(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";require("./sidebar/sidebar");require("./icon/svg-loader");require("simplebar");require("./form/form-input");require("./global/color-theme-toggle");require("./global/smooth-scroll");require("./global/sliders");require("./global/progressBars");require("./global/hexagons");require("./global/avatar-progressbar");require("./global/popups");require("./global/dropdowns");require("./global/tab");require("./global/tooltips");require("./global/accordions");require("./global/forum");require("./global/user-delete");require("./global/vk-el-menu-mobile");require("./global/search-mobile");require("./component-dom/search/search-form");require("./component-dom/header/header-notifications");require("./component-dom/comments/comment-list");require("./component-dom/posts/post-preview-list");require("./component-dom/members/members-list");require("./component-dom/groups/groups-list");require("./component-dom/groups/group-members-list");require("./component-dom/members/profile-header-actions");require("./component-dom/groups/group-header-actions");require("./component-dom/activity/list-activities");require("./component-dom/media/photo-list");require("./component-dom/media/video-list");require("./component-dom/widget/widget-photos");require("./component-dom/settings/settings-profile");require("./component-dom/settings/settings-social");require("./component-dom/settings/settings-stream");require("./component-dom/settings/settings-notifications");require("./component-dom/settings/settings-messages");require("./component-dom/settings/settings-friend-requests");require("./component-dom/settings/settings-account-info");require("./component-dom/settings/settings-password");require("./component-dom/settings/settings-email-settings");require("./component-dom/settings/settings-manage-groups");require("./component-dom/settings/settings-send-group-invitations");require("./component-dom/settings/settings-received-group-invitations");require("./component-dom/settings/settings-group-membership-requests");require("./global/page-loader");

},{"./component-dom/activity/list-activities":2,"./component-dom/comments/comment-list":3,"./component-dom/groups/group-header-actions":4,"./component-dom/groups/group-members-list":5,"./component-dom/groups/groups-list":6,"./component-dom/header/header-notifications":7,"./component-dom/media/photo-list":8,"./component-dom/media/video-list":9,"./component-dom/members/members-list":10,"./component-dom/members/profile-header-actions":11,"./component-dom/posts/post-preview-list":12,"./component-dom/search/search-form":13,"./component-dom/settings/settings-account-info":14,"./component-dom/settings/settings-email-settings":15,"./component-dom/settings/settings-friend-requests":16,"./component-dom/settings/settings-group-membership-requests":17,"./component-dom/settings/settings-manage-groups":18,"./component-dom/settings/settings-messages":19,"./component-dom/settings/settings-notifications":20,"./component-dom/settings/settings-password":21,"./component-dom/settings/settings-profile":22,"./component-dom/settings/settings-received-group-invitations":23,"./component-dom/settings/settings-send-group-invitations":24,"./component-dom/settings/settings-social":25,"./component-dom/settings/settings-stream":26,"./component-dom/widget/widget-photos":27,"./form/form-input":323,"./global/accordions":324,"./global/avatar-progressbar":325,"./global/color-theme-toggle":326,"./global/dropdowns":327,"./global/forum":328,"./global/hexagons":329,"./global/page-loader":330,"./global/popups":331,"./global/progressBars":332,"./global/search-mobile":333,"./global/sliders":334,"./global/smooth-scroll":335,"./global/tab":336,"./global/tooltips":337,"./global/user-delete":338,"./global/vk-el-menu-mobile":339,"./icon/svg-loader":340,"./sidebar/sidebar":354,"simplebar":389}],2:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _ActivityFilterableList=_interopRequireDefault(require("../../component/activity/ActivityFilterableList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var activityFilterableListElement=document.querySelector('#activity-filterable-list');if(activityFilterableListElement){var userID=Number.parseInt(activityFilterableListElement.getAttribute('data-userid'),10)||false,groupID=Number.parseInt(activityFilterableListElement.getAttribute('data-groupid'),10)||false,activityID=Number.parseInt(activityFilterableListElement.getAttribute('data-activityid'),10)||false,noFilter=activityFilterableListElement.getAttribute('data-nofilter')===''||false,order='DESC';_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_ActivityFilterableList.default,{userID:userID,groupID:groupID,activityID:activityID,perPage:5,order:order,noFilter:noFilter}),activityFilterableListElement);}

},{"../../component/activity/ActivityFilterableList":31,"react":380,"react-dom":374}],3:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _OpenPostFooter=_interopRequireDefault(require("../../component/post/OpenPostFooter"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var commentListElement=document.querySelector('#comment-list');if(commentListElement){var postID=Number.parseInt(commentListElement.getAttribute('data-postid'),10),postType=commentListElement.getAttribute('data-posttype')||false,order='DESC';_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_OpenPostFooter.default,{postID:postID,order:order,postType:postType}),commentListElement);}

},{"../../component/post/OpenPostFooter":231,"react":380,"react-dom":374}],4:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _GroupHeaderActions=_interopRequireDefault(require("../../component/profile/GroupHeaderActions"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var groupHeaderActionsElement=document.querySelector('#group-header-actions');if(groupHeaderActionsElement){var groupID=Number.parseInt(groupHeaderActionsElement.getAttribute('data-groupid'),10)||false;_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_GroupHeaderActions.default,{groupID:groupID}),groupHeaderActionsElement);}

},{"../../component/profile/GroupHeaderActions":243,"react":380,"react-dom":374}],5:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _GroupMemberFilterableList=_interopRequireDefault(require("../../component/filter/GroupMemberFilterableList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var groupMemberFilterableListElement=document.querySelector('#group-members-filterable-list');if(groupMemberFilterableListElement){var themeColor=groupMemberFilterableListElement.getAttribute('data-themecolor')||false,groupID=Number.parseInt(groupMemberFilterableListElement.getAttribute('data-groupid'),10)||false,searchTerm=groupMemberFilterableListElement.getAttribute('data-searchterm')||false,gridType=groupMemberFilterableListElement.getAttribute('data-grid-type')||false;_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_GroupMemberFilterableList.default,{itemsPerPage:vikinger_constants.settings.members_list_items_per_page,themeColor:themeColor,groupID:groupID,searchTerm:searchTerm,gridType:gridType}),groupMemberFilterableListElement);}

},{"../../component/filter/GroupMemberFilterableList":136,"react":380,"react-dom":374}],6:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _GroupFilterableList=_interopRequireDefault(require("../../component/filter/GroupFilterableList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var groupFilterableListElement=document.querySelector('#group-filterable-list');if(groupFilterableListElement){var themeColor=groupFilterableListElement.getAttribute('data-themecolor')||false,userID=Number.parseInt(groupFilterableListElement.getAttribute('data-userid'),10)||false,searchTerm=groupFilterableListElement.getAttribute('data-searchterm')||false,gridType=groupFilterableListElement.getAttribute('data-grid-type')||false,groupType=groupFilterableListElement.getAttribute('data-group-type')||false;_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_GroupFilterableList.default,{itemsPerPage:vikinger_constants.settings.groups_list_items_per_page,themeColor:themeColor,userID:userID,searchTerm:searchTerm,gridType:gridType,groupType:groupType}),groupFilterableListElement);}

},{"../../component/filter/GroupFilterableList":134,"react":380,"react-dom":374}],7:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _HeaderNotifications=_interopRequireDefault(require("../../component/header/HeaderNotifications"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var headerNotificationsElement=document.querySelector('#header-notifications');if(headerNotificationsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_HeaderNotifications.default,null),headerNotificationsElement);}

},{"../../component/header/HeaderNotifications":171,"react":380,"react-dom":374}],8:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _ActivityPhotoList=_interopRequireDefault(require("../../component/activity/activity-media/activity-media-photo/ActivityPhotoList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var activityPhotoListElement=document.querySelector('#activity-photo-list');if(activityPhotoListElement){var userID=Number.parseInt(activityPhotoListElement.getAttribute('data-userid'),10)||false,groupID=Number.parseInt(activityPhotoListElement.getAttribute('data-groupid'),10)||false,order='DESC';_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_ActivityPhotoList.default,{userID:userID,groupID:groupID,perPage:24,order:order}),activityPhotoListElement);}

},{"../../component/activity/activity-media/activity-media-photo/ActivityPhotoList":38,"react":380,"react-dom":374}],9:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _ActivityVideoList=_interopRequireDefault(require("../../component/activity/activity-media/activity-media-video/ActivityVideoList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var activityVideoListElement=document.querySelector('#activity-video-list');if(activityVideoListElement){var userID=Number.parseInt(activityVideoListElement.getAttribute('data-userid'),10)||false,groupID=Number.parseInt(activityVideoListElement.getAttribute('data-groupid'),10)||false,order='DESC';_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_ActivityVideoList.default,{userID:userID,groupID:groupID,perPage:24,order:order}),activityVideoListElement);}

},{"../../component/activity/activity-media/activity-media-video/ActivityVideoList":41,"react":380,"react-dom":374}],10:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _MemberFilterableList=_interopRequireDefault(require("../../component/filter/MemberFilterableList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var memberFilterableListElement=document.querySelector('#member-filterable-list');if(memberFilterableListElement){var themeColor=memberFilterableListElement.getAttribute('data-themecolor')||false,userID=Number.parseInt(memberFilterableListElement.getAttribute('data-userid'),10)||false,groupID=Number.parseInt(memberFilterableListElement.getAttribute('data-groupid'),10)||false,searchTerm=memberFilterableListElement.getAttribute('data-searchterm')||false,gridType=memberFilterableListElement.getAttribute('data-grid-type')||false,memberInclude=memberFilterableListElement.getAttribute('data-member-include')||false,memberType=memberFilterableListElement.getAttribute('data-member-type')||false;_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_MemberFilterableList.default,{itemsPerPage:vikinger_constants.settings.members_list_items_per_page,themeColor:themeColor,userID:userID,groupID:groupID,searchTerm:searchTerm,gridType:gridType,memberInclude:memberInclude,memberType:memberType}),memberFilterableListElement);}

},{"../../component/filter/MemberFilterableList":139,"react":380,"react-dom":374}],11:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _ProfileHeaderActions=_interopRequireDefault(require("../../component/profile/ProfileHeaderActions"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var profileHeaderActionsElement=document.querySelector('#profile-header-actions');if(profileHeaderActionsElement){var userID=Number.parseInt(profileHeaderActionsElement.getAttribute('data-userid'),10)||false;_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_ProfileHeaderActions.default,{userID:userID}),profileHeaderActionsElement);}

},{"../../component/profile/ProfileHeaderActions":244,"react":380,"react-dom":374}],12:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _PostFilterableList=_interopRequireDefault(require("../../component/filter/PostFilterableList"));var _core=require("../../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}(0,_core.querySelector)('.post-preview-filterable-list',function(postFilterableListElements){var _iterator=_createForOfIteratorHelper(postFilterableListElements),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var postFilterableListElement=_step.value;var user_id=Number.parseInt(postFilterableListElement.getAttribute('data-userid'),10)||false,category=postFilterableListElement.getAttribute('data-category')||false,categoryExclude=postFilterableListElement.getAttribute('data-category-exclude')||false,postExclude=postFilterableListElement.getAttribute('data-post-exclude')||false,postTypes=postFilterableListElement.getAttribute('data-posttypes')||false,tag=postFilterableListElement.getAttribute('data-tag')||false,year=Number.parseInt(postFilterableListElement.getAttribute('data-year'),10)||false,month=Number.parseInt(postFilterableListElement.getAttribute('data-month'),10)||false,day=Number.parseInt(postFilterableListElement.getAttribute('data-day'),10)||false,searchTerm=postFilterableListElement.getAttribute('data-searchterm')||false,gridType=postFilterableListElement.getAttribute('data-grid-type')||false;_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_PostFilterableList.default,{itemsPerPage:vikinger_constants.settings.posts_per_page,user_id:user_id,category:category,categoryExclude:categoryExclude,postExclude:postExclude,postTypes:postTypes,tag:tag,year:year,month:month,day:day,searchTerm:searchTerm,gridType:gridType}),postFilterableListElement);}}catch(err){_iterator.e(err);}finally{_iterator.f();}});// const postFilterableListElement = document.querySelector('.post-preview-filterable-list');
// if (postFilterableListElement) {
//   const user_id = Number.parseInt(postFilterableListElement.getAttribute('data-userid'), 10) || false,
//         category = postFilterableListElement.getAttribute('data-category') || false,
//         postTypes = postFilterableListElement.getAttribute('data-posttypes') || false,
//         tag = postFilterableListElement.getAttribute('data-tag') || false,
//         year = Number.parseInt(postFilterableListElement.getAttribute('data-year'), 10) || false,
//         month = Number.parseInt(postFilterableListElement.getAttribute('data-month'), 10) || false,
//         day = Number.parseInt(postFilterableListElement.getAttribute('data-day'), 10) || false,
//         searchTerm = postFilterableListElement.getAttribute('data-searchterm') || false,
//         gridType = postFilterableListElement.getAttribute('data-grid-type') || false;
//   ReactDOM.render(
//     <PostFilterableList itemsPerPage={vikinger_constants.settings.posts_per_page}
//                         user_id={user_id}
//                         category={category}
//                         postTypes={postTypes}
//                         tag={tag}
//                         year={year}
//                         month={month}
//                         day={day}
//                         searchTerm={searchTerm}
//                         gridType={gridType}
//     />,
//     postFilterableListElement
//   );
// }

},{"../../component/filter/PostFilterableList":141,"../../utils/core":355,"react":380,"react-dom":374}],13:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _SearchForm=_interopRequireDefault(require("../../component/search/SearchForm"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var searchFormElement=document.querySelector('#vk-search-form');if(searchFormElement){var userID=Number.parseInt(searchFormElement.getAttribute('data-userid'),10)||false,categoryExclude=searchFormElement.getAttribute('data-category-exclude')||false,postExclude=searchFormElement.getAttribute('data-post-exclude')||false;_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_SearchForm.default,{userID:userID,categoryExclude:categoryExclude,postExclude:postExclude}),searchFormElement);}

},{"../../component/search/SearchForm":255,"react":380,"react-dom":374}],14:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _AccountInfoSettingsScreen=_interopRequireDefault(require("../../component/settings/AccountInfoSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var accountInfoSettingsElement=document.querySelector('#account-info-settings-screen');if(accountInfoSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_AccountInfoSettingsScreen.default,null),accountInfoSettingsElement);}

},{"../../component/settings/AccountInfoSettingsScreen":258,"react":380,"react-dom":374}],15:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _EmailSettingsScreen=_interopRequireDefault(require("../../component/settings/EmailSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var emailSettingsElement=document.querySelector('#email-settings-screen');if(emailSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_EmailSettingsScreen.default,null),emailSettingsElement);}

},{"../../component/settings/EmailSettingsScreen":259,"react":380,"react-dom":374}],16:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _FriendRequestsSettingsScreen=_interopRequireDefault(require("../../component/settings/FriendRequestsSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var friendRequestsSettingsElement=document.querySelector('#friend-requests-settings-screen');if(friendRequestsSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_FriendRequestsSettingsScreen.default,null),friendRequestsSettingsElement);}

},{"../../component/settings/FriendRequestsSettingsScreen":260,"react":380,"react-dom":374}],17:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _GroupMembershipRequestsSettingsScreen=_interopRequireDefault(require("../../component/settings/GroupMembershipRequestsSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var groupMembershipRequestsSettingsElement=document.querySelector('#group-membership-requests-settings-screen');if(groupMembershipRequestsSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_GroupMembershipRequestsSettingsScreen.default,null),groupMembershipRequestsSettingsElement);}

},{"../../component/settings/GroupMembershipRequestsSettingsScreen":261,"react":380,"react-dom":374}],18:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _ManageGroupsSettingsScreen=_interopRequireDefault(require("../../component/settings/ManageGroupsSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var manageGroupsSettingsElement=document.querySelector('#manage-groups-settings-screen');if(manageGroupsSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_ManageGroupsSettingsScreen.default,null),manageGroupsSettingsElement);}

},{"../../component/settings/ManageGroupsSettingsScreen":262,"react":380,"react-dom":374}],19:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _MessagesSettingsScreen=_interopRequireDefault(require("../../component/settings/MessagesSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var messagesSettingsElement=document.querySelector('#messages-settings-screen');if(messagesSettingsElement){var userID=Number.parseInt(messagesSettingsElement.getAttribute('data-userid'),10)||false,messageID=Number.parseInt(messagesSettingsElement.getAttribute('data-messageid'),10)||false;_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_MessagesSettingsScreen.default,{userID:userID,messageID:messageID}),messagesSettingsElement);}

},{"../../component/settings/MessagesSettingsScreen":263,"react":380,"react-dom":374}],20:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _NotificationsSettingsScreen=_interopRequireDefault(require("../../component/settings/NotificationsSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var notificationsSettingsElement=document.querySelector('#notifications-settings-screen');if(notificationsSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_NotificationsSettingsScreen.default,null),notificationsSettingsElement);}

},{"../../component/settings/NotificationsSettingsScreen":264,"react":380,"react-dom":374}],21:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _PasswordSettingsScreen=_interopRequireDefault(require("../../component/settings/PasswordSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var passwordSettingsElement=document.querySelector('#password-settings-screen');if(passwordSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_PasswordSettingsScreen.default,null),passwordSettingsElement);}

},{"../../component/settings/PasswordSettingsScreen":265,"react":380,"react-dom":374}],22:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _ProfileSettingsScreen=_interopRequireDefault(require("../../component/settings/ProfileSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var profileSettingsElement=document.querySelector('#profile-settings-screen');if(profileSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_ProfileSettingsScreen.default,null),profileSettingsElement);}

},{"../../component/settings/ProfileSettingsScreen":266,"react":380,"react-dom":374}],23:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _ReceivedGroupInvitationsSettingsScreen=_interopRequireDefault(require("../../component/settings/ReceivedGroupInvitationsSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var receivedGroupInvitationsSettingsElement=document.querySelector('#received-group-invitations-settings-screen');if(receivedGroupInvitationsSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_ReceivedGroupInvitationsSettingsScreen.default,null),receivedGroupInvitationsSettingsElement);}

},{"../../component/settings/ReceivedGroupInvitationsSettingsScreen":267,"react":380,"react-dom":374}],24:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _SendGroupInvitationsSettingsScreen=_interopRequireDefault(require("../../component/settings/SendGroupInvitationsSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var sendGroupInvitationsSettingsElement=document.querySelector('#send-group-invitations-settings-screen');if(sendGroupInvitationsSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_SendGroupInvitationsSettingsScreen.default,null),sendGroupInvitationsSettingsElement);}

},{"../../component/settings/SendGroupInvitationsSettingsScreen":268,"react":380,"react-dom":374}],25:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _SocialSettingsScreen=_interopRequireDefault(require("../../component/settings/SocialSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var socialSettingsElement=document.querySelector('#social-settings-screen');if(socialSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_SocialSettingsScreen.default,null),socialSettingsElement);}

},{"../../component/settings/SocialSettingsScreen":270,"react":380,"react-dom":374}],26:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _StreamSettingsScreen=_interopRequireDefault(require("../../component/settings/StreamSettingsScreen"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var streamSettingsElement=document.querySelector('#stream-settings-screen');if(streamSettingsElement){_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_StreamSettingsScreen.default,null),streamSettingsElement);}

},{"../../component/settings/StreamSettingsScreen":271,"react":380,"react-dom":374}],27:[function(require,module,exports){
"use strict";var _react=_interopRequireDefault(require("react"));var _reactDom=_interopRequireDefault(require("react-dom"));var _WidgetPhotos=_interopRequireDefault(require("../../component/widget/WidgetPhotos"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var photosWidgetElement=document.querySelector('#photos-widget');if(photosWidgetElement){var userID=Number.parseInt(photosWidgetElement.getAttribute('data-userid'),10)||false,groupID=Number.parseInt(photosWidgetElement.getAttribute('data-groupid'),10)||false;_reactDom.default.render(/*#__PURE__*/_react.default.createElement(_WidgetPhotos.default,{userID:userID,groupID:groupID}),photosWidgetElement);}

},{"../../component/widget/WidgetPhotos":322,"react":380,"react-dom":374}],28:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActionBox;var _react=_interopRequireWildcard(require("react"));var _HexagonBorder_100_=_interopRequireDefault(require("../hexagon/hexagon-border/HexagonBorder_100_110"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _GroupManagePopup=_interopRequireDefault(require("../group/GroupManagePopup"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ActionBox(props){var groupManagePopupTriggerRef=(0,_react.useRef)(null);return/*#__PURE__*/_react.default.createElement("div",{className:"create-entity-box"},/*#__PURE__*/_react.default.createElement("div",{className:"create-entity-box-cover"}),/*#__PURE__*/_react.default.createElement("div",{className:"create-entity-box-avatar"},/*#__PURE__*/_react.default.createElement(_HexagonBorder_100_.default,null),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"group",modifiers:"create-entity-box-avatar-icon"})),/*#__PURE__*/_react.default.createElement("div",{className:"create-entity-box-info"},/*#__PURE__*/_react.default.createElement("p",{className:"create-entity-box-title"},props.title),/*#__PURE__*/_react.default.createElement("p",{className:"create-entity-box-text"},props.text),/*#__PURE__*/_react.default.createElement("p",{ref:groupManagePopupTriggerRef,className:"button secondary full"},props.actionText)),/*#__PURE__*/_react.default.createElement(_GroupManagePopup.default,{groupManagePopupTriggerRef:groupManagePopupTriggerRef,loggedUser:props.loggedUser,groupPreviewDescription:props.text}));}

},{"../group/GroupManagePopup":165,"../hexagon/hexagon-border/HexagonBorder_100_110":182,"../icon/IconSVG":201,"react":380}],29:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=Activity;var _react=_interopRequireWildcard(require("react"));var _TagSticker=_interopRequireDefault(require("../tag/TagSticker"));var _ActivityFormSimple=_interopRequireDefault(require("./activity-form/ActivityFormSimple"));var _ActivitySettings=_interopRequireDefault(require("./ActivitySettings"));var _PostFooter=_interopRequireDefault(require("../post/PostFooter"));var _ActivityCommentList=_interopRequireDefault(require("../comment/ActivityCommentList"));var activityRouter=_interopRequireWildcard(require("../../router/activity/activity-router"));var _activityTemplate=require("../utils/activity/activity-template");var _activityFilter=require("../utils/activity/activity-filter");var _activityPermission=require("../utils/activity/activity-permission");var _activityData=require("../utils/activity/activity-data");var _reaction=require("../utils/reaction");var _ads=require("../utils/ads");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function Activity(props){var _useState=(0,_react.useState)(props.data.favorite),_useState2=_slicedToArray(_useState,2),favorite=_useState2[0],setFavorite=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),showMore=_useState4[0],setShowMore=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),showingMore=_useState6[0],setShowingMore=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),editingActivity=_useState8[0],setEditingActivity=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),processingDelete=_useState10[0],setProcessingDelete=_useState10[1];var _useState11=(0,_react.useState)(false),_useState12=_slicedToArray(_useState11,2),processingFavorite=_useState12[0],setProcessingFavorite=_useState12[1];var _useState13=(0,_react.useState)(false),_useState14=_slicedToArray(_useState13,2),processingPinned=_useState14[0],setProcessingPinned=_useState14[1];var activityReactionableProps={entityData:{activity_id:props.data.id},user:props.user,reactions:props.reactions,reactionData:props.data.reactions,onUserReactionUpdate:function onUserReactionUpdate(newReactionData){var newActivityData=(0,_activityData.updateActivityReactions)(props.data,newReactionData);props.onActivityUpdate(newActivityData);}};var activityReactionable=(0,_reaction.ActivityReactionable)(activityReactionableProps);var adsForContentActivityPlacement=(0,_ads.getAdsForPlacementIndex)(props.activityAds,'bp_activity_entry_content',props.activityIndex);var showMoreSettingIsEnabled=vikinger_constants.settings.activity_show_more_status==='enabled';var widgetBoxStatusRef=(0,_react.useRef)(null);var showMoreActivity=function showMoreActivity(){setShowingMore(true);widgetBoxStatusRef.current.classList.remove('widget-box-status-limited');widgetBoxStatusRef.current.style.maxHeight='100%';};var showLessActivity=function showLessActivity(){setShowingMore(false);widgetBoxStatusRef.current.classList.add('widget-box-status-limited');widgetBoxStatusRef.current.style.maxHeight="".concat(vikinger_constants.settings.activity_show_more_height,"px");};var attachShowMoreElement=function attachShowMoreElement(){setShowMore(true);showLessActivity();};(0,_react.useEffect)(function(){if(showMoreSettingIsEnabled&&widgetBoxStatusRef.current&&widgetBoxStatusRef.current.offsetHeight>vikinger_constants.settings.activity_show_more_height){attachShowMoreElement();}},[]);var deleteActivity=function deleteActivity(){if(processingDelete){return;}setProcessingDelete(true);// console.log('ACTIVITY - DELETE ACTIVITY ID: ', props.data.id, 'FROM USER: ', props.user.id);
props.deleteActivity(props.data.id,function(response){setProcessingDelete(false);});};var pinActivity=function pinActivity(){if(processingPinned){return;}setProcessingPinned(true);// console.log('ACTIVITY - PIN ACTIVITY ID: ', props.data.id, 'FROM USER: ', props.user.id);
props.pinActivity(props.data.id,function(){setProcessingPinned(false);});};var unpinActivity=function unpinActivity(){if(processingPinned){return;}setProcessingPinned(true);// console.log('ACTIVITY - UNPIN ACTIVITY ID: ', props.data.id, 'FROM USER: ', props.user.id);
props.unpinActivity(function(){setProcessingPinned(false);});};var addFavorite=function addFavorite(){if(processingFavorite){return;}// console.log('ACTIVITY - ADD FAVORITE ACTIVITY ID: ', props.data.id, 'FROM USER: ', props.user.id);
setProcessingFavorite(true);var config={userID:props.user.id,activityID:props.data.id};activityRouter.addActivityFavorite(config,function(response){// console.log('ACTIVITY - FAVORITE ADD RESPONSE: ', response);
if(response){setFavorite(true);}setProcessingFavorite(false);});};var removeFavorite=function removeFavorite(){if(processingFavorite){return;}// console.log('ACTIVITY - REMOVE FAVORITE ACTIVITY ID: ', props.data.id, 'FROM USER: ', props.user.id);
setProcessingFavorite(true);var config={userID:props.user.id,activityID:props.data.id};activityRouter.removeActivityFavorite(config,function(response){// console.log('ACTIVITY - FAVORITE REMOVE RESPONSE: ', response);
if(response){setFavorite(false);}setProcessingFavorite(false);});};var startEditingActivity=function startEditingActivity(){setEditingActivity(true);};var stopEditingActivity=function stopEditingActivity(){setEditingActivity(false);};var updateActivity=function updateActivity(text){var activityContent=(0,_activityFilter.filterActivityContentForSave)(text);var activityData={id:props.data.id,component:props.data.component,type:props.data.type,user_id:props.data.author.id,content:activityContent,recorded_time:props.data.date,item_id:props.data.item_id,secondary_item_id:props.data.secondary_item_id,hidden:props.data.hide_sitewide===1};props.updateActivity(activityData,stopEditingActivity);};var ActivityEditForm=/*#__PURE__*/_react.default.createElement(_ActivityFormSimple.default,{text:props.data.content,user:props.user,focus:true,onSubmit:updateActivity,onDiscard:stopEditingActivity});var ActivityTemplate=(0,_activityTemplate.getActivityTemplate)(props.data.type)({data:props.data,user:props.user,reactions:props.reactions,onPlay:props.onPlay,widgetBoxStatusRef:widgetBoxStatusRef,onActivityUpdate:props.onActivityUpdate,editForm:editingActivity?ActivityEditForm:false});var activityIsPinned=props.pinnedActivityID&&props.pinnedActivityID===props.data.id;var userActivityPermissions=(0,_activityPermission.getUserActivityPermissions)(props.user,props.data,props.profileUserID);return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box no-padding ".concat(processingDelete?'widget-box-deleted':'')},/*#__PURE__*/_react.default.createElement("div",{className:"tag-stickers"},favorite&&/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:"favorite",iconModifiers:"tertiary",modifiers:"small animate-slide-down"}),props.data.hide_sitewide===1&&/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:"private",iconModifiers:"secondary",modifiers:"small animate-slide-down"}),activityIsPinned&&/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:"pinned",iconModifiers:"primary",modifiers:"small animate-slide-down"})),props.user&&userActivityPermissions.settings&&!editingActivity&&/*#__PURE__*/_react.default.createElement(_ActivitySettings.default,{userActivityPermissions:userActivityPermissions,favorite:favorite,pinned:activityIsPinned,addFavorite:addFavorite,removeFavorite:removeFavorite,processingFavorite:processingFavorite,pinActivity:pinActivity,unpinActivity:unpinActivity,processingPinned:processingPinned,startEditingActivity:startEditingActivity,deleteActivity:deleteActivity,processingDelete:processingDelete}),ActivityTemplate,showMoreSettingIsEnabled&&showMore&&!showingMore&&/*#__PURE__*/_react.default.createElement("p",{className:"button-show-more",onClick:showMoreActivity},vikinger_translation.show_more),adsForContentActivityPlacement&&adsForContentActivityPlacement,/*#__PURE__*/_react.default.createElement(_PostFooter.default,{commentCount:props.data.comment_count,shareType:"activity",shareData:props.data,shareCount:Number.parseInt(props.data.meta.share_count,10)||0,onShare:props.onShare,user:props.user,reactions:props.reactions,reactionData:props.data.reactions,userReaction:activityReactionable.getUserReaction(),createUserReaction:activityReactionable.createUserReaction,deleteUserReaction:activityReactionable.deleteUserReaction,postType:"activity",onPlay:props.onPlay},function(updateCommentCount){return/*#__PURE__*/_react.default.createElement(_ActivityCommentList.default,{activityID:props.data.id,parentData:props.data,comments:props.data.comments,updateCommentCount:updateCommentCount,user:props.user,reactions:props.reactions,perPage:2,order:"DESC",replyType:"quick",formPosition:"top",activityAds:props.activityAds});}));}

},{"../../router/activity/activity-router":341,"../comment/ActivityCommentList":119,"../post/PostFooter":232,"../tag/TagSticker":276,"../utils/activity/activity-data":299,"../utils/activity/activity-filter":300,"../utils/activity/activity-permission":301,"../utils/activity/activity-template":302,"../utils/ads":303,"../utils/reaction":315,"./ActivitySettings":33,"./activity-form/ActivityFormSimple":35,"react":380}],30:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityFilterBar;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ActivityFilterBar(props){var _useState=(0,_react.useState)('all'),_useState2=_slicedToArray(_useState,2),action=_useState2[0],setAction=_useState2[1];var _useState3=(0,_react.useState)({scope:false,filter:{}}),_useState4=_slicedToArray(_useState3,2),filters=_useState4[0],setFilters=_useState4[1];var mounting=(0,_react.useRef)(true);(0,_react.useEffect)(function(){if(!mounting.current){props.onFiltersChange(filters);}else{mounting.current=false;}},[filters]);var setScopeAll=function setScopeAll(){changeScope(false);};var setScopeMentions=function setScopeMentions(){changeScope('mentions');};var setScopeFavorites=function setScopeFavorites(){changeScope('favorites');};var setScopeFriends=function setScopeFriends(){changeScope('friends');};var setScopeGroups=function setScopeGroups(){changeScope('groups');};var changeScope=function changeScope(newScope){// if scope didn't change, return
if(newScope===filters.scope){return;}var newFilters=_objectSpread(_objectSpread({},filters),{},{scope:newScope});setFilters(newFilters);};var handleScopeChange=function handleScopeChange(e){var value=e.target.value==='false'?false:e.target.value;changeScope(value);};var handleActionChange=function handleActionChange(e){var actionValue=e.target.value,filter=actionValue==='all'?{}:{action:actionValue};setAction(actionValue);setFilters(_objectSpread(_objectSpread({},filters),{},{filter:filter}));};return/*#__PURE__*/_react.default.createElement("div",{className:"quick-filters"},/*#__PURE__*/_react.default.createElement("div",{className:"quick-filters-tabs"},/*#__PURE__*/_react.default.createElement("p",{className:"quick-filters-tab ".concat(!filters.scope?'active':''),onClick:setScopeAll},vikinger_translation.all_updates),!props.hideSecondaryFilters&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("p",{className:"quick-filters-tab ".concat(filters.scope==='mentions'?'active':''),onClick:setScopeMentions},vikinger_translation.mentions),/*#__PURE__*/_react.default.createElement("p",{className:"quick-filters-tab ".concat(filters.scope==='favorites'?'active':''),onClick:setScopeFavorites},vikinger_translation.favorites),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("p",{className:"quick-filters-tab ".concat(filters.scope==='friends'?'active':''),onClick:setScopeFriends},vikinger_translation.friends),vikinger_constants.plugin_active.buddypress_groups&&!props.hideGroupsFilter&&/*#__PURE__*/_react.default.createElement("p",{className:"quick-filters-tab ".concat(filters.scope==='groups'?'active':''),onClick:setScopeGroups},vikinger_translation.groups))),/*#__PURE__*/_react.default.createElement("form",{className:"quick-filters-form quick-filters-form-mobile"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"activity-scope"},vikinger_translation.scope),/*#__PURE__*/_react.default.createElement("select",{id:"activity-scope",name:"scope",value:filters.scope,onChange:handleScopeChange},/*#__PURE__*/_react.default.createElement("option",{value:"false"},vikinger_translation.all_updates),!props.hideSecondaryFilters&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("option",{value:"mentions"},vikinger_translation.mentions),/*#__PURE__*/_react.default.createElement("option",{value:"favorites"},vikinger_translation.favorites),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("option",{value:"friends"},vikinger_translation.friends),vikinger_constants.plugin_active.buddypress_groups&&!props.hideGroupsFilter&&/*#__PURE__*/_react.default.createElement("option",{value:"groups"},vikinger_translation.groups))),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}))))),/*#__PURE__*/_react.default.createElement("form",{className:"quick-filters-form"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"activity-show"},vikinger_translation.show),/*#__PURE__*/_react.default.createElement("select",{id:"activity-show",name:"action",value:action,onChange:handleActionChange},/*#__PURE__*/_react.default.createElement("option",{value:"all"},vikinger_translation.everything),/*#__PURE__*/_react.default.createElement("option",{value:"activity_update"},vikinger_translation.status),/*#__PURE__*/_react.default.createElement("option",{value:"activity_share,post_share"},vikinger_translation.shares),vikinger_constants.plugin_active.vkmedia&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_constants.settings.media_photo_upload_enabled&&vikinger_constants.settings.media_video_upload_enabled&&/*#__PURE__*/_react.default.createElement("option",{value:"activity_media_update,activity_media_upload,activity_video_update,activity_video_upload"},vikinger_translation.media),vikinger_constants.settings.media_photo_upload_enabled&&/*#__PURE__*/_react.default.createElement("option",{value:"activity_media_update,activity_media_upload"},vikinger_translation.photos),vikinger_constants.settings.media_video_upload_enabled&&/*#__PURE__*/_react.default.createElement("option",{value:"activity_video_update,activity_video_upload"},vikinger_translation.videos)),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("option",{value:"friendship_created"},vikinger_translation.friendships),vikinger_constants.plugin_active.buddypress_groups&&/*#__PURE__*/_react.default.createElement("option",{value:"created_group"},vikinger_translation.new_groups),vikinger_constants.plugin_active.bbpress&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("option",{value:"bbp_topic_create"},vikinger_translation.forum_topics),/*#__PURE__*/_react.default.createElement("option",{value:"bbp_reply_create"},vikinger_translation.forum_replies))),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}))))));}

},{"../icon/IconSVG":201,"react":380}],31:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityFilterableList;var _react=_interopRequireWildcard(require("react"));var _Paginator=_interopRequireDefault(require("../utils/Paginator"));var _ActivityForm=_interopRequireDefault(require("./activity-form/ActivityForm"));var _ActivityFilterBar=_interopRequireDefault(require("./ActivityFilterBar"));var _ActivityList=_interopRequireDefault(require("./ActivityList"));var _Notification=_interopRequireDefault(require("../notification/Notification"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _ScrollPager=_interopRequireDefault(require("../pager/ScrollPager"));var _core=require("../../utils/core");var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var activityRouter=_interopRequireWildcard(require("../../router/activity/activity-router"));var reactionRouter=_interopRequireWildcard(require("../../router/reaction/reaction-router"));var adsRouter=_interopRequireWildcard(require("../../router/ads/ads-router"));var _activityFilter=require("../utils/activity/activity-filter");var _activityData=require("../utils/activity/activity-data");var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ActivityFilterableList(props){var _useState=(0,_react.useState)({items:[],initialFetch:true,moreItems:true}),_useState2=_slicedToArray(_useState,2),activities=_useState2[0],setActivities=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),pinnedActivityID=_useState4[0],setPinnedActivityID=_useState4[1];var _useState5=(0,_react.useState)([]),_useState6=_slicedToArray(_useState5,2),reactions=_useState6[0],setReactions=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),fetchingUser=_useState8[0],setFetchingUser=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),loggedUser=_useState10[0],setLoggedUser=_useState10[1];var _useState11=(0,_react.useState)(false),_useState12=_slicedToArray(_useState11,2),activityAds=_useState12[0],setActivityAds=_useState12[1];var _useState13=(0,_react.useState)(vikinger_constants.plugin_active['advanced-ads-pro']),_useState14=_slicedToArray(_useState13,2),loadingActivityAds=_useState14[0],setLoadingActivityAds=_useState14[1];var currentPage=(0,_react.useRef)(1);var createCount=(0,_react.useRef)(0);var deleteCount=(0,_react.useRef)(0);var preloadedActivities=(0,_react.useRef)(null);var filters=(0,_react.useRef)({per_page:props.perPage,sort:props.order,show_hidden:props.groupID?true:false,scope:false,filter:{}});(0,_react.useEffect)(function(){if(props.activityID){filters.current.in=props.activityID;}if(!props.noFilter){filters.current.filter.object=['activity','profile','gamipress'];filters.current.filter.action=['activity_update','activity_share','post_share','new_avatar','new_member'];// add group activity object and actions if the BuddyPress groups component is active
if(vikinger_constants.plugin_active.buddypress_groups){filters.current.filter.object.push('groups');filters.current.filter.action.push('created_group','joined_group');}// add friend activity object and actions if the BuddyPress friends component is active
if(vikinger_constants.plugin_active.buddypress_friends){filters.current.filter.object.push('friends');filters.current.filter.action.push('friendship_created');}// add vkmedia activity actions if the plugin is active
if(vikinger_constants.plugin_active.vkmedia){filters.current.filter.action.push('activity_media_update','activity_media_upload');filters.current.filter.action.push('activity_video_update','activity_video_upload');}// add bbpress activity object and actions if the plugin is active
if(vikinger_constants.plugin_active.bbpress){filters.current.filter.object.push('bbpress');filters.current.filter.action.push('bbp_topic_create','bbp_reply_create');}}},[]);var onFiltersChange=function onFiltersChange(newFilters){// console.log('ACTIVITY FILTERABLE LIST - ON FILTERS CHANGE: ', newFilters);
(0,_core.deepExtend)(filters.current,newFilters);if(typeof filters.current.filter.action==='undefined'){filters.current.filter.action=['activity_update','activity_share','post_share','new_avatar','new_member'];// add group activity actions if the BuddyPress groups component is active
if(vikinger_constants.plugin_active.buddypress_groups){filters.current.filter.action.push('created_group','joined_group');}// add friend activity actions if the BuddyPress friends component is active
if(vikinger_constants.plugin_active.buddypress_friends){filters.current.filter.action.push('friendship_created');}// add vkmedia activity actions if the plugin is active
if(vikinger_constants.plugin_active.vkmedia){filters.current.filter.action.push('activity_media_update','activity_media_upload');filters.current.filter.action.push('activity_video_update','activity_video_upload');}// add bbpress activity actions if the plugin is active
if(vikinger_constants.plugin_active.bbpress){filters.current.filter.action.push('bbp_topic_create','bbp_reply_create');}}filters.current.filter.object=['activity','profile','gamipress'];// add group activity object if the BuddyPress groups component is active
if(vikinger_constants.plugin_active.buddypress_groups){filters.current.filter.object.push('groups');}// add friend activity object if the BuddyPress friends component is active
if(vikinger_constants.plugin_active.buddypress_friends){filters.current.filter.object.push('friends');}// add bbpress activity object if the plugin is active
if(vikinger_constants.plugin_active.bbpress){filters.current.filter.object.push('bbpress');}// console.log('ACTIVITY FILTERABLE LIST - ON FILTERS CHANGE: ', filters.current);
reloadActivities();};var getActivities=function getActivities(callback){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};// get next page to fetch based on create and delete counts
currentPage.current=_Paginator.default.getNextPageToFetch({page:currentPage.current,per_page:props.perPage,createCount:createCount.current,deleteCount:deleteCount.current});// reset counts
createCount.current=0;deleteCount.current=0;var config={page:currentPage.current};(0,_core.deepExtend)(config,filters.current);(0,_core.deepExtend)(config,options);// get activities of this user only
if(props.userID){config.filter.user_id=props.userID;if(currentPage.current===1){config.include_pinned_from=props.userID;}}// get activities of this group only
if(props.groupID){config.filter.primary_id=props.groupID;config.filter.object='groups';}// console.log('ACTIVITY FILTERABLE LIST - ACTIVITY FILTERS: ', config);
activityRouter.getActivities(config,callback);};var reloadActivities=function reloadActivities(){currentPage.current=1;// reset counts
createCount.current=0;deleteCount.current=0;setActivities({items:[],initialFetch:true,moreItems:true});getActivitiesPage();};var preloadActivities=function preloadActivities(options,scope){var preloadedActivities=jQuery.Deferred();getActivities(function(response){// console.log('ACTIVITY FILTERABLE LIST - PRELOADED ACTIVITY DATA: ', response);
// cancel if scope changed
var newScope=filters.current.scope;if(newScope!==scope){preloadedActivities.resolve([],false);return;}currentPage.current+=1;var activitiesWithoutDuplicates=_Paginator.default.removeDuplicates(activities.items,response.activities,'id');preloadedActivities.resolve(activitiesWithoutDuplicates,response.has_more_items);},options);return preloadedActivities.promise();};var getActivitiesPage=function getActivitiesPage(){var callback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(){};var scope=filters.current.scope;// exclude pinned activity if exists
var options=pinnedActivityID?{exclude:pinnedActivityID}:{};if(currentPage.current===1){getActivities(function(response){// console.log('ACTIVITY FILTERABLE LIST - ACTIVITY DATA: ', response);
// cancel if scope changed
var newScope=filters.current.scope;if(newScope!==scope){callback(false);return;}currentPage.current+=1;if(response.activities.length>0&&response.activities[0].pinned){setPinnedActivityID(response.activities[0].id);// exclude pinned activity for next preload
options.exclude=response.activities[0].id;}setActivities(function(previousActivities){var activitiesWithoutDuplicates=_Paginator.default.removeDuplicates(previousActivities.items,response.activities,'id');return{items:previousActivities.items.concat(activitiesWithoutDuplicates),moreItems:response.has_more_items,initialFetch:false};});callback(response.has_more_items);// preload next page activities
preloadedActivities.current=preloadActivities(options,filters.current.scope);},options);}else{// dump preloaded activities and preload next page if has more items
preloadedActivities.current.done(function(activities,hasMoreItems){// console.log('ACTIVITY FILTERABLE LIST - PRELOADED ACTIVITY DATA: ', activities);
setActivities(function(previousActivities){return _objectSpread(_objectSpread({},previousActivities),{},{items:previousActivities.items.concat(activities),moreItems:hasMoreItems});});callback(hasMoreItems);// preload next page if has more items
if(hasMoreItems){// preload next page activities
preloadedActivities.current=preloadActivities(options,filters.current.scope);}});}};var createActivity=function createActivity(data,callback){// console.log('ACTIVITY FILTERABLE LIST - CREATE ACTIVITY WITH DATA: ', data);
var itemID=Number.parseInt(data.postIn,10);// post public by default
var hideSitewide=false;// if posting to a group, get group privacy to set hideSitewide
if(itemID!==0){var _iterator=_createForOfIteratorHelper(loggedUser.groups),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var group=_step.value;// user is a member of the group
if(group.id===itemID){// hide sitewide if not public group
hideSitewide=group.status!=='public';break;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}var uploadable_media=false;if(data.uploadable_media){var component=itemID===0?'member':'group',componentID=component==='member'?loggedUser.id:itemID,files=[];var _iterator2=_createForOfIteratorHelper(data.uploadable_media),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var media=_step2.value;files.push(media.file);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}uploadable_media={files:files,component:{type:component,id:componentID,uploader_id:loggedUser.id}};}var activityType='activity_update';if(uploadable_media){if(data.uploadable_media_type==='image'){activityType='activity_media_update';}else if(data.uploadable_media_type==='video'){activityType='activity_video_update';}}var activityContent=(0,_activityFilter.filterActivityContentForSave)(data.text);var activityData={creation_config:{item_id:itemID,user_id:loggedUser.id,component:itemID===0?'activity':'groups',type:activityType,content:activityContent,hide_sitewide:hideSitewide},attached_media:data.attached_media,uploadable_media:uploadable_media,uploadable_media_type:data.uploadable_media_type};// console.log('ACTIVITY FILTERABLE LIST - CREATE ACTIVITY: ', activityData);
activityRouter.createActivity(activityData,function(response){// console.log('ACTIVITY FILTERABLE LIST - CREATE ACTIVITY RESPONSE: ', response);
// activity created
if(response){onCreatedActivity(response,itemID,callback);}else{callback(response);}});};var onCreatedActivity=function onCreatedActivity(activityID,itemID,callback){createCount.current+=1;var postedInMyProfile=loggedUser.id===props.userID,postedInMyGroup=itemID===props.groupID,postedInNewsfeed=!props.userID;// if activity created and logged user is viewing newsfeed, it's own profile or the group where he is posting
// get created activity for display
if(postedInNewsfeed||postedInMyProfile||postedInMyGroup){// get created activity using current filters, if the created activity returns then prepend it
// otherwise it shouldn't be displayed with current filters
var getCreatedActivityFilters=(0,_core.deepMerge)(filters.current);// limit to created activity id
getCreatedActivityFilters.in=activityID;activityRouter.getActivities(getCreatedActivityFilters,function(createdActivityResponse){// console.log('ACTIVITY FILTERABLE LIST - CREATED ACTIVITY GET: ', createdActivityResponse);
if(createdActivityResponse.activities.length){var createdActivity=createdActivityResponse.activities[0];// add activity to state activities
setActivities(function(previousActivities){var newActivities=previousActivities.items.slice();newActivities.unshift(createdActivity);return _objectSpread(_objectSpread({},previousActivities),{},{items:newActivities});});}callback(activityID);});}};var updateActivity=function updateActivity(data,callback){// console.log('ACTIVITY FILTERABLE LIST - UPDATE ACTIVITY - DATA: ', data);
var activityUpdatePromise=activityRouter.updateActivity(data);activityUpdatePromise.done(function(response){// console.log('ACTIVITY FILTERABLE LIST - UPDATE ACTIVITY - RESPONSE: ', response);
// activity updated successfully
if(response){// fetch the updated activity
var getUpdatedActivityFilters={in:data.id};activityRouter.getActivities(getUpdatedActivityFilters,function(updatedActivityResponse){// console.log('ACTIVITY FILTERABLE LIST - UPDATED ACTIVITY GET: ', updatedActivityResponse);
if(updatedActivityResponse.activities.length){var updatedActivity=updatedActivityResponse.activities[0];onActivityUpdate(updatedActivity);}callback();});}}).fail(function(error){// console.log('ACTIVITY FILTERABLE LIST - UPDATE ACTIVITY - ERROR: ', error);
});};var deleteActivity=function deleteActivity(activity_id,callback){// console.log('ACTIVITY FILTERABLE LIST - DELETE ACTIVITY: ', activity_id);
activityRouter.deleteActivity(activity_id,function(response){// console.log('ACTIVITY FILTERABLE LIST - DELETE ACTIVITY RESPONSE: ', response);
callback(response);// activity deleted
if(response){deleteCount.current+=1;// remove from state activities
setActivities(function(previousActivities){var newActivities=previousActivities.items.filter(function(activity){return activity.id!==activity_id;});return _objectSpread(_objectSpread({},previousActivities),{},{items:newActivities});});}});};var pinActivity=function pinActivity(activityID,callback){// console.log('ACTIVITY FILTERABLE LIST - PIN ACTIVITY ID: ', activityID, 'FROM USER: ', loggedUser.id);
var config={userID:loggedUser.id,activityID:activityID};activityRouter.pinActivity(config,function(response){// console.log('ACTIVITY FILTERABLE LIST - PIN RESPONSE: ', response);
if(response){setPinnedActivityID(activityID);}callback();});};var unpinActivity=function unpinActivity(callback){// console.log('ACTIVITY FILTERABLE LIST - UNPIN ACTIVITY FROM USER: ', loggedUser.id);
var config={userID:loggedUser.id};activityRouter.unpinActivity(config,function(response){// console.log('ACTIVITY FILTERABLE LIST - UNPIN RESPONSE: ', response);
if(response){setPinnedActivityID(false);}callback();});};var getLoggedUser=function getLoggedUser(){setFetchingUser(true);userRouter.getLoggedInMember('user-activity').done(function(loggedUser){// console.log('ACTIVITY FILTERABLE LIST - LOGGED IN USER: ', loggedUser);
setLoggedUser(loggedUser);setFetchingUser(false);});};var onPlay=function onPlay(){var activityID=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;setActivities(function(previousActivities){var activities=previousActivities.items.slice();// console.log('ACTIVITY FILTERABLE LIST - ON PLAY ACTIVITY ID: ', activityID);
var _iterator3=_createForOfIteratorHelper(activities),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var activity=_step3.value;if(activity.meta&&activity.meta.attached_media_type&&activity.meta.attached_media_type[0]==='youtube'){// stop all videos if activityID is not set
if(!activityID){activity.meta.attached_media_stop=!activity.meta.attached_media_stop;// stop all other videos if activityID is set
}else if(activity.id!==activityID){activity.meta.attached_media_stop=!activity.meta.attached_media_stop;}}}// console.log('ACTIVITY FILTERABLE LIST - ON PLAY NEW ACTIVITIES: ', activities);
}catch(err){_iterator3.e(err);}finally{_iterator3.f();}return _objectSpread(_objectSpread({},previousActivities),{},{items:activities});});};var getReactions=function getReactions(){if(vikinger_constants.plugin_active.vkreact&&vikinger_constants.plugin_active['vkreact-buddypress']){reactionRouter.getReactions().done(function(response){// console.log('ACTIVITY FILTERABLE IST - REACTIONS: ', response);
setReactions(response);});}};var onActivityUpdate=function onActivityUpdate(newActivityData){// console.log('ACTIVITY FILTERABLE LIST - ON ACTIVITY UPDATE - NEW ACTIVITY DATA: ', newActivityData);
setActivities(function(previousActivities){return _objectSpread(_objectSpread({},previousActivities),{},{items:(0,_activityData.updateActivities)(previousActivities.items,newActivityData)});});};(0,_react.useEffect)(function(){getLoggedUser();getReactions();getActivitiesPage();},[]);var getActivityAds=function getActivityAds(){var getAdsByActivityPlacementPromise=adsRouter.getAdsByActivityPlacement();getAdsByActivityPlacementPromise.done(function(response){// console.log('ACTIVITY FILTERABLE LIST - GET ADS BY ACTIVITY PLACEMENT RESPONSE: ', response);
setActivityAds(response);setLoadingActivityAds(false);}).fail(function(error){// console.log('ACTIVITY FILTERABLE LIST - GET ADS BY ACTIVITY PLACEMENT ERROR: ', error);
});};(0,_react.useEffect)(function(){if(vikinger_constants.plugin_active['advanced-ads-pro']){getActivityAds();}},[]);var postInDefault='0';// if user is logged in and viewing a group activity feed
if(loggedUser&&props.groupID){// check if the user is a member of the group and set the default post option to that group
var _iterator4=_createForOfIteratorHelper(loggedUser.groups),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var group=_step4.value;// user is a member of the group
if(group.id===props.groupID){postInDefault=group.id+'';break;}}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}}var onNewsfeed=loggedUser&&!props.userID&&!props.groupID&&!props.activityID,ownProfile=loggedUser&&loggedUser.id===props.userID,onGroupNewsfeed=loggedUser&&props.groupID,ownGroup=onGroupNewsfeed&&loggedUser.groups.some(function(group){return!group.is_banned&&group.id===props.groupID;});return/*#__PURE__*/_react.default.createElement("div",{className:"grid"},fetchingUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),!fetchingUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,_membership.activityPermissions.createActivity&&(onNewsfeed||ownProfile||ownGroup)&&/*#__PURE__*/_react.default.createElement(_ActivityForm.default,{user:loggedUser,postIn:postInDefault,onSubmit:createActivity}),!props.activityID&&/*#__PURE__*/_react.default.createElement(_ActivityFilterBar.default,{onFiltersChange:onFiltersChange,hideGroupsFilter:Boolean(props.groupID),hideSecondaryFilters:!loggedUser&&!props.userID&&!props.groupID}),/*#__PURE__*/_react.default.createElement(_ScrollPager.default,{modifiers:"grid",loadMoreItems:getActivitiesPage,moreItems:activities.moreItems,initialFetch:activities.initialFetch},activities.items.length===0&&!activities.moreItems&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.no_results_found,text:vikinger_translation.item_list_no_results_text}),activities.items.length>0&&!loadingActivityAds&&/*#__PURE__*/_react.default.createElement(_ActivityList.default,{data:activities.items,user:loggedUser,reactions:reactions,profileUserID:props.userID,pinnedActivityID:pinnedActivityID,pinActivity:pinActivity,unpinActivity:unpinActivity,updateActivity:updateActivity,deleteActivity:deleteActivity,onShare:onCreatedActivity,onPlay:onPlay,onActivityUpdate:onActivityUpdate,activityAds:activityAds}))));}

},{"../../router/activity/activity-router":341,"../../router/ads/ads-router":342,"../../router/reaction/reaction-router":352,"../../router/user/user-router":353,"../../utils/core":355,"../loader/Loader":203,"../notification/Notification":218,"../pager/ScrollPager":223,"../utils/Paginator":298,"../utils/activity/activity-data":299,"../utils/activity/activity-filter":300,"../utils/membership":312,"./ActivityFilterBar":30,"./ActivityList":32,"./activity-form/ActivityForm":34,"react":380}],32:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityList;var _react=_interopRequireDefault(require("react"));var _Activity=_interopRequireDefault(require("./Activity"));var _ads=require("../utils/ads");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ActivityList(props){var renderedActivities=props.data.map(function(activityData,i){var renderedActivity=[];var adsForBeforeActivityPlacement=(0,_ads.getAdsForPlacementIndex)(props.activityAds,'bp_before_activity_entry',i);if(adsForBeforeActivityPlacement){renderedActivity=renderedActivity.concat(adsForBeforeActivityPlacement);}renderedActivity.push(/*#__PURE__*/_react.default.createElement(_Activity.default,{key:activityData.id,data:activityData,user:props.user,profileUserID:props.profileUserID,pinnedActivityID:props.pinnedActivityID,pinActivity:props.pinActivity,unpinActivity:props.unpinActivity,updateActivity:props.updateActivity,deleteActivity:props.deleteActivity,reactions:props.reactions,onShare:props.onShare,onPlay:props.onPlay,onActivityUpdate:props.onActivityUpdate,activityAds:props.activityAds,activityIndex:i}));var adsForAfterActivityPlacement=(0,_ads.getAdsForPlacementIndex)(props.activityAds,'bp_after_activity_entry',i);if(adsForAfterActivityPlacement){renderedActivity=renderedActivity.concat(adsForAfterActivityPlacement);}return renderedActivity;});return renderedActivities;}

},{"../utils/ads":303,"./Activity":29,"react":380}],33:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivitySettings;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _MessageBox=_interopRequireDefault(require("../message/MessageBox"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ActivitySettings(props){var settingsDropdownTriggerRef=(0,_react.useRef)(null);var settingsDropdownContentRef=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){(0,_plugins.createDropdown)({triggerElement:settingsDropdownTriggerRef.current,containerElement:settingsDropdownContentRef.current,offset:{top:30,right:9},animation:{type:'translate-top',speed:.3,translateOffset:{vertical:20}}});},[]);var messageBoxRef=(0,_react.useRef)(null);var messageBoxTriggerRef=(0,_react.useRef)(null);var popup=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){if(props.userActivityPermissions.delete){popup.current=(0,_plugins.createPopup)({triggerElement:messageBoxTriggerRef.current,premadeContentElement:messageBoxRef.current,type:'premade',popupSelectors:['message-box-popup','animate-slide-down'],onOverlayCreate:function onOverlayCreate(overlay){overlay.setAttribute('data-simplebar','');}});}},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-settings"},/*#__PURE__*/_react.default.createElement("div",{className:"post-settings-wrap"},/*#__PURE__*/_react.default.createElement("div",{ref:settingsDropdownTriggerRef,className:"post-settings"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"more-dots",modifiers:"post-settings-icon"})),/*#__PURE__*/_react.default.createElement("div",{ref:settingsDropdownContentRef,className:"simple-dropdown"},!props.favorite&&/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:props.addFavorite},vikinger_translation.add_favorite," ",props.processingFavorite&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null)),props.favorite&&/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:props.removeFavorite},vikinger_translation.remove_favorite," ",props.processingFavorite&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null)),props.userActivityPermissions.pin&&!props.pinned&&/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:props.pinActivity},vikinger_translation.pin_to_top," ",props.processingPinned&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null)),props.userActivityPermissions.pin&&props.pinned&&/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:props.unpinActivity},vikinger_translation.unpin_from_top," ",props.processingPinned&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null)),props.userActivityPermissions.edit&&/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:props.startEditingActivity},vikinger_translation.edit_post),props.userActivityPermissions.delete&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{ref:messageBoxTriggerRef,className:"simple-dropdown-link"},vikinger_translation.delete_post," ",props.processingDelete&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null)),/*#__PURE__*/_react.default.createElement(_MessageBox.default,{forwardedRef:messageBoxRef,data:{title:vikinger_translation.delete_activity_message_title,text:vikinger_translation.delete_activity_message_text},error:true,confirm:true,onAccept:function onAccept(){popup.current.hide();props.deleteActivity();},onCancel:function onCancel(){popup.current.hide();}})))));}

},{"../../utils/plugins":356,"../icon/IconSVG":201,"../loader/LoaderSpinnerSmall":205,"../message/MessageBox":217,"react":380}],34:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityForm;var _react=_interopRequireWildcard(require("react"));var _Avatar=_interopRequireDefault(require("../../avatar/Avatar"));var _MediaLinkPreview=_interopRequireDefault(require("../../media/MediaLinkPreview"));var _UploadableMediaList=_interopRequireDefault(require("../../media/UploadableMediaList"));var _IconSVG=_interopRequireDefault(require("../../icon/IconSVG"));var _BadgeVerified=_interopRequireDefault(require("../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../../user-status/user-status-level/UserStatusLevel"));var _UserStatusType=_interopRequireDefault(require("../../user-status/user-status-type/UserStatusType"));var _ExpandableTextarea=_interopRequireDefault(require("../../form/ExpandableTextarea"));var _UploadVideoButton=_interopRequireDefault(require("../../video/UploadVideoButton"));var _VideoPreview=_interopRequireDefault(require("../../video/VideoPreview"));var _core=require("../../../utils/core");var _plugins=require("../../../utils/plugins");var _activityTemplate=require("../../utils/activity/activity-template");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var textareaPlaceholderEnd=vikinger_constants.plugin_active.buddypress_friends?vikinger_translation.activity_form_placeholder_2:vikinger_translation.activity_form_placeholder_3;function ActivityForm(props){var _useState=(0,_react.useState)({text:'',postIn:props.postIn?props.postIn:'0',attached_media:false,uploadable_media_type:false,uploadable_media:false,uploadable_gif:false,submitting:false,errors:[]}),_useState2=_slicedToArray(_useState,2),formData=_useState2[0],setFormData=_useState2[1];var photoTooltipRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(!props.shareData&&vikinger_constants.plugin_active.vkmedia&&vikinger_constants.settings.media_photo_upload_enabled){(0,_plugins.createTooltip)({containerElement:photoTooltipRef.current,offset:8,direction:'top',animation:{type:'translate-out-fade'}});}},[]);var discardContent=function discardContent(){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{text:'',attached_media:false,uploadable_media_type:false,uploadable_media:false,errors:[]});});// console.log('DISCARD CONTENT - POPUP: ', props.popup);
if(props.popup&&props.popup.current){props.popup.current.hide();}};var toggleUploadablePhotosBar=function toggleUploadablePhotosBar(){setFormData(function(previousFormData){if(previousFormData.uploadable_media&&previousFormData.uploadable_media_type==='image'){return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_media:false,uploadable_media_type:false,errors:[]});}return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_media:[],uploadable_media_type:'image',errors:[]});});};var submitContent=function submitContent(){// if already submitting form or not sharing post and no message entered, return
if(formData.submitting||!props.shareData&&formData.text===''&&!formData.uploadable_media||formData.uploadable_media&&formData.uploadable_media.length===0){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{errors:[{text:vikinger_translation.activity_form_empty_error}]});});return;}setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{submitting:true,errors:[]});});// console.log('ACTIVITY FORM - POST CONTENT: ', formData);
props.onSubmit(formData,function(response){// console.log('ACTIVITY FORM - CREATED ACTIVITY: ', response);
if(response){discardContent();}else{// console.log('ACTIVITY FORM - ERROR CREATING ACTIVITY');
}setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{submitting:false});});});};var resetAttachedMedia=function resetAttachedMedia(){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{attached_media:false});});};var handlePostInChange=function handlePostInChange(e){e.persist();setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{postIn:e.target.value});});};var handleTextChange=function handleTextChange(e){// check if there is a media link in the text content
var attached_media=(0,_core.extractAttachedMedia)(e.target.value);// e can be default event or user generated with only target and value properties
if(e.persist){e.persist();}// console.log('ACTIVITY FORM - EXTRACTED ATTACHED MEDIA: ', attached_media);
setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{text:e.target.value,attached_media:attached_media});});};var addUploadableVideo=function addUploadableVideo(data){// only add video data if user didn't cancel
if(data.length>0){// only add video if size is not higher than maximum allowed
var videoData=data[0],videoSizeInMB=videoData.file.size/(1024*1024);// only add video if file extension is allowed
var extensionAllowed=vikinger_constants.settings.media_video_allowed_extensions.some(function(fileExtension){var fileExtensionCaseSensitiveIsMatch=fileExtension===videoData.extension;var fileExtensionCaseInsensitiveIsMatch=fileExtension.toLowerCase()===videoData.extension.toLowerCase();return vikinger_constants.settings.media_video_allowed_extensions_case_sensitive?fileExtensionCaseSensitiveIsMatch:fileExtensionCaseInsensitiveIsMatch;});// if video extension is not allowed, add error
if(!extensionAllowed){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{errors:[{text:"\"".concat(videoData.file.name,"\" ").concat(vikinger_translation.file_extension_is_not_allowed,".")}]});});// if video size is higher than allowed, show error
}else if(videoSizeInMB>vikinger_constants.settings.media_video_upload_maximum_size){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{errors:[{text:"\"".concat(videoData.file.name,"\" ").concat(vikinger_translation.size_is_too_big," (").concat(Number.parseFloat(videoSizeInMB).toFixed(2),"MB).")},{text:"".concat(vikinger_translation.maximum_size_accepted_is," ").concat(vikinger_constants.settings.media_video_upload_maximum_size,"MB.")}]});});}else{setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_media:data,uploadable_media_type:'video',errors:[]});});}}};var addUploadableMedia=function addUploadableMedia(data){// console.log('ACTIVITY FORM - ADD UPLOADABLE MEDIA: ', data);
// only add photos data if user didn't cancel
if(data.length>0){var errors=[],photosData=[];var fileSizeError=false;var _iterator=_createForOfIteratorHelper(data),_step;try{var _loop=function _loop(){var photoData=_step.value;// only add photo if size is not higher than maximum allowed
var photoSizeInMB=photoData.file.size/(1024*1024);// only add photo if file extension is allowed
var extensionAllowed=vikinger_constants.settings.media_photo_allowed_extensions.some(function(fileExtension){var fileExtensionCaseSensitiveIsMatch=fileExtension===photoData.extension;var fileExtensionCaseInsensitiveIsMatch=fileExtension.toLowerCase()===photoData.extension.toLowerCase();return vikinger_constants.settings.media_photo_allowed_extensions_case_sensitive?fileExtensionCaseSensitiveIsMatch:fileExtensionCaseInsensitiveIsMatch;});// if photo extension is not allowed, add error
if(!extensionAllowed){errors.push({text:"\"".concat(photoData.file.name,"\" ").concat(vikinger_translation.file_extension_is_not_allowed,".")});// if photo size is higher than allowed, add error
}else if(photoSizeInMB>vikinger_constants.settings.media_photo_upload_maximum_size){fileSizeError=true;errors.push({text:"\"".concat(photoData.file.name,"\" ").concat(vikinger_translation.size_is_too_big," (").concat(Number.parseFloat(photoSizeInMB).toFixed(2),"MB).")});}else{photosData.push(photoData);}};for(_iterator.s();!(_step=_iterator.n()).done;){_loop();}}catch(err){_iterator.e(err);}finally{_iterator.f();}if(errors.length>0&&fileSizeError){errors.push({text:"".concat(vikinger_translation.maximum_size_accepted_is," ").concat(vikinger_constants.settings.media_photo_upload_maximum_size,"MB.")});}setFormData(function(previousFormData){var newUploadableMedia=previousFormData.uploadable_media.concat(photosData);// console.log('ACTIVITY FORM - UPLOADABLE MEDIA: ', newUploadableMedia);
return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_media:newUploadableMedia,errors:errors});});}};var removeUploadableMedia=function removeUploadableMedia(id){// console.log('ACTIVITY FORM - REMOVE UPLOADABLE MEDIA: ', id);
setFormData(function(previousFormData){var uploadableMedia=previousFormData.uploadable_media.filter(function(media,i){if(media.id===id){// release object URL reference
URL.revokeObjectURL(media.url);}return media.id!==id;});// console.log('ACTIVITY FORM - UPLOADABLE MEDIA: ', uploadableMedia);
return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_media:uploadableMedia});});};var addUploadableGif=function addUploadableGif(data){console.log('ACTIVITY FORM - ADD UPLOADABLE GIF DATA: ',data);setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_gif:data});});};var removeUploadableGif=function removeUploadableGif(){console.log('ACTIVITY FORM - REMOVE UPLOADABLE GIF');setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_gif:false});});};var toggleUploadableGifBar=function toggleUploadableGifBar(){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_gif:previousFormData.uploadable_gif?false:{}});});};var ActivityFormat=false;if(props.shareData){if(props.shareData.format){ActivityFormat=props.shareData.format;}}var ActivityTemplate=props.shareData?(0,_activityTemplate.getActivityTemplate)(props.shareData.type,ActivityFormat)({data:props.shareData,simpleActivity:true,sharePopupActivity:true,user:props.user}):'';var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_activity_stream&&props.user.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.user.membership;var userGroups=props.user.groups.filter(function(group){return!group.is_banned;});return/*#__PURE__*/_react.default.createElement("div",{ref:props.forwardedRef,className:"quick-post ".concat(formData.submitting?'disabled':'')},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-header"},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-header-filters-wrap"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status-avatar"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",data:props.user,noBorder:true,noLink:true})),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title medium"},/*#__PURE__*/_react.default.createElement("span",{className:"bold"},props.user.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.user.membership.name,size:"small"}),props.user.member_types.length>0&&props.user.member_types.map(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];if(memberTypeSettings&&memberTypeSettings.show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}})),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text small"},vikinger_translation.status_update)),/*#__PURE__*/_react.default.createElement("form",{className:"quick-post-header-filters"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"post-in"},vikinger_translation.post_in),/*#__PURE__*/_react.default.createElement("select",{id:"post-in",name:"postIn",value:formData.postIn,onChange:handlePostInChange},/*#__PURE__*/_react.default.createElement("option",{value:"0"},vikinger_translation.my_profile),vikinger_constants.plugin_active.buddypress_groups&&userGroups.map(function(group){return/*#__PURE__*/_react.default.createElement("option",{key:group.id,value:group.id},group.name);})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}))))))),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-body ".concat(props.shareData?'with-share-data':'')},/*#__PURE__*/_react.default.createElement("form",{className:"form ".concat(formData.submitting?'disabled':'')},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_ExpandableTextarea.default,{name:"text",value:formData.text,maxLength:vikinger_constants.settings.activity_character_limit,minHeight:120,placeholder:"".concat(vikinger_translation.activity_form_placeholder_1," ").concat(props.user.name,"! ").concat(textareaPlaceholderEnd),userFriends:props.user.friends,handleChange:handleTextChange,loading:formData.submitting,disabled:formData.submitting})))),formData.attached_media&&/*#__PURE__*/_react.default.createElement(_MediaLinkPreview.default,{iframeSrc:formData.attached_media.link,onCloseButtonClick:resetAttachedMedia,disabled:formData.submitting}),!props.shareData&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,formData.uploadable_media&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,formData.uploadable_media_type==='video'&&/*#__PURE__*/_react.default.createElement(_VideoPreview.default,{src:formData.uploadable_media[0].url}),formData.uploadable_media_type==='image'&&/*#__PURE__*/_react.default.createElement(_UploadableMediaList.default,{data:formData.uploadable_media,onSelect:addUploadableMedia,onRemove:removeUploadableMedia,disabled:formData.submitting})),formData.uploadable_gif&&/*#__PURE__*/_react.default.createElement(UploadableGifList,{onSelect:addUploadableGif,onRemove:removeUploadableGif,disabled:formData.submitting})),props.shareData&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box no-padding"},ActivityTemplate)),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-wrap"},formData.errors.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-errors"},formData.errors.map(function(error,i){return/*#__PURE__*/_react.default.createElement("p",{key:i,className:"quick-post-footer-error error-field-message"},"* ",error.text);})),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer"},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-actions"},!props.shareData&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_constants.plugin_active.vkmedia&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_constants.settings.media_photo_upload_enabled&&/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-action",ref:photoTooltipRef,"data-title":vikinger_translation.add_photo,onClick:toggleUploadablePhotosBar},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"camera",modifiers:"quick-post-footer-action-icon"})),vikinger_constants.settings.media_video_upload_enabled&&/*#__PURE__*/_react.default.createElement(_UploadVideoButton.default,{onSelect:addUploadableVideo})))),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"button small void",onClick:discardContent},vikinger_translation.discard),/*#__PURE__*/_react.default.createElement("p",{className:"button small secondary",onClick:submitContent},vikinger_translation.post_action)))));}

},{"../../../utils/core":355,"../../../utils/plugins":356,"../../avatar/Avatar":55,"../../badge/BadgeVerified":82,"../../form/ExpandableTextarea":143,"../../icon/IconSVG":201,"../../media/MediaLinkPreview":206,"../../media/UploadableMediaList":208,"../../user-status/user-status-level/UserStatusLevel":292,"../../user-status/user-status-type/UserStatusType":296,"../../utils/activity/activity-template":302,"../../video/UploadVideoButton":318,"../../video/VideoPreview":321,"react":380}],35:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityFormSimple;var _react=_interopRequireWildcard(require("react"));var _ExpandableTextarea=_interopRequireDefault(require("../../form/ExpandableTextarea"));var _core=require("../../../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var textareaPlaceholderEnd=vikinger_constants.plugin_active.buddypress_friends?vikinger_translation.activity_form_placeholder_2:vikinger_translation.activity_form_placeholder_3;function ActivityFormSimple(props){var previousText=(0,_react.useRef)(props.text?(0,_core.stripHTML)(props.text):'');var _useState=(0,_react.useState)(previousText.current),_useState2=_slicedToArray(_useState,2),text=_useState2[0],setText=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),submitting=_useState4[0],setSubmitting=_useState4[1];var submitContent=function submitContent(){// if already submitting return
if(submitting){return;}// if text wasn't changed, discard
if(previousText.current===text){props.onDiscard();return;}setSubmitting(true);props.onSubmit(text);};var handleTextChange=function handleTextChange(e){setText(e.target.value);};return/*#__PURE__*/_react.default.createElement("div",{className:"quick-post ".concat(submitting?'disabled':'')},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-body ".concat(props.shareData?'with-share-data':'')},/*#__PURE__*/_react.default.createElement("form",{className:"form ".concat(submitting?'disabled':'')},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_ExpandableTextarea.default,{name:"text",value:text,maxLength:vikinger_constants.settings.activity_character_limit,minHeight:120,placeholder:"".concat(vikinger_translation.activity_form_placeholder_1," ").concat(props.user.name,"! ").concat(textareaPlaceholderEnd),userFriends:props.user.friends,handleChange:handleTextChange,loading:submitting,disabled:submitting,focus:props.focus}))))),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-wrap"},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer"},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-actions"}),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"button small void",onClick:props.onDiscard},vikinger_translation.discard),/*#__PURE__*/_react.default.createElement("p",{className:"button small secondary",onClick:submitContent},vikinger_translation.save)))));}

},{"../../../utils/core":355,"../../form/ExpandableTextarea":143,"react":380}],36:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityMediaList;var _react=_interopRequireWildcard(require("react"));var _Paginator=_interopRequireDefault(require("../../utils/Paginator"));var _SectionHeader=_interopRequireDefault(require("../../section/SectionHeader"));var _Notification=_interopRequireDefault(require("../../notification/Notification"));var _Loader=_interopRequireDefault(require("../../loader/Loader"));var _ScrollPager=_interopRequireDefault(require("../../pager/ScrollPager"));var _core=require("../../../utils/core");var userRouter=_interopRequireWildcard(require("../../../router/user/user-router"));var activityRouter=_interopRequireWildcard(require("../../../router/activity/activity-router"));var reactionRouter=_interopRequireWildcard(require("../../../router/reaction/reaction-router"));var memberRouter=_interopRequireWildcard(require("../../../router/member/member-router"));var groupRouter=_interopRequireWildcard(require("../../../router/group/group-router"));var _activityData=require("../../utils/activity/activity-data");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ActivityMediaList(props){var _useState=(0,_react.useState)({items:[],selectedItems:[],selectedAll:false,initialFetch:true,moreItems:true}),_useState2=_slicedToArray(_useState,2),activities=_useState2[0],setActivities=_useState2[1];var _useState3=(0,_react.useState)(0),_useState4=_slicedToArray(_useState3,2),activityCount=_useState4[0],setActivityCount=_useState4[1];var _useState5=(0,_react.useState)([]),_useState6=_slicedToArray(_useState5,2),reactions=_useState6[0],setReactions=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),loggedUser=_useState8[0],setLoggedUser=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),activityUser=_useState10[0],setActivityUser=_useState10[1];var _useState11=(0,_react.useState)(true),_useState12=_slicedToArray(_useState11,2),loading=_useState12[0],setLoading=_useState12[1];var currentPage=(0,_react.useRef)(1);var createCount=(0,_react.useRef)(0);var deleteCount=(0,_react.useRef)(0);var filters=(0,_react.useRef)({per_page:props.perPage,sort:props.order,show_hidden:props.groupID?true:false,filter:{object:props.userID?'activity':'groups',action:props.activityGetType,primary_id:props.userID?props.userID:props.groupID}});var getActivities=function getActivities(callback){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};// get next page to fetch based on create and delete counts
currentPage.current=_Paginator.default.getNextPageToFetch({page:currentPage.current,per_page:props.perPage,createCount:createCount.current,deleteCount:deleteCount.current});// reset counts
createCount.current=0;deleteCount.current=0;var config={page:currentPage.current};(0,_core.deepExtend)(config,filters.current);(0,_core.deepExtend)(config,options);// console.log('ACTIVITY MEDIA LIST - ACTIVITY FILTERS: ', config);
activityRouter.getActivities(config,callback);};var reloadActivities=function reloadActivities(){currentPage.current=1;// reset counts
createCount.current=0;deleteCount.current=0;setActivities({items:[],selectedItems:[],selectedAll:false,initialFetch:true,moreItems:true});getActivitiesPage();};var activitiesSelected=function activitiesSelected(){var _iterator=_createForOfIteratorHelper(activities.selectedItems),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var item=_step.value;if(item){return true;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}return false;};var deleteSelected=function deleteSelected(callback){var activityMediaToDelete=[];for(var i=0;i<activities.items.length;i++){var activity=activities.items[i];// if the activity is selected
if(activities.selectedItems[i]){activityMediaToDelete.push({activity_id:activity.id,media:activity.media,component:{id:activity.item_id,type:activity.component==='activity'?'member':'group'}});}}// console.log('ACTIVITY MEDIA LIST - DELETE SELECTED: ', activityMediaToDelete);
activityRouter.deleteActivityMedia(activityMediaToDelete,function(response){// console.log('ACTIVITY MEDIA LIST - DELETED RESPONSE: ', response);
callback();// if deleted successfully, response is array of deleted activity media IDs
if(response){deleteCount.current+=response.length;// refresh activity count
getActivitiesCount();// remove from state activities
setActivities(function(previousActivities){var newActivities=previousActivities.items.filter(function(item){return!response.some(function(activity_id){return activity_id==item.id;});});// console.log('ACTIVITY MEDIA LIST - ACTIVITIES AFTER DELETE: ', newActivities);
return _objectSpread(_objectSpread({},previousActivities),{},{items:newActivities,selectedItems:new Array(newActivities.length).fill(false),selectedAll:false});});}else{// console.log('ACTIVITY MEDIA LIST - DELETE ERROR');
}});};var toggleSelectableActive=function toggleSelectableActive(i){setActivities(function(previousActivities){var newSelectedActivities=previousActivities.selectedItems.slice();newSelectedActivities[i]=!newSelectedActivities[i];// console.log('ACTIVITY MEDIA LIST - SELECTED ACTIVITIES: ', newSelectedActivities);
return _objectSpread(_objectSpread({},previousActivities),{},{selectedItems:newSelectedActivities});});};var toggleAllSelectable=function toggleAllSelectable(){if(!activities.selectedAll){selectAll();}else{unselectAll();}};var selectAll=function selectAll(){setActivities(function(previousActivities){return _objectSpread(_objectSpread({},previousActivities),{},{selectedItems:new Array(previousActivities.items.length).fill(true),selectedAll:true});});};var unselectAll=function unselectAll(){setActivities(function(previousActivities){return _objectSpread(_objectSpread({},previousActivities),{},{selectedItems:new Array(previousActivities.items.length).fill(false),selectedAll:false});});};var getActivitiesPage=function getActivitiesPage(){var callback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(){};getActivities(function(response){// console.log('ACTIVITY MEDIA LIST - ACTIVITY DATA: ', response);
currentPage.current+=1;setActivities(function(previousActivities){var activitiesWithoutDuplicates=_Paginator.default.removeDuplicates(previousActivities.items,response.activities,'id'),newSelectedActivities=new Array(activitiesWithoutDuplicates.length).fill(false);return _objectSpread(_objectSpread({},previousActivities),{},{items:previousActivities.items.concat(activitiesWithoutDuplicates),selectedItems:previousActivities.selectedItems.concat(newSelectedActivities),moreItems:response.has_more_items,initialFetch:false});});callback(response.has_more_items);});};var onUpload=function onUpload(data,callback){// console.log('ACTIVITY MEDIA LIST - CREATE ACTIVITY WITH DATA: ', data);
// post to own profile or group and hide sitewide according to group status
var itemID=props.groupID?props.groupID:0,hideSitewide=props.groupID?activityUser.status!=='public':false;var component=itemID===0?'member':'group',componentID=component==='member'?loggedUser.id:itemID,files=[];var _iterator2=_createForOfIteratorHelper(data.uploadable_media),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var media=_step2.value;files.push(media.file);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}var uploadable_media={files:files,component:{type:component,id:componentID,uploader_id:loggedUser.id}};var activityData={creation_config:{item_id:itemID,user_id:loggedUser.id,component:itemID===0?'activity':'groups',type:props.activityCreateType,content:data.text.trim(),hide_sitewide:hideSitewide},uploadable_media:uploadable_media,uploadable_media_type:data.uploadable_media_type};// console.log('ACTIVITY MEDIA LIST - CREATE ACTIVITY: ', activityData);
activityRouter.createActivity(activityData,function(response){// console.log('ACTIVITY MEDIA LIST - CREATE ACTIVITY RESPONSE: ', response);
callback(response);// if activity created successfully
if(response){// refresh activity count
getActivitiesCount();// reload activities to show newly created ones
reloadActivities();}});};var getLoggedUser=function getLoggedUser(){userRouter.getLoggedInMember('user-activity').done(function(loggedUser){// console.log('ACTIVITY MEDIA LIST - LOGGED IN USER: ', loggedUser);
setLoggedUser(loggedUser);});};var getActivityMediaListUser=function getActivityMediaListUser(){if(props.userID){memberRouter.getMembers({include:[props.userID]}).done(function(user){// console.log('ACTIVITY MEDIA LIST - ACTIVITY USER: ', user[0]);
setActivityUser(user[0]);setLoading(false);});}else if(props.groupID){groupRouter.getGroups({include:[props.groupID]}).done(function(group){// console.log('ACTIVITY MEDIA LIST - ACTIVITY GROUP: ', group[0]);
setActivityUser(group[0]);setLoading(false);});}};var getActivitiesCount=function getActivitiesCount(){var config={show_hidden:props.groupID?true:false,filter:filters.current.filter};// console.log('ACTIVITY MEDIA LIST - ACTIVITY COUNT FILTERS: ', config);
activityRouter.getActivities(config,function(response){// console.log('ACTIVITY MEDIA LIST - ACTIVITY TOTAL COUNT: ', response.activities.length);
setActivityCount(response.activities.length);});};var getReactions=function getReactions(){reactionRouter.getReactions().done(function(response){// console.log('ACTIVITY MEDIA LIST - REACTIONS: ', response);
setReactions(response);});};var onActivityUpdate=function onActivityUpdate(newActivityData){// console.log('ACTIVITY MEDIA LIST - ON ACTIVITY UPDATE - NEW ACTIVITY DATA: ', newActivityData);
setActivities(function(previousActivities){return _objectSpread(_objectSpread({},previousActivities),{},{items:(0,_activityData.updateActivities)(previousActivities.items,newActivityData)});});};(0,_react.useEffect)(function(){getLoggedUser();getActivityMediaListUser();getActivitiesCount();getActivitiesPage();getReactions();},[]);var ItemPreviewList=props.itemPreviewList,ActivityListOptions=props.activityListOptions;var inLoggedUserProfile=loggedUser&&loggedUser.id===props.userID;// check if the logged user is a member of the group he is seeing
var inLoggedUserGroup=false;if(loggedUser&&props.groupID){var _iterator3=_createForOfIteratorHelper(loggedUser.groups),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var group=_step3.value;// if logged user is a member of this group and is not banned
if(group.id===props.groupID&&!group.is_banned){inLoggedUserGroup=true;break;}}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}}// check if logged user is group admin or mod
var loggedUserIsGroupAdmin=false,loggedUserIsGroupMod=false;if(inLoggedUserGroup){var _iterator4=_createForOfIteratorHelper(loggedUser.groups),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _group=_step4.value;if(_group.id===props.groupID){loggedUserIsGroupAdmin=_group.is_admin;loggedUserIsGroupMod=_group.is_mod;break;}}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}}// allow logged user to delete items if viewing it's own profile, or a group he is an admin or mod of
var allowDelete=inLoggedUserProfile||inLoggedUserGroup&&(loggedUserIsGroupAdmin||loggedUserIsGroupMod);return/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,loading&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),!loading&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:"".concat(vikinger_translation.browse," ").concat(activityUser.name),title:props.sectionTitle,titleCount:activityCount},(inLoggedUserProfile||inLoggedUserGroup)&&/*#__PURE__*/_react.default.createElement(ActivityListOptions,{user:loggedUser,onUpload:onUpload,allowDelete:allowDelete,deleteSelected:deleteSelected,toggleAllSelectable:toggleAllSelectable,selectedAll:activities.selectedAll,activities:activities.items,activitiesSelected:activitiesSelected})),/*#__PURE__*/_react.default.createElement(_ScrollPager.default,{loadMoreItems:getActivitiesPage,moreItems:activities.moreItems,initialFetch:activities.initialFetch},/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,activities.items.length===0&&!activities.moreItems&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:props.noResultsTitle,text:props.noResultsText}),activities.items.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"grid ".concat(props.gridModifiers," centered-on-mobile")},/*#__PURE__*/_react.default.createElement(ItemPreviewList,{data:activities.items,user:loggedUser,reactions:reactions,modifiers:props.itemPreviewModifiers,selectable:allowDelete,selectedItems:activities.selectedItems,toggleSelectableActive:toggleSelectableActive,onActivityUpdate:onActivityUpdate}))))));}

},{"../../../router/activity/activity-router":341,"../../../router/group/group-router":347,"../../../router/member/member-router":348,"../../../router/reaction/reaction-router":352,"../../../router/user/user-router":353,"../../../utils/core":355,"../../loader/Loader":203,"../../notification/Notification":218,"../../pager/ScrollPager":223,"../../section/SectionHeader":257,"../../utils/Paginator":298,"../../utils/activity/activity-data":299,"react":380}],37:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityMediaListOptions;var _react=_interopRequireWildcard(require("react"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../../loader/LoaderSpinnerSmall"));var _plugins=require("../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ActivityMediaListOptions(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),processingDelete=_useState2[0],setProcessingDelete=_useState2[1];var uploadPhotoBoxTriggerRef=(0,_react.useRef)(null);var uploadPhotoBoxRef=(0,_react.useRef)(null);var popup=(0,_react.useRef)(null);(0,_react.useEffect)(function(){popup.current=(0,_plugins.createPopup)({triggerElement:uploadPhotoBoxTriggerRef.current,premadeContentElement:uploadPhotoBoxRef.current,type:'premade',popupSelectors:['upload-box-popup','animate-slide-down'],onOverlayCreate:function onOverlayCreate(overlay){overlay.setAttribute('data-simplebar','');}});},[]);var deleteSelected=function deleteSelected(){if(processingDelete){return;}setProcessingDelete(true);props.deleteSelected(function(){setProcessingDelete(false);});};var ActivityUploadForm=props.activityUploadForm;return/*#__PURE__*/_react.default.createElement("div",{className:"item-list-options"},/*#__PURE__*/_react.default.createElement("div",{className:"item-list-option-wrap"},/*#__PURE__*/_react.default.createElement("p",{ref:uploadPhotoBoxTriggerRef,className:"item-list-option"},props.uploadButtonText),/*#__PURE__*/_react.default.createElement(ActivityUploadForm,{forwardedRef:uploadPhotoBoxRef,user:props.user,postIn:props.postIn,onSubmit:props.onUpload,popup:popup})),props.allowDelete&&props.activities.length>0&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,props.activitiesSelected()&&/*#__PURE__*/_react.default.createElement("div",{className:"item-list-option-wrap"},/*#__PURE__*/_react.default.createElement("p",{className:"item-list-option",onClick:deleteSelected},vikinger_translation.delete),processingDelete&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null)),/*#__PURE__*/_react.default.createElement("p",{className:"item-list-option",onClick:props.toggleAllSelectable},!props.selectedAll?vikinger_translation.select_all:vikinger_translation.unselect_all)));}

},{"../../../utils/plugins":356,"../../loader/LoaderSpinnerSmall":205,"react":380}],38:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityPhotoList;var _react=_interopRequireDefault(require("react"));var _ActivityMediaList=_interopRequireDefault(require("../ActivityMediaList"));var _ActivityPhotoListOptions=_interopRequireDefault(require("./ActivityPhotoListOptions"));var _PhotoPreviewList=_interopRequireDefault(require("../../../picture/PhotoPreviewList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function ActivityPhotoList(props){return/*#__PURE__*/_react.default.createElement(_ActivityMediaList.default,_extends({activityListOptions:_ActivityPhotoListOptions.default,gridModifiers:"grid-2-2-2-2-2-2",itemPreviewList:_PhotoPreviewList.default,itemPreviewModifiers:"small animate-slide-down",activityGetType:"activity_media",activityCreateType:"activity_media_upload",sectionTitle:vikinger_translation.photos,noResultsTitle:vikinger_translation.photos_no_results_title,noResultsText:vikinger_translation.photos_no_results_text},props));}

},{"../../../picture/PhotoPreviewList":225,"../ActivityMediaList":36,"./ActivityPhotoListOptions":39,"react":380}],39:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityPhotoListOptions;var _react=_interopRequireDefault(require("react"));var _ActivityMediaListOptions=_interopRequireDefault(require("../ActivityMediaListOptions"));var _ActivityPhotoUploadForm=_interopRequireDefault(require("./ActivityPhotoUploadForm"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function ActivityPhotoListOptions(props){return/*#__PURE__*/_react.default.createElement(_ActivityMediaListOptions.default,_extends({uploadButtonText:vikinger_translation.upload_photos,activityUploadForm:_ActivityPhotoUploadForm.default},props));}

},{"../ActivityMediaListOptions":37,"./ActivityPhotoUploadForm":40,"react":380}],40:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityPhotoUploadForm;var _react=_interopRequireWildcard(require("react"));var _UploadableMediaList=_interopRequireDefault(require("../../../media/UploadableMediaList"));var _ExpandableTextarea=_interopRequireDefault(require("../../../form/ExpandableTextarea"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var textareaPlaceholderEnd=vikinger_constants.plugin_active.buddypress_friends?vikinger_translation.activity_form_placeholder_2:vikinger_translation.activity_form_placeholder_3;function ActivityPhotoUploadForm(props){var _useState=(0,_react.useState)({text:'',submitting:false,uploadable_media:[],uploadable_media_type:'image',errors:[]}),_useState2=_slicedToArray(_useState,2),formData=_useState2[0],setFormData=_useState2[1];var discardContent=function discardContent(){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{text:'',uploadable_media:[],errors:[]});});// console.log('DISCARD CONTENT - POPUP: ', props.popup);
if(props.popup&&props.popup.current){props.popup.current.hide();}};var submitContent=function submitContent(){// if didn't select any media, or already submitting form, return
if(formData.uploadable_media.length===0||formData.submitting){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{errors:[{text:vikinger_translation.upload_form_photo_empty_error}]});});return;}setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{submitting:true,errors:[]});});// console.log('ACTIVITY MEDIA UPLOAD FORM - POST CONTENT: ', formData);
props.onSubmit(formData,function(response){// console.log('ACTIVITY MEDIA UPLOAD FORM - CREATED ACTIVITY: ', response);
if(response){discardContent();}else{// console.log('ACTIVITY MEDIA UPLOAD FORM - ERROR CREATING ACTIVITY');
}setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{submitting:false});});});};var handleTextChange=function handleTextChange(e){// e can be default event or user generated with only target and value properties
if(e.persist){e.persist();}setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{text:e.target.value});});// console.log('ACTIVITY MEDIA UPLOAD FORM - STATE:', formData);
};var addUploadableMedia=function addUploadableMedia(data){// console.log('ACTIVITY MEDIA UPLOAD FORM - ADD UPLOADABLE MEDIA: ', data);
// only add photos data if user didn't cancel
if(data.length>0){var errors=[],photosData=[];var fileSizeError=false;var _iterator=_createForOfIteratorHelper(data),_step;try{var _loop=function _loop(){var photoData=_step.value;// only add photo if size is not higher than maximum allowed
var photoSizeInMB=photoData.file.size/(1024*1024);// only add photo if file extension is allowed
var extensionAllowed=vikinger_constants.settings.media_photo_allowed_extensions.some(function(fileExtension){var fileExtensionCaseSensitiveIsMatch=fileExtension===photoData.extension;var fileExtensionCaseInsensitiveIsMatch=fileExtension.toLowerCase()===photoData.extension.toLowerCase();return vikinger_constants.settings.media_photo_allowed_extensions_case_sensitive?fileExtensionCaseSensitiveIsMatch:fileExtensionCaseInsensitiveIsMatch;});// if photo extension is not allowed, add error
if(!extensionAllowed){errors.push({text:"\"".concat(photoData.file.name,"\" ").concat(vikinger_translation.file_extension_is_not_allowed,".")});// if photo size is higher than allowed, add error
}else if(photoSizeInMB>vikinger_constants.settings.media_photo_upload_maximum_size){fileSizeError=true;errors.push({text:"\"".concat(photoData.file.name,"\" ").concat(vikinger_translation.size_is_too_big," (").concat(Number.parseFloat(photoSizeInMB).toFixed(2),"MB).")});}else{photosData.push(photoData);}};for(_iterator.s();!(_step=_iterator.n()).done;){_loop();}}catch(err){_iterator.e(err);}finally{_iterator.f();}if(errors.length>0&&fileSizeError){errors.push({text:"".concat(vikinger_translation.maximum_size_accepted_is," ").concat(vikinger_constants.settings.media_photo_upload_maximum_size,"MB.")});}setFormData(function(previousFormData){var newUploadableMedia=previousFormData.uploadable_media.concat(photosData);// console.log('ACTIVITY MEDIA UPLOAD FORM - UPLOADABLE MEDIA: ', newUploadableMedia);
return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_media:newUploadableMedia,errors:errors});});}};var removeUploadableMedia=function removeUploadableMedia(id){// console.log('ACTIVITY MEDIA UPLOAD FORM - REMOVE UPLOADABLE MEDIA: ', id);
setFormData(function(previousFormData){var uploadableMedia=previousFormData.uploadable_media.filter(function(media,i){if(media.id===id){// release object URL reference
URL.revokeObjectURL(media.url);}return media.id!==id;});// console.log('ACTIVITY MEDIA UPLOAD FORM - UPLOADABLE MEDIA: ', uploadableMedia);
return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_media:uploadableMedia});});};return/*#__PURE__*/_react.default.createElement("div",{ref:props.forwardedRef,className:"quick-post ".concat(formData.submitting?'disabled':'')},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-header"},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-header-filters-wrap"},/*#__PURE__*/_react.default.createElement("p",{className:"quick-post-header-title"},vikinger_translation.upload_photos))),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-body"},/*#__PURE__*/_react.default.createElement("form",{className:"form ".concat(formData.submitting?'disabled':'')},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_ExpandableTextarea.default,{name:"text",value:formData.text,maxLength:vikinger_constants.settings.activity_character_limit,minHeight:120,placeholder:"".concat(vikinger_translation.activity_form_placeholder_1," ").concat(props.user.name,"! ").concat(textareaPlaceholderEnd),userFriends:props.user.friends,handleChange:handleTextChange,loading:formData.submitting,disabled:formData.submitting})))),/*#__PURE__*/_react.default.createElement(_UploadableMediaList.default,{data:formData.uploadable_media,onSelect:addUploadableMedia,onRemove:removeUploadableMedia,disabled:formData.submitting})),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-wrap"},formData.errors.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-errors"},formData.errors.map(function(error,i){return/*#__PURE__*/_react.default.createElement("p",{key:i,className:"quick-post-footer-error error-field-message"},"* ",error.text);})),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer"},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-actions"}),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"button small void",onClick:discardContent},vikinger_translation.discard),/*#__PURE__*/_react.default.createElement("p",{className:"button small secondary",onClick:submitContent},vikinger_translation.post_action)))));}

},{"../../../form/ExpandableTextarea":143,"../../../media/UploadableMediaList":208,"react":380}],41:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityVideoList;var _react=_interopRequireDefault(require("react"));var _ActivityMediaList=_interopRequireDefault(require("../ActivityMediaList"));var _ActivityVideoListOptions=_interopRequireDefault(require("./ActivityVideoListOptions"));var _VideoItemList=_interopRequireDefault(require("../../../video/VideoItemList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function ActivityVideoList(props){return/*#__PURE__*/_react.default.createElement(_ActivityMediaList.default,_extends({activityListOptions:_ActivityVideoListOptions.default,gridModifiers:"grid-3-3-3-3",itemPreviewList:_VideoItemList.default,itemPreviewModifiers:"video-box-cover-only animate-slide-down",activityGetType:"activity_video",activityCreateType:"activity_video_upload",sectionTitle:vikinger_translation.videos,noResultsTitle:vikinger_translation.videos_no_results_title,noResultsText:vikinger_translation.videos_no_results_text},props));}

},{"../../../video/VideoItemList":320,"../ActivityMediaList":36,"./ActivityVideoListOptions":42,"react":380}],42:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityVideoListOptions;var _react=_interopRequireDefault(require("react"));var _ActivityMediaListOptions=_interopRequireDefault(require("../ActivityMediaListOptions"));var _ActivityVideoUploadForm=_interopRequireDefault(require("./ActivityVideoUploadForm"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function ActivityVideoListOptions(props){return/*#__PURE__*/_react.default.createElement(_ActivityMediaListOptions.default,_extends({uploadButtonText:vikinger_translation.upload_video,activityUploadForm:_ActivityVideoUploadForm.default},props));}

},{"../ActivityMediaListOptions":37,"./ActivityVideoUploadForm":43,"react":380}],43:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityVideoUploadForm;var _react=_interopRequireWildcard(require("react"));var _ExpandableTextarea=_interopRequireDefault(require("../../../form/ExpandableTextarea"));var _VideoPreview=_interopRequireDefault(require("../../../video/VideoPreview"));var _UploadVideoButton=_interopRequireDefault(require("../../../video/UploadVideoButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var textareaPlaceholderEnd=vikinger_constants.plugin_active.buddypress_friends?vikinger_translation.activity_form_placeholder_2:vikinger_translation.activity_form_placeholder_3;function ActivityVideoUploadForm(props){var _useState=(0,_react.useState)({text:'',submitting:false,uploadable_media:[],uploadable_media_type:'video',errors:[]}),_useState2=_slicedToArray(_useState,2),formData=_useState2[0],setFormData=_useState2[1];var discardContent=function discardContent(){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{text:'',uploadable_media:[],errors:[]});});// console.log('DISCARD CONTENT - POPUP: ', props.popup);
if(props.popup&&props.popup.current){props.popup.current.hide();}};var submitContent=function submitContent(){// if didn't select any media, or already submitting form, return
if(formData.uploadable_media.length===0||formData.submitting){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{errors:[{text:vikinger_translation.upload_form_video_empty_error}]});});return;}setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{submitting:true,errors:[]});});// console.log('ACTIVITY MEDIA UPLOAD FORM - POST CONTENT: ', formData);
props.onSubmit(formData,function(response){// console.log('ACTIVITY MEDIA UPLOAD FORM - CREATED ACTIVITY: ', response);
if(response){discardContent();}else{// console.log('ACTIVITY MEDIA UPLOAD FORM - ERROR CREATING ACTIVITY');
}setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{submitting:false});});});};var handleTextChange=function handleTextChange(e){// e can be default event or user generated with only target and value properties
if(e.persist){e.persist();}setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{text:e.target.value});});// console.log('ACTIVITY MEDIA UPLOAD FORM - STATE:', formData);
};var addUploadableMedia=function addUploadableMedia(data){// console.log('ACTIVITY MEDIA UPLOAD FORM - ADD UPLOADABLE MEDIA: ', data);
// only add video data if user didn't cancel
if(data.length>0){// only add video if size is not higher than maximum allowed
var videoData=data[0],videoSizeInMB=videoData.file.size/(1024*1024);// only add video if file extension is allowed
var extensionAllowed=vikinger_constants.settings.media_video_allowed_extensions.some(function(fileExtension){var fileExtensionCaseSensitiveIsMatch=fileExtension===videoData.extension;var fileExtensionCaseInsensitiveIsMatch=fileExtension.toLowerCase()===videoData.extension.toLowerCase();return vikinger_constants.settings.media_video_allowed_extensions_case_sensitive?fileExtensionCaseSensitiveIsMatch:fileExtensionCaseInsensitiveIsMatch;});// if video extension is not allowed, add error
if(!extensionAllowed){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{errors:[{text:"\"".concat(videoData.file.name,"\" ").concat(vikinger_translation.file_extension_is_not_allowed,".")}]});});// if video size is higher than allowed, show error
}else if(videoSizeInMB>vikinger_constants.settings.media_video_upload_maximum_size){setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{errors:[{text:"\"".concat(videoData.file.name,"\" ").concat(vikinger_translation.size_is_too_big," (").concat(Number.parseFloat(videoSizeInMB).toFixed(2),"MB).")},{text:"".concat(vikinger_translation.maximum_size_accepted_is," ").concat(vikinger_constants.settings.media_video_upload_maximum_size,"MB.")}]});});}else{setFormData(function(previousFormData){return _objectSpread(_objectSpread({},previousFormData),{},{uploadable_media:data,errors:[]});});}}};return/*#__PURE__*/_react.default.createElement("div",{ref:props.forwardedRef,className:"quick-post ".concat(formData.submitting?'disabled':'')},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-header"},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-header-filters-wrap"},/*#__PURE__*/_react.default.createElement("p",{className:"quick-post-header-title"},vikinger_translation.upload_video))),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-body"},/*#__PURE__*/_react.default.createElement("form",{className:"form ".concat(formData.submitting?'disabled':'')},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_ExpandableTextarea.default,{name:"text",value:formData.text,maxLength:vikinger_constants.settings.activity_character_limit,minHeight:120,placeholder:"".concat(vikinger_translation.activity_form_placeholder_1," ").concat(props.user.name,"! ").concat(textareaPlaceholderEnd),userFriends:props.user.friends,handleChange:handleTextChange,loading:formData.submitting,disabled:formData.submitting})))),formData.uploadable_media.length>0&&/*#__PURE__*/_react.default.createElement(_VideoPreview.default,{src:formData.uploadable_media[0].url})),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-wrap"},formData.errors.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-errors"},formData.errors.map(function(error,i){return/*#__PURE__*/_react.default.createElement("p",{key:i,className:"quick-post-footer-error error-field-message"},"* ",error.text);})),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer"},/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-actions"},/*#__PURE__*/_react.default.createElement(_UploadVideoButton.default,{onSelect:addUploadableMedia})),/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"button small void",onClick:discardContent},vikinger_translation.discard),/*#__PURE__*/_react.default.createElement("p",{className:"button small secondary",onClick:submitContent},vikinger_translation.post_action)))));}

},{"../../../form/ExpandableTextarea":143,"../../../video/UploadVideoButton":318,"../../../video/VideoPreview":321,"react":380}],44:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityMediaPopup;var _react=_interopRequireWildcard(require("react"));var _ActivityCommentList=_interopRequireDefault(require("../../comment/ActivityCommentList"));var _PostFooter=_interopRequireDefault(require("../../post/PostFooter"));var _VideoPreview=_interopRequireDefault(require("../../video/VideoPreview"));var _simplebarReact=_interopRequireDefault(require("simplebar-react"));var _plugins=require("../../../utils/plugins");var _activityTemplate=require("../../utils/activity/activity-template");var _activityData=require("../../utils/activity/activity-data");var _group=_interopRequireDefault(require("../../utils/group"));var _reaction=require("../../utils/reaction");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ActivityMediaPopup(props){var activityReactionableProps={entityData:{activity_id:props.data.id},user:props.user,reactions:props.reactions,reactionData:props.data.reactions,onUserReactionUpdate:function onUserReactionUpdate(newReactionData){var newActivityData=(0,_activityData.updateActivityReactions)(props.data,newReactionData);props.onActivityUpdate(newActivityData);}};var activityReactionable=(0,_reaction.ActivityReactionable)(activityReactionableProps);var activityMediaPopupRef=(0,_react.useRef)(null);var simplebarStyles=(0,_react.useRef)({overflowX:'hidden',height:'100%'});var popup=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){popup.current=(0,_plugins.createPopup)({triggerElement:props.activityMediaPopupTriggerRef.current,premadeContentElement:activityMediaPopupRef.current,type:'premade',popupSelectors:['activity-media-popup','animate-slide-down']});},[]);var isGroupActivity=props.data.component==='groups';var ActivityTemplate=(0,_activityTemplate.getActivityTemplate)(props.data.type)({data:props.data,user:props.user,reactions:props.reactions,onActivityUpdate:props.onActivityUpdate});var userCanUseSettings=props.user;// if this activity belongs to a group
if(props.user&&isGroupActivity&&props.data.group){var groupable=(0,_group.default)(props.user,props.data.group);userCanUseSettings=!groupable.isBannedFromGroup();}return/*#__PURE__*/_react.default.createElement("div",{ref:activityMediaPopupRef,className:"popup-picture"},/*#__PURE__*/_react.default.createElement("div",{className:"widget-box no-padding no-settings"},/*#__PURE__*/_react.default.createElement(_simplebarReact.default,{style:simplebarStyles.current},ActivityTemplate,userCanUseSettings&&/*#__PURE__*/_react.default.createElement(_PostFooter.default,{commentCount:props.data.comment_count,shareData:false,simpleOptions:true,user:props.user,reactions:props.reactions,reactionData:props.data.reactions,userReaction:activityReactionable.getUserReaction(),createUserReaction:activityReactionable.createUserReaction,deleteUserReaction:activityReactionable.deleteUserReaction,postType:"activity"},function(updateCommentCount){return/*#__PURE__*/_react.default.createElement(_ActivityCommentList.default,{activityID:props.data.id,parentData:props.data,comments:props.data.comments,updateCommentCount:updateCommentCount,user:props.user,reactions:props.reactions,perPage:2,order:"DESC",replyType:"quick",formPosition:"top"});}))),/*#__PURE__*/_react.default.createElement("div",{className:"popup-picture-image-wrap"},props.data.type==='activity_media'&&/*#__PURE__*/_react.default.createElement("img",{className:"popup-picture-image",src:props.data.media.link,alt:props.data.media.name}),props.data.type==='activity_video'&&/*#__PURE__*/_react.default.createElement(_VideoPreview.default,{src:props.data.media.link})));}

},{"../../../utils/plugins":356,"../../comment/ActivityCommentList":119,"../../post/PostFooter":232,"../../utils/activity/activity-data":299,"../../utils/activity/activity-template":302,"../../utils/group":311,"../../utils/reaction":315,"../../video/VideoPreview":321,"react":380,"simplebar-react":388}],45:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityContent;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ActivityContent(props){var ActivityHeader=props.activityHeader;var ActivityBody=props.activityBody;return/*#__PURE__*/_react.default.createElement("div",{ref:props.widgetBoxStatusRef,className:"widget-box-status"},/*#__PURE__*/_react.default.createElement(ActivityHeader,props),props.editForm&&props.editForm,/*#__PURE__*/_react.default.createElement(ActivityBody,props));}

},{"react":380}],46:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityFriendBody;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../../../user-status/user-status-level/UserStatusLevel"));var _UserStatusTypeList=_interopRequireDefault(require("../../../user-status/user-status-type/UserStatusTypeList"));var _ButtonLink=_interopRequireDefault(require("../../../button/ButtonLink"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _membership=require("../../../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ActivityFriendBody(props){var friendable;if(props.user){friendable=(0,_friend.default)(props.user,props.data.friend.id);}var displayVerified=vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_activity_stream;var displayVerifiedMemberFriendBadge=displayVerified&&props.data.friend.verified;var displayVerifiedMemberFriendBadgeInUsername=displayVerifiedMemberFriendBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username;var displayVerifiedMemberFriendBadgeInFullname=displayVerifiedMemberFriendBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.friend.membership;var memberTypes=props.data.friend.member_types.length>0?props.data.friend.member_types.filter(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];return memberTypeSettings&&memberTypeSettings.show_in_list==='1';}):false;return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-status-content"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-widget"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.friend.link},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-widget-cover",style:{background:"url('".concat(props.data.friend.cover_url,"') center center / cover no-repeat")}})),/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{modifiers:"user-short-description-avatar",data:props.data.friend}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.friend.link},props.data.friend.name),displayVerifiedMemberFriendBadgeInFullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.friend.membership.name,size:"small"}),memberTypes&&/*#__PURE__*/_react.default.createElement(_UserStatusTypeList.default,{tags:memberTypes}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-text"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.friend.link},"@",props.data.friend.mention_name),displayVerifiedMemberFriendBadgeInUsername&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-widget-footer"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-widget-footer-action"}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-widget-footer-action"},_membership.messagePermissions.createMessage&&vikinger_constants.plugin_active.buddypress_messages&&props.user&&props.user.id!==props.data.friend.id&&friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_ButtonLink.default,{modifiers:"primary",title:vikinger_translation.send_message,icon:"messages",link:"".concat(props.user.messages_link,"?user_id=").concat(props.data.friend.id)})))));}

},{"../../../avatar/Avatar":55,"../../../badge/BadgeVerified":82,"../../../button/ButtonLink":84,"../../../user-status/user-status-level/UserStatusLevel":292,"../../../user-status/user-status-type/UserStatusTypeList":297,"../../../utils/friend":309,"../../../utils/membership":312,"react":380}],47:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityFriendHeader;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../../../user-status/user-status-level/UserStatusLevel"));var _UserStatusType=_interopRequireDefault(require("../../../user-status/user-status-type/UserStatusType"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ActivityFriendHeader(props){var displayVerified=vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_activity_stream;var displayVerifiedMemberBadge=displayVerified&&props.data.author.verified;var displayVerifiedMemberFriendBadge=displayVerified&&props.data.friend.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled;var displayMembershipTagForMember=displayMembershipTag&&props.data.author.membership;var displayMembershipTagForFriend=displayMembershipTag&&props.data.friend.membership;return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-status-header"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status-avatar"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",data:props.data.author,noBorder:true})),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title medium"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.author.link},props.data.author.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTagForMember&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.author.membership.name,size:"small"}),props.data.author.member_types.length>0&&props.data.author.member_types.map(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];if(memberTypeSettings&&memberTypeSettings.show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}})," ".concat(vikinger_translation.and),/*#__PURE__*/_react.default.createElement("a",{href:props.data.friend.link}," ".concat(props.data.friend.name)),displayVerifiedMemberFriendBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTagForFriend&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.friend.membership.name,size:"small"}),props.data.friend.member_types.length>0&&props.data.friend.member_types.map(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];if(memberTypeSettings&&memberTypeSettings.show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}}),/*#__PURE__*/_react.default.createElement("span",{dangerouslySetInnerHTML:{__html:" ".concat(props.data.action)}})),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text small"},props.data.timestamp)));}

},{"../../../avatar/Avatar":55,"../../../badge/BadgeVerified":82,"../../../user-status/user-status-level/UserStatusLevel":292,"../../../user-status/user-status-type/UserStatusType":296,"react":380}],48:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityGroupBody;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../../avatar/Avatar"));var _TagSticker=_interopRequireDefault(require("../../../tag/TagSticker"));var _UserStatusTypeList=_interopRequireDefault(require("../../../user-status/user-status-type/UserStatusTypeList"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ActivityGroupBody(props){var memberCountText=props.data.group.total_member_count===1?vikinger_translation.member:vikinger_translation.members;var groupTypes=props.data.group.group_types.length>0?props.data.group.group_types.filter(function(groupType){var groupTypeSettings=vikinger_constants.settings.group_types[groupType];return groupTypeSettings&&groupTypeSettings.show_in_list==='1';}):false;return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-status-content"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-widget"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.group.link},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-widget-cover",style:{background:"url('".concat(props.data.group.cover_image_url,"') center center / cover no-repeat")}})),/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:props.data.group.status}),/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{modifiers:"user-short-description-avatar",data:props.data.group}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.group.link},props.data.group.name)),groupTypes&&/*#__PURE__*/_react.default.createElement(_UserStatusTypeList.default,{tags:groupTypes})),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-widget-footer"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-widget-footer-action"}),/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.group.total_member_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},memberCountText))))));}

},{"../../../avatar/Avatar":55,"../../../tag/TagSticker":276,"../../../user-status/user-status-type/UserStatusTypeList":297,"react":380}],49:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityGroupHeader;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../../../user-status/user-status-level/UserStatusLevel"));var _UserStatusType=_interopRequireDefault(require("../../../user-status/user-status-type/UserStatusType"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ActivityGroupHeader(props){var displayVerified=vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_activity_stream;var displayVerifiedMemberBadge=displayVerified&&props.data.author.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.author.membership;return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-status-header"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status-avatar"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",data:props.data.author,noBorder:true})),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title medium"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.author.link},props.data.author.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.author.membership.name,size:"small"}),props.data.author.member_types.length>0&&props.data.author.member_types.map(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];if(memberTypeSettings&&memberTypeSettings.show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}}),/*#__PURE__*/_react.default.createElement("span",{dangerouslySetInnerHTML:{__html:" ".concat(props.data.action)}})),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text small"},props.data.timestamp)));}

},{"../../../avatar/Avatar":55,"../../../badge/BadgeVerified":82,"../../../user-status/user-status-level/UserStatusLevel":292,"../../../user-status/user-status-type/UserStatusType":296,"react":380}],50:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityShareBody;var _react=_interopRequireDefault(require("react"));var _AlertLine=_interopRequireDefault(require("../../../alert/AlertLine"));var _activityTemplate=require("../../../utils/activity/activity-template");var _activityFilter=require("../../../utils/activity/activity-filter");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ActivityShareBody(props){var ActivityFormat,ActivityTemplate;if(props.data.shared_item){ActivityFormat=props.data.shared_item.format?props.data.shared_item.format:false,ActivityTemplate=(0,_activityTemplate.getActivityTemplate)(props.data.shared_item.type,ActivityFormat)({data:props.data.shared_item,updateSlider:props.updateSlider,loggedUser:props.user,simpleActivity:true,sharePopupActivity:props.sharePopupActivity});}var filteredActivityContent=(0,_activityFilter.filterActivityContentForDisplay)(props.data.content);return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-status-content"},!props.editForm&&/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-status-text",dangerouslySetInnerHTML:{__html:filteredActivityContent}}),!props.data.shared_item&&/*#__PURE__*/_react.default.createElement(_AlertLine.default,{type:"info",title:vikinger_translation.shared_content_deleted_title,text:vikinger_translation.shared_content_deleted_text}),props.data.shared_item&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box no-padding"},ActivityTemplate));}

},{"../../../alert/AlertLine":54,"../../../utils/activity/activity-filter":300,"../../../utils/activity/activity-template":302,"react":380}],51:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityShareHeader;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../../../user-status/user-status-level/UserStatusLevel"));var _UserStatusType=_interopRequireDefault(require("../../../user-status/user-status-type/UserStatusType"));var _EditedByStatus=_interopRequireDefault(require("../../../user-status/user-status-edited-by/EditedByStatus"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ActivityShareHeader(props){var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_activity_stream&&props.data.author.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.author.membership;return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-status-header"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status-avatar"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",data:props.data.author,noBorder:true})),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title medium"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.author.link},props.data.author.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.author.membership.name,size:"small"}),props.data.author.member_types.length>0&&props.data.author.member_types.map(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];if(memberTypeSettings&&memberTypeSettings.show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}}),/*#__PURE__*/_react.default.createElement("span",{dangerouslySetInnerHTML:{__html:" ".concat(props.data.action)}}),props.data.component==='groups'&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"micro",data:props.data.group,noBorder:true}),/*#__PURE__*/_react.default.createElement("a",{href:props.data.group.link},props.data.group.name))),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-text small ".concat(props.data.last_edited?'user-status-text_edited':'')},props.data.timestamp,props.data.last_edited&&/*#__PURE__*/_react.default.createElement(_EditedByStatus.default,{user:props.data.last_edited.user}))));}

},{"../../../avatar/Avatar":55,"../../../badge/BadgeVerified":82,"../../../user-status/user-status-edited-by/EditedByStatus":286,"../../../user-status/user-status-level/UserStatusLevel":292,"../../../user-status/user-status-type/UserStatusType":296,"react":380}],52:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityStatusBody;var _react=_interopRequireWildcard(require("react"));var _PictureCollage=_interopRequireDefault(require("../../../picture/PictureCollage"));var _VideoPreview=_interopRequireDefault(require("../../../video/VideoPreview"));var _ActivityMediaPopup=_interopRequireDefault(require("../../activity-popup/ActivityMediaPopup"));var _YTPlayer=_interopRequireDefault(require("../../../iframe/YTPlayer"));var _core=require("../../../../utils/core");var _activityFilter=require("../../../utils/activity/activity-filter");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ActivityStatusBody(props){var activityMediaPopupTriggerRef=(0,_react.useRef)(null);var onPlay=function onPlay(){props.onPlay(props.data.id);};var bbPressActivity=props.data.component==='bbpress'||props.data.type==='bbp_topic_create'||props.data.type==='bbp_reply_create';var filteredActivityContent=(0,_activityFilter.filterActivityContentForDisplay)(props.data.content);return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-status-content"},props.data.content!==''&&!props.editForm&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,bbPressActivity&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-status-html-content",dangerouslySetInnerHTML:{__html:filteredActivityContent}}),!bbPressActivity&&/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-status-text",dangerouslySetInnerHTML:{__html:filteredActivityContent}})),props.data.uploaded_media&&props.data.uploaded_media.data.length>1&&/*#__PURE__*/_react.default.createElement(_PictureCollage.default,{data:props.data.uploaded_media.data,metadata:props.data.uploaded_media.metadata,user:props.user,reactions:props.reactions,noPopup:props.simpleActivity,onActivityUpdate:props.onActivityUpdate}),props.data.uploaded_media&&props.data.uploaded_media.data.length===1&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,(props.data.type==='activity_video_update'||props.data.type==='activity_video_upload')&&/*#__PURE__*/_react.default.createElement(_VideoPreview.default,{src:props.data.uploaded_media.data[0].media.link}),(props.data.type==='activity_media_update'||props.data.type==='activity_media_upload')&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("figure",{ref:activityMediaPopupTriggerRef,className:"widget-box-picture"},/*#__PURE__*/_react.default.createElement("img",{src:props.data.uploaded_media.data[0].media.link,alt:props.data.uploaded_media.data[0].media.name})),!props.simpleActivity&&/*#__PURE__*/_react.default.createElement(_ActivityMediaPopup.default,{data:props.data.uploaded_media.data[0],user:props.user,reactions:props.reactions,activityMediaPopupTriggerRef:activityMediaPopupTriggerRef,onActivityUpdate:props.onActivityUpdate}))),props.data.meta.attached_media_type&&props.data.meta.attached_media_id&&/*#__PURE__*/_react.default.createElement("div",{className:"iframe-wrap"},props.data.meta.attached_media_type[0]==='youtube'&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_constants.settings.newsfeed_yt_playback_limit==='yes'&&!props.sharePopupActivity&&/*#__PURE__*/_react.default.createElement(_YTPlayer.default,{videoID:props.data.meta.attached_media_id[0],stop:props.data.meta.attached_media_stop,onPlay:onPlay}),(vikinger_constants.settings.newsfeed_yt_playback_limit==='no'||props.sharePopupActivity)&&/*#__PURE__*/_react.default.createElement("iframe",{src:(0,_core.getMediaLink)(props.data.meta.attached_media_type[0],props.data.meta.attached_media_id[0]),allowFullScreen:true})),props.data.meta.attached_media_type[0]!=='youtube'&&/*#__PURE__*/_react.default.createElement("iframe",{src:(0,_core.getMediaLink)(props.data.meta.attached_media_type[0],props.data.meta.attached_media_id[0]),allowFullScreen:true})));}

},{"../../../../utils/core":355,"../../../iframe/YTPlayer":202,"../../../picture/PictureCollage":226,"../../../utils/activity/activity-filter":300,"../../../video/VideoPreview":321,"../../activity-popup/ActivityMediaPopup":44,"react":380}],53:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityStatusHeader;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../../../user-status/user-status-level/UserStatusLevel"));var _UserStatusType=_interopRequireDefault(require("../../../user-status/user-status-type/UserStatusType"));var _EditedByStatus=_interopRequireDefault(require("../../../user-status/user-status-edited-by/EditedByStatus"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ActivityStatusHeader(props){var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_activity_stream&&props.data.author.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.author.membership;// console.log('ACTIVITY STATUS HEADER - ACTIVITY DATA: ', props.data);
return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-status-header"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status"},/*#__PURE__*/_react.default.createElement("div",{className:"user-status-avatar"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",data:props.data.author,noBorder:true})),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title medium"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.author.link},props.data.author.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.author.membership.name,size:"small"}),props.data.author.member_types.length>0&&props.data.author.member_types.map(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];if(memberTypeSettings&&memberTypeSettings.show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}}),/*#__PURE__*/_react.default.createElement("span",{dangerouslySetInnerHTML:{__html:" ".concat(props.data.action)}}),props.data.component==='groups'&&props.data.type!=='bbp_topic_create'&&props.data.type!=='bbp_reply_create'&&props.data.group&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"micro",data:props.data.group,noBorder:true}),/*#__PURE__*/_react.default.createElement("a",{href:props.data.group.link},props.data.group.name))),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-text small ".concat(props.data.last_edited?'user-status-text_edited':'')},props.data.timestamp,props.data.last_edited&&/*#__PURE__*/_react.default.createElement(_EditedByStatus.default,{user:props.data.last_edited.user}))));}

},{"../../../avatar/Avatar":55,"../../../badge/BadgeVerified":82,"../../../user-status/user-status-edited-by/EditedByStatus":286,"../../../user-status/user-status-level/UserStatusLevel":292,"../../../user-status/user-status-type/UserStatusType":296,"react":380}],54:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AlertLine;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function AlertLine(props){return/*#__PURE__*/_react.default.createElement("div",{className:"alert-line alert-line-".concat(props.type)},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:props.type,modifiers:"alert-line-icon"}),/*#__PURE__*/_react.default.createElement("p",{className:"alert-line-text"},/*#__PURE__*/_react.default.createElement("span",{className:"bold"},props.title)," ",props.text));}

},{"../icon/IconSVG":201,"react":380}],55:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Avatar;var _react=_interopRequireDefault(require("react"));var _avatar=require("../utils/avatar");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var avatarType=vikinger_constants.settings.avatar_type;function Avatar(props){var avatarSize=props.size?props.size:'regular';var AvatarElement=(0,_avatar.getAvatarTemplate)(avatarType,avatarSize);return/*#__PURE__*/_react.default.createElement(AvatarElement,props);}

},{"../utils/avatar":304,"react":380}],56:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarSmallerList;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("./Avatar"));var _AvatarOverlay=_interopRequireDefault(require("./avatar-overlay/AvatarOverlay"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function AvatarSmallerList(props){var displayCount=props.limit?Math.min(props.limit,props.data.length):props.data.length;var moreItems=props.count>displayCount?props.count-displayCount:0;var renderedItems=[];for(var i=0;i<displayCount;i++){var dataItem=props.data[i],lastItem=i===displayCount-1;if(lastItem&&moreItems){renderedItems.push(/*#__PURE__*/_react.default.createElement(_AvatarOverlay.default,{size:"smaller",key:dataItem.id,data:dataItem,count:moreItems,link:props.link}));}else{renderedItems.push(/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"smaller",key:dataItem.id,data:dataItem}));}}return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-list medium reverse centered"},renderedItems);}

},{"./Avatar":55,"./avatar-overlay/AvatarOverlay":71,"react":380}],57:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarCircle;var _react=_interopRequireDefault(require("react"));var _CircleProgressBar=_interopRequireDefault(require("../../progress/CircleProgressBar"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarCircle(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle ".concat(!props.data.rank?'no-stats':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}),props.data.rank&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_CircleProgressBar.default,{size:"regular",fillAmount:props.data.rank.current/props.data.rank.total}),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge"},/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge-content"},/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-circle-badge-content-text"},props.data.rank.current)))));}

},{"../../progress/CircleProgressBar":245,"react":380}],58:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarCircleMedium;var _react=_interopRequireDefault(require("react"));var _CircleProgressBar=_interopRequireDefault(require("../../progress/CircleProgressBar"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarCircleMedium(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle medium ".concat(!props.data.rank?'no-stats':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}),props.data.rank&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_CircleProgressBar.default,{size:"medium",fillAmount:props.data.rank.current/props.data.rank.total}),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge"},/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge-content"},/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-circle-badge-content-text"},props.data.rank.current)))));}

},{"../../progress/CircleProgressBar":245,"react":380}],59:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarCircleMicro;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarCircleMicro(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle micro ".concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}));}

},{"react":380}],60:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarCircleSmall;var _react=_interopRequireDefault(require("react"));var _CircleProgressBar=_interopRequireDefault(require("../../progress/CircleProgressBar"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarCircleSmall(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle small ".concat(!props.data.rank?'no-stats':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}),props.data.rank&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_CircleProgressBar.default,{size:"small",fillAmount:props.data.rank.current/props.data.rank.total}),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge"},/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge-content"},/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-circle-badge-content-text"},props.data.rank.current)))));}

},{"../../progress/CircleProgressBar":245,"react":380}],61:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarCircleSmaller;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarCircleSmaller(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle smaller ".concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}));}

},{"react":380}],62:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarCircleTiny;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarCircleTiny(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle tiny ".concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}));}

},{"react":380}],63:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarCircleOverlaySmaller;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarCircleOverlaySmaller(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle smaller ".concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-overlay"},/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-circle-overlay-text"},"+",props.count)));}

},{"react":380}],64:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarHexagon;var _react=_interopRequireDefault(require("react"));var _HexagonBorder_100_=_interopRequireDefault(require("../../hexagon/hexagon-border/HexagonBorder_100_110"));var _HexagonBadge_22_=_interopRequireDefault(require("../../hexagon/hexagon-badge/HexagonBadge_22_24"));var _HexagonBadgeBorder_28_=_interopRequireDefault(require("../../hexagon/hexagon-badge/hexagon-badge-border/HexagonBadgeBorder_28_32"));var _HexagonImage_68_=_interopRequireDefault(require("../../hexagon/hexagon-image/HexagonImage_68_74"));var _HexagonImage_82_=_interopRequireDefault(require("../../hexagon/hexagon-image/HexagonImage_82_90"));var _HexagonProgress_84_=_interopRequireDefault(require("../../hexagon/hexagon-progress/HexagonProgress_84_92"));var _HexagonProgressBorder_84_=_interopRequireDefault(require("../../hexagon/hexagon-progress/hexagon-progress-border/HexagonProgressBorder_84_92"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarHexagon(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar ".concat(!props.data.rank?'no-stats':''," ").concat(props.noBorder&&props.data.rank?'no-outline':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),!props.noBorder&&/*#__PURE__*/_react.default.createElement(_HexagonBorder_100_.default,null),!props.data.rank&&/*#__PURE__*/_react.default.createElement(_HexagonImage_82_.default,{imageURL:props.data.avatar_url}),props.data.rank&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_HexagonImage_68_.default,{imageURL:props.data.avatar_url}),/*#__PURE__*/_react.default.createElement(_HexagonProgress_84_.default,{data:props.data.rank}),/*#__PURE__*/_react.default.createElement(_HexagonProgressBorder_84_.default,null),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-badge"},/*#__PURE__*/_react.default.createElement(_HexagonBadgeBorder_28_.default,null),/*#__PURE__*/_react.default.createElement(_HexagonBadge_22_.default,null),/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-badge-text"},props.data.rank.current))));}

},{"../../hexagon/hexagon-badge/HexagonBadge_22_24":177,"../../hexagon/hexagon-badge/hexagon-badge-border/HexagonBadgeBorder_28_32":180,"../../hexagon/hexagon-border/HexagonBorder_100_110":182,"../../hexagon/hexagon-image/HexagonImage_68_74":192,"../../hexagon/hexagon-image/HexagonImage_82_90":193,"../../hexagon/hexagon-progress/HexagonProgress_84_92":197,"../../hexagon/hexagon-progress/hexagon-progress-border/HexagonProgressBorder_84_92":200,"react":380}],65:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarHexagonMedium;var _react=_interopRequireDefault(require("react"));var _HexagonBorder_120_=_interopRequireDefault(require("../../hexagon/hexagon-border/HexagonBorder_120_130"));var _HexagonBadge_26_=_interopRequireDefault(require("../../hexagon/hexagon-badge/HexagonBadge_26_28"));var _HexagonBadgeBorder_32_=_interopRequireDefault(require("../../hexagon/hexagon-badge/hexagon-badge-border/HexagonBadgeBorder_32_36"));var _HexagonImage_82_=_interopRequireDefault(require("../../hexagon/hexagon-image/HexagonImage_82_90"));var _HexagonImage_100_=_interopRequireDefault(require("../../hexagon/hexagon-image/HexagonImage_100_110"));var _HexagonProgress_100_=_interopRequireDefault(require("../../hexagon/hexagon-progress/HexagonProgress_100_110"));var _HexagonProgressBorder_100_=_interopRequireDefault(require("../../hexagon/hexagon-progress/hexagon-progress-border/HexagonProgressBorder_100_110"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarHexagonMedium(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar medium ".concat(!props.data.rank?'no-stats':''," ").concat(props.noBorder&&props.data.rank?'no-outline':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),!props.noBorder&&/*#__PURE__*/_react.default.createElement(_HexagonBorder_120_.default,null),!props.data.rank&&/*#__PURE__*/_react.default.createElement(_HexagonImage_100_.default,{imageURL:props.data.avatar_url}),props.data.rank&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_HexagonImage_82_.default,{imageURL:props.data.avatar_url}),/*#__PURE__*/_react.default.createElement(_HexagonProgress_100_.default,{data:props.data.rank}),/*#__PURE__*/_react.default.createElement(_HexagonProgressBorder_100_.default,null),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-badge"},/*#__PURE__*/_react.default.createElement(_HexagonBadgeBorder_32_.default,null),/*#__PURE__*/_react.default.createElement(_HexagonBadge_26_.default,null),/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-badge-text"},props.data.rank.current))));}

},{"../../hexagon/hexagon-badge/HexagonBadge_26_28":178,"../../hexagon/hexagon-badge/hexagon-badge-border/HexagonBadgeBorder_32_36":181,"../../hexagon/hexagon-border/HexagonBorder_120_130":183,"../../hexagon/hexagon-image/HexagonImage_100_110":187,"../../hexagon/hexagon-image/HexagonImage_82_90":193,"../../hexagon/hexagon-progress/HexagonProgress_100_110":195,"../../hexagon/hexagon-progress/hexagon-progress-border/HexagonProgressBorder_100_110":198,"react":380}],66:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarHexagonMicro;var _react=_interopRequireDefault(require("react"));var _HexagonBorder_22_=_interopRequireDefault(require("../../hexagon/hexagon-border/HexagonBorder_22_24"));var _HexagonImage_18_=_interopRequireDefault(require("../../hexagon/hexagon-image/HexagonImage_18_20"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarHexagonMicro(props){var Element=props.noLink?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar micro no-stats ".concat(props.noBorder?'no-border':''," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),!props.noBorder&&/*#__PURE__*/_react.default.createElement(_HexagonBorder_22_.default,null),/*#__PURE__*/_react.default.createElement(_HexagonImage_18_.default,{imageURL:props.data.avatar_url}));}

},{"../../hexagon/hexagon-border/HexagonBorder_22_24":184,"../../hexagon/hexagon-image/HexagonImage_18_20":188,"react":380}],67:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarHexagonSmall;var _react=_interopRequireDefault(require("react"));var _HexagonBorder_50_=_interopRequireDefault(require("../../hexagon/hexagon-border/HexagonBorder_50_56"));var _HexagonBadge_16_=_interopRequireDefault(require("../../hexagon/hexagon-badge/HexagonBadge_16_18"));var _HexagonBadgeBorder_22_=_interopRequireDefault(require("../../hexagon/hexagon-badge/hexagon-badge-border/HexagonBadgeBorder_22_24"));var _HexagonImage_30_=_interopRequireDefault(require("../../hexagon/hexagon-image/HexagonImage_30_32"));var _HexagonImage_40_=_interopRequireDefault(require("../../hexagon/hexagon-image/HexagonImage_40_44"));var _HexagonProgress_40_=_interopRequireDefault(require("../../hexagon/hexagon-progress/HexagonProgress_40_44"));var _HexagonProgressBorder_40_=_interopRequireDefault(require("../../hexagon/hexagon-progress/hexagon-progress-border/HexagonProgressBorder_40_44"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarHexagonSmall(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar small ".concat(!props.data.rank?'no-stats':''," ").concat(props.noBorder&&props.data.rank?'no-outline':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),!props.noBorder&&/*#__PURE__*/_react.default.createElement(_HexagonBorder_50_.default,null),!props.data.rank&&/*#__PURE__*/_react.default.createElement(_HexagonImage_40_.default,{imageURL:props.data.avatar_url}),props.data.rank&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_HexagonImage_30_.default,{imageURL:props.data.avatar_url}),/*#__PURE__*/_react.default.createElement(_HexagonProgress_40_.default,{data:props.data.rank}),/*#__PURE__*/_react.default.createElement(_HexagonProgressBorder_40_.default,null),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-badge"},/*#__PURE__*/_react.default.createElement(_HexagonBadgeBorder_22_.default,null),/*#__PURE__*/_react.default.createElement(_HexagonBadge_16_.default,null),/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-badge-text"},props.data.rank.current))));}

},{"../../hexagon/hexagon-badge/HexagonBadge_16_18":176,"../../hexagon/hexagon-badge/hexagon-badge-border/HexagonBadgeBorder_22_24":179,"../../hexagon/hexagon-border/HexagonBorder_50_56":186,"../../hexagon/hexagon-image/HexagonImage_30_32":190,"../../hexagon/hexagon-image/HexagonImage_40_44":191,"../../hexagon/hexagon-progress/HexagonProgress_40_44":196,"../../hexagon/hexagon-progress/hexagon-progress-border/HexagonProgressBorder_40_44":199,"react":380}],68:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarHexagonSmaller;var _react=_interopRequireDefault(require("react"));var _HexagonBorder_34_=_interopRequireDefault(require("../../hexagon/hexagon-border/HexagonBorder_34_36"));var _HexagonImage_30_=_interopRequireDefault(require("../../hexagon/hexagon-image/HexagonImage_30_32"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarHexagonSmaller(props){var Element=props.noLink?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar smaller no-stats ".concat(props.noBorder?'no-border':''," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),!props.noBorder&&/*#__PURE__*/_react.default.createElement(_HexagonBorder_34_.default,null),/*#__PURE__*/_react.default.createElement(_HexagonImage_30_.default,{imageURL:props.data.avatar_url}));}

},{"../../hexagon/hexagon-border/HexagonBorder_34_36":185,"../../hexagon/hexagon-image/HexagonImage_30_32":190,"react":380}],69:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarHexagonTiny;var _react=_interopRequireDefault(require("react"));var _HexagonBorder_22_=_interopRequireDefault(require("../../hexagon/hexagon-border/HexagonBorder_22_24"));var _HexagonImage_24_=_interopRequireDefault(require("../../hexagon/hexagon-image/HexagonImage_24_26"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarHexagonTiny(props){var Element=props.noLink?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar tiny ".concat(props.noBorder?'no-border':''," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),!props.noBorder&&/*#__PURE__*/_react.default.createElement(_HexagonBorder_22_.default,null),/*#__PURE__*/_react.default.createElement(_HexagonImage_24_.default,{imageURL:props.data.avatar_url}));}

},{"../../hexagon/hexagon-border/HexagonBorder_22_24":184,"../../hexagon/hexagon-image/HexagonImage_24_26":189,"react":380}],70:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarHexagonOverlaySmaller;var _react=_interopRequireDefault(require("react"));var _HexagonBorder_34_=_interopRequireDefault(require("../../../hexagon/hexagon-border/HexagonBorder_34_36"));var _HexagonImage_30_=_interopRequireDefault(require("../../../hexagon/hexagon-image/HexagonImage_30_32"));var _HexagonOverlay_30_=_interopRequireDefault(require("../../../hexagon/hexagon-overlay/HexagonOverlay_30_32"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarHexagonOverlaySmaller(props){var Element=props.noLink?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar smaller no-stats ".concat(props.modifiers||'')},!props.noLink?{href:props.link}:{}),/*#__PURE__*/_react.default.createElement(_HexagonBorder_34_.default,null),/*#__PURE__*/_react.default.createElement(_HexagonImage_30_.default,{imageURL:props.data.avatar_url}),/*#__PURE__*/_react.default.createElement(_HexagonOverlay_30_.default,null),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-overlay-content"},/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-overlay-content-text"},"+",props.count)));}

},{"../../../hexagon/hexagon-border/HexagonBorder_34_36":185,"../../../hexagon/hexagon-image/HexagonImage_30_32":190,"../../../hexagon/hexagon-overlay/HexagonOverlay_30_32":194,"react":380}],71:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarOverlay;var _react=_interopRequireDefault(require("react"));var _avatar=require("../../utils/avatar");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var avatarOverlayType=vikinger_constants.settings.avatar_type;function AvatarOverlay(props){var avatarOverlaySize=props.size?props.size:'regular';var AvatarElement=(0,_avatar.getAvatarOverlayTemplate)(avatarOverlayType,avatarOverlaySize);return/*#__PURE__*/_react.default.createElement(AvatarElement,props);}

},{"../../utils/avatar":304,"react":380}],72:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarSquare;var _react=_interopRequireDefault(require("react"));var _SquareProgressBar=_interopRequireDefault(require("../../progress/SquareProgressBar"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarSquare(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle user-avatar-circle-flat ".concat(!props.data.rank?'no-stats':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}),props.data.rank&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-progress"},/*#__PURE__*/_react.default.createElement(_SquareProgressBar.default,{size:"regular",fillAmount:props.data.rank.current/props.data.rank.total})),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge"},/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge-content"},/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-circle-badge-content-text"},props.data.rank.current)))));}

},{"../../progress/SquareProgressBar":246,"react":380}],73:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarSquareMedium;var _react=_interopRequireDefault(require("react"));var _SquareProgressBar=_interopRequireDefault(require("../../progress/SquareProgressBar"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarSquareMedium(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle user-avatar-circle-flat medium ".concat(!props.data.rank?'no-stats':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}),props.data.rank&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-progress"},/*#__PURE__*/_react.default.createElement(_SquareProgressBar.default,{size:"medium",fillAmount:props.data.rank.current/props.data.rank.total})),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge"},/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge-content"},/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-circle-badge-content-text"},props.data.rank.current)))));}

},{"../../progress/SquareProgressBar":246,"react":380}],74:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarSquareMicro;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarSquareMicro(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle user-avatar-circle-flat micro ".concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}));}

},{"react":380}],75:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarSquareSmall;var _react=_interopRequireDefault(require("react"));var _SquareProgressBar=_interopRequireDefault(require("../../progress/SquareProgressBar"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarSquareSmall(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle user-avatar-circle-flat small ".concat(!props.data.rank?'no-stats':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}),props.data.rank&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-progress"},/*#__PURE__*/_react.default.createElement(_SquareProgressBar.default,{size:"small",fillAmount:props.data.rank.current/props.data.rank.total})),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge"},/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-badge-content"},/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-circle-badge-content-text"},props.data.rank.current)))));}

},{"../../progress/SquareProgressBar":246,"react":380}],76:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarSquareSmaller;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarSquareSmaller(props){var noStats=typeof props.data.rank==='undefined';var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle user-avatar-circle-flat smaller ".concat(noStats?'no-stats':''," ").concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}));}

},{"react":380}],77:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarSquareTiny;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarSquareTiny(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle user-avatar-circle-flat tiny ".concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.data.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}));}

},{"react":380}],78:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AvatarSquareOverlaySmaller;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AvatarSquareOverlaySmaller(props){var noBorderClasses=props.noBorder?'no-border':'';var Element=props.noLink||!vikinger_constants.plugin_active.buddypress?'div':'a';return/*#__PURE__*/_react.default.createElement(Element,_extends({className:"user-avatar-circle user-avatar-circle-flat smaller ".concat(noBorderClasses," ").concat(props.modifiers||'')},!props.noLink?{href:props.link}:{}),/*#__PURE__*/_react.default.createElement("img",{className:"user-avatar-circle-image",src:props.data.avatar_url,alt:"user-avatar"}),/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-circle-overlay"},/*#__PURE__*/_react.default.createElement("p",{className:"user-avatar-circle-overlay-text"},"+",props.count)));}

},{"react":380}],79:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=BadgeItem;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function BadgeItem(props){var tooltipRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createTooltip)({containerElement:tooltipRef.current,offset:4,direction:'top',animation:{type:'translate-out-fade'}});},[props.data.name]);return/*#__PURE__*/_react.default.createElement("div",{ref:tooltipRef,className:"badge-item","data-title":props.data.name},/*#__PURE__*/_react.default.createElement("img",{src:props.data.image_url,alt:props.data.slug}));}

},{"../../utils/plugins":356,"react":380}],80:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=BadgeItemList;var _react=_interopRequireDefault(require("react"));var _BadgeItem=_interopRequireDefault(require("./BadgeItem"));var _BadgeItemMore=_interopRequireDefault(require("./BadgeItemMore"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BadgeItemList(props){var maxDisplayCount=props.maxDisplayCount||props.data.length,badgesCount=props.data.length,displayCount=Math.min(maxDisplayCount,badgesCount),badges=props.data.slice(0,displayCount),moreCount=badgesCount-displayCount>0?badgesCount-displayCount:0;var badgeItems=badges.map(function(badge){return/*#__PURE__*/_react.default.createElement(_BadgeItem.default,{key:badge.id,data:badge});});return/*#__PURE__*/_react.default.createElement("div",{className:"badge-list ".concat(props.modifiers||'')},badgeItems,moreCount>0&&/*#__PURE__*/_react.default.createElement(_BadgeItemMore.default,{more_count:moreCount,more_link:props.moreLink}));}

},{"./BadgeItem":79,"./BadgeItemMore":81,"react":380}],81:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=BadgeItemMore;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BadgeItemMore(props){return/*#__PURE__*/_react.default.createElement("a",{className:"badge-item badge-item-more",href:props.more_link},/*#__PURE__*/_react.default.createElement("img",{src:"".concat(vikinger_constants.settings.badge_view_more_image_url),alt:"View more badges"}),/*#__PURE__*/_react.default.createElement("p",{className:"badge-item-text"},"+",props.more_count));}

},{"react":380}],82:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=BadgeVerified;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BadgeVerified(props){return/*#__PURE__*/_react.default.createElement("span",{dangerouslySetInnerHTML:{__html:vikinger_constants.settings.bp_verified_member_badge}});}

},{"react":380}],83:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=Button;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function Button(props){var tooltipRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(props.title){(0,_plugins.createTooltip)({containerElement:tooltipRef.current,offset:4,direction:'top',animation:{type:'translate-out-fade'}});}},[props.title]);return/*#__PURE__*/_react.default.createElement("div",_extends({ref:tooltipRef,className:"button ".concat(props.modifiers||''," ").concat(props.icon&&!props.text?'with-only-icon':'')},props.title?{'data-title':props.title}:{},{onClick:props.onClick}),!props.loading&&props.icon&&/*#__PURE__*/_react.default.createElement(_IconSVG.default,{modifiers:"button-icon",icon:props.icon}),props.text,props.loading&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null));}

},{"../../utils/plugins":356,"../icon/IconSVG":201,"../loader/LoaderSpinnerSmall":205,"react":380}],84:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ButtonLink;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function ButtonLink(props){var tooltipRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(props.title){(0,_plugins.createTooltip)({containerElement:tooltipRef.current,offset:4,direction:'top',animation:{type:'translate-out-fade'}});}},[props.title]);return/*#__PURE__*/_react.default.createElement("a",_extends({ref:tooltipRef,className:"button ".concat(props.modifiers||''," ").concat(props.icon&&!props.text?'with-only-icon':'')},props.title?{'data-title':props.title}:{},{href:props.link}),props.icon&&/*#__PURE__*/_react.default.createElement(_IconSVG.default,{modifiers:"button-icon",icon:props.icon}),props.text);}

},{"../../utils/plugins":356,"../icon/IconSVG":201,"react":380}],85:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=IconButton;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function IconButton(props){var tooltipRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(props.title){(0,_plugins.createTooltip)({containerElement:tooltipRef.current,offset:4,direction:'top',animation:{type:'translate-out-fade'}});}},[props.title]);return/*#__PURE__*/_react.default.createElement("div",_extends({ref:tooltipRef,className:"action-request ".concat(props.type)},props.title?{'data-title':props.title}:{},{onClick:props.onClick}),!props.loading&&/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:props.icon,modifiers:"action-request-icon"}),props.loading&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null));}

},{"../../utils/plugins":356,"../icon/IconSVG":201,"../loader/LoaderSpinnerSmall":205,"react":380}],86:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActionButton;var _react=_interopRequireWildcard(require("react"));var _Button=_interopRequireDefault(require("../Button"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ActionButton(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loading=_useState2[0],setLoading=_useState2[1];var doAction=function doAction(){if(loading||props.locked){return;}if(props.onActionStart){props.onActionStart();}if(props.action){setLoading(true);props.action().done(function(result){// console.log('ACTION BUTTON - RESULT: ', result);
if(result){if(props.onActionComplete){props.onActionComplete();}}else{setLoading(false);}}).fail(function(error){// console.log('ACTION BUTTON - ERROR: ', error);
setLoading(false);});}};return/*#__PURE__*/_react.default.createElement(_Button.default,{modifiers:props.modifiers,text:props.text,icon:props.icon,title:props.title,loading:loading,onClick:doAction});}

},{"../Button":83,"react":380}],87:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AcceptFriendRequestButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AcceptFriendRequestButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:friendable.acceptFriendRequest}));}

},{"../../../utils/friend":309,"../ActionButton":86,"react":380}],88:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AddFriendButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AddFriendButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:friendable.addFriend}));}

},{"../../../utils/friend":309,"../ActionButton":86,"react":380}],89:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=RejectFriendRequestButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function RejectFriendRequestButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:friendable.rejectFriendRequest}));}

},{"../../../utils/friend":309,"../ActionButton":86,"react":380}],90:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=RemoveFriendButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function RemoveFriendButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:friendable.removeFriend}));}

},{"../../../utils/friend":309,"../ActionButton":86,"react":380}],91:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=WithdrawFriendRequestButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function WithdrawFriendRequestButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:friendable.withdrawFriendRequest}));}

},{"../../../utils/friend":309,"../ActionButton":86,"react":380}],92:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=AcceptGroupInvitationButton;var _react=_interopRequireDefault(require("react"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));var groupMemberRouter=_interopRequireWildcard(require("../../../../router/group-member/group-member-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AcceptGroupInvitationButton(props){var acceptGroupInvitation=function acceptGroupInvitation(){return groupMemberRouter.acceptGroupInvitation(props.data.id);};return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:acceptGroupInvitation}));}

},{"../../../../router/group-member/group-member-router":346,"../ActionButton":86,"react":380}],93:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=AcceptGroupMembershipButton;var _react=_interopRequireDefault(require("react"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));var groupMemberRouter=_interopRequireWildcard(require("../../../../router/group-member/group-member-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function AcceptGroupMembershipButton(props){var acceptGroupMembership=function acceptGroupMembership(){return groupMemberRouter.acceptGroupMembership(props.data.id);};return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:acceptGroupMembership}));}

},{"../../../../router/group-member/group-member-router":346,"../ActionButton":86,"react":380}],94:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=CancelGroupMembershipButton;var _react=_interopRequireDefault(require("react"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));var groupMemberRouter=_interopRequireWildcard(require("../../../../router/group-member/group-member-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function CancelGroupMembershipButton(props){var removeGroupMembership=function removeGroupMembership(){return groupMemberRouter.removeGroupMembership(props.data.id);};return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:removeGroupMembership}));}

},{"../../../../router/group-member/group-member-router":346,"../ActionButton":86,"react":380}],95:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=JoinGroupButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function JoinGroupButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group);return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:groupable.joinGroup}));}

},{"../../../utils/group":311,"../ActionButton":86,"react":380}],96:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=LeaveGroupButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function LeaveGroupButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group);return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:groupable.leaveGroup}));}

},{"../../../utils/group":311,"../ActionButton":86,"react":380}],97:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=RejectGroupMembershipButton;var _react=_interopRequireDefault(require("react"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));var groupMemberRouter=_interopRequireWildcard(require("../../../../router/group-member/group-member-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function RejectGroupMembershipButton(props){var rejectGroupMembership=function rejectGroupMembership(){return groupMemberRouter.removeGroupMembership(props.data.id);};return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:rejectGroupMembership}));}

},{"../../../../router/group-member/group-member-router":346,"../ActionButton":86,"react":380}],98:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=RemoveGroupInvitationButton;var _react=_interopRequireDefault(require("react"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));var groupMemberRouter=_interopRequireWildcard(require("../../../../router/group-member/group-member-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function RemoveGroupInvitationButton(props){var removeGroupInvitation=function removeGroupInvitation(){return groupMemberRouter.removeGroupInvitation(props.data.id);};return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:removeGroupInvitation}));}

},{"../../../../router/group-member/group-member-router":346,"../ActionButton":86,"react":380}],99:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=RemoveGroupMembershipButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function RemoveGroupMembershipButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group);return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:groupable.removeGroupMembership}));}

},{"../../../utils/group":311,"../ActionButton":86,"react":380}],100:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=RequestGroupMembershipButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionButton=_interopRequireDefault(require("../ActionButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function RequestGroupMembershipButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group);return/*#__PURE__*/_react.default.createElement(_ActionButton.default,_extends({},props,{action:groupable.requestGroupMembership}));}

},{"../../../utils/group":311,"../ActionButton":86,"react":380}],101:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActionIconButton;var _react=_interopRequireWildcard(require("react"));var _IconButton=_interopRequireDefault(require("../IconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ActionIconButton(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loading=_useState2[0],setLoading=_useState2[1];var doAction=function doAction(){if(loading||props.locked){return;}if(props.onActionStart){props.onActionStart();}if(props.action){setLoading(true);props.action().done(function(response){// console.log('ACTION ICON BUTTON - ACTION RESPONSE: ', response);
if(response){if(props.onActionComplete){props.onActionComplete();}}else{setLoading(false);}}).fail(function(error){// console.log('ACTION ICON BUTTON - ACTION ERROR: ', error);
setLoading(false);});}};return/*#__PURE__*/_react.default.createElement(_IconButton.default,{icon:props.icon,type:props.type,title:props.title,loading:loading,onClick:doAction});}

},{"../IconButton":85,"react":380}],102:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AcceptFriendRequestIconButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function AcceptFriendRequestIconButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"add-friend",type:"accept",title:vikinger_translation.accept_friend,action:friendable.acceptFriendRequest,onActionStart:props.onActionStart,onActionComplete:props.onActionComplete,locked:props.locked});}

},{"../../../utils/friend":309,"../ActionIconButton":101,"react":380}],103:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AddFriendIconButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function AddFriendIconButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"add-friend",type:"accept",title:vikinger_translation.add_friend,action:friendable.addFriend,onActionComplete:props.onActionComplete});}

},{"../../../utils/friend":309,"../ActionIconButton":101,"react":380}],104:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=RejectFriendRequestIconButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RejectFriendRequestIconButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"remove-friend",type:"decline",title:vikinger_translation.reject_friend,action:friendable.rejectFriendRequest,onActionStart:props.onActionStart,onActionComplete:props.onActionComplete,locked:props.locked});}

},{"../../../utils/friend":309,"../ActionIconButton":101,"react":380}],105:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=RemoveFriendIconButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RemoveFriendIconButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"remove-friend",type:"decline",title:vikinger_translation.remove_friend,action:friendable.removeFriend,onActionComplete:props.onActionComplete});}

},{"../../../utils/friend":309,"../ActionIconButton":101,"react":380}],106:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=WithdrawFriendRequestIconButton;var _react=_interopRequireDefault(require("react"));var _friend=_interopRequireDefault(require("../../../utils/friend"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function WithdrawFriendRequestIconButton(props){var friendable=(0,_friend.default)(props.loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"remove-friend",type:"decline",title:vikinger_translation.withdraw_friend,action:friendable.withdrawFriendRequest,onActionComplete:props.onActionComplete});}

},{"../../../utils/friend":309,"../ActionIconButton":101,"react":380}],107:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=BanGroupMemberIconButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function BanGroupMemberIconButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group,props.member);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"ban",type:"decline",title:vikinger_translation.ban_member,action:groupable.banGroupMember,onActionComplete:props.onActionComplete});}

},{"../../../utils/group":311,"../ActionIconButton":101,"react":380}],108:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=DemoteGroupMemberToMemberIconButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DemoteGroupMemberToMemberIconButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group,props.member);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"members",type:"decline",title:vikinger_translation.demote_to_member,action:groupable.demoteGroupMemberToMember,onActionComplete:props.onActionComplete});}

},{"../../../utils/group":311,"../ActionIconButton":101,"react":380}],109:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=DemoteGroupMemberToModIconButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function DemoteGroupMemberToModIconButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group,props.member);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"mod-shield",type:"decline",title:vikinger_translation.demote_to_mod,action:groupable.demoteGroupMemberToMod,onActionComplete:props.onActionComplete});}

},{"../../../utils/group":311,"../ActionIconButton":101,"react":380}],110:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PromoteGroupMemberToAdminIconButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PromoteGroupMemberToAdminIconButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group,props.member);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"admin-crown",type:"accept",title:vikinger_translation.promote_to_admin,action:groupable.promoteGroupMemberToAdmin,onActionComplete:props.onActionComplete});}

},{"../../../utils/group":311,"../ActionIconButton":101,"react":380}],111:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PromoteGroupMemberToModIconButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PromoteGroupMemberToModIconButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group,props.member);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"mod-shield",type:"accept",title:vikinger_translation.promote_to_mod,action:groupable.promoteGroupMemberToMod,onActionComplete:props.onActionComplete});}

},{"../../../utils/group":311,"../ActionIconButton":101,"react":380}],112:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=RemoveGroupInvitationIconButton;var _react=_interopRequireDefault(require("react"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));var groupMemberRouter=_interopRequireWildcard(require("../../../../router/group-member/group-member-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RemoveGroupInvitationIconButton(props){var removeGroupInvitation=function removeGroupInvitation(){return groupMemberRouter.removeGroupInvitation(props.data.id);};return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"remove-user",type:"decline",title:vikinger_translation.remove_invitation,action:removeGroupInvitation,onActionComplete:props.onActionComplete});}

},{"../../../../router/group-member/group-member-router":346,"../ActionIconButton":101,"react":380}],113:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=RemoveGroupMemberIconButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function RemoveGroupMemberIconButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group,props.member);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"remove-user",type:"decline",title:vikinger_translation.remove_member,action:groupable.removeGroupMember,onActionComplete:props.onActionComplete});}

},{"../../../utils/group":311,"../ActionIconButton":101,"react":380}],114:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UnbanGroupMemberIconButton;var _react=_interopRequireDefault(require("react"));var _group=_interopRequireDefault(require("../../../utils/group"));var _ActionIconButton=_interopRequireDefault(require("../ActionIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UnbanGroupMemberIconButton(props){var groupable=(0,_group.default)(props.loggedUser,props.group,props.member);return/*#__PURE__*/_react.default.createElement(_ActionIconButton.default,{icon:"ban",type:"accept",title:vikinger_translation.unban_member,action:groupable.unbanGroupMember,onActionComplete:props.onActionComplete});}

},{"../../../utils/group":311,"../ActionIconButton":101,"react":380}],115:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ChatMessageList;var _react=_interopRequireWildcard(require("react"));var _FormInputInteractive=_interopRequireDefault(require("../form/FormInputInteractive"));var _MessageStatus=_interopRequireDefault(require("../user-status/user-status-message/MessageStatus"));var _LoaderSpinner=_interopRequireDefault(require("../loader/LoaderSpinner"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _simplebarReact=_interopRequireDefault(require("simplebar-react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ChatMessageList(props){var _useState=(0,_react.useState)(''),_useState2=_slicedToArray(_useState,2),searchText=_useState2[0],setSearchText=_useState2[1];var simplebarStyles=(0,_react.useRef)({overflowX:'hidden',height:'100%'});var showBox=function showBox(box){updateFilters({box:box});};var showInbox=function showInbox(){showBox('inbox');};var showSentbox=function showSentbox(){showBox('sentbox');};var showStarred=function showStarred(){showBox('starred');};var onSearchInputReset=function onSearchInputReset(data){updateFilters({search:data});};var onSearchSubmit=function onSearchSubmit(e){e.preventDefault();// console.log('CHAT MESSAGE LIST - SEARCH SUBMIT: ', searchText);
updateFilters({search:searchText});};var updateFilters=function updateFilters(filters){props.onFiltersChange(filters);};return/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget static"},/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-filters"},/*#__PURE__*/_react.default.createElement("p",{className:"chat-widget-filter ".concat(props.filters.box==='inbox'?'active':''),onClick:showInbox},vikinger_translation.inbox),/*#__PURE__*/_react.default.createElement("p",{className:"chat-widget-filter ".concat(props.filters.box==='sentbox'?'active':''),onClick:showSentbox},vikinger_translation.sentbox),/*#__PURE__*/_react.default.createElement("p",{className:"chat-widget-filter ".concat(props.filters.box==='starred'?'active':''),onClick:showStarred},vikinger_translation.starred)),/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-messages"},props.loading&&/*#__PURE__*/_react.default.createElement(_LoaderSpinner.default,null),props.data.length>0&&!props.loading&&/*#__PURE__*/_react.default.createElement(_simplebarReact.default,{style:simplebarStyles.current},props.data.map(function(message){return/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-message\n                        ".concat(props.selectedMessage===message?'active':'',"\n                        ").concat(message.unread_count>0?'unread':''),key:message.id,onClick:function onClick(){props.onSelectMessage(message);}},/*#__PURE__*/_react.default.createElement(_MessageStatus.default,{data:message,ownLastMessage:message.user.id===props.loggedUser.id,favorite:message.starred}));}),props.moreItems&&/*#__PURE__*/_react.default.createElement("div",{className:"load-more-text",onClick:props.onLoadMore},!props.loadingMore&&vikinger_translation.load_more_messages,props.loadingMore&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))),props.data.length===0&&!props.loading&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},props.searching&&vikinger_translation.message_search_no_results,!props.searching&&vikinger_translation.no_messages_found)),/*#__PURE__*/_react.default.createElement("form",{className:"chat-widget-form",onSubmit:onSearchSubmit},/*#__PURE__*/_react.default.createElement(_FormInputInteractive.default,{name:"searchText",value:searchText,placeholder:vikinger_translation.search_messages,modifiers:"small",onChange:setSearchText,onReset:onSearchInputReset})));}

},{"../form/FormInputInteractive":148,"../loader/LoaderSpinner":204,"../loader/LoaderSpinnerSmall":205,"../user-status/user-status-message/MessageStatus":293,"react":380,"simplebar-react":388}],116:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ChatMessageNew;var _react=_interopRequireWildcard(require("react"));var _MentionBlock=_interopRequireDefault(require("../mention/MentionBlock"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _ExpandableTextarea=_interopRequireDefault(require("../form/ExpandableTextarea"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ChatMessageNew(props){var _useState=(0,_react.useState)(''),_useState2=_slicedToArray(_useState,2),sendMessageText=_useState2[0],setSendMessageText=_useState2[1];var _useState3=(0,_react.useState)(''),_useState4=_slicedToArray(_useState3,2),recipientsText=_useState4[0],setRecipientsText=_useState4[1];var _useState5=(0,_react.useState)([]),_useState6=_slicedToArray(_useState5,2),recipients=_useState6[0],setRecipients=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),creatingThread=_useState8[0],setCreatingThread=_useState8[1];var sendMessageTextInputRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){// start sending to a user
if(props.userID){var friend=props.loggedUser.friends.filter(function(friend){return friend.id===props.userID;})[0];setRecipientsText(friend.mention_name);setRecipients([friend]);props.clearSendMessageUser();}},[]);var handleSendMessageTextChange=function handleSendMessageTextChange(e){setSendMessageText(e.target.value);};var handleRecipientsTextChange=function handleRecipientsTextChange(e){// console.log('CHAT MESSAGE NEW - ON RECIPIENTS CHANGE: ', e.target);
if(e.target.user){sendMessageTextInputRef.current.focus();}setRecipientsText(e.target.value);setRecipients(e.target.user?[e.target.user]:[]);};var deleteRecipients=function deleteRecipients(){setRecipientsText('');setRecipients([]);};var onSubmit=function onSubmit(e){e.preventDefault();// if already submitting or no recipient or no message was entered, return
if(creatingThread||recipients.length===0||sendMessageText===''){return;}setCreatingThread(true);var recipientsIDs=[];var _iterator=_createForOfIteratorHelper(recipients),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var recipient=_step.value;recipientsIDs.push(recipient.id);}}catch(err){_iterator.e(err);}finally{_iterator.f();}props.onCreateThread(sendMessageText,recipientsIDs);};return/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget"},/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-header no-padding"},/*#__PURE__*/_react.default.createElement("p",{className:"chat-widget-header-title"},vikinger_translation.new_message),/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-header-form"},recipients.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-header-recipient"},/*#__PURE__*/_react.default.createElement(_MentionBlock.default,{data:recipients[0],onActionClick:deleteRecipients})),recipients.length===0&&/*#__PURE__*/_react.default.createElement(_ExpandableTextarea.default,{name:"recipients_text",modifiers:"small",value:recipientsText,minHeight:50,placeholder:vikinger_translation.add_friend_placeholder,userFriends:props.loggedUser.friends,handleChange:handleRecipientsTextChange,disabled:creatingThread,hideLimit:true,disableEnter:true}))),/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-conversation with-recipient"}),/*#__PURE__*/_react.default.createElement("form",{className:"chat-widget-form ".concat(creatingThread?'disabled':''),onSubmit:onSubmit},/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"interactive-input small"},/*#__PURE__*/_react.default.createElement("input",{ref:sendMessageTextInputRef,type:"text",id:"send_message_text",name:"send_message_text",placeholder:vikinger_translation.write_a_message,value:sendMessageText,onChange:handleSendMessageTextChange,disabled:creatingThread}),creatingThread&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))),/*#__PURE__*/_react.default.createElement("div",{className:"form-item auto-width"},/*#__PURE__*/_react.default.createElement("button",{className:"button primary padded",disabled:creatingThread},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"send-message",modifiers:"button-icon no-space"}))))));}

},{"../form/ExpandableTextarea":143,"../icon/IconSVG":201,"../loader/LoaderSpinnerSmall":205,"../mention/MentionBlock":214,"react":380}],117:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ChatMessageOpen;var _react=_interopRequireWildcard(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _BadgeVerified=_interopRequireDefault(require("../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../user-status/user-status-level/UserStatusLevel"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _simplebarReact=_interopRequireDefault(require("simplebar-react"));var _plugins=require("../../utils/plugins");var messageRouter=_interopRequireWildcard(require("../../router/message/message-router"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ChatMessageOpen(props){var _useState=(0,_react.useState)(''),_useState2=_slicedToArray(_useState,2),sendMessageText=_useState2[0],setSendMessageText=_useState2[1];var _useState3=(0,_react.useState)(props.data.starred||false),_useState4=_slicedToArray(_useState3,2),starred=_useState4[0],setStarred=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),processingStarred=_useState6[0],setProcessingStarred=_useState6[1];var simplebarStyles=(0,_react.useRef)({overflowX:'hidden',height:'100%',padding:'35px 28px'});var sendMessageTextInputRef=(0,_react.useRef)(null);var settingsDropdownTriggerRef=(0,_react.useRef)(null);var settingsDropdownContentRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createDropdown)({triggerElement:settingsDropdownTriggerRef.current,containerElement:settingsDropdownContentRef.current,offset:{top:30,right:9},animation:{type:'translate-top',speed:.3,translateOffset:{vertical:20}}});},[]);(0,_react.useEffect)(function(){setStarred(props.data.starred);},[props.data]);var scrollableNodeRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){// wait for animation frame before scrolling, otherwise element won't be fully rendered and scroll won't work
window.requestAnimationFrame(function(){// scroll to bottom of messages
scrollableNodeRef.current.scrollTo(0,scrollableNodeRef.current.scrollHeight);// focus send message input
// sendMessageTextInputRef.current.focus();
});});var starMessage=function starMessage(){// if already processing star, return
if(processingStarred){return;}setProcessingStarred(true);var starMessagePromise=messageRouter.starMessage(props.data.messages[0].id);starMessagePromise.done(function(response){// console.log('CHAT MESSAGE OPEN - STAR MESSAGE RESPONSE: ', response);
setStarred(true);props.onStarMessage();}).fail(function(error){// console.log('CHAT MESSAGE OPEN - STAR MESSAGE ERROR: ', error);
}).always(function(){setProcessingStarred(false);});};var unstarMessage=function unstarMessage(){// if already processing star, return
if(processingStarred){return;}setProcessingStarred(true);var unstarMessagePromise=messageRouter.unstarMessage(props.data.messages[0].id);unstarMessagePromise.done(function(response){// console.log('CHAT MESSAGE OPEN - UNSTAR MESSAGE RESPONSE: ', response);
setStarred(false);props.onUnstarMessage();}).fail(function(error){// console.log('CHAT MESSAGE OPEN - UNSTAR MESSAGE ERROR: ', error);
}).always(function(){setProcessingStarred(false);});};var handleSendMessageTextChange=function handleSendMessageTextChange(e){setSendMessageText(e.target.value);};var onSubmit=function onSubmit(e){e.preventDefault();// if no message was entered, return
if(sendMessageText===''){return;}// console.log('CHAT MESSAGE OPEN - ON SUBMIT: ', props.data.id, sendMessageText);
props.onSendMessage(props.data.id,sendMessageText,props.data.recipients_ids,function(){setSendMessageText('');});};var recipientUser=props.data.recipients.length&&props.data.recipients[0].user?props.data.recipients[0].user:{};var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&recipientUser.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&recipientUser.membership;return/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget"},/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-header"},/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-settings"},/*#__PURE__*/_react.default.createElement("div",{className:"post-settings-wrap"},/*#__PURE__*/_react.default.createElement("div",{ref:settingsDropdownTriggerRef,className:"post-settings"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"more-dots",modifiers:"post-settings-icon"})),/*#__PURE__*/_react.default.createElement("div",{ref:settingsDropdownContentRef,className:"simple-dropdown"},!starred&&/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:starMessage},vikinger_translation.star_action," ",processingStarred&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null)),starred&&/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:unstarMessage},vikinger_translation.unstar," ",processingStarred&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null)),/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:props.onDeleteThread},vikinger_translation.delete," ",props.deletingThread&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))))),/*#__PURE__*/_react.default.createElement("div",{className:"user-status"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:recipientUser,noBorder:true}),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title"},/*#__PURE__*/_react.default.createElement("a",{className:"bold",href:recipientUser.link},recipientUser.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:recipientUser.membership.name,size:"small"})),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-timestamp small-space"},"".concat(vikinger_translation.started,": ").concat(props.data.messages[0].timestamp)))),/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-conversation"},/*#__PURE__*/_react.default.createElement(_simplebarReact.default,{scrollableNodeProps:{ref:scrollableNodeRef},style:simplebarStyles.current},props.data.messages.map(function(message){return/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-speaker animate-slide-down ".concat(message.user.id!==props.loggedUser.id?'left':'right'),key:message.id},message.user.id!==props.loggedUser.id&&/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-speaker-avatar"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"tiny",data:message.user,noBorder:true,noLink:true})),/*#__PURE__*/_react.default.createElement("p",{className:"chat-widget-speaker-message"},message.content),/*#__PURE__*/_react.default.createElement("p",{className:"chat-widget-speaker-timestamp"},message.timestamp));}))),_membership.messagePermissions.createMessage&&/*#__PURE__*/_react.default.createElement("form",{className:"chat-widget-form ".concat(props.sendingMessage?'disabled':''),onSubmit:onSubmit},/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"interactive-input small"},/*#__PURE__*/_react.default.createElement("input",{ref:sendMessageTextInputRef,type:"text",id:"send_message_text",name:"send_message_text",placeholder:vikinger_translation.write_a_message,value:sendMessageText,onChange:handleSendMessageTextChange,disabled:props.sendingMessage}),props.sendingMessage&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))),/*#__PURE__*/_react.default.createElement("div",{className:"form-item auto-width"},/*#__PURE__*/_react.default.createElement("button",{className:"button primary padded",disabled:props.sendingMessage},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"send-message",modifiers:"button-icon no-space"}))))));}

},{"../../router/message/message-router":349,"../../utils/plugins":356,"../avatar/Avatar":55,"../badge/BadgeVerified":82,"../icon/IconSVG":201,"../loader/LoaderSpinnerSmall":205,"../user-status/user-status-level/UserStatusLevel":292,"../utils/membership":312,"react":380,"simplebar-react":388}],118:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ChatMessages;var _react=_interopRequireDefault(require("react"));var _ChatMessageList=_interopRequireDefault(require("./ChatMessageList"));var _ChatMessageNew=_interopRequireDefault(require("./ChatMessageNew"));var _ChatMessageOpen=_interopRequireDefault(require("./ChatMessageOpen"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ChatMessages(props){return/*#__PURE__*/_react.default.createElement("div",{className:"chat-widget-wrap"},/*#__PURE__*/_react.default.createElement(_ChatMessageList.default,{data:props.data,loggedUser:props.loggedUser,onSelectMessage:props.onSelectMessage,selectedMessage:props.selectedMessage,onFiltersChange:props.onFiltersChange,loading:props.loading,moreItems:props.moreItems,onLoadMore:props.onLoadMore,loadingMore:props.loadingMore,searching:props.searching,filters:props.filters}),!props.creatingNewMessage&&props.selectedMessage&&/*#__PURE__*/_react.default.createElement(_ChatMessageOpen.default,{data:props.selectedMessage,loggedUser:props.loggedUser,onSendMessage:props.onSendMessage,onStarMessage:props.onStarMessage,onUnstarMessage:props.onUnstarMessage,onDeleteThread:props.onDeleteThread,deletingThread:props.deletingThread,sendingMessage:props.sendingMessage}),_membership.messagePermissions.createMessage&&props.creatingNewMessage&&/*#__PURE__*/_react.default.createElement(_ChatMessageNew.default,{loggedUser:props.loggedUser,userID:props.userID,clearSendMessageUser:props.clearSendMessageUser,onCreateThread:props.onCreateThread}));}

},{"../utils/membership":312,"./ChatMessageList":115,"./ChatMessageNew":116,"./ChatMessageOpen":117,"react":380}],119:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ActivityCommentList;var _react=_interopRequireWildcard(require("react"));var _AsyncCommentList=_interopRequireDefault(require("./AsyncCommentList"));var _reaction=require("../utils/reaction");var _commentData=require("../utils/comment/comment-data");var _core=require("../../utils/core");var activityRouter=_interopRequireWildcard(require("../../router/activity/activity-router"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ActivityCommentList(props){var order=props.order?props.order:'DESC';var comments=(0,_react.useRef)((0,_commentData.reorderComments)(props.comments.slice(),order));var createComment=function createComment(commentData,callback){var config={activityID:props.activityID};(0,_core.deepExtend)(config,commentData);// console.log('CREATE COMMENT - CONFIG: ', config);
activityRouter.createActivityComment(config,function(response){if(response){props.updateCommentCount(1);}callback(response);});};var updateComment=function updateComment(commentData){var config={id:commentData.id,component:commentData.component,type:commentData.type,user_id:commentData.author.id,content:commentData.content,recorded_time:commentData.date,item_id:commentData.item_id,secondary_item_id:commentData.secondary_item_id};// console.log('ACTIVITY COMMENT LIST - UPDATE COMMENT - CONFIG: ', config);
return activityRouter.updateActivity(config);};var getComment=function getComment(commentID,callback){var config={display_comments:'stream',in:commentID,filter:{action:'activity_comment'}};activityRouter.getActivities(config,function(response){var comment=response.activities.length>0?response.activities[0]:{};callback(comment);});};var getComments=function getComments(callback,options){var startPosition=(options.page-1)*props.perPage,endPosition=startPosition+props.perPage,newComments=comments.current.slice(startPosition,endPosition);// console.log('ACTIVITY COMMENT LIST - GET COMMENTS - START POSITION: ', startPosition);
// console.log('ACTIVITY COMMENT LIST - GET COMMENTS - END POSITION: ', endPosition);
// console.log('ACTIVITY COMMENT LIST - COMMENTS: ', comments.current);
callback(newComments);};var getCommentCount=function getCommentCount(callback){// console.log('ACTIVITY COMMENT LIST - COMMENT COUNT: ', comments.current.length);
callback(comments.current.length);};var deleteComment=function deleteComment(config){return activityRouter.deleteActivityComment({activity_id:props.activityID,comment_id:config.comment_id});};return/*#__PURE__*/_react.default.createElement(_AsyncCommentList.default,{postType:"activity",getComment:getComment,getComments:getComments,commentCount:comments.current.length,getCommentCount:getCommentCount,createComment:createComment,updateComment:updateComment,deleteComment:deleteComment,user:props.user,order:order,replyType:props.replyType,formPosition:props.formPosition,entityData:function entityData(id){return{activity_id:id};},parentData:props.parentData,reactions:props.reactions,reactionable:_reaction.ActivityReactionable,disableComments:!_membership.activityPermissions.createActivity,showVerifiedBadge:vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_activity_stream,activityAds:props.activityAds});}

},{"../../router/activity/activity-router":341,"../../utils/core":355,"../utils/comment/comment-data":305,"../utils/membership":312,"../utils/reaction":315,"./AsyncCommentList":120,"react":380}],120:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=AsyncCommentList;var _react=_interopRequireWildcard(require("react"));var _CommentForm=_interopRequireDefault(require("./comment-form/CommentForm"));var _CommentFormBig=_interopRequireDefault(require("./comment-form/CommentFormBig"));var _CommentFormGuest=_interopRequireDefault(require("./comment-form/CommentFormGuest"));var _CommentList=_interopRequireDefault(require("./CommentList"));var _LoaderSpinner=_interopRequireDefault(require("../loader/LoaderSpinner"));var _core=require("../../utils/core");var _group=_interopRequireDefault(require("../utils/group"));var _commentData=require("../utils/comment/comment-data");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function AsyncCommentList(props){var _useState=(0,_react.useState)({items:[],count:props.commentCount}),_useState2=_slicedToArray(_useState,2),comments=_useState2[0],setComments=_useState2[1];var _useState3=(0,_react.useState)(props.commentCount>0),_useState4=_slicedToArray(_useState3,2),initialFetch=_useState4[0],setInitialFetch=_useState4[1];var commentsWithChildren=(0,_react.useRef)([]);var preloadedComments=(0,_react.useRef)([]);var currentPage=(0,_react.useRef)(1);var _isMounted=(0,_react.useRef)(false);var deleteCommentStatic=function deleteCommentStatic(commentID){setComments(function(previousComments){var newComments=[];(0,_core.deepExtend)(newComments,previousComments.items);var deletedCommentCount=0;// only need top level comment count
for(var _i2=0,_newComments=newComments;_i2<_newComments.length;_i2++){var comment=_newComments[_i2];if(comment.id===commentID){deletedCommentCount=1;break;}}newComments=iterateCommentsFilter(newComments,commentID);// console.log('ASYNC COMMENT LIST - NEW COMMENTS: ', newComments);
// console.log('ASYNC COMMENT LIST - DELETED COMMENT COUNT: ', deletedCommentCount);
return{items:newComments,count:previousComments.count-deletedCommentCount};});};var deleteComment=function deleteComment(config,callback){var deleteCommentPromise=props.deleteComment(config);// console.log('ASYNC COMMENT LIST - DELETE COMMENT CONFIG: ', config);
deleteCommentPromise.done(function(response){// console.log('ASYNC COMMENT LIST - DELETE COMMENT RESPONSE: ', response);
// comment deleted succesfully, remove comment and all its children from the comments
if(response){// remove comment from state
deleteCommentStatic(config.comment_id);}else{// show error
callback(false);}}).fail(function(error){// console.log('ASYNC COMMENT LIST - DELETE COMMENT ERROR: ', error);
// show error
callback(false);});};var iterateCommentsFilter=function iterateCommentsFilter(comments,commentID){var filteredComments=comments.filter(function(comment){return comment.id!==commentID;});return filteredComments.map(function(comment){if(typeof comment.children!=='undefined'){comment.children=iterateCommentsFilter(comment.children,commentID);}return comment;});};var iterateComments=function iterateComments(comments,callback){var depth=arguments.length>2&&arguments[2]!==undefined?arguments[2]:1;var _iterator=_createForOfIteratorHelper(comments),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var comment=_step.value;callback(comment,depth);if(typeof comment.children!=='undefined'){iterateComments(comment.children,callback,depth+1);}}}catch(err){_iterator.e(err);}finally{_iterator.f();}};var onReplyButtonClick=function onReplyButtonClick(commentID){setComments(function(previousComments){var newComments=previousComments.items.slice();iterateComments(newComments,function(comment){comment.showReplyForm=comment.id===commentID;});return _objectSpread(_objectSpread({},previousComments),{},{items:newComments});});};var onCancelReplyButtonClick=function onCancelReplyButtonClick(){setComments(function(previousComments){var newComments=previousComments.items.slice();iterateComments(newComments,function(comment){comment.showReplyForm=false;});return _objectSpread(_objectSpread({},previousComments),{},{items:newComments});});};var clearChildrenComments=function clearChildrenComments(comments){var _iterator2=_createForOfIteratorHelper(comments),_step2;try{var _loop=function _loop(){var comment=_step2.value;if(comment.children instanceof Array&&comment.children.length>0){comment.hasChildren=0;iterateComments(comment.children,function(){comment.hasChildren++;});comment.children=[];}};for(_iterator2.s();!(_step2=_iterator2.n()).done;){_loop();}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}};var getChildrenComments=function getChildrenComments(parentID){// console.log('ASYNC COMMENT LIST - GET CHILDREN COMMENTS FOR: ', parentID);
var _iterator3=_createForOfIteratorHelper(commentsWithChildren.current),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var comment=_step3.value;if(comment.id===parentID){var _ret=function(){var children=comment.children;// console.log('ASYNC COMMENT LIST - FOUND PARENT: ', parentID);
// console.log('ASYNC COMMENT LIST - PARENT CHILDREN COMMENTS: ', children);
setComments(function(previousComments){var newComments=previousComments.items.slice();var _iterator4=_createForOfIteratorHelper(newComments),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var newComment=_step4.value;if(newComment.id===parentID){newComment.children=children;newComment.hasChildren=0;break;}}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}return _objectSpread(_objectSpread({},previousComments),{},{items:newComments});});return{v:void 0};}();if(_typeof(_ret)==="object")return _ret.v;}}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}};var getCommentsPage=function getCommentsPage(callback){var config={page:currentPage.current};// console.log('ASYNC COMMENT LIST - GET COMMENTS PAGE CONFIG: ', config);
currentPage.current+=1;// console.log('ASYNC COMMENT LIST - GET COMMENTS PAGE NEXT PAGE: ', currentPage.current);
props.getComments(function(requestedComments){// console.log('ASYNC COMMENT LIST - GET COMMENTS PAGE RESPONSE: ', requestedComments);
var newRequestedComments=[];(0,_core.deepExtend)(newRequestedComments,requestedComments);// console.log('ASYNC COMMENT LIST - COMMENTS WITH DUPLICATES (MAYBE): ', newRequestedComments);
var newComments=newRequestedComments.slice();// remove duplicates (needed for on demand comment show vs pagination)
for(var i=newRequestedComments.length-1;i>=0;i--){var comment=newRequestedComments[i];for(var j=comments.items.length-1;j>=0;j--){var newComment=comments.items[j];// if comment already exists at level 0, remove it
if(comment.id===newComment.id){newComments.splice(i,1);}}}// console.log('COMMENTS WITHOUT DUPLICATES: ', newComments);
// save original comments with children
commentsWithChildren.current=commentsWithChildren.current.concat(requestedComments);// console.log('COMMENTS WITH CHILDREN: ', commentsWithChildren.current);
// remove children comments from top level
// and add children comment count property
clearChildrenComments(newComments);// console.log('COMMENTS WITHOUT CHILDREN: ', newComments);
callback(newComments);},config);};var getMoreComments=function getMoreComments(){// dump preloaded comments if any
if(preloadedComments.current.length>0){if(_isMounted.current){setComments(function(previousComments){var newComments=previousComments.items.concat(preloadedComments.current);getCommentsPage(function(comments){preloadedComments.current=comments;});return _objectSpread(_objectSpread({},previousComments),{},{items:newComments});});}// get comments page and preload comments if there are any left
}else{getCommentsPage(function(comments){if(_isMounted.current){setComments(function(previousComments){return _objectSpread(_objectSpread({},previousComments),{},{items:previousComments.items.concat(comments)});});setInitialFetch(false);}getCommentsPage(function(comments){preloadedComments.current=comments;});});}};var createComment=function createComment(commentData,callback){// console.log('ASYNC COMMENT LIST - CREATE COMMENT: ', commentData);
props.createComment(commentData,function(response){// console.log('ASYNC COMMENT LIST - CREATE COMMENT RESPONSE: ', response);
if(!response){callback('An error has ocurred, please try again later');}else{callback(response);if(!Number.isNaN(Number.parseInt(response,10))){newCommentCreated(response);}}});};var newCommentCreated=function newCommentCreated(commentID){// console.log('ASYNC COMMENT LIST - NEW COMMENT CREATED - COMMENT ID: ', commentID);
// get created comment and update comment list state
props.getComment(commentID,function(comment){setComments(function(previousComments){// console.log('ASYNC COMMENT LIST - GET COMMENT RESPONSE: ', comment);
comment.showReplyForm=false;var newComments=previousComments.items.slice();var commentCount=previousComments.count;// if comment doesn't have parent push it to newComments array
if(comment.parent==0){commentCount++;// console.log('ORDER: ', props.order);
if(props.order==='ASC'){newComments.push(comment);}else if(props.order==='DESC'){// comment.scrollToMe = true;
newComments.unshift(comment);}}else{// if comment has a parent, push it in the parents children array (create it if first child)
iterateComments(newComments,function(newComment,depth){// if found comment parent
if(newComment.id==comment.parent){// if children array doesn't exist in parent, create it
if(typeof newComment.children==='undefined'){newComment.children=[];}// insert comment as child
if(props.order==='ASC'){newComment.children.push(comment);}else if(props.order==='DESC'){// comment.scrollToMe = true;
newComment.children.unshift(comment);}// hide parent comment reply form
newComment.showReplyForm=false;// don't continue searching
return;}});}// console.log('ASYNC COMMENT LIST - NEW COMMENTS: ', newComments);
return{items:newComments,count:commentCount};});});};var updateComment=function updateComment(commentData,callback){var updateCommentPromise=props.updateComment(commentData);updateCommentPromise.done(function(response){// console.log('ASYNC COMMENT LIST - UPDATE COMMENT - RESPONSE: ', response);
props.getComment(commentData.id,function(updatedCommentData){// console.log('ASYNC COMMENT LIST - GET UPDATED COMMENT - RESPONSE: ', updatedCommentData);
onCommentUpdate(updatedCommentData);callback();});}).fail(function(error){// console.log('ASYNC COMMENT LIST - UPDATE COMMENT - ERROR: ', error);
});};var onCommentUpdate=function onCommentUpdate(newCommentData){// console.log('ASYNC COMMENT LIST - ON COMMENT UPDATE - NEW COMMENT DATA: ', newCommentData);
setComments(function(previousComments){return _objectSpread(_objectSpread({},previousComments),{},{items:(0,_commentData.updateComments)(previousComments.items,newCommentData)});});};(0,_react.useEffect)(function(){if(!_isMounted.current){_isMounted.current=true;}return function(){_isMounted.current=false;};},[]);(0,_react.useEffect)(function(){if(props.commentCount>0){props.getCommentCount(function(commentCount){setComments(function(previousComments){return _objectSpread(_objectSpread({},previousComments),{},{count:commentCount});});getMoreComments();});}},[]);var commentForm;if(props.allowGuest){commentForm=/*#__PURE__*/_react.default.createElement(_CommentFormGuest.default,{createComment:createComment});}if(props.user){if(props.replyType==='quick'){commentForm=/*#__PURE__*/_react.default.createElement(_CommentForm.default,{user:props.user,userFriends:props.user.friends,createComment:createComment});}else{commentForm=/*#__PURE__*/_react.default.createElement(_CommentFormBig.default,{user:props.user,userFriends:props.user.friends,createComment:createComment});}}var userCanComment=props.user;var isActivityComment=props.postType==='activity',isGroupActivityComment=isActivityComment&&props.parentData.component==='groups';// if user is not admin and this comment belongs to a group
if(!vikinger_constants.settings.current_user_is_admin&&props.user&&isGroupActivityComment){var groupable=(0,_group.default)(props.user,props.parentData.group);userCanComment=groupable.isGroupMember()&&!groupable.isBannedFromGroup();}return/*#__PURE__*/_react.default.createElement("div",{className:"post-comments"},initialFetch&&/*#__PURE__*/_react.default.createElement(_LoaderSpinner.default,null),!initialFetch&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!props.disableComments&&props.formPosition==='top'&&userCanComment&&commentForm,comments.items.length>0&&/*#__PURE__*/_react.default.createElement(_CommentList.default,{comments:comments.items,user:props.user,userCanComment:userCanComment,createComment:createComment,onReplyButtonClick:onReplyButtonClick,onCancelReplyButtonClick:onCancelReplyButtonClick,commentCount:comments.count,getMoreComments:getMoreComments,getChildrenComments:getChildrenComments,entityData:props.entityData,parentData:props.parentData,reactions:props.reactions,reactionable:props.reactionable,onCommentUpdate:onCommentUpdate,postType:props.postType,showVerifiedBadge:props.showVerifiedBadge,updateComment:updateComment,deleteComment:deleteComment,disableComments:props.disableComments,activityAds:props.activityAds}),!props.disableComments&&props.formPosition==='bottom'&&userCanComment&&commentForm));}

},{"../../utils/core":355,"../loader/LoaderSpinner":204,"../utils/comment/comment-data":305,"../utils/group":311,"./CommentList":123,"./comment-form/CommentForm":126,"./comment-form/CommentFormBig":127,"./comment-form/CommentFormGuest":128,"react":380}],121:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=Comment;var _react=_interopRequireWildcard(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _CommentForm=_interopRequireDefault(require("./comment-form/CommentForm"));var _CommentFormGuest=_interopRequireDefault(require("./comment-form/CommentFormGuest"));var _CommentFormSimple=_interopRequireDefault(require("./comment-form/CommentFormSimple"));var _CommentActions=_interopRequireDefault(require("./CommentActions"));var _BadgeVerified=_interopRequireDefault(require("../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../user-status/user-status-level/UserStatusLevel"));var _UserStatusType=_interopRequireDefault(require("../user-status/user-status-type/UserStatusType"));var _commentFilter=require("../utils/comment/comment-filter");var _ads=require("../utils/ads");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function Comment(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),editingComment=_useState2[0],setEditingComment=_useState2[1];var adsForContentCommentPlacement=(0,_ads.getAdsForPlacementIndex)(props.activityAds,'bp_activity_entry_comments',props.commentIndex);var commentRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(props.data.scrollToMe){commentRef.current.scrollIntoView();}},[]);var deleteComment=function deleteComment(){props.deleteComment({comment_id:props.data.id});};var onReplyButtonClick=function onReplyButtonClick(){props.onReplyButtonClick(props.data.id);};var startEditingComment=function startEditingComment(){setEditingComment(true);};var stopEditingComment=function stopEditingComment(){setEditingComment(false);};var updateComment=function updateComment(text){var commentContent=(0,_commentFilter.filterCommentContentForSave)(text);var commentData=_objectSpread(_objectSpread({},props.data),{},{content:commentContent});// console.log('COMMENT - UPDATE COMMENT - CONFIG: ', commentData);
props.updateComment(commentData,stopEditingComment);};var commentForm;if(props.allowGuest){commentForm=/*#__PURE__*/_react.default.createElement(_CommentFormGuest.default,{parent:props.data.id,createComment:props.createComment});}if(props.user){commentForm=/*#__PURE__*/_react.default.createElement(_CommentForm.default,{user:props.user,parent:props.data.id,createComment:props.createComment,focus:true});}var replyForm=props.data.showReplyForm?commentForm:'';var displayVerifiedMemberBadge=props.showVerifiedBadge&&props.data.author.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.author.membership;var filteredCommentContent=(0,_commentFilter.filterCommentContentForDisplay)(props.data.content);return/*#__PURE__*/_react.default.createElement("div",{ref:commentRef,className:"post-comment reply-".concat(props.depth||1)},(!props.data.type||props.data.type==='comment'||props.data.type==='activity_comment')&&/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",data:props.data.author,noBorder:true,noLink:props.data.author.link===''}),/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-text ".concat(editingComment?'post-comment-text-editing':'')},props.data.author.link!==''&&/*#__PURE__*/_react.default.createElement("a",{className:"post-comment-text-author",href:props.data.author.link},props.data.author.name),props.data.author.link===''&&/*#__PURE__*/_react.default.createElement("span",{className:"post-comment-text-author"},props.data.author.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.author.membership.name,size:"small"}),props.data.author.member_types&&props.data.author.member_types.length>0&&props.data.author.member_types.map(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];if(memberTypeSettings&&memberTypeSettings.show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}}),!editingComment&&/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-text-content",dangerouslySetInnerHTML:{__html:filteredCommentContent}}),editingComment&&/*#__PURE__*/_react.default.createElement(_CommentFormSimple.default,{text:props.data.content,user:props.user,parent:props.data.id,onSubmit:updateComment,onDiscard:stopEditingComment,focus:true})),adsForContentCommentPlacement&&adsForContentCommentPlacement,/*#__PURE__*/_react.default.createElement(_CommentActions.default,{data:props.data,parentData:props.parentData,allowReply:!props.disableComments&&(props.user||props.allowGuest)&&props.userCanComment,user:props.user,userCanComment:props.userCanComment,onReplyButtonClick:onReplyButtonClick,onCancelReplyButtonClick:props.onCancelReplyButtonClick,reactions:props.reactions,reactionData:props.reactionData,userReaction:props.userReaction,createUserReaction:props.createUserReaction,deleteUserReaction:props.deleteUserReaction,postType:props.postType,editingComment:editingComment,startEditingComment:startEditingComment,stopEditingComment:stopEditingComment,deleteComment:deleteComment}),replyForm,props.data.approved=='0'&&/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-notification"},vikinger_translation.comment_not_approved_message));}

},{"../avatar/Avatar":55,"../badge/BadgeVerified":82,"../user-status/user-status-level/UserStatusLevel":292,"../user-status/user-status-type/UserStatusType":296,"../utils/ads":303,"../utils/comment/comment-filter":306,"./CommentActions":122,"./comment-form/CommentForm":126,"./comment-form/CommentFormGuest":128,"./comment-form/CommentFormSimple":129,"react":380}],122:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=CommentActions;var _react=_interopRequireDefault(require("react"));var _ReactionMetaLine=_interopRequireDefault(require("../reaction/ReactionMetaLine"));var _ReactionOptionComment=_interopRequireDefault(require("../reaction/reaction-option/reaction-option-comment/ReactionOptionComment"));var _CommentSettings=_interopRequireDefault(require("./CommentSettings"));var _EditedByStatus=_interopRequireDefault(require("../user-status/user-status-edited-by/EditedByStatus"));var _commentPermission=require("../utils/comment/comment-permission");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function CommentActions(props){var parentActivityGroup=props.parentData?props.parentData.group:false;var userCommentPermissions=(0,_commentPermission.getUserCommentPermissions)(props.user,props.data,parentActivityGroup);return/*#__PURE__*/_react.default.createElement("div",{className:"content-actions"},/*#__PURE__*/_react.default.createElement("div",{className:"content-action"},props.reactionData.length>0&&/*#__PURE__*/_react.default.createElement(_ReactionMetaLine.default,{modifiers:"small",data:props.reactionData}),props.user&&(props.postType==='post'&&vikinger_constants.plugin_active.vkreact||props.postType==='activity'&&vikinger_constants.plugin_active.vkreact&&vikinger_constants.plugin_active['vkreact-buddypress'])&&/*#__PURE__*/_react.default.createElement(_ReactionOptionComment.default,{reactions:props.reactions,userReaction:props.userReaction,createUserReaction:props.createUserReaction,deleteUserReaction:props.deleteUserReaction}),props.allowReply&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!props.data.showReplyForm&&/*#__PURE__*/_react.default.createElement("div",{className:"meta-line"},/*#__PURE__*/_react.default.createElement("p",{className:"meta-line-link light",onClick:props.onReplyButtonClick},vikinger_translation.reply_action)),props.data.showReplyForm&&/*#__PURE__*/_react.default.createElement("div",{className:"meta-line"},/*#__PURE__*/_react.default.createElement("p",{className:"meta-line-link light",onClick:props.onCancelReplyButtonClick},vikinger_translation.cancel_action))),userCommentPermissions.settings&&/*#__PURE__*/_react.default.createElement("div",{className:"meta-line settings"},/*#__PURE__*/_react.default.createElement(_CommentSettings.default,{data:props.data,editingComment:props.editingComment,startEditingComment:props.startEditingComment,stopEditingComment:props.stopEditingComment,deleteComment:props.deleteComment,userCommentPermissions:userCommentPermissions})),/*#__PURE__*/_react.default.createElement("div",{className:"meta-line"},/*#__PURE__*/_react.default.createElement("div",{className:"meta-line-timestamp ".concat(props.data.last_edited?'meta-line-timestamp_edited':'')},props.data.timestamp,props.data.last_edited&&/*#__PURE__*/_react.default.createElement(_EditedByStatus.default,{user:props.data.last_edited.user})))));}

},{"../reaction/ReactionMetaLine":248,"../reaction/reaction-option/reaction-option-comment/ReactionOptionComment":253,"../user-status/user-status-edited-by/EditedByStatus":286,"../utils/comment/comment-permission":307,"./CommentSettings":124,"react":380}],123:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=CommentList;var _react=_interopRequireWildcard(require("react"));var _Comment=_interopRequireDefault(require("./Comment"));var _commentData=require("../utils/comment/comment-data");var _ads=require("../utils/ads");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function CommentList(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),deleting=_useState2[0],setDeleting=_useState2[1];var deleteComment=function deleteComment(config){setDeleting(config.comment_id);props.deleteComment(config,function(response){// console.log('COMMENT LIST - DELETE COMMENT RESPONSE: ', response);
if(!response){setDeleting(false);}});};var _onReplyButtonClick=function onReplyButtonClick(commentID){props.getChildrenComments(commentID);props.onReplyButtonClick(commentID);};var depth=props.depth||1;var replyText=depth===2&&props.childrenComments>1?vikinger_translation.replies:vikinger_translation.reply,commentsLeft=props.commentCount-props.comments.length,hasMoreComments=commentsLeft>0;var renderedComments=[];var _loop=function _loop(i){var comment=props.comments[i];var reactionableProps={entityData:props.entityData(comment.id),user:props.user,reactions:props.reactions,reactionData:comment.reactions,onUserReactionUpdate:function onUserReactionUpdate(newReactionData){var newCommentData=(0,_commentData.updateCommentReactions)(comment,newReactionData);props.onCommentUpdate(newCommentData);}};var reactionable=props.reactionable(reactionableProps);if(depth===1){var adsForBeforeActivityCommentPlacement=(0,_ads.getAdsForPlacementIndex)(props.activityAds,'bp_before_activity_entry_comments',i);if(adsForBeforeActivityCommentPlacement){renderedComments=renderedComments.concat(adsForBeforeActivityCommentPlacement);}}renderedComments.push(/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-list ".concat(deleting===comment.id?'post-comment-list-deleted':''),key:comment.id},/*#__PURE__*/_react.default.createElement(_Comment.default,{data:comment,user:props.user,userCanComment:props.userCanComment,allowGuest:props.allowGuest,onReplyButtonClick:function onReplyButtonClick(){depth===1&&comment.hasChildren?_onReplyButtonClick(comment.id):props.onReplyButtonClick(comment.id);},onCancelReplyButtonClick:props.onCancelReplyButtonClick,createComment:props.createComment,depth:depth,parentData:props.parentData,reactions:props.reactions,reactionData:comment.reactions,userReaction:reactionable.getUserReaction(),createUserReaction:reactionable.createUserReaction,deleteUserReaction:reactionable.deleteUserReaction,postType:props.postType,showVerifiedBadge:props.showVerifiedBadge,updateComment:props.updateComment,deleteComment:deleteComment,disableComments:props.disableComments,activityAds:props.activityAds,commentIndex:i}),comment.children instanceof Array&&/*#__PURE__*/_react.default.createElement(CommentList,{comments:comment.children,user:props.user,userCanComment:props.userCanComment,createComment:props.createComment,onReplyButtonClick:props.onReplyButtonClick,onCancelReplyButtonClick:props.onCancelReplyButtonClick,childrenComments:comment.hasChildren,getChildrenComments:function getChildrenComments(){props.getChildrenComments(comment.id);},commentCount:comment.children.length,depth:depth+1,entityData:props.entityData,parentData:props.parentData,reactions:props.reactions,reactionable:props.reactionable,onCommentUpdate:props.onCommentUpdate,postType:props.postType,showVerifiedBadge:props.showVerifiedBadge,updateComment:props.updateComment,deleteComment:deleteComment,disableComments:props.disableComments})));if(depth===1){var adsForAfterActivityCommentPlacement=(0,_ads.getAdsForPlacementIndex)(props.activityAds,'bp_after_activity_entry_comments',i);if(adsForAfterActivityCommentPlacement){renderedComments=renderedComments.concat(adsForAfterActivityCommentPlacement);}}};for(var i=0;i<props.comments.length;i++){_loop(i);}return/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-list-wrap"},renderedComments,depth===1&&hasMoreComments&&/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-heading",onClick:props.getMoreComments},vikinger_translation.load_more_comments," ",/*#__PURE__*/_react.default.createElement("span",{className:"highlighted"},commentsLeft)),depth===2&&props.childrenComments>0&&/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-heading reply-".concat(depth),onClick:props.getChildrenComments},vikinger_translation.load," ",/*#__PURE__*/_react.default.createElement("span",{className:"highlighted"},props.childrenComments)," ",replyText,"..."));}

},{"../utils/ads":303,"../utils/comment/comment-data":305,"./Comment":121,"react":380}],124:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=CommentSettings;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _MessageBox=_interopRequireDefault(require("../message/MessageBox"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function CommentSettings(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),processingDelete=_useState2[0],setProcessingDelete=_useState2[1];var settingsDropdownTriggerRef=(0,_react.useRef)(null);var settingsDropdownContentRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createDropdown)({triggerElement:settingsDropdownTriggerRef.current,containerElement:settingsDropdownContentRef.current,offset:{bottom:30,left:0},animation:{type:'translate-bottom',speed:.3,translateOffset:{vertical:20}}});},[]);var messageBoxRef=(0,_react.useRef)(null);var messageBoxTriggerRef=(0,_react.useRef)(null);var popup=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(props.userCommentPermissions.delete){popup.current=(0,_plugins.createPopup)({triggerElement:messageBoxTriggerRef.current,premadeContentElement:messageBoxRef.current,type:'premade',popupSelectors:['message-box-popup','animate-slide-down'],onOverlayCreate:function onOverlayCreate(overlay){overlay.setAttribute('data-simplebar','');}});}},[]);var deleteComment=function deleteComment(){// return if already processing delete
if(processingDelete){return;}setProcessingDelete(true);var commentData={id:props.data.id,hasChildren:props.data.hasChildren};props.deleteComment(commentData,function(){setProcessingDelete(false);});};return/*#__PURE__*/_react.default.createElement("div",{className:"post-settings-wrap"},/*#__PURE__*/_react.default.createElement("div",{ref:settingsDropdownTriggerRef,className:"post-settings"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"more-dots",modifiers:"post-settings-icon small"})),/*#__PURE__*/_react.default.createElement("div",{ref:settingsDropdownContentRef,className:"simple-dropdown"},props.userCommentPermissions.edit&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!props.editingComment&&/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:props.startEditingComment},vikinger_translation.edit_comment),props.editingComment&&/*#__PURE__*/_react.default.createElement("div",{className:"simple-dropdown-link",onClick:props.stopEditingComment},vikinger_translation.cancel_edit)),props.userCommentPermissions.delete&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{ref:messageBoxTriggerRef,className:"simple-dropdown-link"},vikinger_translation.delete_comment,processingDelete&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null)),/*#__PURE__*/_react.default.createElement(_MessageBox.default,{forwardedRef:messageBoxRef,data:{title:vikinger_translation.delete_comment_message_title,text:vikinger_translation.delete_comment_message_text},error:true,confirm:true,onAccept:function onAccept(){popup.current.hide();deleteComment();},onCancel:function onCancel(){popup.current.hide();}}))));}

},{"../../utils/plugins":356,"../icon/IconSVG":201,"../loader/LoaderSpinnerSmall":205,"../message/MessageBox":217,"react":380}],125:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostCommentList;var _react=_interopRequireDefault(require("react"));var _AsyncCommentList=_interopRequireDefault(require("./AsyncCommentList"));var _core=require("../../utils/core");var commentRouter=_interopRequireWildcard(require("../../router/comment/comment-router"));var _reaction=require("../utils/reaction");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PostCommentList(props){var order=props.order?props.order:'DESC';var createComment=function createComment(commentData,callback){var config={postID:props.postID};(0,_core.deepExtend)(config,commentData);// console.log('CREATE COMMENT WITH CONFIG: ', config);
commentRouter.createComment(config,function(response){if(response){props.updateCommentCount(1);}callback(response);});};var updateComment=function updateComment(commentData){var config={comment_ID:commentData.id,comment_content:commentData.content};// console.log('POST COMMENT LIST - UPDATE COMMENT - CONFIG: ', config);
return commentRouter.updateComment(config);};var getComment=function getComment(commentID,callback){var getCommentConfig={comment__in:[commentID]};commentRouter.getComments(getCommentConfig,function(comments){callback(comments[0]);});};var getComments=function getComments(callback,options){var config={post_id:props.postID,paged:options.page,number:props.perPage,order:order,hierarchical:'threaded',status:'approve'};commentRouter.getComments(config,callback);};var getCommentCount=function getCommentCount(callback){commentRouter.getPostTopLevelCommentCount(props.postID,callback);};return/*#__PURE__*/_react.default.createElement(_AsyncCommentList.default,{postType:"post",getComment:getComment,getComments:getComments,commentCount:props.commentCount,getCommentCount:getCommentCount,createComment:createComment,updateComment:updateComment,deleteComment:commentRouter.deletePostComment,user:props.user,order:order,replyType:props.replyType,formPosition:props.formPosition,entityData:function entityData(id){return{postcomment_id:id};},reactions:props.reactions,reactionable:_reaction.PostCommentReactionable,disableComments:props.disableComments,showVerifiedBadge:vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_wp_comments});}

},{"../../router/comment/comment-router":343,"../../utils/core":355,"../utils/reaction":315,"./AsyncCommentList":120,"react":380}],126:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=CommentForm;var _react=_interopRequireWildcard(require("react"));var _Avatar=_interopRequireDefault(require("../../avatar/Avatar"));var _ExpandableTextarea=_interopRequireDefault(require("../../form/ExpandableTextarea"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function CommentForm(props){var _useState=(0,_react.useState)(''),_useState2=_slicedToArray(_useState,2),replyText=_useState2[0],setReplyText=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),disabled=_useState4[0],setDisabled=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),error=_useState6[0],setError=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),loading=_useState8[0],setLoading=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),clearInput=_useState10[0],setClearInput=_useState10[1];var resetInput=function resetInput(){setReplyText('');setError(false);setClearInput(function(previousClearInput){return!previousClearInput;});};var handleSubmit=function handleSubmit(){if(replyText===''){setError(vikinger_translation.comment_empty_message);return;}// return if already loading
if(loading){return;}setLoading(true);setDisabled(true);setError(false);var commentData={parentID:props.parent?props.parent:0,content:replyText.trim(),userID:props.user.id,author:props.user.name};// console.log('COMMENT FORM - COMMENT DATA: ', commentData);
props.createComment(commentData,function(response){// console.log('COMMENT FORM - FORM CREATE COMMENT WITH ID: ', response);
setLoading(false);setDisabled(false);// if comment was not created
if(Number.isNaN(Number.parseInt(response,10))){// console.log('COMMENT FORM - COULDN\'T CREATE COMMENT: ', response);
setError(response);}else{resetInput();}});};var handleReplyTextChange=function handleReplyTextChange(e){setReplyText(e.target.value);};return/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-form"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",data:props.user,noBorder:true}),/*#__PURE__*/_react.default.createElement("form",{className:"form comment-form"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_ExpandableTextarea.default,{name:"replyText",value:replyText,label:vikinger_translation.your_reply,modifiers:"small",maxLength:vikinger_constants.settings.activity_comment_character_limit,userFriends:props.user.friends,handleChange:handleReplyTextChange,loading:loading,focus:props.focus,disabled:disabled,error:error,submitOnEnter:true,onSubmit:handleSubmit,clearInput:clearInput})))),error&&/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-form-error",dangerouslySetInnerHTML:{__html:error}}));}

},{"../../avatar/Avatar":55,"../../form/ExpandableTextarea":143,"react":380}],127:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=CommentFormBig;var _react=_interopRequireWildcard(require("react"));var _Avatar=_interopRequireDefault(require("../../avatar/Avatar"));var _ExpandableTextarea=_interopRequireDefault(require("../../form/ExpandableTextarea"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function CommentFormBig(props){var _useState=(0,_react.useState)(''),_useState2=_slicedToArray(_useState,2),replyText=_useState2[0],setReplyText=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),disabled=_useState4[0],setDisabled=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),error=_useState6[0],setError=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),loading=_useState8[0],setLoading=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),clearInput=_useState10[0],setClearInput=_useState10[1];var resetInput=function resetInput(){setReplyText('');setError(false);setClearInput(function(previousClearInput){return!previousClearInput;});};var handleSubmit=function handleSubmit(e){e.preventDefault();if(replyText===''){setError(vikinger_translation.comment_empty_message);return;}// return if already loading
if(loading){return;}setLoading(true);setDisabled(true);setError(false);var commentData={parentID:props.parent?props.parent:0,content:replyText.trim(),userID:props.user.id,author:props.user.name};props.createComment(commentData,function(response){// console.log('COMMENT FORM BIG - COMMENT ID: ', response);
setLoading(false);setDisabled(false);// if comment was not created
if(Number.isNaN(Number.parseInt(response,10))){// console.log('COMMENT FORM BIG - COULDN\'T CREATE COMMENT: ', response);
setError(response);}else{resetInput();}});};var handleReplyTextChange=function handleReplyTextChange(e){setReplyText(e.target.value);};return/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-form with-title"},/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-form-title"},vikinger_translation.leave_a_comment),/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",data:props.user,noBorder:true}),/*#__PURE__*/_react.default.createElement("form",{className:"form comment-form",onSubmit:handleSubmit},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_ExpandableTextarea.default,{name:"replyText",value:replyText,label:vikinger_translation.your_reply,modifiers:"small",minHeight:124,maxLength:vikinger_constants.settings.activity_comment_character_limit,userFriends:props.userFriends,handleChange:handleReplyTextChange,loading:loading,error:error,disabled:disabled,clearInput:clearInput}))),error&&/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-form-error",dangerouslySetInnerHTML:{__html:error}}),/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-form-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"button void",onClick:resetInput},vikinger_translation.discard),/*#__PURE__*/_react.default.createElement("button",{type:"submit",className:"button secondary"},vikinger_translation.post_reply))));}

},{"../../avatar/Avatar":55,"../../form/ExpandableTextarea":143,"react":380}],128:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=CommentFormGuest;var _react=_interopRequireWildcard(require("react"));var _LoaderSpinner=_interopRequireDefault(require("../../loader/LoaderSpinner"));var _plugins=require("../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function CommentFormGuest(props){var _useState=(0,_react.useState)(''),_useState2=_slicedToArray(_useState,2),name=_useState2[0],setName=_useState2[1];var _useState3=(0,_react.useState)(''),_useState4=_slicedToArray(_useState3,2),email=_useState4[0],setEmail=_useState4[1];var _useState5=(0,_react.useState)(''),_useState6=_slicedToArray(_useState5,2),replyText=_useState6[0],setReplyText=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),nameError=_useState8[0],setNameError=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),emailError=_useState10[0],setEmailError=_useState10[1];var _useState11=(0,_react.useState)(false),_useState12=_slicedToArray(_useState11,2),replyTextError=_useState12[0],setReplyTextError=_useState12[1];var _useState13=(0,_react.useState)(false),_useState14=_slicedToArray(_useState13,2),disabled=_useState14[0],setDisabled=_useState14[1];var _useState15=(0,_react.useState)(false),_useState16=_slicedToArray(_useState15,2),error=_useState16[0],setError=_useState16[1];var _useState17=(0,_react.useState)(false),_useState18=_slicedToArray(_useState17,2),loading=_useState18[0],setLoading=_useState18[1];var _useState19=(0,_react.useState)(false),_useState20=_slicedToArray(_useState19,2),notification=_useState20[0],setNotification=_useState20[1];var nameInputRef=(0,_react.useRef)(null);var emailInputRef=(0,_react.useRef)(null);var replyTextInputRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createFormInput)([nameInputRef.current]);(0,_plugins.createFormInput)([emailInputRef.current]);(0,_plugins.createFormInput)([replyTextInputRef.current]);},[]);var resetInput=function resetInput(){setName('');setEmail('');setReplyText('');setNameError(false);setEmailError(false);setReplyTextError(false);setError(false);setNotification(false);nameInputRef.current.classList.remove('active');emailInputRef.current.classList.remove('active');replyTextInputRef.current.classList.remove('active');};var emailIsValid=function emailIsValid(email){return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email);};var handleSubmit=function handleSubmit(e){e.preventDefault();// check if there is an empty field
var nameIsEmpty=name==='';var emailIsEmpty=email==='';var replyTextIsEmpty=replyText==='';if(nameIsEmpty||emailIsEmpty||replyTextIsEmpty){setNameError(nameIsEmpty);setEmailError(emailIsEmpty);setReplyTextError(replyTextIsEmpty);setError('Please complete all fields');return;}// validate email
if(!emailIsValid(email)){setEmailError(true);setError('Please enter a valid email address');return;}setLoading(true);setDisabled(true);setError(false);setNotification(false);var commentData={parentID:props.parent?props.parent:0,author:name,email:email,content:replyText.trim()};props.createComment(commentData,function(response){// console.log('COMMENT FORM GUEST - COMMENT ID: ', response);
setLoading(false);setDisabled(false);// if comment was not created
if(Number.isNaN(Number.parseInt(response,10))){// console.log('COMMENT FORM GUEST - COULDN\'T CREATE COMMENT: ', response);
setError(response);setReplyTextError(true);}else{resetInput();}});};var handleNameChange=function handleNameChange(e){setName(e.target.value);};var handleEmailChange=function handleEmailChange(e){setEmail(e.target.value);};var handleReplyTextChange=function handleReplyTextChange(e){setReplyText(e.target.value);};return/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-form guest-form"},/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-form-title"},vikinger_translation.leave_a_comment),/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-form-text"},"Please sign in or register to comment with your account!"),/*#__PURE__*/_react.default.createElement("form",{className:"form comment-form",onSubmit:handleSubmit},/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{ref:nameInputRef,className:"form-input small"},/*#__PURE__*/_react.default.createElement("label",{className:"".concat(loading?'label-disabled':'')},"Name"),/*#__PURE__*/_react.default.createElement("input",{type:"text",name:"name",className:"".concat(nameError?'input-error':''," ").concat(loading?'input-disabled':''),disabled:disabled,onChange:handleNameChange,value:name}))),/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{ref:emailInputRef,className:"form-input small"},/*#__PURE__*/_react.default.createElement("label",{className:"".concat(loading?'label-disabled':'')},"Email"),/*#__PURE__*/_react.default.createElement("input",{type:"text",name:"email",className:"".concat(emailError?'input-error':''," ").concat(loading?'input-disabled':''),disabled:disabled,onChange:handleEmailChange,value:email})))),/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{ref:replyTextInputRef,className:"form-input small medium-textarea"},/*#__PURE__*/_react.default.createElement("label",{className:"".concat(loading?'label-disabled':'')},"Write your comment here"),/*#__PURE__*/_react.default.createElement("textarea",{name:"replyText",className:"".concat(replyTextError?'input-error':''," ").concat(loading?'input-disabled':''),disabled:disabled,onChange:handleReplyTextChange,value:replyText})))),error&&/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-form-error",dangerouslySetInnerHTML:{__html:error}}),notification&&/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-form-notification"},notification),loading&&/*#__PURE__*/_react.default.createElement(_LoaderSpinner.default,null),/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-form-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"button void",onClick:resetInput},vikinger_translation.discard),/*#__PURE__*/_react.default.createElement("button",{type:"submit",className:"button secondary"},vikinger_translation.post_reply))));}

},{"../../../utils/plugins":356,"../../loader/LoaderSpinner":204,"react":380}],129:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=CommentFormSimple;var _react=_interopRequireWildcard(require("react"));var _ExpandableTextarea=_interopRequireDefault(require("../../form/ExpandableTextarea"));var _core=require("../../../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function CommentFormSimple(props){var previousText=(0,_react.useRef)(props.text?(0,_core.stripHTML)(props.text):'');var _useState=(0,_react.useState)(previousText.current),_useState2=_slicedToArray(_useState,2),replyText=_useState2[0],setReplyText=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),disabled=_useState4[0],setDisabled=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),error=_useState6[0],setError=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),loading=_useState8[0],setLoading=_useState8[1];var handleSubmit=function handleSubmit(){// if no text entered, show error
if(replyText===''){setError(vikinger_translation.comment_empty_message);return;}// if text didn't change, discard
if(replyText===previousText.current){props.onDiscard();return;}// return if already loading
if(loading){return;}setLoading(true);setDisabled(true);setError(false);// console.log('COMMENT FORM - COMMENT DATA: ', commentData);
props.onSubmit(replyText);};var handleReplyTextChange=function handleReplyTextChange(e){setReplyText(e.target.value);};return/*#__PURE__*/_react.default.createElement("div",{className:"post-comment-form"},/*#__PURE__*/_react.default.createElement("form",{className:"form comment-form"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_ExpandableTextarea.default,{name:"replyText",value:replyText,modifiers:"small",maxLength:vikinger_constants.settings.activity_comment_character_limit,userFriends:props.user.friends,handleChange:handleReplyTextChange,loading:loading,focus:props.focus,disabled:disabled,error:error,submitOnEnter:true,onSubmit:handleSubmit})))),error&&/*#__PURE__*/_react.default.createElement("p",{className:"post-comment-form-error",dangerouslySetInnerHTML:{__html:error}}));}

},{"../../../utils/core":355,"../../form/ExpandableTextarea":143,"react":380}],130:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ContentActions;var _react=_interopRequireDefault(require("react"));var _ReactionMetaLine=_interopRequireDefault(require("../reaction/ReactionMetaLine"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ContentActions(props){var commentsText=props.commentCount===1?vikinger_translation.comment:vikinger_translation.comments,sharesText=props.shareCount===1?vikinger_translation.share:vikinger_translation.shares;return/*#__PURE__*/_react.default.createElement("div",{className:"content-actions"},/*#__PURE__*/_react.default.createElement("div",{className:"content-action"},props.reactionData.length>0&&/*#__PURE__*/_react.default.createElement(_ReactionMetaLine.default,{data:props.reactionData})),/*#__PURE__*/_react.default.createElement("div",{className:"content-action"},/*#__PURE__*/_react.default.createElement("div",{className:"meta-line"},!props.link&&/*#__PURE__*/_react.default.createElement("p",{className:"meta-line-text"},props.commentCount," ",commentsText),props.link&&/*#__PURE__*/_react.default.createElement("a",{className:"meta-line-link",href:"".concat(props.link,"#comment-list")},props.commentCount," ",commentsText)),props.shareCount!==false&&vikinger_constants.plugin_active.buddypress&&/*#__PURE__*/_react.default.createElement("div",{className:"meta-line"},/*#__PURE__*/_react.default.createElement("p",{className:"meta-line-text"},props.shareCount," ",sharesText))));}

},{"../reaction/ReactionMetaLine":248,"react":380}],131:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=SliderControl;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SliderControl(props){return/*#__PURE__*/_react.default.createElement("div",{className:"slider-control ".concat(props.direction," ").concat(props.disabled?'disabled':''),onClick:props.controlClicked},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"}),props.double&&/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"}));}

},{"../icon/IconSVG":201,"react":380}],132:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FilterableList;var _react=_interopRequireWildcard(require("react"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _ItemPreviewList=_interopRequireDefault(require("./ItemPreviewList"));var _Pager=_interopRequireDefault(require("../pager/Pager"));var _core=require("../../utils/core");var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FilterableList(props){var _useState=(0,_react.useState)([]),_useState2=_slicedToArray(_useState,2),items=_useState2[0],setItems=_useState2[1];var _useState3=(0,_react.useState)(0),_useState4=_slicedToArray(_useState3,2),itemCount=_useState4[0],setItemCount=_useState4[1];var _useState5=(0,_react.useState)(props.gridType||'small'),_useState6=_slicedToArray(_useState5,2),gridType=_useState6[0],setGridType=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),loadingItems=_useState8[0],setLoadingItems=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),loggedUser=_useState10[0],setLoggedUser=_useState10[1];var _useState11=(0,_react.useState)(true),_useState12=_slicedToArray(_useState11,2),loadingUser=_useState12[0],setLoadingUser=_useState12[1];var filterableListRef=(0,_react.useRef)(null);var getLoggedInMember=function getLoggedInMember(){var callback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(){};var getLoggedInMemberScope=props.loggedUserScope?props.loggedUserScope:'user-status';var getLoggedInMemberPromise=userRouter.getLoggedInMember(getLoggedInMemberScope);getLoggedInMemberPromise.done(function(loggedUser){// console.log('FILTERABLE LIST - LOGGED USER: ', loggedUser);
setLoggedUser(loggedUser);setLoadingUser(false);callback();});};(0,_react.useEffect)(function(){getLoggedInMember();},[]);var themeColor=props.themeColor||'primary';var filters=(0,_react.useRef)({});var currentPage=(0,_react.useRef)(1);var getItems=function getItems(){var config=props.getItemsFilters(currentPage.current);(0,_core.deepExtend)(config,filters.current);// console.log('FILTERABLE LIST - GET ITEMS CONFIG: ', config);
return props.getItems(config);};var getItemsCount=function getItemsCount(callback){var config=props.getItemsCountFilters(filters.current);// console.log('FILTERABLE LIST - GET ITEMS COUNT CONFIG: ', config);
props.getItemsCount(config,callback);};var updateItems=function updateItems(){setLoadingItems(true);getItems().done(function(items){// console.log('Filterable List - Items: ', items);
setItems(items);}).fail(function(error){// console.log('FILTERABLE LIST - ERROR: ', error);
}).always(function(){setLoadingItems(false);});};var updateItemsCount=function updateItemsCount(){getItemsCount(function(itemCount){// console.log('FILTERABLE LIST - ITEM COUNT: ', itemCount);
setItemCount(itemCount);});};var applyFilters=function applyFilters(filtersData){// console.log('FILTERABLE LIST - APPLY FILTERS: ', filtersData);
// check if filters changed
var filtersChanged=false;for(var filter in filtersData){// filter count changed
if(Object.keys(filtersData).length!==Object.keys(filters.current).length){filtersChanged=true;break;}if(filters.current[filter]!==filtersData[filter]){filtersChanged=true;break;}}// if filters didn't change, don't update
if(!filtersChanged){return;}(0,_core.deepExtend)(filters.current,filtersData);if(typeof filters.current.member_type!=='undefined'&&!filters.current.member_type){delete filters.current.member_type;}// filters changed, update count
// and reset to first page
currentPage.current=1;updateItemsCount();updateItems();};var setGrid=function setGrid(gridType){setGridType(gridType);// only save grid type if there is a user logged in
if(loggedUser){var updateLoggedUserGridTypePromise=userRouter.updateLoggedUserGridType({grid_component:props.itemType,grid_type:gridType});// console.log('FILTERABLE LIST - UPDATE LOGGED USER GRID TYPE: ', props.itemType, gridType);
updateLoggedUserGridTypePromise.done(function(response){// console.log('FILTERABLE LIST - UPDATE LOGGED USER GRID TYPE RESPONSE: ', response);
}).fail(function(error){// console.log('FILTERABLE LIST - UPDATE LOGGED USER GRID TYPE ERROR: ', error);
});}};var onPageChange=function onPageChange(){// console.log('FILTERABLE LIST - ON PAGE CHANGE: ', filterableListRef.current);
if(filterableListRef.current){filterableListRef.current.scrollIntoView();window.scrollBy({top:-120});}};var showPage=function showPage(pageNumber){// if page didn't change, don't update items
if(currentPage.current===pageNumber){return;}currentPage.current=pageNumber;onPageChange();updateItems();};var FilterBar=props.filterBar;var itemTypeText=itemCount===1?vikinger_translation.result:vikinger_translation.results;return/*#__PURE__*/_react.default.createElement("div",{ref:filterableListRef},/*#__PURE__*/_react.default.createElement(FilterBar,{extraFilters:props.extraFilters,applyFilters:applyFilters,gridType:gridType,setGrid:setGrid,themeColor:themeColor,searchTerm:props.searchTerm,memberType:props.memberType,groupType:props.groupType}),(loadingItems||loadingUser||props.loadingAds)&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),!(loadingItems||loadingUser||props.loadingAds)&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_ItemPreviewList.default,{itemType:props.itemType,gridType:gridType,data:items,loggedUser:loggedUser,onActionComplete:getLoggedInMember,ads:props.ads,adsPlacement:props.adsPlacement}),itemCount!==0&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_Pager.default,{pageCount:Math.ceil(itemCount/props.itemsPerPage),activePage:currentPage.current,showPage:showPage,themeColor:themeColor}),/*#__PURE__*/_react.default.createElement("p",{className:"section-results-text"},vikinger_translation.showing_results_text_1," ",currentPage.current===1?1:props.itemsPerPage*(currentPage.current-1)+1," - ",props.itemsPerPage*currentPage.current>itemCount?itemCount:props.itemsPerPage*currentPage.current," ",vikinger_translation.showing_results_text_2," ",itemCount," ",itemTypeText.toLowerCase()))));}

},{"../../router/user/user-router":353,"../../utils/core":355,"../loader/Loader":203,"../pager/Pager":221,"./ItemPreviewList":137,"react":380}],133:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupFilterBar;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _GridOptions=_interopRequireDefault(require("../grid/GridOptions"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var groupTypes=Object.values(vikinger_constants.settings.group_types).filter(function(groupType){return groupType.has_directory==='1';});function GroupFilterBar(props){var _useState=(0,_react.useState)('alphabetical'),_useState2=_slicedToArray(_useState,2),type=_useState2[0],setType=_useState2[1];var _useState3=(0,_react.useState)(props.searchTerm||''),_useState4=_slicedToArray(_useState3,2),search=_useState4[0],setSearch=_useState4[1];var _useState5=(0,_react.useState)(props.groupType||'all'),_useState6=_slicedToArray(_useState5,2),groupType=_useState6[0],setGroupType=_useState6[1];var searchInputRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(!props.searchTerm){(0,_plugins.createFormInput)([searchInputRef.current]);}},[]);(0,_react.useEffect)(function(){var filters={type:type,search:search,group_type:groupType};if(groupType==='all'){filters.group_type='';}props.applyFilters(filters);},[type,groupType]);var handleSubmit=function handleSubmit(e){e.preventDefault();var filters={type:type,search:search,group_type:groupType};if(groupType==='all'){filters.group_type='';}props.applyFilters(filters);};return/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar v2"},/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar-actions full"},/*#__PURE__*/_react.default.createElement("form",{className:"form",onSubmit:handleSubmit},/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},!props.searchTerm&&/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{ref:searchInputRef,className:"form-input small with-button"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"group-name"},vikinger_translation.search_groups),/*#__PURE__*/_react.default.createElement("input",{type:"text",id:"group-name",name:"search",onChange:function onChange(e){setSearch(e.target.value);}}),/*#__PURE__*/_react.default.createElement("button",{type:"submit",className:"button ".concat(props.themeColor)},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"magnifying-glass"})))),/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"group-order-by"},vikinger_translation.order_by),/*#__PURE__*/_react.default.createElement("select",{id:"group-order-by",name:"type",value:type,onChange:function onChange(e){setType(e.target.value);}},/*#__PURE__*/_react.default.createElement("option",{value:"alphabetical"},vikinger_translation.alphabetical),/*#__PURE__*/_react.default.createElement("option",{value:"newest"},vikinger_translation.newest_groups),/*#__PURE__*/_react.default.createElement("option",{value:"active"},vikinger_translation.recently_active)),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}))),!props.groupType&&groupTypes.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"group-order-by"},vikinger_translation.group_type),/*#__PURE__*/_react.default.createElement("select",{id:"group-order-by",name:"group_type",value:groupType.name,onChange:function onChange(e){setGroupType(e.target.value);}},/*#__PURE__*/_react.default.createElement("option",{value:"all"},vikinger_translation.all),groupTypes.map(function(groupType){return/*#__PURE__*/_react.default.createElement("option",{key:groupType.name,value:groupType.name},groupType.labels.name);})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"})))))),/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar-actions"},/*#__PURE__*/_react.default.createElement(_GridOptions.default,{gridTypes:['big','small','list'],activeGrid:props.gridType,onGridOptionClick:props.setGrid})));}

},{"../../utils/plugins":356,"../grid/GridOptions":160,"../icon/IconSVG":201,"react":380}],134:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupFilterableList;var _react=_interopRequireWildcard(require("react"));var _FilterableList=_interopRequireDefault(require("./FilterableList"));var _GroupFilterBar=_interopRequireDefault(require("./GroupFilterBar"));var groupRouter=_interopRequireWildcard(require("../../router/group/group-router"));var adsRouter=_interopRequireWildcard(require("../../router/ads/ads-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function GroupFilterableList(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),ads=_useState2[0],setAds=_useState2[1];var _useState3=(0,_react.useState)(vikinger_constants.plugin_active['advanced-ads-pro']),_useState4=_slicedToArray(_useState3,2),loadingAds=_useState4[0],setLoadingAds=_useState4[1];var getItemsFilters=function getItemsFilters(currentPage){var itemsFilters={per_page:props.itemsPerPage,page:currentPage,data_scope:'group-preview'};// limit to user groups
if(props.userID){itemsFilters.user_id=props.userID;}// limit to search term
if(props.searchTerm){itemsFilters.search=props.searchTerm;}if(props.groupType){itemsFilters.group_type=props.groupType;}return itemsFilters;};var getItemsCountFilters=function getItemsCountFilters(filters){var itemsCountFilters={search:filters.search,type:filters.type,group_type:filters.group_type};// limit to user groups
if(props.userID){itemsCountFilters.user_id=props.userID;}// limit to search term
if(props.searchTerm){itemsCountFilters.search=props.searchTerm;}if(props.groupType){itemsCountFilters.group_type=props.groupType;}return itemsCountFilters;};var getGroupAds=function getGroupAds(){var getAdsByGroupPlacementPromise=adsRouter.getAdsByGroupPlacement();getAdsByGroupPlacementPromise.done(function(response){// console.log('GROUP FILTERABLE LIST - GET ADS BY GROUP PLACEMENT RESPONSE: ', response);
setAds(response);setLoadingAds(false);}).fail(function(error){// console.log('GROUP FILTERABLE LIST - GET ADS BY GROUP PLACEMENT ERROR: ', error);
});};(0,_react.useEffect)(function(){if(vikinger_constants.plugin_active['advanced-ads-pro']){getGroupAds();}},[]);return/*#__PURE__*/_react.default.createElement(_FilterableList.default,{itemType:"group",gridType:props.gridType,themeColor:props.themeColor,itemsPerPage:props.itemsPerPage,filterBar:_GroupFilterBar.default,getItems:groupRouter.getGroups,getItemsFilters:getItemsFilters,getItemsCount:groupRouter.getGroupsCount,getItemsCountFilters:getItemsCountFilters,searchTerm:props.searchTerm,groupType:props.groupType,loggedUserScope:"user-groups",ads:ads,adsPlacement:"bp_directory_groups_item",loadingAds:loadingAds});}

},{"../../router/ads/ads-router":342,"../../router/group/group-router":347,"./FilterableList":132,"./GroupFilterBar":133,"react":380}],135:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupMemberFilterBar;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _GridOptions=_interopRequireDefault(require("../grid/GridOptions"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function GroupMemberFilterBar(props){var _useState=(0,_react.useState)('alphabetical'),_useState2=_slicedToArray(_useState,2),status=_useState2[0],setStatus=_useState2[1];var _useState3=(0,_react.useState)(props.searchTerm||''),_useState4=_slicedToArray(_useState3,2),search=_useState4[0],setSearch=_useState4[1];var searchInputRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(!props.searchTerm){(0,_plugins.createFormInput)([searchInputRef.current]);}},[]);(0,_react.useEffect)(function(){props.applyFilters({status:status,search:search});},[status]);var handleSubmit=function handleSubmit(e){e.preventDefault();props.applyFilters({status:status,search:search});};return/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar v2"},/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar-actions full"},/*#__PURE__*/_react.default.createElement("form",{className:"form",onSubmit:handleSubmit},/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},!props.searchTerm&&/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{ref:searchInputRef,className:"form-input small with-button"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"member-name"},vikinger_translation.search_members),/*#__PURE__*/_react.default.createElement("input",{type:"text",id:"member-name",name:"search",onChange:function onChange(e){setSearch(e.target.value);}}),/*#__PURE__*/_react.default.createElement("button",{type:"submit",className:"button ".concat(props.themeColor)},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"magnifying-glass"})))),/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"member-order-by"},vikinger_translation.order_by),/*#__PURE__*/_react.default.createElement("select",{id:"member-order-by",name:"status",value:status,onChange:function onChange(e){setStatus(e.target.value);}},/*#__PURE__*/_react.default.createElement("option",{value:"alphabetical"},vikinger_translation.alphabetical),/*#__PURE__*/_react.default.createElement("option",{value:"last_joined"},vikinger_translation.newest_members),/*#__PURE__*/_react.default.createElement("option",{value:"group_activity"},vikinger_translation.recently_active)),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"})))))),/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar-actions"},/*#__PURE__*/_react.default.createElement(_GridOptions.default,{gridTypes:['big','small','list'],activeGrid:props.gridType,onGridOptionClick:props.setGrid})));}

},{"../../utils/plugins":356,"../grid/GridOptions":160,"../icon/IconSVG":201,"react":380}],136:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupMemberFilterableList;var _react=_interopRequireWildcard(require("react"));var _FilterableList=_interopRequireDefault(require("./FilterableList"));var _GroupMemberFilterBar=_interopRequireDefault(require("./GroupMemberFilterBar"));var groupMemberRouter=_interopRequireWildcard(require("../../router/group-member/group-member-router"));var adsRouter=_interopRequireWildcard(require("../../router/ads/ads-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function GroupMemberFilterableList(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),ads=_useState2[0],setAds=_useState2[1];var _useState3=(0,_react.useState)(vikinger_constants.plugin_active['advanced-ads-pro']),_useState4=_slicedToArray(_useState3,2),loadingAds=_useState4[0],setLoadingAds=_useState4[1];var getItemsFilters=function getItemsFilters(currentPage){var itemsFilters={group_id:props.groupID,exclude_admins:false,per_page:props.itemsPerPage,page:currentPage,data_scope:'user-preview'};// limit to search term
if(props.searchTerm){itemsFilters.search=props.searchTerm;}return itemsFilters;};var getItemsCountFilters=function getItemsCountFilters(filters){var itemsCountFilters={group_id:props.groupID,exclude_admins:false,search:filters.search,status:filters.status};// limit to search term
if(props.searchTerm){itemsCountFilters.search=props.searchTerm;}return itemsCountFilters;};var getMemberAds=function getMemberAds(){var getAdsByMemberPlacementPromise=adsRouter.getAdsByMemberPlacement();getAdsByMemberPlacementPromise.done(function(response){// console.log('MEMBER FILTERABLE LIST - GET ADS BY MEMBER PLACEMENT RESPONSE: ', response);
setAds(response);setLoadingAds(false);}).fail(function(error){// console.log('MEMBER FILTERABLE LIST - GET ADS BY MEMBER PLACEMENT ERROR: ', error);
});};(0,_react.useEffect)(function(){if(vikinger_constants.plugin_active['advanced-ads-pro']){getMemberAds();}},[]);return/*#__PURE__*/_react.default.createElement(_FilterableList.default,{itemType:"member",gridType:props.gridType,themeColor:props.themeColor,itemsPerPage:props.itemsPerPage,filterBar:_GroupMemberFilterBar.default,getItems:groupMemberRouter.getGroupMembers,getItemsFilters:getItemsFilters,getItemsCount:groupMemberRouter.getGroupMembersCount,getItemsCountFilters:getItemsCountFilters,searchTerm:props.searchTerm,loggedUserScope:"user-friends",ads:ads,adsPlacement:"bp_directory_members_item",loadingAds:loadingAds});}

},{"../../router/ads/ads-router":342,"../../router/group-member/group-member-router":346,"./FilterableList":132,"./GroupMemberFilterBar":135,"react":380}],137:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ItemPreviewList;var _react=_interopRequireDefault(require("react"));var _Notification=_interopRequireDefault(require("../notification/Notification"));var _grid=_interopRequireDefault(require("../utils/grid"));var _ads=require("../utils/ads");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var postExcerptDisplayIsEnabled=vikinger_constants.settings.post_excerpt_display_is_enabled;function ItemPreviewList(props){var grid;// if there are items, show them
if(props.data.length){var GridTemplate=_grid.default.getGridTemplate(props.itemType,props.gridType);var items=props.data.map(function(item,i){var renderedItem=[];var adsForPlacement=(0,_ads.getAdsForPlacementIndex)(props.ads,props.adsPlacement,i);if(adsForPlacement){renderedItem=renderedItem.concat(adsForPlacement);}var ItemPreviewTemplate=_grid.default.getItemPreviewTemplate(props.itemType,props.gridType,item);var hidePostExcerpt=props.itemType==='post'&&!postExcerptDisplayIsEnabled&&!item.has_membership_access;renderedItem.push(/*#__PURE__*/_react.default.createElement(ItemPreviewTemplate,{key:item.id,data:item,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete,hidePostExcerpt:hidePostExcerpt}));return renderedItem;});grid=/*#__PURE__*/_react.default.createElement(GridTemplate,{content:items});}else{// no items, show message
grid=/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.no_results_found,text:vikinger_translation.item_list_no_results_text});}return grid;}

},{"../notification/Notification":218,"../utils/ads":303,"../utils/grid":310,"react":380}],138:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=MemberFilterBar;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _GridOptions=_interopRequireDefault(require("../grid/GridOptions"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var memberTypes=Object.values(vikinger_constants.settings.member_types).filter(function(memberType){return memberType.has_directory==='1';});function MemberFilterBar(props){var _useState=(0,_react.useState)('alphabetical'),_useState2=_slicedToArray(_useState,2),type=_useState2[0],setType=_useState2[1];var _useState3=(0,_react.useState)(props.searchTerm||''),_useState4=_slicedToArray(_useState3,2),search=_useState4[0],setSearch=_useState4[1];var _useState5=(0,_react.useState)(props.memberType||'all'),_useState6=_slicedToArray(_useState5,2),memberType=_useState6[0],setMemberType=_useState6[1];var searchInputRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(!props.searchTerm){(0,_plugins.createFormInput)([searchInputRef.current]);}},[]);(0,_react.useEffect)(function(){var filters={type:type,search:search,member_type:memberType};if(memberType==='all'){filters.member_type=false;}props.applyFilters(filters);},[type,memberType]);var handleSubmit=function handleSubmit(e){e.preventDefault();var filters={type:type,search:search,member_type:memberType};if(memberType==='all'){filters.member_type=false;}props.applyFilters(filters);};return/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar v2"},/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar-actions full"},/*#__PURE__*/_react.default.createElement("form",{className:"form",onSubmit:handleSubmit},/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},!props.searchTerm&&/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{ref:searchInputRef,className:"form-input small with-button"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"member-name"},vikinger_translation.search_members),/*#__PURE__*/_react.default.createElement("input",{type:"text",id:"member-name",name:"search",onChange:function onChange(e){setSearch(e.target.value);}}),/*#__PURE__*/_react.default.createElement("button",{type:"submit",className:"button ".concat(props.themeColor)},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"magnifying-glass"})))),/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"member-order-by"},vikinger_translation.order_by),/*#__PURE__*/_react.default.createElement("select",{id:"member-order-by",name:"type",value:type,onChange:function onChange(e){setType(e.target.value);}},/*#__PURE__*/_react.default.createElement("option",{value:"alphabetical"},vikinger_translation.alphabetical),/*#__PURE__*/_react.default.createElement("option",{value:"newest"},vikinger_translation.newest_members),/*#__PURE__*/_react.default.createElement("option",{value:"active"},vikinger_translation.recently_active)),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}))),!props.memberType&&memberTypes.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:"member-order-by"},vikinger_translation.member_type),/*#__PURE__*/_react.default.createElement("select",{id:"member-order-by",name:"member_type",value:memberType.name,onChange:function onChange(e){setMemberType(e.target.value);}},/*#__PURE__*/_react.default.createElement("option",{value:"all"},vikinger_translation.all),memberTypes.map(function(memberType){return/*#__PURE__*/_react.default.createElement("option",{key:memberType.name,value:memberType.name},memberType.labels.name);})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"})))))),/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar-actions"},/*#__PURE__*/_react.default.createElement(_GridOptions.default,{gridTypes:['big','small','list'],activeGrid:props.gridType,onGridOptionClick:props.setGrid})));}

},{"../../utils/plugins":356,"../grid/GridOptions":160,"../icon/IconSVG":201,"react":380}],139:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=MemberFilterableList;var _react=_interopRequireWildcard(require("react"));var _FilterableList=_interopRequireDefault(require("./FilterableList"));var _MemberFilterBar=_interopRequireDefault(require("./MemberFilterBar"));var memberRouter=_interopRequireWildcard(require("../../router/member/member-router"));var adsRouter=_interopRequireWildcard(require("../../router/ads/ads-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function MemberFilterableList(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),ads=_useState2[0],setAds=_useState2[1];var _useState3=(0,_react.useState)(vikinger_constants.plugin_active['advanced-ads-pro']),_useState4=_slicedToArray(_useState3,2),loadingAds=_useState4[0],setLoadingAds=_useState4[1];var memberInclude=props.memberInclude?props.memberInclude.split(','):[];var getItemsFilters=function getItemsFilters(currentPage){var itemsFilters={per_page:props.itemsPerPage,page:currentPage,data_scope:'user-preview'};// limit to members friends of user
if(props.userID){itemsFilters.user_id=props.userID;}// limit to members of a group
if(props.groupID){itemsFilters.group_id=props.groupID;}// limit to search term
if(props.searchTerm){itemsFilters.search=props.searchTerm;}if(props.memberType){itemsFilters.member_type=props.memberType;}if(props.memberInclude){itemsFilters.include=memberInclude;}return itemsFilters;};var getItemsCountFilters=function getItemsCountFilters(filters){var itemsCountFilters={search:filters.search,type:filters.type,member_type:filters.member_type};// limit to members friends of user
if(props.userID){itemsCountFilters.user_id=props.userID;}// limit to members of a group
if(props.groupID){itemsCountFilters.group_id=props.groupID;}// limit to search term
if(props.searchTerm){itemsCountFilters.search=props.searchTerm;}if(props.memberType){itemsCountFilters.member_type=props.memberType;}if(props.memberInclude){itemsCountFilters.include=memberInclude;}return itemsCountFilters;};var getMemberAds=function getMemberAds(){var getAdsByMemberPlacementPromise=adsRouter.getAdsByMemberPlacement();getAdsByMemberPlacementPromise.done(function(response){// console.log('MEMBER FILTERABLE LIST - GET ADS BY MEMBER PLACEMENT RESPONSE: ', response);
setAds(response);setLoadingAds(false);}).fail(function(error){// console.log('MEMBER FILTERABLE LIST - GET ADS BY MEMBER PLACEMENT ERROR: ', error);
});};(0,_react.useEffect)(function(){if(vikinger_constants.plugin_active['advanced-ads-pro']){getMemberAds();}},[]);return/*#__PURE__*/_react.default.createElement(_FilterableList.default,{itemType:"member",gridType:props.gridType,themeColor:props.themeColor,itemsPerPage:props.itemsPerPage,filterBar:_MemberFilterBar.default,getItems:memberRouter.getMembers,getItemsFilters:getItemsFilters,getItemsCount:memberRouter.getMembersCount,getItemsCountFilters:getItemsCountFilters,searchTerm:props.searchTerm,memberType:props.memberType,loggedUserScope:"user-friends",ads:ads,adsPlacement:"bp_directory_members_item",loadingAds:loadingAds});}

},{"../../router/ads/ads-router":342,"../../router/member/member-router":348,"./FilterableList":132,"./MemberFilterBar":138,"react":380}],140:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostFilterBar;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _GridOptions=_interopRequireDefault(require("../grid/GridOptions"));var _core=require("../../utils/core");var postRouter=_interopRequireWildcard(require("../../router/post/post-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function PostFilterBar(props){var _useState=(0,_react.useState)([]),_useState2=_slicedToArray(_useState,2),categories=_useState2[0],setCategories=_useState2[1];var _useState3=(0,_react.useState)(props.extraFilters.category||0),_useState4=_slicedToArray(_useState3,2),category=_useState4[0],setCategory=_useState4[1];var _useState5=(0,_react.useState)('date'),_useState6=_slicedToArray(_useState5,2),filterBy=_useState6[0],setFilterBy=_useState6[1];var _useState7=(0,_react.useState)('DESC'),_useState8=_slicedToArray(_useState7,2),orderBy=_useState8[0],setOrderBy=_useState8[1];var _useState9=(0,_react.useState)(0),_useState10=_slicedToArray(_useState9,2),postType=_useState10[0],setPostType=_useState10[1];var postTypes=props.extraFilters.postTypes;var postTypeFilterIsEnabled=vikinger_constants.settings.post_type_filter_display_is_enabled&&postTypes.length>1;(0,_react.useEffect)(function(){if(!props.hideCategories){postRouter.getCategories(function(categories){// console.log('POST FILTER BAR - CATEGORIES: ', categories);
setCategories(categories);});}},[]);(0,_react.useEffect)(function(){var newFilters={category:category,orderby:filterBy,order:orderBy};if(postTypeFilterIsEnabled){if(postType===0){newFilters.post_type=postTypes;}else{newFilters.post_type=[postTypes[postType-1]];}}props.applyFilters(newFilters);},[category,filterBy,orderBy,postType]);var showCategoryFilter=!props.extraFilters.category;return/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar v2"},/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar-actions full"},/*#__PURE__*/_react.default.createElement("form",{className:"form"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},showCategoryFilter&&/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",null,vikinger_translation.category),/*#__PURE__*/_react.default.createElement("select",{name:"category",value:category,onChange:function onChange(e){setCategory(e.target.value);}},/*#__PURE__*/_react.default.createElement("option",{value:"0"},vikinger_translation.all_categories),categories.map(function(category){return/*#__PURE__*/_react.default.createElement("option",{key:category.id,value:category.id},category.name);})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}))),/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",null,vikinger_translation.filter_by),/*#__PURE__*/_react.default.createElement("select",{name:"orderby",value:filterBy,onChange:function onChange(e){setFilterBy(e.target.value);}},/*#__PURE__*/_react.default.createElement("option",{value:"date"},vikinger_translation.date),/*#__PURE__*/_react.default.createElement("option",{value:"comment_count"},vikinger_translation.popularity)),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}))),/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",null,vikinger_translation.order_by),/*#__PURE__*/_react.default.createElement("select",{name:"order",value:orderBy,onChange:function onChange(e){setOrderBy(e.target.value);}},/*#__PURE__*/_react.default.createElement("option",{value:"DESC"},vikinger_translation.descending),/*#__PURE__*/_react.default.createElement("option",{value:"ASC"},vikinger_translation.ascending)),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}))),postTypeFilterIsEnabled&&/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",null,vikinger_translation.type),/*#__PURE__*/_react.default.createElement("select",{name:"postType",value:postType,onChange:function onChange(e){setPostType(e.target.value);}},/*#__PURE__*/_react.default.createElement("option",{value:"0"},vikinger_translation.all),postTypes.map(function(postType,i){return/*#__PURE__*/_react.default.createElement("option",{key:i,value:i+1},(0,_core.ucfirst)(postType));})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"})))))),/*#__PURE__*/_react.default.createElement("div",{className:"section-filters-bar-actions"},/*#__PURE__*/_react.default.createElement(_GridOptions.default,{gridTypes:['big','small','list'],activeGrid:props.gridType,onGridOptionClick:props.setGrid})));}

},{"../../router/post/post-router":351,"../../utils/core":355,"../grid/GridOptions":160,"../icon/IconSVG":201,"react":380}],141:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostFilterableList;var _react=_interopRequireWildcard(require("react"));var _FilterableList=_interopRequireDefault(require("./FilterableList"));var _PostFilterBar=_interopRequireDefault(require("./PostFilterBar"));var postRouter=_interopRequireWildcard(require("../../router/post/post-router"));var adsRouter=_interopRequireWildcard(require("../../router/ads/ads-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function PostFilterableList(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),ads=_useState2[0],setAds=_useState2[1];var _useState3=(0,_react.useState)(vikinger_constants.plugin_active['advanced-ads-pro']),_useState4=_slicedToArray(_useState3,2),loadingAds=_useState4[0],setLoadingAds=_useState4[1];var postTypes=props.postTypes?props.postTypes.split(','):['post'];var categoryExclude=props.categoryExclude?props.categoryExclude.split(','):[];var postExclude=props.postExclude?props.postExclude.split(','):[];var getItemsFilters=function getItemsFilters(currentPage){var itemFilters={numberposts:props.itemsPerPage,paged:currentPage,post_type:postTypes};if(props.categoryExclude){itemFilters.category__not_in=categoryExclude;}if(props.postExclude){itemFilters.post__not_in=postExclude;}if(props.tag){itemFilters.tag_id=props.tag;}if(props.user_id){itemFilters.author=props.user_id;}if(props.year){itemFilters.year=props.year;}if(props.month){itemFilters.monthnum=props.month;}if(props.day){itemFilters.day=props.day;}// limit to search term
if(props.searchTerm){itemFilters.s=props.searchTerm;}return itemFilters;};var getItemsCountFilters=function getItemsCountFilters(filters){var itemFilters={category:filters.category,post_type:postTypes};if(props.categoryExclude){itemFilters.category__not_in=categoryExclude;}if(props.postExclude){itemFilters.post__not_in=postExclude;}if(props.tag){itemFilters.tag_id=props.tag;}if(props.user_id){itemFilters.author=props.user_id;}if(props.year){itemFilters.year=props.year;}if(props.month){itemFilters.monthnum=props.month;}if(props.day){itemFilters.day=props.day;}// limit to search term
if(props.searchTerm){itemFilters.s=props.searchTerm;}return itemFilters;};var getPostAds=function getPostAds(){var getAdsByPostPlacementPromise=adsRouter.getAdsByPostPlacement();getAdsByPostPlacementPromise.done(function(response){// console.log('POST FILTERABLE LIST - GET ADS BY POST PLACEMENT RESPONSE: ', response);
setAds(response);setLoadingAds(false);}).fail(function(error){// console.log('POST FILTERABLE LIST - GET ADS BY POST PLACEMENT ERROR: ', error);
});};(0,_react.useEffect)(function(){if(vikinger_constants.plugin_active['advanced-ads-pro']){getPostAds();}},[]);return/*#__PURE__*/_react.default.createElement(_FilterableList.default,{itemType:"post",gridType:props.gridType,itemsPerPage:props.itemsPerPage,extraFilters:{category:props.category,postTypes:postTypes},filterBar:_PostFilterBar.default,getItems:postRouter.getPosts,getItemsFilters:getItemsFilters,getItemsCount:postRouter.getPostCount,getItemsCountFilters:getItemsCountFilters,ads:ads,adsPlacement:"archive_pages",loadingAds:loadingAds});}

},{"../../router/ads/ads-router":342,"../../router/post/post-router":351,"./FilterableList":132,"./PostFilterBar":140,"react":380}],142:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Checkbox;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Checkbox(props){return/*#__PURE__*/_react.default.createElement("div",{className:"checkbox-box ".concat(props.modifiers||''," ").concat(props.active?'active':''),onClick:props.toggleActive},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"cross"}));}

},{"../icon/IconSVG":201,"react":380}],143:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ExpandableTextarea;var _react=_interopRequireWildcard(require("react"));var _MentionList=_interopRequireDefault(require("../mention/MentionList"));var _LoaderSpinner=_interopRequireDefault(require("../loader/LoaderSpinner"));var _core=require("../../utils/core");var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ExpandableTextarea(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),mentioning=_useState2[0],setMentioning=_useState2[1];var _useState3=(0,_react.useState)(''),_useState4=_slicedToArray(_useState3,2),mentionChars=_useState4[0],setMentionChars=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),mentionPositionData=_useState6[0],setMentionPositionData=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),onMobileResolution=_useState8[0],setOnMobileResolution=_useState8[1];var maxLength=(0,_react.useRef)(props.maxLength||1000);var minHeight=(0,_react.useRef)(props.minHeight||48);var formTextareaRef=(0,_react.useRef)(null);var textareaRef=(0,_react.useRef)(null);var shadowTextareaRef=(0,_react.useRef)(null);var mounting=(0,_react.useRef)(true);var wordInCursor=(0,_react.useRef)({});var pressedKeys=(0,_react.useRef)({});var savePressedKey=function savePressedKey(e){pressedKeys.current[e.keyCode]=true;};var resetPressedKey=function resetPressedKey(e){pressedKeys.current[e.keyCode]=false;};var resetPressedKeys=function resetPressedKeys(){pressedKeys.current={};};var clearInput=function clearInput(){formTextareaRef.current.classList.remove('active');};var updateTextareaDimensions=function updateTextareaDimensions(){// set minimum textarea height
textareaRef.current.style.height="".concat(minHeight.current,"px");var scrollHeight=textareaRef.current.scrollHeight;// if scroll height is greater that minimum height, set it as textarea height
if(scrollHeight>minHeight.current){textareaRef.current.style.height="".concat(textareaRef.current.scrollHeight,"px");}};var submitOnEnterKeyPress=function submitOnEnterKeyPress(){var shift=16,enter=13;// enter key
if(pressedKeys.current[enter]&&!pressedKeys.current[shift]){resetPressedKeys();props.onSubmit();}};var addNewlineOnShiftEnterKeyPress=function addNewlineOnShiftEnterKeyPress(){var shift=16,enter=13;// shift + enter
if(pressedKeys.current[shift]&&pressedKeys.current[enter]){// put newline in textarea
props.handleChange({target:{name:props.name,value:props.value+'\n'}});}};var disableEnterKey=function disableEnterKey(e){var enter=13;if(e.keyCode===enter){e.preventDefault();}};var disableInputArrows=function disableInputArrows(e){// arrow up/down pressed
if(e.keyCode===38||e.keyCode===40){e.preventDefault();}};var oneTimeDisableInput=function oneTimeDisableInput(e){// spacebar or enter key pressed
if(e.keyCode===32||e.keyCode===13){e.preventDefault();textareaRef.current.removeEventListener('keydown',oneTimeDisableInput);}};var getTextWithMention=function getTextWithMention(mentionText){// console.log('EXPANDABLE TEXTAREA - GET TEXT WITH MENTION - TEXT: ', textareaRef.current.value);
// console.log('EXPANDABLE TEXTAREA - GET TEXT WITH MENTION - WORD IN CURSOR: ', wordInCursor.current);
var newText=(0,_core.insertWordInText)(textareaRef.current.value,"@".concat(mentionText),wordInCursor.current.startIndex,wordInCursor.current.word.length);return newText;};var closeMention=function closeMention(mentionData,event){setMentioning(false);// don't interrupt writing focus
textareaRef.current.focus();// set cursor position to be after user mention
if(mentionData){textareaRef.current.selectionEnd=wordInCursor.current.startIndex+mentionData.length+1;}// enable arrows
textareaRef.current.removeEventListener('keydown',disableInputArrows);// console.log('APPLY SELECTED MENTION - EVENT: ', event);
// if event is not keydown (user didn't press spacebar/enter to select mention), remove enter/spacebar block
if(event!=='keydown'){textareaRef.current.removeEventListener('keydown',oneTimeDisableInput);}};var checkForMentions=function checkForMentions(text){// get word in current cursor position
var currentCursorPosition=textareaRef.current.selectionStart,currentWordInCursor=(0,_core.getWordInPosition)(text,currentCursorPosition);// console.log('CURSOR POSITION: ', currentCursorPosition);
// console.log('WORD IN CURSOR POSITION: ', currentWordInCursor.word);
// console.log('WORD IN CURSOR START INDEX: ', currentWordInCursor.startIndex);
// if word has @, user is trying to mention
var mentionRegex=/@/igm,wordInCursorIsMention=mentionRegex.test(currentWordInCursor.word);// if user is trying to mention
if(wordInCursorIsMention){wordInCursor.current=currentWordInCursor;setMentionChars(currentWordInCursor.word.substring(1));// if user already mentioning (adding/removing characters from mention)
if(!mentioning){// if user just started mentioning
// disable textarea input enter/spacebar (only one stroke)
textareaRef.current.addEventListener('keydown',oneTimeDisableInput);// disable textarea arrows
textareaRef.current.addEventListener('keydown',disableInputArrows);// calculate cursor position
(0,_core.updateShadowInput)(shadowTextareaRef.current,text);var dimensions=(0,_core.getPositionInInput)(textareaRef.current,shadowTextareaRef.current,currentWordInCursor.startIndex+1);setMentioning(true);setMentionPositionData(dimensions);}}else{// if user isn't trying to mention
// if user just ended doing a mention (deleted mention characters including @)
if(mentioning){setMentioning(false);// enable arrows
textareaRef.current.removeEventListener('keydown',disableInputArrows);// remove one time spacebar/enter block
textareaRef.current.removeEventListener('keydown',oneTimeDisableInput);}}};var handleChange=function handleChange(e){// console.log('EXPANDABLE TEXTAREA - HANDLE CHANGE: ', e.target.value);
// check for mentions (@name), only if the BuddyPress friends component is active
if(vikinger_constants.plugin_active.buddypress_friends){checkForMentions(e.target.value);}props.handleChange(e);};var applySelectedMention=function applySelectedMention(user,event){// console.log('EXPANDABLE TEXTAREA - APPLY SELECTED MENTION: ', user);
var newText=getTextWithMention(user.mention_name);// console.log('EXPANDABLE TEXTAREA - APPLY SELECTED MENTION NEW TEXT: ', newText);
closeMention(user.mention_name,event);props.handleChange({target:{name:props.name,value:newText,user:user}});};var isOnMobileResolution=function isOnMobileResolution(){return window.innerWidth<=768;};var updateMobileResolution=function updateMobileResolution(){setOnMobileResolution(isOnMobileResolution());};(0,_react.useEffect)(function(){if(props.label){(0,_plugins.createFormInput)([formTextareaRef.current]);}},[]);(0,_react.useEffect)(function(){// disable enter for space
if(props.disableEnter){// disable enter key
textareaRef.current.addEventListener('keypress',disableEnterKey);}return function(){if(props.disableEnter){textareaRef.current.removeEventListener('keypress',disableEnterKey);}};});(0,_react.useEffect)(function(){updateMobileResolution();window.addEventListener('resize',updateMobileResolution);return function(){window.removeEventListener('resize',updateMobileResolution);};});(0,_react.useEffect)(function(){var onMobileResolutionAtUseEffectStart=isOnMobileResolution();// submit content on enter key press
if(props.submitOnEnter&&!onMobileResolutionAtUseEffectStart){textareaRef.current.addEventListener('keypress',submitOnEnterKeyPress);textareaRef.current.addEventListener('keypress',addNewlineOnShiftEnterKeyPress);// disable enter key
textareaRef.current.addEventListener('keypress',disableEnterKey);// insert newline on shift + enter
textareaRef.current.addEventListener('keydown',savePressedKey);textareaRef.current.addEventListener('keyup',resetPressedKey);}return function(){if(props.submitOnEnter&&!onMobileResolutionAtUseEffectStart){textareaRef.current.removeEventListener('keypress',submitOnEnterKeyPress);textareaRef.current.removeEventListener('keypress',addNewlineOnShiftEnterKeyPress);textareaRef.current.removeEventListener('keypress',disableEnterKey);textareaRef.current.removeEventListener('keydown',savePressedKey);textareaRef.current.removeEventListener('keyup',resetPressedKey);}};});(0,_react.useLayoutEffect)(function(){// if text changed, refresh textarea size
updateTextareaDimensions();},[props.value]);(0,_react.useEffect)(function(){if(!mounting.current){clearInput();}else{mounting.current=false;}},[props.clearInput]);(0,_react.useEffect)(function(){if(props.focus&&textareaRef.current){// set cursor to end of textarea after focus
var selectionPosition=textareaRef.current.value.length*2;textareaRef.current.setSelectionRange(selectionPosition,selectionPosition);}},[props.focus]);return/*#__PURE__*/_react.default.createElement("div",{ref:formTextareaRef,className:"form-textarea ".concat(props.focus?'active':''," ").concat(props.modifiers||'')},/*#__PURE__*/_react.default.createElement("p",{ref:shadowTextareaRef,className:"form-textarea-shadow ".concat(props.modifiers||'')}),props.label&&/*#__PURE__*/_react.default.createElement("label",{className:"".concat(props.loading?'label-disabled':'')},props.label),props.userFriends&&mentioning&&/*#__PURE__*/_react.default.createElement(_MentionList.default,{data:props.userFriends,searchText:mentionChars,positionData:mentionPositionData,onItemSelection:applySelectedMention}),/*#__PURE__*/_react.default.createElement("textarea",_extends({ref:textareaRef,name:props.name,value:props.value,className:"".concat(props.loading?'input-disabled':''," ").concat(props.error?'input-error':'')},props.placeholder?{placeholder:props.placeholder}:{},{maxLength:maxLength.current,autoFocus:props.focus,disabled:props.disabled,onChange:handleChange})),/*#__PURE__*/_react.default.createElement("div",{className:"form-textarea-footer"},!props.hideLimit&&/*#__PURE__*/_react.default.createElement("div",{className:"form-textarea-limit ".concat(props.modifiers||'')},props.loading&&/*#__PURE__*/_react.default.createElement(_LoaderSpinner.default,null),/*#__PURE__*/_react.default.createElement("p",{className:"form-textarea-limit-text"},props.value.length,"/",maxLength.current)),props.submitOnEnter&&onMobileResolution&&/*#__PURE__*/_react.default.createElement("p",{className:"button small secondary",onClick:props.onSubmit},vikinger_translation.post_action)));}

},{"../../utils/core":355,"../../utils/plugins":356,"../loader/LoaderSpinner":204,"../mention/MentionList":216,"react":380}],144:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormDatepicker;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _core=require("../../utils/core");var _date=_interopRequireDefault(require("../utils/date"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FormDatepicker(props){var _useState3;var dateValue=props.value!==''?props.value:new Date();var dateState={day:{name:"".concat(props.name,"_day"),value:_date.default.getDay(dateValue)},month:{name:"".concat(props.name,"_month"),value:_date.default.getMonth(dateValue)},year:{name:"".concat(props.name,"_year"),value:_date.default.getYear(dateValue)}};var _useState=(0,_react.useState)((_useState3={},_defineProperty(_useState3,dateState.day.name,dateState.day.value),_defineProperty(_useState3,dateState.month.name,dateState.month.value),_defineProperty(_useState3,dateState.year.name,dateState.year.value),_defineProperty(_useState3,"daysInMonthYear",_date.default.getDaysInMonthYear(dateState.month.value,dateState.year.value)),_useState3)),_useState2=_slicedToArray(_useState,2),date=_useState2[0],setDate=_useState2[1];var months=_date.default.getMonths();var currentYear=new Date().getFullYear();var years=_date.default.getYears(currentYear-60,currentYear+10);if(props.meta.range_type){if(props.meta.range_type[0]==='relative'){var _currentYear=new Date().getFullYear(),yearRelativeStart=Number.parseInt(props.meta.range_relative_start[0],10),yearRelativeEnd=Number.parseInt(props.meta.range_relative_end[0],10);years=_date.default.getYears(_currentYear+yearRelativeStart,_currentYear+yearRelativeEnd);}else{var yearAbsoluteStart=Number.parseInt(props.meta.range_absolute_start[0],10),yearAbsoluteEnd=Number.parseInt(props.meta.range_absolute_end[0],10);years=_date.default.getYears(yearAbsoluteStart,yearAbsoluteEnd);}}var onChange=function onChange(e){e.persist();var yearChanged=e.target.name===dateState.year.name,monthChanged=e.target.name===dateState.month.name;// if month or year changed
if(monthChanged||yearChanged){// validate that the current day value is still valid
var newDate={day:date[dateState.day.name],month:monthChanged?e.target.value:date[dateState.month.name],year:yearChanged?e.target.value:date[dateState.year.name]};// if current day value is not valid, set it to max possible value
if(!_date.default.validDay(newDate.day,newDate.month,newDate.year)){setDate(function(previousDate){return _objectSpread(_objectSpread({},previousDate),{},_defineProperty({},dateState.day.name,_date.default.getMaxDaysInMonthYear(newDate.month,newDate.year)));});}}setDate(function(previousDate){return _objectSpread(_objectSpread({},previousDate),{},_defineProperty({},e.target.name,e.target.value));});};(0,_react.useEffect)(function(){setDate(function(previousDate){return _objectSpread(_objectSpread({},previousDate),{},{daysInMonthYear:_date.default.getDaysInMonthYear(previousDate[dateState.month.name],previousDate[dateState.year.name])});});var newDate=_date.default.getDateString(date[dateState.day.name],date[dateState.month.name],date[dateState.year.name]);props.onChange(newDate);},[date[dateState.day.name],date[dateState.month.name],date[dateState.year.name]]);return/*#__PURE__*/_react.default.createElement("div",{className:"form-select-wrap"},/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:dateState.day.name},(0,_core.ucfirst)(props.name)," - ",vikinger_translation.day),/*#__PURE__*/_react.default.createElement("select",{id:dateState.day.name,name:dateState.day.name,value:date[dateState.day.name],onChange:onChange},date.daysInMonthYear.map(function(day){return/*#__PURE__*/_react.default.createElement("option",{key:day,value:day},day);})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"})),/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:dateState.month.name},(0,_core.ucfirst)(props.name)," - ",vikinger_translation.month),/*#__PURE__*/_react.default.createElement("select",{id:dateState.month.name,name:dateState.month.name,value:date[dateState.month.name],onChange:onChange},months.map(function(month){return/*#__PURE__*/_react.default.createElement("option",{key:month,value:month},month);})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"})),/*#__PURE__*/_react.default.createElement("div",{className:"form-select"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:dateState.year.name},(0,_core.ucfirst)(props.name)," - ",vikinger_translation.year),/*#__PURE__*/_react.default.createElement("select",{id:dateState.year.name,name:dateState.year.name,value:date[dateState.year.name],onChange:onChange},years.map(function(year){return/*#__PURE__*/_react.default.createElement("option",{key:year,value:year},year);})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"})));}

},{"../../utils/core":355,"../icon/IconSVG":201,"../utils/date":308,"react":380}],145:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormInput;var _react=_interopRequireWildcard(require("react"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FormInput(props){var _useState=(0,_react.useState)(_defineProperty({},props.name,props.value||'')),_useState2=_slicedToArray(_useState,2),inputData=_useState2[0],setInputData=_useState2[1];var _useState4=(0,_react.useState)(props.value?true:false),_useState5=_slicedToArray(_useState4,2),active=_useState5[0],setActive=_useState5[1];var inputRef=(0,_react.useRef)(null);var blurInput=function blurInput(value){if(value===''){setActive(false);}};var focusInput=function focusInput(){setActive(true);};var onFocus=function onFocus(e){focusInput();};var onBlur=function onBlur(e){blurInput(e.target.value);};var onChange=function onChange(e){setInputData(_defineProperty({},props.name,e.target.value));if(props.onChange){if(props.handleValue){props.onChange({target:{name:props.name,value:e.target.value}});}else{props.onChange(e.target.value);}}};(0,_react.useEffect)(function(){// handling input value and value changed
if(props.handleValue){// if input isn't focused, blur it
if(inputRef.current!==document.activeElement){focusInput();blurInput(props.value);}}},[props.value]);return/*#__PURE__*/_react.default.createElement("div",{className:"form-input ".concat(props.modifiers||''," ").concat(active?'active':''," ").concat(props.markAsRequired?'required':'')},/*#__PURE__*/_react.default.createElement("label",{htmlFor:props.name},props.label," ",props.required&&/*#__PURE__*/_react.default.createElement("span",{className:"label-required"},"*")),/*#__PURE__*/_react.default.createElement("input",{ref:inputRef,type:"text",className:"".concat(props.error?'input-error':''," ").concat(props.disabled?'input-disabled':''),name:props.name,value:inputData[props.name],onChange:onChange,onFocus:onFocus,onBlur:onBlur,disabled:props.disabled}));}

},{"react":380}],146:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormInputCheckbox;var _react=_interopRequireDefault(require("react"));var _Checkbox=_interopRequireDefault(require("./Checkbox"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function FormInputCheckbox(props){return/*#__PURE__*/_react.default.createElement("div",{className:"form-input-checkbox"},/*#__PURE__*/_react.default.createElement(_Checkbox.default,{active:props.active,toggleActive:props.toggleActive}),/*#__PURE__*/_react.default.createElement("p",{className:"form-input-checkbox-text",onClick:props.toggleActive},props.text));}

},{"./Checkbox":142,"react":380}],147:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormInputCheckboxList;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _core=require("../../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function FormInputCheckboxList(props){var initialOptions={};var _iterator=_createForOfIteratorHelper(props.options),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var option=_step.value;initialOptions[option.name]=props.value.includes(option.name);}}catch(err){_iterator.e(err);}finally{_iterator.f();}var _useState=(0,_react.useState)(initialOptions),_useState2=_slicedToArray(_useState,2),options=_useState2[0],setOptions=_useState2[1];var handleChange=function handleChange(e){e.persist();setOptions(function(previousOptions){var newOptions=(0,_core.deepMerge)(previousOptions);newOptions[e.target.name]=e.target.checked;return newOptions;});};var generateCheckboxValue=function generateCheckboxValue(){var values=[];for(var option in options){if(options[option]){values.push(option);}}if(values.length===0){return'';}return values;};(0,_react.useEffect)(function(){var checkboxValue=generateCheckboxValue();props.onChange(checkboxValue);},[options]);return/*#__PURE__*/_react.default.createElement("div",{className:"form-input-list"},/*#__PURE__*/_react.default.createElement("p",{className:"form-input-list-title"},props.label),/*#__PURE__*/_react.default.createElement("div",{className:"form-input-list-items"},props.options.map(function(checkbox){return/*#__PURE__*/_react.default.createElement("div",{key:checkbox.id,className:"checkbox-wrap small"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:checkbox.name},checkbox.name),/*#__PURE__*/_react.default.createElement("input",{type:"checkbox",id:checkbox.name,name:checkbox.name,checked:options[checkbox.name],onChange:handleChange}),/*#__PURE__*/_react.default.createElement("div",{className:"checkbox-box small"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"cross",modifiers:"form-input-checkbox-box-icon"})));})));}

},{"../../utils/core":355,"../icon/IconSVG":201,"react":380}],148:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormInputInteractive;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FormInputInteractive(props){var _useState=(0,_react.useState)(_defineProperty({},props.name,props.value||'')),_useState2=_slicedToArray(_useState,2),inputData=_useState2[0],setInputData=_useState2[1];var _useState4=(0,_react.useState)(props.value?true:false),_useState5=_slicedToArray(_useState4,2),active=_useState5[0],setActive=_useState5[1];var resetInput=function resetInput(){setInputData(_defineProperty({},props.name,''));setActive(false);if(props.onReset){props.onReset('');}};var onFocus=function onFocus(e){setActive(true);};var onBlur=function onBlur(e){if(e.target.value===''){setActive(false);}};var onChange=function onChange(e){setInputData(_defineProperty({},props.name,e.target.value));if(props.onChange){props.onChange(e.target.value);}};return/*#__PURE__*/_react.default.createElement("div",{className:"interactive-input ".concat(props.modifiers||''," ").concat(active?'active':'')},/*#__PURE__*/_react.default.createElement("input",{type:"text",name:props.name,placeholder:props.placeholder,value:inputData[props.name],onChange:onChange,onFocus:onFocus,onBlur:onBlur}),inputData[props.name]===''&&/*#__PURE__*/_react.default.createElement("div",{className:"interactive-input-icon-wrap"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"magnifying-glass",modifiers:"interactive-input-icon"})),inputData[props.name]!==''&&/*#__PURE__*/_react.default.createElement("div",{className:"interactive-input-action",onClick:resetInput},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"cross-thin",modifiers:"interactive-input-action-icon"})));}

},{"../icon/IconSVG":201,"react":380}],149:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormInputPassword;var _react=_interopRequireWildcard(require("react"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FormInputPassword(props){var _useState=(0,_react.useState)(_defineProperty({},props.name,props.value||'')),_useState2=_slicedToArray(_useState,2),inputData=_useState2[0],setInputData=_useState2[1];var _useState4=(0,_react.useState)(props.value?true:false),_useState5=_slicedToArray(_useState4,2),active=_useState5[0],setActive=_useState5[1];var inputRef=(0,_react.useRef)(null);var blurInput=function blurInput(value){if(value===''){setActive(false);}};var focusInput=function focusInput(){setActive(true);};var onFocus=function onFocus(e){focusInput();};var onBlur=function onBlur(e){blurInput(e.target.value);};var onChange=function onChange(e){setInputData(_defineProperty({},props.name,e.target.value));if(props.onChange){if(props.handleValue){props.onChange({target:{name:props.name,value:e.target.value}});}else{props.onChange(e.target.value);}}};(0,_react.useEffect)(function(){// handling input value and value changed
if(props.handleValue){// if input isn't focused, blur it
if(inputRef.current!==document.activeElement){focusInput();blurInput(props.value);}}},[props.value]);return/*#__PURE__*/_react.default.createElement("div",{className:"form-input ".concat(props.modifiers||''," ").concat(active?'active':''," ").concat(props.markAsRequired?'required':'')},/*#__PURE__*/_react.default.createElement("label",{htmlFor:props.name},props.label," ",props.required&&/*#__PURE__*/_react.default.createElement("span",{className:"label-required"},"*")),/*#__PURE__*/_react.default.createElement("input",{ref:inputRef,type:"password",className:"".concat(props.error?'input-error':''," ").concat(props.disabled?'input-disabled':''),name:props.name,value:inputData[props.name],onChange:onChange,onFocus:onFocus,onBlur:onBlur,disabled:props.disabled}));}

},{"react":380}],150:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormInputRadioList;var _react=_interopRequireWildcard(require("react"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FormInputRadioList(props){var _useState=(0,_react.useState)(props.value),_useState2=_slicedToArray(_useState,2),value=_useState2[0],setValue=_useState2[1];var handleValueChange=function handleValueChange(e){setValue(e.target.value);if(props.onChange){props.onChange(e.target.value);}};return/*#__PURE__*/_react.default.createElement("div",{className:"form-input-list"},/*#__PURE__*/_react.default.createElement("p",{className:"form-input-list-title"},props.label),/*#__PURE__*/_react.default.createElement("div",{className:"form-input-list-items"},props.options.map(function(radio){return/*#__PURE__*/_react.default.createElement("div",{key:radio.id,className:"checkbox-wrap small"},/*#__PURE__*/_react.default.createElement("label",{htmlFor:radio.name},radio.name),/*#__PURE__*/_react.default.createElement("input",{type:"radio",id:radio.name,name:props.name,value:radio.name,checked:value===radio.name,onChange:handleValueChange}),/*#__PURE__*/_react.default.createElement("div",{className:"checkbox-box small round"}));})));}

},{"react":380}],151:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormInputSelect;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FormInputSelect(props){var _useState=(0,_react.useState)(props.value),_useState2=_slicedToArray(_useState,2),value=_useState2[0],setValue=_useState2[1];var handleValueChange=function handleValueChange(e){setValue(e.target.value);if(props.onChange){props.onChange(e.target.value);}};return/*#__PURE__*/_react.default.createElement("div",{className:"form-select ".concat(props.is_required?'required':'')},/*#__PURE__*/_react.default.createElement("label",{htmlFor:props.name},props.label," ",props.is_required&&/*#__PURE__*/_react.default.createElement("span",{className:"label-required"},"*")),/*#__PURE__*/_react.default.createElement("select",{name:props.name,value:value,onChange:handleValueChange},/*#__PURE__*/_react.default.createElement("option",{value:""},vikinger_translation.select_an_option),props.options.map(function(option){return/*#__PURE__*/_react.default.createElement("option",{key:option.id,value:option.name},option.name);})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}));}

},{"../icon/IconSVG":201,"react":380}],152:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormInputURL;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FormInputURL(props){var _useState=(0,_react.useState)(_defineProperty({},props.name,props.value||'')),_useState2=_slicedToArray(_useState,2),inputData=_useState2[0],setInputData=_useState2[1];var _useState4=(0,_react.useState)(props.value?true:false),_useState5=_slicedToArray(_useState4,2),active=_useState5[0],setActive=_useState5[1];var inputRef=(0,_react.useRef)(null);var blurInput=function blurInput(value){if(value===''){setActive(false);}};var focusInput=function focusInput(){setActive(true);};var onFocus=function onFocus(e){focusInput();};var onBlur=function onBlur(e){blurInput(e.target.value);};var onChange=function onChange(e){setInputData(_defineProperty({},props.name,e.target.value));if(props.onChange){if(props.handleValue){props.onChange({target:{name:props.name,value:e.target.value}});}else{props.onChange(e.target.value);}}};(0,_react.useEffect)(function(){// handling input value and value changed
if(props.handleValue){// if input isn't focused, blur it
if(inputRef.current!==document.activeElement){focusInput();blurInput(props.value);}}},[props.value]);return/*#__PURE__*/_react.default.createElement("div",{className:"form-input social-input ".concat(props.modifiers||''," ").concat(active?'active':''," ").concat(props.markAsRequired?'required':'')},/*#__PURE__*/_react.default.createElement("div",{className:"social-link no-hover ".concat(props.icon)},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:props.icon})),/*#__PURE__*/_react.default.createElement("label",{htmlFor:props.name},props.label," ",props.required&&/*#__PURE__*/_react.default.createElement("span",{className:"label-required"},"*")),/*#__PURE__*/_react.default.createElement("input",{ref:inputRef,type:"text",name:props.name,value:inputData[props.name],onChange:onChange,onFocus:onFocus,onBlur:onBlur}));}

},{"../icon/IconSVG":201,"react":380}],153:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormRow;var _react=_interopRequireDefault(require("react"));var _FormInput=_interopRequireDefault(require("../form/FormInput"));var _FormDatepicker=_interopRequireDefault(require("../form/FormDatepicker"));var _FormInputRadioList=_interopRequireDefault(require("../form/FormInputRadioList"));var _FormInputSelect=_interopRequireDefault(require("../form/FormInputSelect"));var _FormInputCheckboxList=_interopRequireDefault(require("../form/FormInputCheckboxList"));var _FormInputURL=_interopRequireDefault(require("../form/FormInputURL"));var _FormTextarea=_interopRequireDefault(require("../form/FormTextarea"));var _xprofile=require("../utils/xprofile");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function FormRow(props){return/*#__PURE__*/_react.default.createElement("div",{className:"form-row ".concat(props.modifiers||'')},props.data.map(function(field){var Input=_FormInput.default,icon=(0,_xprofile.getURLIcon)(field.name),modifiers='small';if(field.type==='textarea'){Input=_FormTextarea.default;modifiers+=' mid-textarea';}else if(field.type==='datebox'){Input=_FormDatepicker.default;}else if(field.type==='url'){Input=_FormInputURL.default;}else if(field.type==='checkbox'){Input=_FormInputCheckboxList.default;}else if(field.type==='radio'){Input=_FormInputRadioList.default;}else if(field.type==='selectbox'){Input=_FormInputSelect.default;}return/*#__PURE__*/_react.default.createElement("div",{key:field.name,className:"form-item"},/*#__PURE__*/_react.default.createElement(Input,{label:field.name,name:field.name.toLowerCase(),value:field.value,meta:field.meta,options:field.options,icon:icon,modifiers:modifiers,handleValue:props.handleValue,onChange:function onChange(data){props.onFieldUpdate(field,data);}}));}));}

},{"../form/FormDatepicker":144,"../form/FormInput":145,"../form/FormInputCheckboxList":147,"../form/FormInputRadioList":150,"../form/FormInputSelect":151,"../form/FormInputURL":152,"../form/FormTextarea":155,"../utils/xprofile":317,"react":380}],154:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormSelect;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FormSelect(props){var _useState=(0,_react.useState)(_defineProperty({},props.name,props.value||'')),_useState2=_slicedToArray(_useState,2),inputData=_useState2[0],setInputData=_useState2[1];var onChange=function onChange(e){setInputData(_defineProperty({},props.name,e.target.value));if(props.onChange){if(props.handleValue){props.onChange({target:{name:props.name,value:e.target.value}});}else{props.onChange(e.target.value);}}};return/*#__PURE__*/_react.default.createElement("div",{className:"form-select ".concat(props.markAsRequired?'required':'')},/*#__PURE__*/_react.default.createElement("label",{htmlFor:props.name},props.label," ",props.required&&/*#__PURE__*/_react.default.createElement("span",{className:"label-required"},"*")),/*#__PURE__*/_react.default.createElement("select",{name:props.name,value:inputData[props.name],onChange:onChange},props.options.map(function(option){return/*#__PURE__*/_react.default.createElement("option",{key:option.id,value:option.id},option.name);})),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"form-select-icon"}));}

},{"../icon/IconSVG":201,"react":380}],155:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FormTextarea;var _react=_interopRequireWildcard(require("react"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FormTextarea(props){var _useState=(0,_react.useState)(_defineProperty({},props.name,props.value||'')),_useState2=_slicedToArray(_useState,2),inputData=_useState2[0],setInputData=_useState2[1];var _useState4=(0,_react.useState)(props.value?true:false),_useState5=_slicedToArray(_useState4,2),active=_useState5[0],setActive=_useState5[1];var inputRef=(0,_react.useRef)(null);var blurInput=function blurInput(value){if(value===''){setActive(false);}};var focusInput=function focusInput(){setActive(true);};var onFocus=function onFocus(e){focusInput();};var onBlur=function onBlur(e){blurInput(e.target.value);};var onChange=function onChange(e){setInputData(_defineProperty({},props.name,e.target.value));if(props.onChange){if(props.handleValue){props.onChange({target:{name:props.name,value:e.target.value}});}else{props.onChange(e.target.value);}}};(0,_react.useEffect)(function(){// handling input value and value changed
if(props.handleValue){// if input isn't focused, blur it
if(inputRef.current!==document.activeElement){focusInput();blurInput(props.value);}}},[props.value]);return/*#__PURE__*/_react.default.createElement("div",{className:"form-input ".concat(props.modifiers||''," ").concat(active?'active':''," ").concat(props.markAsRequired?'required':'')},/*#__PURE__*/_react.default.createElement("label",{htmlFor:props.name},props.label," ",props.required&&/*#__PURE__*/_react.default.createElement("span",{className:"label-required"},"*")),/*#__PURE__*/_react.default.createElement("textarea",{ref:inputRef,name:props.name,value:inputData[props.name],onChange:onChange,onFocus:onFocus,onBlur:onBlur}));}

},{"react":380}],156:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=FriendRequest;var _react=_interopRequireDefault(require("react"));var _FriendStatus=_interopRequireDefault(require("../user-status/user-status-friend/FriendStatus"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function FriendRequest(props){return/*#__PURE__*/_react.default.createElement("div",{className:"notification-box"},/*#__PURE__*/_react.default.createElement(_FriendStatus.default,{data:props.data,modifiers:"request",loggedUser:props.loggedUser,onActionComplete:props.onActionComplete,allowReject:true}));}

},{"../user-status/user-status-friend/FriendStatus":287,"react":380}],157:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=FriendRequestList;var _react=_interopRequireDefault(require("react"));var _FriendRequest=_interopRequireDefault(require("./FriendRequest"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function FriendRequestList(props){return/*#__PURE__*/_react.default.createElement("div",{className:"notification-box-list"},props.data.map(function(friendRequest){return/*#__PURE__*/_react.default.createElement(_FriendRequest.default,{key:friendRequest.id,data:friendRequest.user,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete});}));}

},{"./FriendRequest":156,"react":380}],158:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Grid;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Grid(props){return/*#__PURE__*/_react.default.createElement("div",{className:"grid"},props.content);}

},{"react":380}],159:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=GridOption;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function GridOption(props){var tooltipRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createTooltip)({containerElement:tooltipRef.current,offset:8,direction:'top',animation:{type:'translate-out-fade'}});},[]);return/*#__PURE__*/_react.default.createElement("div",{ref:tooltipRef,className:"view-action ".concat(props.active?'active':''),"data-title":vikinger_translation.grid_filter[props.type],onClick:props.onClick},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"".concat(props.type,"-grid-view"),modifiers:"view-action-icon"}));}

},{"../../utils/plugins":356,"../icon/IconSVG":201,"react":380}],160:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GridOptions;var _react=_interopRequireDefault(require("react"));var _GridOption=_interopRequireDefault(require("./GridOption"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GridOptions(props){var renderedGridOptions=props.gridTypes.map(function(gridType){return/*#__PURE__*/_react.default.createElement(_GridOption.default,{key:gridType,type:gridType,active:props.activeGrid===gridType,onClick:function onClick(){props.onGridOptionClick(gridType);}});});return/*#__PURE__*/_react.default.createElement("div",{className:"view-actions"},renderedGridOptions);}

},{"./GridOption":159,"react":380}],161:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Grid_3;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Grid_3(props){return/*#__PURE__*/_react.default.createElement("div",{className:"grid grid-3-3-3-3 stretched centered-on-mobile"},props.content);}

},{"react":380}],162:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Grid_4;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Grid_4(props){return/*#__PURE__*/_react.default.createElement("div",{className:"grid grid-4-4-4 stretched centered-on-mobile"},props.content);}

},{"react":380}],163:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Grid_6;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Grid_6(props){return/*#__PURE__*/_react.default.createElement("div",{className:"grid grid-6-6 centered"},props.content);}

},{"react":380}],164:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupInvitationPreview;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _UserPreviewAuthor=_interopRequireDefault(require("../user-preview/UserPreviewAuthor"));var _AcceptGroupInvitationButton=_interopRequireDefault(require("../button/action-button/action-button-group/AcceptGroupInvitationButton"));var _RemoveGroupInvitationButton=_interopRequireDefault(require("../button/action-button/action-button-group/RemoveGroupInvitationButton"));var _TagSticker=_interopRequireDefault(require("../tag/TagSticker"));var _core=require("../../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupInvitationPreview(props){var membersText=props.data.group.total_member_count===1?vikinger_translation.member:vikinger_translation.members,postsText=props.data.group.post_count===1?vikinger_translation.post:vikinger_translation.posts;return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview small"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url(".concat(props.data.group.cover_image_url,") center center / cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:props.data.group.status}),/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{modifiers:"user-short-description-avatar",data:props.data.group}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.group.link},(0,_core.truncateText)(props.data.group.name,25))),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-text"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.group.link},"@",(0,_core.truncateText)((0,_core.joinText)(props.data.group.name).toLowerCase(),35)))),/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.group.total_member_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},membersText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.group.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postsText))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-actions"},/*#__PURE__*/_react.default.createElement(_RemoveGroupInvitationButton.default,{data:props.data,modifiers:"tertiary",icon:"leave-group",title:vikinger_translation.reject_invitation,onActionComplete:props.onActionComplete}),/*#__PURE__*/_react.default.createElement(_AcceptGroupInvitationButton.default,{data:props.data,modifiers:"secondary",icon:"join-group",title:vikinger_translation.accept_invitation,onActionComplete:props.onActionComplete}))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-footer padded"},/*#__PURE__*/_react.default.createElement(_UserPreviewAuthor.default,{data:props.data.inviter})));}

},{"../../utils/core":355,"../avatar/Avatar":55,"../button/action-button/action-button-group/AcceptGroupInvitationButton":92,"../button/action-button/action-button-group/RemoveGroupInvitationButton":98,"../tag/TagSticker":276,"../user-preview/UserPreviewAuthor":281,"react":380}],165:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupManagePopup;var _react=_interopRequireWildcard(require("react"));var _UserGroupPreview=_interopRequireDefault(require("../user-preview/UserGroupPreview"));var _UploadBox=_interopRequireDefault(require("../upload/UploadBox"));var _FormInput=_interopRequireDefault(require("../form/FormInput"));var _FormInputCheckbox=_interopRequireDefault(require("../form/FormInputCheckbox"));var _FormTextarea=_interopRequireDefault(require("../form/FormTextarea"));var _FormSelect=_interopRequireDefault(require("../form/FormSelect"));var _FormRow=_interopRequireDefault(require("../form/FormRow"));var _GroupMemberStatusList=_interopRequireDefault(require("../user-status/user-status-group/user-status-group-member/GroupMemberStatusList"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _core=require("../../utils/core");var _plugins=require("../../utils/plugins");var groupRouter=_interopRequireWildcard(require("../../router/group/group-router"));var forumRouter=_interopRequireWildcard(require("../../router/forum/forum-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var getCustomGroupMeta=function getCustomGroupMeta(data){var customGroupMeta={social:[{name:'Facebook',value:'',type:'url'},{name:'Twitter',value:'',type:'url'},{name:'Instagram',value:'',type:'url'},{name:'Youtube',value:'',type:'url'},{name:'Twitch',value:'',type:'url'},{name:'Discord',value:'',type:'url'},{name:'Patreon',value:'',type:'url'},{name:'Linkedin',value:'',type:'url'},{name:'Pinterest',value:'',type:'url'},{name:'Tiktok',value:'',type:'url'},{name:'Github',value:'',type:'url'},{name:'Reddit',value:'',type:'url'},{name:'Dribbble',value:'',type:'url'},{name:'Unsplash',value:'',type:'url'},{name:'Flickr',value:'',type:'url'}]};if(data){for(var customGroupMetaGroupKey in customGroupMeta){var customGroupMetaGroup=customGroupMeta[customGroupMetaGroupKey];var _iterator=_createForOfIteratorHelper(customGroupMetaGroup),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var customGroupMetaField=_step.value;if(typeof data.meta[customGroupMetaField.name]!=='undefined'){customGroupMetaField.value=data.meta[customGroupMetaField.name];}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}}return customGroupMeta;};var createGroupData={name:vikinger_translation.create_new_group,status:'public',avatar_url:vikinger_constants.settings.group_avatar_url_default,cover_image_url:vikinger_constants.settings.group_cover_image_url_default,enable_forum:false};var groupStatusOptions=[{id:'public',name:vikinger_translation.public},{id:'private',name:vikinger_translation.private}];var defaultForumData={post_title:'',post_content:'',post_status:'publish'};var forumPrivacyOptions=[{id:'publish',name:'Public'},{id:'private',name:'Private'},{id:'hidden',name:'Hidden'}];var groupTypes=Object.values(vikinger_constants.settings.group_types).filter(function(groupType){return groupType.show_in_create_screen==='1';});function GroupManagePopup(props){var creatingGroup=!props.data;var popupBoxStyles=(0,_react.useRef)(!creatingGroup?{minHeight:'526px'}:{});var defaultGroupData=(0,_react.useRef)({name:'',status:'public',description:'',enable_forum:false,types:[]});var defaultGroupMeta=(0,_react.useRef)(getCustomGroupMeta());var initialTab='group-info';// if editing group
if(!creatingGroup){// if logged user is not the creator of the group
if(props.data.creator_id!==props.loggedUser.id){// if logged user is an admin or mod of the group, show members screen
if(props.data.is_admin||props.data.is_mod){initialTab='group-members';}}}var _useState=(0,_react.useState)(initialTab),_useState2=_slicedToArray(_useState,2),activeTab=_useState2[0],setActiveTab=_useState2[1];var _useState3=(0,_react.useState)(creatingGroup?createGroupData:false),_useState4=_slicedToArray(_useState3,2),group=_useState4[0],setGroup=_useState4[1];var _useState5=(0,_react.useState)(defaultGroupData.current),_useState6=_slicedToArray(_useState5,2),groupData=_useState6[0],setGroupData=_useState6[1];var _useState7=(0,_react.useState)(defaultGroupMeta.current),_useState8=_slicedToArray(_useState7,2),groupMeta=_useState8[0],setGroupMeta=_useState8[1];var _useState9=(0,_react.useState)({}),_useState10=_slicedToArray(_useState9,2),groupMetaToUpdate=_useState10[0],setGroupMetaToUpdate=_useState10[1];var _useState11=(0,_react.useState)(false),_useState12=_slicedToArray(_useState11,2),avatarFile=_useState12[0],setAvatarFile=_useState12[1];var _useState13=(0,_react.useState)(false),_useState14=_slicedToArray(_useState13,2),uploadAvatarActive=_useState14[0],setUploadAvatarActive=_useState14[1];var _useState15=(0,_react.useState)(vikinger_translation.change_avatar),_useState16=_slicedToArray(_useState15,2),uploadAvatarTitle=_useState16[0],setUploadAvatarTitle=_useState16[1];var _useState17=(0,_react.useState)(false),_useState18=_slicedToArray(_useState17,2),coverFile=_useState18[0],setCoverFile=_useState18[1];var _useState19=(0,_react.useState)(false),_useState20=_slicedToArray(_useState19,2),uploadCoverActive=_useState20[0],setUploadCoverActive=_useState20[1];var _useState21=(0,_react.useState)(vikinger_translation.change_cover),_useState22=_slicedToArray(_useState21,2),uploadCoverTitle=_useState22[0],setUploadCoverTitle=_useState22[1];var _useState23=(0,_react.useState)(false),_useState24=_slicedToArray(_useState23,2),markAsRequired=_useState24[0],setMarkAsRequired=_useState24[1];var _useState25=(0,_react.useState)(false),_useState26=_slicedToArray(_useState25,2),saving=_useState26[0],setSaving=_useState26[1];var _useState27=(0,_react.useState)(false),_useState28=_slicedToArray(_useState27,2),error=_useState28[0],setError=_useState28[1];var _useState29=(0,_react.useState)(false),_useState30=_slicedToArray(_useState29,2),deleting=_useState30[0],setDeleting=_useState30[1];var _useState31=(0,_react.useState)(defaultForumData),_useState32=_slicedToArray(_useState31,2),forum=_useState32[0],setForum=_useState32[1];var groupManagePopupRef=(0,_react.useRef)(null);var popup=(0,_react.useRef)(null);(0,_react.useEffect)(function(){popup.current=(0,_plugins.createPopup)({triggerElement:props.groupManagePopupTriggerRef.current,premadeContentElement:groupManagePopupRef.current,type:'premade',popupSelectors:['group-manage-popup','animate-slide-down']});// only fetch group data if not creating
if(!creatingGroup){getGroupData();}},[]);var getGroupData=function getGroupData(){var getGroupsPromise=groupRouter.getGroups({include:[props.data.id],data_scope:'group-manage'});getGroupsPromise.done(function(response){// console.log('GROUP MANAGE POPUP - GET GROUP DATA RESPONSE: ', response);
var groupResponseData=response[0];var newGroupMeta=getCustomGroupMeta(groupResponseData);defaultGroupData.current.name=groupResponseData.name;defaultGroupData.current.status=groupResponseData.status;defaultGroupData.current.description=groupResponseData.description;defaultGroupData.current.enable_forum=groupResponseData.enable_forum;defaultGroupData.current.types=groupResponseData.group_types;setGroup(groupResponseData);setGroupMeta(newGroupMeta);// use group data to generate default forum title, description and status
var newForumData=(0,_core.deepMerge)(defaultForumData);var groupForumStatus={public:'publish',private:'private',hidden:'hidden'};newForumData.post_title=groupResponseData.name;newForumData.post_content=groupResponseData.description;newForumData.post_status=groupForumStatus[groupResponseData.status];setForum(newForumData);// only fetch group associated forum if bbPress is active and the forums option is enabled
if(!creatingGroup&&vikinger_constants.plugin_active.bbpress&&vikinger_constants.settings['bbp_is_group_forums_active']){getGroupAssociatedForum();}}).fail(function(error){// console.log('GROUP MANAGE POPUP - GET GROUP DATA ERROR: ', error);
});};var getGroupAssociatedForum=function getGroupAssociatedForum(){var getGroupAssociatedForumPromise=forumRouter.getGroupAssociatedForum({group_id:props.data.id});getGroupAssociatedForumPromise.done(function(response){// console.log('GROUP MANAGE POPUP - GET GROUP ASSOCIATED FORUM RESPONSE: ', props.data.id, response);
if(response&&response.length>0){var groupForumData=response[0];setForum({ID:groupForumData.ID,post_title:groupForumData.post_title,post_content:groupForumData.post_content,post_status:groupForumData.post_status});}}).fail(function(error){// console.log('GROUP MANAGE POPUP - GET GROUP ASSOCIATED FORUM ERROR: ', error);
});};var handleChange=function handleChange(e){setGroupData(function(previousGroupData){return _objectSpread(_objectSpread({},previousGroupData),{},_defineProperty({},e.target.name,e.target.value));});if(e.target.name==='status'){setGroup(function(previousGroup){return _objectSpread(_objectSpread({},previousGroup),{},{status:e.target.value});});}};var handleGroupTypeChange=function handleGroupTypeChange(groupType){setGroupData(function(previousGroupData){var newGroupTypes=[];if(previousGroupData.types.includes(groupType.name)){newGroupTypes=previousGroupData.types.filter(function(previousGroupType){return previousGroupType!==groupType.name;});}else{newGroupTypes=previousGroupData.types.concat([groupType.name]);}return _objectSpread(_objectSpread({},previousGroupData),{},{types:newGroupTypes});});};var handleForumChange=function handleForumChange(e){setForum(function(previousForum){return _objectSpread(_objectSpread({},previousForum),{},_defineProperty({},e.target.name,e.target.value));});};var toggleForumActive=function toggleForumActive(){setGroup(function(previousGroup){return _objectSpread(_objectSpread({},previousGroup),{},{enable_forum:!previousGroup.enable_forum});});setGroupData(function(previousGroupData){return _objectSpread(_objectSpread({},previousGroupData),{},{enable_forum:!previousGroupData.enable_forum});});};var updateAvatarFile=function updateAvatarFile(file){// console.log('GROUP MANAGE POPUP - AVATAR FILE: ', file);
setGroup(function(previousGroup){return _objectSpread(_objectSpread({},previousGroup),{},{avatar_url:file.url});});setAvatarFile(file);setUploadAvatarActive(true);setUploadAvatarTitle(file.file.name);};var updateCoverFile=function updateCoverFile(file){// console.log('GROUP MANAGE POPUP - COVER FILE: ', file);
setGroup(function(previousGroup){return _objectSpread(_objectSpread({},previousGroup),{},{cover_image_url:file.url});});setCoverFile(file);setUploadCoverActive(true);setUploadCoverTitle(file.file.name);};var updateSocialMeta=function updateSocialMeta(field,data){// console.log('GROUP MANAGE POPUP - SOCIAL FIELD UPDATE: ', field, data);
setGroupMeta(function(previousGroupMeta){var newGroupMeta=(0,_core.deepMerge)(previousGroupMeta);var _iterator2=_createForOfIteratorHelper(newGroupMeta.social),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var socialMeta=_step2.value;if(socialMeta.name===field.name){socialMeta.value=data.target.value;break;}}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}return newGroupMeta;});setGroupMetaToUpdate(function(previousGroupMetaToUpdate){return _objectSpread(_objectSpread({},previousGroupMetaToUpdate),{},_defineProperty({},field.name,data.target.value));});};var discardAll=function discardAll(){setGroupData(defaultGroupData.current);setGroupMeta(defaultGroupMeta.current);setGroupMetaToUpdate({});setAvatarFile(false);setUploadAvatarActive(false);setUploadAvatarTitle(vikinger_translation.change_avatar);setCoverFile(false);setUploadCoverActive(false);setUploadCoverTitle(vikinger_translation.change_cover);setMarkAsRequired(false);setError(false);};var getGroupDataUpdatedFields=function getGroupDataUpdatedFields(){// group updated fields
var updatedFields={};// only update group data if it changed
for(var groupField in groupData){// if group field value changed from the original value, add it to update it
if(groupData[groupField]!==defaultGroupData.current[groupField]){updatedFields[groupField]=groupData[groupField];}}if(updatedFields.types instanceof Array&&updatedFields.types.length===0){updatedFields.types='';}return Object.keys(updatedFields).length>0?updatedFields:false;};var deleteGroup=function deleteGroup(){// if already deleting, return
if(deleting){return;}setDeleting(true);var deleteGroupPromise=groupRouter.deleteGroup(props.data.id);deleteGroupPromise.done(function(response){// console.log('GROUP MANAGE POPUP - GROUP DELETE RESPONSE: ', response);
// refresh
window.location.reload();}).fail(function(error){// console.log('GROUP MANAGE POPUP - GROUP DELETE ERROR: ', error);
setDeleting(false);});};var save=function save(){// if already saving, return
if(saving){return;}setError(false);setSaving(true);setMarkAsRequired(false);// if creating a group
if(creatingGroup){// console.log('GROUP MANAGE POPUP - CREATING');
// if required fields have no value, show message and return
if(groupData.name===''||groupData.description===''){setSaving(false);setMarkAsRequired(true);// console.log('GROUP MANAGE POPUP - MISSING REQUIRED FIELDS');
return;}// create group
var createGroupConfig=(0,_core.deepMerge)(groupData,{creator_id:props.loggedUser.id});// handle group types
if(createGroupConfig.types instanceof Array){createGroupConfig.types=createGroupConfig.types.join(',');}var createGroupPromise=groupRouter.createGroup(createGroupConfig);// console.log('GROUP MANAGE POPUP - CREATE GROUP WITH DATA: ', createGroupConfig);
createGroupPromise.done(function(response){// console.log('GROUP MANAGE POPUP - CREATE GROUP RESPONSE: ', response);
var uploadAvatarPromise={no_result:true},uploadCoverPromise={no_result:true},updateGroupMetaPromise={no_result:true};var avatarChanged=avatarFile,coverChanged=coverFile,groupMetaChanged=Object.keys(groupMetaToUpdate).length>0;// if avatar, cover or group meta changed, save them
if(avatarChanged||coverChanged||groupMetaChanged){var createdGroupID=response.data[0].id;// if user changed avatar, save it
if(avatarChanged){uploadAvatarPromise=groupRouter.uploadGroupAvatar({group_id:createdGroupID,file:avatarFile.file});}// if user changed cover, save it
if(coverChanged){uploadCoverPromise=groupRouter.uploadGroupCover({group_id:createdGroupID,file:coverFile.file});}// if user updated group meta, save it
if(groupMetaChanged){updateGroupMetaPromise=groupRouter.updateGroupMetaFields({group_id:createdGroupID,fields:groupMetaToUpdate});}jQuery.when(uploadAvatarPromise,uploadCoverPromise,updateGroupMetaPromise).done(function(avatarUploadResponse,coverUploadResponse,updateGroupMetaResponse){// console.log('GROUP MANAGE POPUP - AVATAR UPLOAD RESPONSE:', avatarUploadResponse);
// console.log('GROUP MANAGE POPUP - COVER UPLOAD RESPONSE:', coverUploadResponse);
// console.log('GROUP MANAGE POPUP - GROUP META UPDATE RESPONSE:', updateGroupMetaResponse);
}).fail(function(error){// console.log('GROUP MANAGE POPUP - UPLOAD AVATAR/COVER OR UPDATE GROUP META ERROR: ', error);
}).always(function(){// refresh
window.location.reload();});}else{// refresh
window.location.reload();}}).fail(function(error){// console.log('GROUP MANAGE POPUP - CREATE GROUP ERROR: ', error);
var errorObject=error.responseJSON&&error.responseJSON.message?error.responseJSON:{message:vikinger_translation.create_group_error};setError(errorObject);setSaving(false);});}else{// if editing a group
// console.log('GROUP MANAGE POPUP - EDITING');
// if required fields have no value, show message and return
var emptyGroupName=groupData.name==='',emptyGroupDescription=groupData.description==='',usingForum=vikinger_constants.plugin_active.bbpress&&vikinger_constants.settings['bbp_is_group_forums_active']&&groupData.enable_forum,emptyForumName=forum.post_title==='',emptyForumDescription=forum.post_content==='';if(emptyGroupName||emptyGroupDescription||usingForum&&(emptyForumName||emptyForumDescription)){setSaving(false);setMarkAsRequired(true);// console.log('GROUP MANAGE POPUP - MISSING REQUIRED FIELDS');
return;}var updateGroupDataPromise={no_result:true},uploadAvatarPromise={no_result:true},uploadCoverPromise={no_result:true},deleteGroupMetaPromise={no_result:true},updateGroupMetaPromise={no_result:true};// get group data updated fields
var updatedFields=getGroupDataUpdatedFields();// if there are updated fields, update them
if(updatedFields){// set group id to update
updatedFields.id=props.data.id;updateGroupDataPromise=groupRouter.updateGroup(updatedFields);}// console.log('GROUP MANAGE POPUP - GROUP DATA UPDATED FIELDS: ', updatedFields);
var avatarChanged=avatarFile,coverChanged=coverFile,groupMetaChanged=Object.keys(groupMetaToUpdate).length>0,forumChanged=usingForum;// if there is nothing to update, return
if(!updatedFields&&!avatarChanged&&!coverChanged&&!groupMetaChanged&&!forumChanged){setSaving(false);return;}// if avatar, cover or group meta changed, save them
if(avatarChanged||coverChanged||groupMetaChanged){var createdGroupID=props.data.id;// if user changed avatar, save it
if(avatarChanged){uploadAvatarPromise=groupRouter.uploadGroupAvatar({group_id:createdGroupID,file:avatarFile.file});}// if user changed cover, save it
if(coverChanged){uploadCoverPromise=groupRouter.uploadGroupCover({group_id:createdGroupID,file:coverFile.file});}// if user updated group meta, save it
if(groupMetaChanged){var groupMetaFieldsToDelete=[],groupMetaFieldsToUpdate={};// console.log('GROUP MANAGE POPUP - GROUP META TO UPDATE STATE: ', groupMetaToUpdate);
// only update meta fields if they are not empty, otherwise delete them
for(var metaKey in groupMetaToUpdate){var metaValue=groupMetaToUpdate[metaKey];if(metaValue===''){groupMetaFieldsToDelete.push(metaKey);}else{groupMetaFieldsToUpdate[metaKey]=metaValue;}}// console.log('GROUP MANAGE POPUP - GROUP META TO DELETE: ', groupMetaFieldsToDelete);
// console.log('GROUP MANAGE POPUP - GROUP META TO UPDATE: ', groupMetaFieldsToUpdate);
if(groupMetaFieldsToDelete.length>0){// delete empty meta
deleteGroupMetaPromise=groupRouter.deleteGroupMetaFields({group_id:createdGroupID,fields:groupMetaFieldsToDelete});}if(Object.keys(groupMetaFieldsToUpdate).length>0){// update non empty meta
updateGroupMetaPromise=groupRouter.updateGroupMetaFields({group_id:createdGroupID,fields:groupMetaFieldsToUpdate});}}}var createGroupForumPromise={no_result:true},deleteGroupForumPromise={no_result:true};// associate forum to group
if(forumChanged){var forumData=(0,_core.deepMerge)(forum);// console.log('GROUP MANAGE POPUP - UPDATE FORUM WITH DATA: ', forumData);
createGroupForumPromise=forumRouter.createGroupForum(forumData,props.data.id);}else if(forum.ID){// console.log('GROUP MANAGE POPUP - DELETE FORUM WITH DATA: ', forum);
deleteGroupForumPromise=forumRouter.deleteGroupForum({forum_id:forum.ID,group_id:props.data.id});}jQuery.when(updateGroupDataPromise,uploadAvatarPromise,uploadCoverPromise,updateGroupMetaPromise,deleteGroupMetaPromise,createGroupForumPromise,deleteGroupForumPromise).done(function(updateGroupDataPromiseResponse,avatarUploadResponse,coverUploadResponse,updateGroupMetaResponse,deleteGroupMetaResponse,createGroupForumResponse,deleteGroupForumResponse){// console.log('GROUP MANAGE POPUP - GROUP DATA UPDATE RESPONSE:', updateGroupDataPromiseResponse);
// console.log('GROUP MANAGE POPUP - AVATAR UPLOAD RESPONSE:', avatarUploadResponse);
// console.log('GROUP MANAGE POPUP - COVER UPLOAD RESPONSE:', coverUploadResponse);
// console.log('GROUP MANAGE POPUP - GROUP META UPDATE RESPONSE:', updateGroupMetaResponse);
// console.log('GROUP MANAGE POPUP - GROUP META DELETE RESPONSE:', deleteGroupMetaResponse);
// console.log('GROUP MANAGE POPUP - CREATE GROUP FORUM RESPONSE:', createGroupForumResponse);
// console.log('GROUP MANAGE POPUP - DELETE FORUM RESPONSE:', deleteGroupForumResponse);
window.location.reload();}).fail(function(error){// console.log('GROUP MANAGE POPUP - GROUP DATA UPDATE: ', error);
var errorObject=error.responseJSON&&error.responseJSON.message?error.responseJSON:{message:vikinger_translation.update_group_error};setError(errorObject);setSaving(false);});}};var groupSocialMetaRows=[];var i=0,groupSocialMetaFields=[];var _iterator3=_createForOfIteratorHelper(groupMeta.social),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var field=_step3.value;if(i===2){groupSocialMetaRows.push(groupSocialMetaFields);i=0;groupSocialMetaFields=[];}groupSocialMetaFields.push(field);i++;}// dump remaining fields
}catch(err){_iterator3.e(err);}finally{_iterator3.f();}if(groupSocialMetaFields.length>0){groupSocialMetaRows.push(groupSocialMetaFields);}return/*#__PURE__*/_react.default.createElement("div",{ref:groupManagePopupRef,className:"popup-box-body",style:popupBoxStyles.current},!creatingGroup&&!group&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),(creatingGroup||!creatingGroup&&group)&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"popup-box-sidebar"},/*#__PURE__*/_react.default.createElement(_UserGroupPreview.default,{data:group,descriptionText:props.groupPreviewDescription}),/*#__PURE__*/_react.default.createElement("div",{className:"sidebar-menu-item limited"},/*#__PURE__*/_react.default.createElement("div",{className:"sidebar-menu-body secondary"},(creatingGroup||props.data.is_admin)&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("p",{className:"sidebar-menu-link ".concat(activeTab==='group-info'?'active':''),onClick:function onClick(){setActiveTab('group-info');}},vikinger_translation.group_info),/*#__PURE__*/_react.default.createElement("p",{className:"sidebar-menu-link ".concat(activeTab==='group-avatar-cover'?'active':''),onClick:function onClick(){setActiveTab('group-avatar-cover');}},vikinger_translation.avatar_and_cover),/*#__PURE__*/_react.default.createElement("p",{className:"sidebar-menu-link ".concat(activeTab==='group-social'?'active':''),onClick:function onClick(){setActiveTab('group-social');}},vikinger_translation.social_networks)),!creatingGroup&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,(props.data.is_admin||props.data.is_mod)&&/*#__PURE__*/_react.default.createElement("p",{className:"sidebar-menu-link ".concat(activeTab==='group-members'?'active':''),onClick:function onClick(){setActiveTab('group-members');}},vikinger_translation.members),props.data.is_admin&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_constants.plugin_active.bbpress&&vikinger_constants.settings['bbp_is_group_forums_active']&&/*#__PURE__*/_react.default.createElement("p",{className:"sidebar-menu-link ".concat(activeTab==='group-forum'?'active':''),onClick:function onClick(){setActiveTab('group-forum');}},vikinger_translation.forum),/*#__PURE__*/_react.default.createElement("p",{className:"sidebar-menu-link ".concat(activeTab==='group-delete'?'active':''),onClick:function onClick(){setActiveTab('group-delete');}},vikinger_translation.delete_group))))),(creatingGroup||!creatingGroup&&props.data.is_admin)&&/*#__PURE__*/_react.default.createElement("div",{className:"popup-box-sidebar-footer"},/*#__PURE__*/_react.default.createElement("div",{className:"button secondary full",onClick:save},!saving&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,creatingGroup?vikinger_translation.create_group:vikinger_translation.save_changes),saving&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,creatingGroup?vikinger_translation.creating:vikinger_translation.saving,/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))),markAsRequired&&/*#__PURE__*/_react.default.createElement("p",{className:"required-field-message"},"* ",vikinger_translation.required_fields_message),error&&error.message&&/*#__PURE__*/_react.default.createElement("p",{className:"required-field-message"},"* ",error.message),/*#__PURE__*/_react.default.createElement("p",{className:"button white full",onClick:discardAll},vikinger_translation.discard_all))),/*#__PURE__*/_react.default.createElement("div",{className:"popup-box-content limited"},activeTab==='group-info'&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.group_info),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("div",{className:"form"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_FormInput.default,{name:"name",label:vikinger_translation.group_name,value:groupData.name,handleValue:true,onChange:handleChange,required:true,markAsRequired:markAsRequired&&groupData.name==='',modifiers:"small"})),/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_FormSelect.default,{name:"status",label:vikinger_translation.group_status,options:groupStatusOptions,value:groupData.status,handleValue:true,onChange:handleChange,modifiers:"small"}))),/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_FormTextarea.default,{name:"description",label:vikinger_translation.group_description,value:groupData.description,handleValue:true,onChange:handleChange,required:true,markAsRequired:markAsRequired&&groupData.description==='',modifiers:"small mid-textarea"}))),groupTypes.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement("div",{className:"form-input-list"},/*#__PURE__*/_react.default.createElement("p",{className:"form-input-list-title"},vikinger_translation.group_type),/*#__PURE__*/_react.default.createElement("div",{className:"form-input-list-items"},groupTypes.map(function(groupType){return/*#__PURE__*/_react.default.createElement(_FormInputCheckbox.default,{key:groupType.name,text:groupType.labels.singular_name,active:groupData.types.includes(groupType.name),toggleActive:function toggleActive(){handleGroupTypeChange(groupType);}});})))))))),activeTab==='group-avatar-cover'&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.avatar_and_cover),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("div",{className:"grid grid-3-3-3 centered"},/*#__PURE__*/_react.default.createElement(_UploadBox.default,{title:uploadAvatarTitle,onFileSelect:updateAvatarFile,active:uploadAvatarActive,modifiers:"upload-box-shadowed"}),/*#__PURE__*/_react.default.createElement(_UploadBox.default,{title:uploadCoverTitle,onFileSelect:updateCoverFile,active:uploadCoverActive,modifiers:"upload-box-shadowed"})))),activeTab==='group-social'&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.social_networks),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("div",{className:"form"},groupSocialMetaRows.map(function(fields,i){return/*#__PURE__*/_react.default.createElement(_FormRow.default,{key:i,data:fields,modifiers:"split",handleValue:true,onFieldUpdate:updateSocialMeta});})))),!creatingGroup&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,activeTab==='group-members'&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box right-padded"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},"".concat(vikinger_translation.administrators," (").concat(group.admins.length,")")),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement(_GroupMemberStatusList.default,{data:group.admins,group:group,loggedUser:props.loggedUser,onActionComplete:getGroupData})),/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},"".concat(vikinger_translation.mods," (").concat(group.mods.length,")")),group.mods.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_mods_found),group.mods.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement(_GroupMemberStatusList.default,{data:group.mods,group:group,loggedUser:props.loggedUser,onActionComplete:getGroupData})),/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},"".concat(vikinger_translation.members," (").concat(group.members.length,")")),group.members.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_members_found),group.members.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement(_GroupMemberStatusList.default,{data:group.members,group:group,loggedUser:props.loggedUser,onActionComplete:getGroupData})),/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},"".concat(vikinger_translation.banned_members," (").concat(group.banned.length,")")),group.banned.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_banned_members_found),group.banned.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement(_GroupMemberStatusList.default,{data:group.banned,group:group,loggedUser:props.loggedUser,onActionComplete:getGroupData}))),activeTab==='group-forum'&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.forum),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-text"},/*#__PURE__*/_react.default.createElement("span",{className:"bold"},vikinger_translation.group_forum)),/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-text"},vikinger_translation.group_forum_enable_title),/*#__PURE__*/_react.default.createElement(_FormInputCheckbox.default,{text:vikinger_translation.group_forum_enable_text,active:groupData.enable_forum,toggleActive:toggleForumActive}),groupData.enable_forum&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-form"},/*#__PURE__*/_react.default.createElement(_FormInput.default,{name:"post_title",label:vikinger_translation.forum_name,value:forum.post_title,handleValue:true,onChange:handleForumChange,required:true,markAsRequired:markAsRequired&&forum.post_title==='',modifiers:"small"}),/*#__PURE__*/_react.default.createElement(_FormTextarea.default,{name:"post_content",label:vikinger_translation.forum_description,value:forum.post_content,handleValue:true,onChange:handleForumChange,required:true,markAsRequired:markAsRequired&&forum.post_content==='',modifiers:"small mid-textarea"}),/*#__PURE__*/_react.default.createElement(_FormSelect.default,{name:"post_status",label:vikinger_translation.forum_privacy,options:forumPrivacyOptions,value:forum.post_status,handleValue:true,onChange:handleForumChange,modifiers:"small"})))),activeTab==='group-delete'&&/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.delete_group),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-text"},vikinger_translation.delete_group_text),/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-text"},/*#__PURE__*/_react.default.createElement("span",{className:"bold"},vikinger_translation.delete_group_confirmation)),/*#__PURE__*/_react.default.createElement("div",{className:"button tertiary",onClick:deleteGroup},vikinger_translation.delete_group,deleting&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))))))));}

},{"../../router/forum/forum-router":344,"../../router/group/group-router":347,"../../utils/core":355,"../../utils/plugins":356,"../form/FormInput":145,"../form/FormInputCheckbox":146,"../form/FormRow":153,"../form/FormSelect":154,"../form/FormTextarea":155,"../loader/Loader":203,"../loader/LoaderSpinnerSmall":205,"../upload/UploadBox":277,"../user-preview/UserGroupPreview":279,"../user-status/user-status-group/user-status-group-member/GroupMemberStatusList":291,"react":380}],166:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupPreview;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _AvatarSmallerList=_interopRequireDefault(require("../avatar/AvatarSmallerList"));var _TagSticker=_interopRequireDefault(require("../tag/TagSticker"));var _UserStatusTypeList=_interopRequireDefault(require("../user-status/user-status-type/UserStatusTypeList"));var _JoinGroupButton=_interopRequireDefault(require("../button/action-button/action-button-group/JoinGroupButton"));var _LeaveGroupButton=_interopRequireDefault(require("../button/action-button/action-button-group/LeaveGroupButton"));var _RequestGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/RequestGroupMembershipButton"));var _RemoveGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/RemoveGroupMembershipButton"));var _group=_interopRequireDefault(require("../utils/group"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupPreview(props){var groupable=(0,_group.default)(props.loggedUser,props.data);var memberCountText=props.data.total_member_count===1?vikinger_translation.member:vikinger_translation.members;var postCountText=props.data.post_count===1?vikinger_translation.post:vikinger_translation.posts;var groupTypes=props.data.group_types.filter(function(groupType){return vikinger_constants.settings.group_types[groupType].show_in_list==='1';});return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview small"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-top"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url(".concat(props.data.cover_image_url,") center center / cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:props.data.status}),/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{modifiers:"user-short-description-avatar",data:props.data}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},props.data.name)),groupTypes.length>0&&/*#__PURE__*/_react.default.createElement(_UserStatusTypeList.default,{tags:groupTypes})))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-bottom"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.total_member_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},memberCountText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postCountText))),/*#__PURE__*/_react.default.createElement(_AvatarSmallerList.default,{data:props.data.members,count:props.data.total_member_count,limit:6,link:props.data.members_link})),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-footer"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-footer-action full"},props.loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,groupable.isBannedFromGroup()&&/*#__PURE__*/_react.default.createElement(_TagSticker.default,{modifiers:"button-tag tertiary",title:vikinger_translation.banned,icon:"ban",iconModifiers:"white"}),!groupable.isBannedFromGroup()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,_membership.groupPermissions.joinGroup&&groupable.isGroupPublic()&&!groupable.isGroupMember()&&/*#__PURE__*/_react.default.createElement(_JoinGroupButton.default,{modifiers:"void void-secondary",title:vikinger_translation.join_group,icon:"join-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}),groupable.isGroupMember()&&!groupable.isGroupAdmin()&&/*#__PURE__*/_react.default.createElement(_LeaveGroupButton.default,{modifiers:"void void-tertiary",title:vikinger_translation.leave_group,icon:"leave-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}),_membership.groupPermissions.joinGroup&&groupable.isGroupPrivate()&&!groupable.isGroupMember()&&!groupable.groupMembershipRequestSent()&&/*#__PURE__*/_react.default.createElement(_RequestGroupMembershipButton.default,{modifiers:"void void-secondary",title:vikinger_translation.send_join_request,icon:"join-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}),groupable.isGroupPrivate()&&!groupable.isGroupMember()&&groupable.groupMembershipRequestSent()&&/*#__PURE__*/_react.default.createElement(_RemoveGroupMembershipButton.default,{modifiers:"void void-tertiary",title:vikinger_translation.cancel_join_request,icon:"leave-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete})))))));}

},{"../avatar/Avatar":55,"../avatar/AvatarSmallerList":56,"../button/action-button/action-button-group/JoinGroupButton":95,"../button/action-button/action-button-group/LeaveGroupButton":96,"../button/action-button/action-button-group/RemoveGroupMembershipButton":99,"../button/action-button/action-button-group/RequestGroupMembershipButton":100,"../tag/TagSticker":276,"../user-status/user-status-type/UserStatusTypeList":297,"../utils/group":311,"../utils/membership":312,"react":380}],167:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupPreviewBig;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _AvatarSmallerList=_interopRequireDefault(require("../avatar/AvatarSmallerList"));var _TagSticker=_interopRequireDefault(require("../tag/TagSticker"));var _UserStatusTypeList=_interopRequireDefault(require("../user-status/user-status-type/UserStatusTypeList"));var _JoinGroupButton=_interopRequireDefault(require("../button/action-button/action-button-group/JoinGroupButton"));var _LeaveGroupButton=_interopRequireDefault(require("../button/action-button/action-button-group/LeaveGroupButton"));var _RequestGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/RequestGroupMembershipButton"));var _RemoveGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/RemoveGroupMembershipButton"));var _group=_interopRequireDefault(require("../utils/group"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupPreviewBig(props){var groupable=(0,_group.default)(props.loggedUser,props.data);var memberCountText=props.data.total_member_count===1?vikinger_translation.member:vikinger_translation.members;var postCountText=props.data.post_count===1?vikinger_translation.post:vikinger_translation.posts;var groupTypes=props.data.group_types.filter(function(groupType){return vikinger_constants.settings.group_types[groupType].show_in_list==='1';});return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-top"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url(".concat(props.data.cover_image_url,") center center / cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:props.data.status}),/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"medium",modifiers:"user-short-description-avatar",data:props.data}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},props.data.name)),groupTypes.length>0&&/*#__PURE__*/_react.default.createElement(_UserStatusTypeList.default,{tags:groupTypes})))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-bottom"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.total_member_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},memberCountText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postCountText))),/*#__PURE__*/_react.default.createElement(_AvatarSmallerList.default,{data:props.data.members,count:props.data.total_member_count,limit:6,link:props.data.members_link}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-actions"},props.loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,groupable.isBannedFromGroup()&&/*#__PURE__*/_react.default.createElement(_TagSticker.default,{modifiers:"button-tag tertiary",text:vikinger_translation.banned,icon:"ban",iconModifiers:"white"}),!groupable.isBannedFromGroup()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,_membership.groupPermissions.joinGroup&&groupable.isGroupPublic()&&!groupable.isGroupMember()&&/*#__PURE__*/_react.default.createElement(_JoinGroupButton.default,{modifiers:"secondary full",text:vikinger_translation.join_group,icon:"join-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}),groupable.isGroupMember()&&!groupable.isGroupAdmin()&&/*#__PURE__*/_react.default.createElement(_LeaveGroupButton.default,{modifiers:"tertiary full",text:vikinger_translation.leave_group,icon:"leave-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}),_membership.groupPermissions.joinGroup&&groupable.isGroupPrivate()&&!groupable.isGroupMember()&&!groupable.groupMembershipRequestSent()&&/*#__PURE__*/_react.default.createElement(_RequestGroupMembershipButton.default,{modifiers:"secondary full",text:vikinger_translation.send_join_request,icon:"join-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}),groupable.isGroupPrivate()&&!groupable.isGroupMember()&&groupable.groupMembershipRequestSent()&&/*#__PURE__*/_react.default.createElement(_RemoveGroupMembershipButton.default,{modifiers:"tertiary full",text:vikinger_translation.cancel_join_request,icon:"leave-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete})))))));}

},{"../avatar/Avatar":55,"../avatar/AvatarSmallerList":56,"../button/action-button/action-button-group/JoinGroupButton":95,"../button/action-button/action-button-group/LeaveGroupButton":96,"../button/action-button/action-button-group/RemoveGroupMembershipButton":99,"../button/action-button/action-button-group/RequestGroupMembershipButton":100,"../tag/TagSticker":276,"../user-status/user-status-type/UserStatusTypeList":297,"../utils/group":311,"../utils/membership":312,"react":380}],168:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupPreviewSmall;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _AvatarSmallerList=_interopRequireDefault(require("../avatar/AvatarSmallerList"));var _TagSticker=_interopRequireDefault(require("../tag/TagSticker"));var _UserStatusTypeList=_interopRequireDefault(require("../user-status/user-status-type/UserStatusTypeList"));var _JoinGroupButton=_interopRequireDefault(require("../button/action-button/action-button-group/JoinGroupButton"));var _LeaveGroupButton=_interopRequireDefault(require("../button/action-button/action-button-group/LeaveGroupButton"));var _RequestGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/RequestGroupMembershipButton"));var _RemoveGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/RemoveGroupMembershipButton"));var _group=_interopRequireDefault(require("../utils/group"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupPreviewSmall(props){var groupable=(0,_group.default)(props.loggedUser,props.data);var memberCountText=props.data.total_member_count===1?vikinger_translation.member:vikinger_translation.members;var postCountText=props.data.post_count===1?vikinger_translation.post:vikinger_translation.posts;var groupTypes=props.data.group_types.filter(function(groupType){return vikinger_constants.settings.group_types[groupType].show_in_list==='1';});return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview landscape"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url(".concat(props.data.cover_image_url,") center center / cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description landscape tiny"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-short-description-avatar",data:props.data}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},props.data.name)),groupTypes.length>0&&/*#__PURE__*/_react.default.createElement(_UserStatusTypeList.default,{tags:groupTypes})),/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.total_member_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},memberCountText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postCountText))),/*#__PURE__*/_react.default.createElement(_AvatarSmallerList.default,{data:props.data.members,count:props.data.total_member_count,limit:6,link:props.data.members_link}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-actions user-preview-actions-tagged"},/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:props.data.status}),props.loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,groupable.isBannedFromGroup()&&/*#__PURE__*/_react.default.createElement(_TagSticker.default,{modifiers:"button-tag tertiary",title:vikinger_translation.banned,icon:"ban",iconModifiers:"white"}),!groupable.isBannedFromGroup()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,_membership.groupPermissions.joinGroup&&groupable.isGroupPublic()&&!groupable.isGroupMember()&&/*#__PURE__*/_react.default.createElement(_JoinGroupButton.default,{modifiers:"secondary",title:vikinger_translation.join_group,icon:"join-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}),groupable.isGroupMember()&&!groupable.isGroupAdmin()&&/*#__PURE__*/_react.default.createElement(_LeaveGroupButton.default,{modifiers:"tertiary",title:vikinger_translation.leave_group,icon:"leave-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}),_membership.groupPermissions.joinGroup&&groupable.isGroupPrivate()&&!groupable.isGroupMember()&&!groupable.groupMembershipRequestSent()&&/*#__PURE__*/_react.default.createElement(_RequestGroupMembershipButton.default,{modifiers:"secondary",title:vikinger_translation.send_join_request,icon:"join-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}),groupable.isGroupPrivate()&&!groupable.isGroupMember()&&groupable.groupMembershipRequestSent()&&/*#__PURE__*/_react.default.createElement(_RemoveGroupMembershipButton.default,{modifiers:"tertiary",title:vikinger_translation.cancel_join_request,icon:"leave-group",loggedUser:props.loggedUser,group:props.data,onActionComplete:props.onActionComplete}))))));}

},{"../avatar/Avatar":55,"../avatar/AvatarSmallerList":56,"../button/action-button/action-button-group/JoinGroupButton":95,"../button/action-button/action-button-group/LeaveGroupButton":96,"../button/action-button/action-button-group/RemoveGroupMembershipButton":99,"../button/action-button/action-button-group/RequestGroupMembershipButton":100,"../tag/TagSticker":276,"../user-status/user-status-type/UserStatusTypeList":297,"../utils/group":311,"../utils/membership":312,"react":380}],169:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupReceivedMembershipRequestPreview;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _UserPreviewAuthor=_interopRequireDefault(require("../user-preview/UserPreviewAuthor"));var _AcceptGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/AcceptGroupMembershipButton"));var _RejectGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/RejectGroupMembershipButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupReceivedMembershipRequestPreview(props){var postCountText=props.data.user.stats.post_count===1?vikinger_translation.post:vikinger_translation.posts,friendCountText=props.data.user.stats.friend_count===1?vikinger_translation.friend:vikinger_translation.friends,commentCountText=props.data.user.stats.comment_count===1?vikinger_translation.comment:vikinger_translation.comments;return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview small"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url(".concat(props.data.user.cover_url,") center center / cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{modifiers:"user-short-description-avatar",data:props.data.user}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.user.link},props.data.user.name)),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-text"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.user.link},"@",props.data.user.mention_name))),/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.user.stats.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postCountText)),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.user.stats.friend_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},friendCountText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.user.stats.comment_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},commentCountText))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-actions"},/*#__PURE__*/_react.default.createElement(_RejectGroupMembershipButton.default,{data:props.data,modifiers:"tertiary",icon:"leave-group",title:vikinger_translation.reject_join_request,onActionComplete:props.onActionComplete}),/*#__PURE__*/_react.default.createElement(_AcceptGroupMembershipButton.default,{data:props.data,modifiers:"secondary",icon:"join-group",title:vikinger_translation.accept_join_request,onActionComplete:props.onActionComplete}))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-footer padded"},/*#__PURE__*/_react.default.createElement(_UserPreviewAuthor.default,{title:vikinger_translation.wants_to_join,data:props.data.group})));}

},{"../avatar/Avatar":55,"../button/action-button/action-button-group/AcceptGroupMembershipButton":93,"../button/action-button/action-button-group/RejectGroupMembershipButton":97,"../user-preview/UserPreviewAuthor":281,"react":380}],170:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupSentMembershipRequestPreview;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _TagSticker=_interopRequireDefault(require("../tag/TagSticker"));var _CancelGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/CancelGroupMembershipButton"));var _core=require("../../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupSentMembershipRequestPreview(props){var membersText=props.data.group.total_member_count===1?vikinger_translation.member:vikinger_translation.members,postsText=props.data.group.post_count===1?vikinger_translation.post:vikinger_translation.posts;return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview small"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url(".concat(props.data.group.cover_image_url,") center center / cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:props.data.group.status}),/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{modifiers:"user-short-description-avatar",data:props.data.group}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.group.link},(0,_core.truncateText)(props.data.group.name,25))),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-text"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.group.link},"@",(0,_core.truncateText)((0,_core.joinText)(props.data.group.name).toLowerCase(),35)))),/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.group.total_member_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},membersText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.group.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postsText))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-actions"},/*#__PURE__*/_react.default.createElement(_CancelGroupMembershipButton.default,{data:props.data,modifiers:"tertiary",icon:"leave-group",title:vikinger_translation.cancel_join_request,onActionComplete:props.onActionComplete}))));}

},{"../../utils/core":355,"../avatar/Avatar":55,"../button/action-button/action-button-group/CancelGroupMembershipButton":94,"../tag/TagSticker":276,"react":380}],171:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HeaderNotifications;var _react=_interopRequireWildcard(require("react"));var _HeaderDropdownFriendRequests=_interopRequireDefault(require("./header-dropdown/header-dropdown-friend-requests/HeaderDropdownFriendRequests"));var _HeaderDropdownMessages=_interopRequireDefault(require("./header-dropdown/header-dropdown-messages/HeaderDropdownMessages"));var _HeaderDropdownNotifications=_interopRequireDefault(require("./header-dropdown/header-dropdown-notifications/HeaderDropdownNotifications"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function HeaderNotifications(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var getLoggedInMember=function getLoggedInMember(){var callback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(){};userRouter.getLoggedInMember('user-friends').done(function(loggedUser){// console.log('HEADER NOTIFICATIONS - GET LOGGED USER RESPONSE: ', loggedUser);
setLoggedUser(loggedUser);callback();});};(0,_react.useEffect)(function(){getLoggedInMember();},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"action-list dark"},vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement(_HeaderDropdownFriendRequests.default,{loggedUser:loggedUser,onActionComplete:getLoggedInMember}),vikinger_constants.plugin_active.buddypress_messages&&vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement(_HeaderDropdownMessages.default,{loggedUser:loggedUser}),vikinger_constants.plugin_active.buddypress_notifications&&/*#__PURE__*/_react.default.createElement(_HeaderDropdownNotifications.default,{loggedUser:loggedUser}));}

},{"../../router/user/user-router":353,"./header-dropdown/header-dropdown-friend-requests/HeaderDropdownFriendRequests":173,"./header-dropdown/header-dropdown-messages/HeaderDropdownMessages":174,"./header-dropdown/header-dropdown-notifications/HeaderDropdownNotifications":175,"react":380}],172:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HeaderDropdown;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function HeaderDropdown(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),dropdownIsOpen=_useState2[0],setDropdownIsOpen=_useState2[1];var dropdownContainerRef=(0,_react.useRef)(null);var toggleDropdown=function toggleDropdown(){setDropdownIsOpen(function(previousDropdownIsOpen){return!previousDropdownIsOpen;});};var closeDropdown=function closeDropdown(e){var clickedInsideDropdown=dropdownContainerRef.current.contains(e.target);if(!clickedInsideDropdown){setDropdownIsOpen(false);}};(0,_react.useEffect)(function(){window.addEventListener('click',closeDropdown);return function(){window.removeEventListener('click',closeDropdown);};});var dropdownBoxStyles={position:'absolute',top:'64px',right:'6px',transition:'transform .4s ease-in-out, opacity .4s ease-in-out, visibility .4s ease-in-out',opacity:dropdownIsOpen?1:0,visibility:dropdownIsOpen?'visible':'hidden',transform:dropdownIsOpen?'translate(0, 0)':'translate(0, -40px)',pointerEvents:dropdownIsOpen?'auto':'none'};return/*#__PURE__*/_react.default.createElement("div",{className:"action-list-item-wrap",tabIndex:"0",ref:dropdownContainerRef},/*#__PURE__*/_react.default.createElement("div",{className:"action-list-item ".concat(props.unread?'unread':''),onClick:toggleDropdown},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:props.icon,modifiers:"action-list-item-icon"})),/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box",style:dropdownBoxStyles},props.children));}

},{"../../icon/IconSVG":201,"react":380}],173:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HeaderDropdownFriendRequests;var _react=_interopRequireWildcard(require("react"));var _HeaderDropdown=_interopRequireDefault(require("../HeaderDropdown"));var _FriendStatus=_interopRequireDefault(require("../../../user-status/user-status-friend/FriendStatus"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../../../loader/LoaderSpinnerSmall"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function HeaderDropdownFriendRequests(props){var _useState=(0,_react.useState)('received'),_useState2=_slicedToArray(_useState,2),currentTabItem=_useState2[0],setCurrentTabItem=_useState2[1];var activateReceivedTab=function activateReceivedTab(){setCurrentTabItem('received');};var activateSentTab=function activateSentTab(){setCurrentTabItem('sent');};var sentFriendRequestsCount=0,receivedFriendRequestsCount=0;if(props.loggedUser){sentFriendRequestsCount=props.loggedUser.friend_requests_sent.length;receivedFriendRequestsCount=props.loggedUser.friend_requests_received.length;}var maxResults=5;var sentFriendRequestsShowCount=Math.min(maxResults,sentFriendRequestsCount),sentFriendRequestsToShow=props.loggedUser?props.loggedUser.friend_requests_sent.slice(0,sentFriendRequestsShowCount):[],newFriendRequestsSent=sentFriendRequestsToShow.length>0;var receivedFriendRequestsShowCount=Math.min(maxResults,receivedFriendRequestsCount),receivedFriendRequestsToShow=props.loggedUser?props.loggedUser.friend_requests_received.slice(0,receivedFriendRequestsShowCount):[],newFriendRequestsReceived=receivedFriendRequestsToShow.length>0;return/*#__PURE__*/_react.default.createElement(_HeaderDropdown.default,{icon:"friend",unread:newFriendRequestsReceived||newFriendRequestsSent},!props.loggedUser&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null),props.loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-header"},/*#__PURE__*/_react.default.createElement("p",{className:"dropdown-box-header-title"},vikinger_translation.friend_requests),/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-header-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"dropdown-box-header-action dropdown-box-header-action-tab ".concat(currentTabItem==='received'?'active':''),onClick:activateReceivedTab},vikinger_translation.received," (",receivedFriendRequestsCount,")"),/*#__PURE__*/_react.default.createElement("p",{className:"dropdown-box-header-action dropdown-box-header-action-tab ".concat(currentTabItem==='sent'?'active':''),onClick:activateSentTab},vikinger_translation.sent," (",sentFriendRequestsCount,")"))),currentTabItem==='received'&&/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-list no-hover"},newFriendRequestsReceived&&receivedFriendRequestsToShow.map(function(request){return/*#__PURE__*/_react.default.createElement("div",{key:request.id,className:"dropdown-box-list-item"},/*#__PURE__*/_react.default.createElement(_FriendStatus.default,{data:request.user,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete,modifiers:"request",allowReject:true}));}),!newFriendRequestsReceived&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_friend_requests_received)),currentTabItem==='sent'&&/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-list no-hover"},newFriendRequestsSent&&sentFriendRequestsToShow.map(function(request){return/*#__PURE__*/_react.default.createElement("div",{key:request.id,className:"dropdown-box-list-item"},/*#__PURE__*/_react.default.createElement(_FriendStatus.default,{data:request.user,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete,modifiers:"request",allowReject:true}));}),!newFriendRequestsSent&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_friend_requests_sent)),/*#__PURE__*/_react.default.createElement("a",{className:"dropdown-box-button secondary",href:props.loggedUser.friend_requests_link},vikinger_translation.view_all_friend_requests)));}

},{"../../../loader/LoaderSpinnerSmall":205,"../../../user-status/user-status-friend/FriendStatus":287,"../HeaderDropdown":172,"react":380}],174:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HeaderDropdownMessages;var _react=_interopRequireWildcard(require("react"));var _HeaderDropdown=_interopRequireDefault(require("../HeaderDropdown"));var _MessageStatus=_interopRequireDefault(require("../../../user-status/user-status-message/MessageStatus"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../../../loader/LoaderSpinnerSmall"));var _simplebarReact=_interopRequireDefault(require("simplebar-react"));var messageRouter=_interopRequireWildcard(require("../../../../router/message/message-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function HeaderDropdownMessages(props){var _useState=(0,_react.useState)([]),_useState2=_slicedToArray(_useState,2),messages=_useState2[0],setMessages=_useState2[1];var _useState3=(0,_react.useState)(true),_useState4=_slicedToArray(_useState3,2),loading=_useState4[0],setLoading=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),messagesHTML=_useState6[0],setMessagesHTML=_useState6[1];var _useState7=(0,_react.useState)(0),_useState8=_slicedToArray(_useState7,2),betterMessagesUnreadCount=_useState8[0],setBetterMessagesUnreadCount=_useState8[1];var simplebarStyles=(0,_react.useRef)({overflowX:'hidden',height:'100%'});(0,_react.useEffect)(function(){if(props.loggedUser){var getMessagesPromise=messageRouter.getMessages({user_id:props.loggedUser.id,box:'inbox',per_page:8});getMessagesPromise.done(function(response){// console.log('HEADER DROPDOWN MESSAGES - GET MESSAGES RESPONSE: ', response);
if(vikinger_constants.plugin_active['bp-better-messages']){setMessagesHTML(response);}else{if(response&&response.data&&response.data instanceof Array){setMessages(response.data);}}}).fail(function(error){// console.log('HEADER DROPDOWN MESSAGES - GET MESSAGES ERROR: ', error);
}).always(function(){setLoading(false);});}},[props.loggedUser]);(0,_react.useEffect)(function(){if(vikinger_constants.plugin_active['bp-better-messages']){jQuery(document).trigger('bp-better-messages-init-scrollers');}});(0,_react.useEffect)(function(){if(vikinger_constants.plugin_active['bp-better-messages']){jQuery(document).on('bp-better-messages-update-unread',function(e){var inboxUnreadCount=parseInt(e.originalEvent.detail.unread);setBetterMessagesUnreadCount(inboxUnreadCount);// console.log('HEADER DROPDOWN MESSAGES - BETTER MESSAGES - UNREAD COUNT', inboxUnreadCount);
});}},[]);var unreadMessagesCount=0;if(vikinger_constants.plugin_active['bp-better-messages']){unreadMessagesCount=betterMessagesUnreadCount;}else{var _iterator=_createForOfIteratorHelper(messages),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var thread=_step.value;if(thread.unread_count>0){unreadMessagesCount++;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}return/*#__PURE__*/_react.default.createElement(_HeaderDropdown.default,{icon:"messages",unread:vikinger_constants.plugin_active['bp-better-messages']?betterMessagesUnreadCount>0:unreadMessagesCount>0},(!props.loggedUser||props.loggedUser&&loading)&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null),props.loggedUser&&!loading&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-header"},/*#__PURE__*/_react.default.createElement("p",{className:"dropdown-box-header-title"},vikinger_translation.inbox," ",/*#__PURE__*/_react.default.createElement("span",{className:"highlighted"},unreadMessagesCount))),messagesHTML&&/*#__PURE__*/_react.default.createElement("div",{dangerouslySetInnerHTML:{__html:messagesHTML}}),!messagesHTML&&/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-list"},/*#__PURE__*/_react.default.createElement(_simplebarReact.default,{style:simplebarStyles.current},messages.length>0&&messages.map(function(message){return/*#__PURE__*/_react.default.createElement("a",{key:message.id,className:"dropdown-box-list-item ".concat(message.unread_count>0?'unread':''),href:"".concat(props.loggedUser.messages_link,"?message_id=").concat(message.id)},/*#__PURE__*/_react.default.createElement(_MessageStatus.default,{data:message,ownLastMessage:message.user.id===props.loggedUser.id,favorite:message.starred}));}),messages.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_messages_received))),/*#__PURE__*/_react.default.createElement("a",{className:"dropdown-box-button primary",href:props.loggedUser.messages_link},vikinger_translation.view_all_messages)));}

},{"../../../../router/message/message-router":349,"../../../loader/LoaderSpinnerSmall":205,"../../../user-status/user-status-message/MessageStatus":293,"../HeaderDropdown":172,"react":380,"simplebar-react":388}],175:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HeaderDropdownNotifications;var _react=_interopRequireWildcard(require("react"));var _HeaderDropdown=_interopRequireDefault(require("../HeaderDropdown"));var _NotificationStatus=_interopRequireDefault(require("../../../user-status/user-status-notification/NotificationStatus"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../../../loader/LoaderSpinnerSmall"));var _simplebarReact=_interopRequireDefault(require("simplebar-react"));var notificationRouter=_interopRequireWildcard(require("../../../../router/notification/notification-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function HeaderDropdownNotifications(props){var _useState=(0,_react.useState)([]),_useState2=_slicedToArray(_useState,2),notifications=_useState2[0],setNotifications=_useState2[1];var _useState3=(0,_react.useState)(0),_useState4=_slicedToArray(_useState3,2),unreadNotificationsCount=_useState4[0],setUnreadNotificationsCount=_useState4[1];var simplebarStyles=(0,_react.useRef)({overflowX:'hidden',height:'100%'});var markNotificationAsRead=function markNotificationAsRead(i){var selectedNotification=notifications[i];// console.log('HEADER DROPDOWN NOTIFICATIONS - MARK NOTIFICATION AS READ: ', notification);
// update notification data to be marked as read
var markNotificationAsReadPromise=notificationRouter.markNotificationAsRead({id:selectedNotification.id});markNotificationAsReadPromise.done(function(response){// console.log('HEADER DROPDOWN NOTIFICATIONS - MARK NOTIFICATIONS AS READ RESPONSE: ', response);
}).fail(function(error){// console.log('HEADER DROPDOWN NOTIFICATIONS - MARK NOTIFICATIONS AS READ ERROR: ', error);
});// mark notification as read in state (optimistic approach)
setNotifications(function(previousNotifications){var newNotifications=previousNotifications.map(function(notification){if(notification.id===selectedNotification.id){notification.is_new=0;}return notification;});// console.log('HEADER DROPDOWN NOTIFICATIONS - UPDATED NOTIFICATIONS: ', newNotifications);
return newNotifications;});setUnreadNotificationsCount(function(previousUnreadNotificationsCount){return previousUnreadNotificationsCount-1;});};var getUnreadNotificationsCount=function getUnreadNotificationsCount(){var unreadNotificationsCountPromise=notificationRouter.getUnreadNotificationsCount();unreadNotificationsCountPromise.done(function(response){// console.log('HEADER DROPDOWN NOFITICATIONS - GET UNREAD NOTIFICATIONS COUNT: ', response);
setUnreadNotificationsCount(Number.parseInt(response,10));}).fail(function(error){// console.log('HEADER DROPDOWN NOFITICATIONS - GET UNREAD NOTIFICATIONS COUNT ERROR: ', error);
});};var getNotifications=function getNotifications(){var getNotificationsPromise=notificationRouter.getNotifications({per_page:8});getNotificationsPromise.done(function(response){// console.log('HEADER DROPDOWN NOTIFICATIONS - GET NOTIFICATIONS RESPONSE: ', response);
setNotifications(response?response:[]);}).fail(function(error){// console.log('HEADER DROPDOWN NOTIFICATIONS - GET NOTIFICATIONS RESPONSE: ', error);
});};(0,_react.useEffect)(function(){getNotifications();getUnreadNotificationsCount();},[]);return/*#__PURE__*/_react.default.createElement(_HeaderDropdown.default,{icon:"notification",unread:unreadNotificationsCount>0},!props.loggedUser&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null),props.loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-header"},/*#__PURE__*/_react.default.createElement("p",{className:"dropdown-box-header-title"},vikinger_translation.notifications," ",/*#__PURE__*/_react.default.createElement("span",{className:"highlighted"},unreadNotificationsCount))),/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-list"},/*#__PURE__*/_react.default.createElement(_simplebarReact.default,{style:simplebarStyles.current},notifications.length>0&&notifications.map(function(notification,i){return/*#__PURE__*/_react.default.createElement("div",_extends({key:notification.id,className:"dropdown-box-list-item ".concat(notification.is_new?'unread':'')},notification.is_new?{onMouseEnter:function onMouseEnter(){markNotificationAsRead(i);}}:{}),/*#__PURE__*/_react.default.createElement(_NotificationStatus.default,{data:notification}));}),notifications.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_notifications_received))),/*#__PURE__*/_react.default.createElement("a",{className:"dropdown-box-button secondary",href:props.loggedUser.notifications_link},vikinger_translation.view_all_notifications)));}

},{"../../../../router/notification/notification-router":350,"../../../loader/LoaderSpinnerSmall":205,"../../../user-status/user-status-notification/NotificationStatus":294,"../HeaderDropdown":172,"react":380,"simplebar-react":388}],176:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBadge_16_18;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBadge_16_18(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:16,height:18,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-avatar-rank-hexagon']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-badge-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-dark-16-18"}));}

},{"../../../utils/plugins":356,"react":380}],177:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBadge_22_24;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBadge_22_24(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:22,height:24,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-avatar-rank-hexagon']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-badge-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-dark-22-24"}));}

},{"../../../utils/plugins":356,"react":380}],178:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBadge_26_28;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBadge_26_28(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:26,height:28,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-avatar-rank-hexagon']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-badge-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-dark-26-28"}));}

},{"../../../utils/plugins":356,"react":380}],179:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBadgeBorder_22_24;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBadgeBorder_22_24(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:22,height:24,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-badge-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-22-24"}));}

},{"../../../../utils/plugins":356,"react":380}],180:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBadgeBorder_28_32;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBadgeBorder_28_32(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:28,height:32,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-badge-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-28-32"}));}

},{"../../../../utils/plugins":356,"react":380}],181:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBadgeBorder_32_36;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBadgeBorder_32_36(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:32,height:36,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-badge-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-32-36"}));}

},{"../../../../utils/plugins":356,"react":380}],182:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBorder_100_110;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBorder_100_110(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:100,height:110,roundedCorners:true,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-100-110"}));}

},{"../../../utils/plugins":356,"react":380}],183:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBorder_120_130;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBorder_120_130(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:120,height:130,roundedCorners:true,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-120-130"}));}

},{"../../../utils/plugins":356,"react":380}],184:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBorder_22_24;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBorder_22_24(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:22,height:24,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-22-24"}));}

},{"../../../utils/plugins":356,"react":380}],185:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBorder_34_36;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBorder_34_36(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:34,height:36,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-34-36"}));}

},{"../../../utils/plugins":356,"react":380}],186:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonBorder_50_56;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonBorder_50_56(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:50,height:56,roundedCorners:true,roundedCornerRadius:2,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-50-56"}));}

},{"../../../utils/plugins":356,"react":380}],187:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonImage_100_110;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonImage_100_110(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:100,height:110,roundedCorners:true,clip:true});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-image-100-110","data-src":props.imageURL}));}

},{"../../../utils/plugins":356,"react":380}],188:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonImage_18_20;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonImage_18_20(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:18,height:20,roundedCorners:true,roundedCornerRadius:1,clip:true});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-image-18-20","data-src":props.imageURL}));}

},{"../../../utils/plugins":356,"react":380}],189:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonImage_24_26;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonImage_24_26(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:24,height:26,roundedCorners:true,roundedCornerRadius:1,clip:true});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-image-24-26","data-src":props.imageURL}));}

},{"../../../utils/plugins":356,"react":380}],190:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonImage_30_32;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonImage_30_32(props){var hexagonRef=(0,_react.useRef)(null);var hexagon=(0,_react.useRef)(false);(0,_react.useEffect)(function(){hexagon.current=(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:30,height:32,roundedCorners:true,roundedCornerRadius:1,clip:true});},[]);(0,_react.useEffect)(function(){if(hexagon.current){// redraw hexagon
hexagon.current.redrawImages();}},[props.imageURL]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-image-30-32","data-src":props.imageURL}));}

},{"../../../utils/plugins":356,"react":380}],191:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonImage_40_44;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonImage_40_44(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:40,height:44,roundedCorners:true,roundedCornerRadius:1,clip:true});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-image-40-44","data-src":props.imageURL}));}

},{"../../../utils/plugins":356,"react":380}],192:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonImage_68_74;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonImage_68_74(props){var hexagonRef=(0,_react.useRef)(null);var hexagon=(0,_react.useRef)(false);(0,_react.useEffect)(function(){hexagon.current=(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:68,height:74,roundedCorners:true,roundedCornerRadius:3,clip:true});},[]);(0,_react.useEffect)(function(){if(hexagon.current){// redraw hexagon
hexagon.current.redrawImages();}},[props.imageURL]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-image-68-74","data-src":props.imageURL}));}

},{"../../../utils/plugins":356,"react":380}],193:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonImage_82_90;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonImage_82_90(props){var hexagonRef=(0,_react.useRef)(null);var hexagon=(0,_react.useRef)(false);(0,_react.useEffect)(function(){hexagon.current=(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:82,height:90,roundedCorners:true,roundedCornerRadius:3,clip:true});},[]);(0,_react.useEffect)(function(){if(hexagon.current){// redraw hexagon
hexagon.current.redrawImages();}},[props.imageURL]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-content"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-image-82-90","data-src":props.imageURL}));}

},{"../../../utils/plugins":356,"react":380}],194:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonOverlay_30_32;var _react=_interopRequireWildcard(require("react"));var _core=require("../../../utils/core");var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonOverlay_30_32(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:30,height:32,roundedCorners:true,roundedCornerRadius:1,lineColor:(0,_core.hexaToRGB)(vikinger_constants.colors['--color-secondary'],'.9'),fill:true});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-overlay"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-overlay-30-32"}));}

},{"../../../utils/core":355,"../../../utils/plugins":356,"react":380}],195:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonProgress_100_110;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonProgress_100_110(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:100,height:110,lineWidth:6,roundedCorners:true,gradient:{colors:[vikinger_constants.colors['--color-progressbar-line-gradient-end'],vikinger_constants.colors['--color-progressbar-line-gradient-start']]},scale:{start:0,end:props.data.total,stop:props.data.current}});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-progress"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-progress-100-110"}));}

},{"../../../utils/plugins":356,"react":380}],196:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonProgress_40_44;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonProgress_40_44(props){var hexagonRef=(0,_react.useRef)(null);var hexagon=(0,_react.useRef)(false);(0,_react.useEffect)(function(){hexagon.current=(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:40,height:44,lineWidth:3,roundedCorners:true,roundedCornerRadius:1,gradient:{colors:[vikinger_constants.colors['--color-progressbar-line-gradient-end'],vikinger_constants.colors['--color-progressbar-line-gradient-start']]},scale:{start:0,end:props.data.total,stop:props.data.current}});},[]);(0,_react.useEffect)(function(){if(hexagon.current){// redraw hexagon
hexagon.current.redrawProgress({start:0,end:props.data.total,stop:props.data.current});}},[props.data]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-progress"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-progress-40-44"}));}

},{"../../../utils/plugins":356,"react":380}],197:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonProgress_84_92;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonProgress_84_92(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:84,height:92,lineWidth:5,roundedCorners:true,roundedCornerRadius:3,gradient:{colors:[vikinger_constants.colors['--color-progressbar-line-gradient-end'],vikinger_constants.colors['--color-progressbar-line-gradient-start']]},scale:{start:0,end:props.data.total,stop:props.data.current}});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-progress"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-progress-84-92"}));}

},{"../../../utils/plugins":356,"react":380}],198:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonProgressBorder_100_110;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonProgressBorder_100_110(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:100,height:110,lineWidth:6,roundedCorners:true,lineColor:vikinger_constants.colors['--color-progressbar-underline']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-progress-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-border-100-110"}));}

},{"../../../../utils/plugins":356,"react":380}],199:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonProgressBorder_40_44;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonProgressBorder_40_44(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:40,height:44,lineWidth:3,roundedCorners:true,roundedCornerRadius:1,lineColor:vikinger_constants.colors['--color-progressbar-underline']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-progress-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-border-40-44"}));}

},{"../../../../utils/plugins":356,"react":380}],200:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=HexagonProgressBorder_84_92;var _react=_interopRequireWildcard(require("react"));var _plugins=require("../../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function HexagonProgressBorder_84_92(props){var hexagonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createHexagon)({containerElement:hexagonRef.current,width:84,height:92,lineWidth:5,roundedCorners:true,roundedCornerRadius:3,lineColor:vikinger_constants.colors['--color-progressbar-underline']});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"user-avatar-progress-border"},/*#__PURE__*/_react.default.createElement("div",{ref:hexagonRef,className:"hexagon-border-84-92"}));}

},{"../../../../utils/plugins":356,"react":380}],201:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=IconSVG;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function IconSVG(props){return/*#__PURE__*/_react.default.createElement("svg",{className:"icon-".concat(props.icon," ").concat(props.modifiers||'')},/*#__PURE__*/_react.default.createElement("use",{href:"#svg-".concat(props.icon)}));}

},{"react":380}],202:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=YTPlayer;var _react=_interopRequireWildcard(require("react"));var _core=require("../../utils/core");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function YTPlayer(props){var iframeSrc="".concat((0,_core.getMediaLink)('youtube',props.videoID),"?enablejsapi=1");var iframeRef=(0,_react.useRef)(null);var player=(0,_react.useRef)(null);var onPlayerStateChange=function onPlayerStateChange(e){var callback=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){};var playing=e.data===window.YT.PlayerState.PLAYING;// console.log('YTPLAYER - ON PLAYER STATE CHANGE STATUS: ', e.data);
// notify parent that this player started playing
if(playing){callback();}};var loadPlayer=function loadPlayer(onPlayerStateChange){// console.log('YTPLAYER - LOAD PLAYER: ', iframeRef.current);
player.current=new window.YT.Player(iframeRef.current,{events:{onStateChange:onPlayerStateChange}});};(0,_react.useEffect)(function(){// console.log('YTPLAYER - MOUNTING VIDEO: ', iframeRef.current);
// load YT Iframe player API if it isn't loaded
if(!window.YT&&!document.querySelector('#ytIframePlayerScript')){var ytIframePlayerScript=document.createElement('script');ytIframePlayerScript.id='ytIframePlayerScript';ytIframePlayerScript.src='https://www.youtube.com/iframe_api';document.body.appendChild(ytIframePlayerScript);}if(!window.onYouTubeIframeAPIReady){window.onYouTubeIframeAPIReady=function(){var _iterator=_createForOfIteratorHelper(window.onYouTubeIframeAPIReady.callbacks),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var callback=_step.value;callback();}}catch(err){_iterator.e(err);}finally{_iterator.f();}};window.onYouTubeIframeAPIReady.callbacks=[function(){loadPlayer(function(e){onPlayerStateChange(e,props.onPlay);});}];// } else {
//   window.onYouTubeIframeAPIReady.callbacks.push(() => {loadPlayer((e) => {onPlayerStateChange(e, props.onPlay);})});
// }
}else if(!window.YT){if(!(window.onYouTubeIframeAPIReady.callbacks instanceof Array)){window.onYouTubeIframeAPIReady.callbacks=[];}window.onYouTubeIframeAPIReady.callbacks.push(function(){loadPlayer(function(e){onPlayerStateChange(e,props.onPlay);});});}else{loadPlayer(function(e){onPlayerStateChange(e,props.onPlay);});}},[]);(0,_react.useEffect)(function(){// console.log('YTPLAYER - COMPONENT DID UPDATE PLAYER: ', player.current);
// console.log('YTPLAYER - COMPONENT DID UPDATE PLAYER PAUSE VIDEO: ', player.current.pauseVideo);
// console.log('YTPLAYER - COMPONENT DID UPDATE IFRAME: ', iframeRef.current);
// hidden / popup iframes aren't loaded and won't have a player yet
if(player.current&&player.current.pauseVideo){player.current.pauseVideo();}},[props.stop]);return/*#__PURE__*/_react.default.createElement("iframe",{ref:iframeRef,src:iframeSrc,allowFullScreen:true});}

},{"../../utils/core":355,"react":380}],203:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Loader;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Loader(props){return/*#__PURE__*/_react.default.createElement("div",{className:"page-loader-indicator"},/*#__PURE__*/_react.default.createElement("div",{className:"loader-bars"},/*#__PURE__*/_react.default.createElement("div",{className:"loader-bar"}),/*#__PURE__*/_react.default.createElement("div",{className:"loader-bar"}),/*#__PURE__*/_react.default.createElement("div",{className:"loader-bar"}),/*#__PURE__*/_react.default.createElement("div",{className:"loader-bar"}),/*#__PURE__*/_react.default.createElement("div",{className:"loader-bar"}),/*#__PURE__*/_react.default.createElement("div",{className:"loader-bar"}),/*#__PURE__*/_react.default.createElement("div",{className:"loader-bar"}),/*#__PURE__*/_react.default.createElement("div",{className:"loader-bar"})));}

},{"react":380}],204:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=LoaderSpinner;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function LoaderSpinner(props){return/*#__PURE__*/_react.default.createElement("div",{className:"loader-spinner-wrap"},/*#__PURE__*/_react.default.createElement("div",{className:"loader-spinner"}));}

},{"react":380}],205:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=LoaderSpinnerSmall;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function LoaderSpinnerSmall(props){return/*#__PURE__*/_react.default.createElement("div",{className:"loader-spinner-wrap small"},/*#__PURE__*/_react.default.createElement("div",{className:"loader-spinner"}));}

},{"react":380}],206:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MediaLinkPreview;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MediaLinkPreview(props){return/*#__PURE__*/_react.default.createElement("div",{className:"media-link-preview ".concat(props.disabled?'disabled':'')},/*#__PURE__*/_react.default.createElement("div",{className:"media-link-preview-close-button",onClick:props.onCloseButtonClick},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"cross",modifiers:"media-link-preview-close-button-icon"})),/*#__PURE__*/_react.default.createElement("div",{className:"iframe-wrap"},/*#__PURE__*/_react.default.createElement("iframe",{src:props.iframeSrc,allowFullScreen:true})));}

},{"../icon/IconSVG":201,"react":380}],207:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UploadableMediaItem;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UploadableMediaItem(props){return/*#__PURE__*/_react.default.createElement("div",{className:"uploadable-item",style:{background:"url('".concat(props.data.url,"') center center / cover no-repeat")}},/*#__PURE__*/_react.default.createElement("div",{className:"uploadable-item-remove-button",onClick:props.onRemoveButtonClick},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"cross",modifiers:"uploadable-item-remove-button-icon"})));}

},{"../icon/IconSVG":201,"react":380}],208:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UploadableMediaList;var _react=_interopRequireDefault(require("react"));var _UploadableMediaItem=_interopRequireDefault(require("./UploadableMediaItem"));var _UploadableMediaSelector=_interopRequireDefault(require("./UploadableMediaSelector"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UploadableMediaList(props){var renderedUploadableMediaItems=props.data.map(function(item){return/*#__PURE__*/_react.default.createElement(_UploadableMediaItem.default,{key:item.id,data:item,onRemoveButtonClick:function onRemoveButtonClick(){props.onRemove(item.id);}});});return/*#__PURE__*/_react.default.createElement("div",{className:"uploadable-item-list ".concat(props.disabled?'disabled':'')},renderedUploadableMediaItems,/*#__PURE__*/_react.default.createElement(_UploadableMediaSelector.default,{onSelect:props.onSelect}));}

},{"./UploadableMediaItem":207,"./UploadableMediaSelector":209,"react":380}],209:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=UploadableMediaSelector;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var allowedExtensions=".".concat(vikinger_constants.settings.media_photo_allowed_extensions.join(',.'));function UploadableMediaSelector(props){var fileID=(0,_react.useRef)(1);var fileInputRef=(0,_react.useRef)(null);var selectorButtonRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createTooltip)({containerElement:selectorButtonRef.current,offset:8,direction:'top',animation:{type:'translate-out-fade'}});},[]);var uploadFiles=function uploadFiles(){var files=fileInputRef.current.files;// console.log('UPLOADABLE MEDIA SELECTOR - UPLOAD FILES: ', files);
var fileData=[];var _iterator=_createForOfIteratorHelper(files),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var file=_step.value;var fileExtension=file.name.substring(file.name.lastIndexOf('.')+1);fileData.push({id:fileID.current,file:new File([file],file.name),url:URL.createObjectURL(file),extension:fileExtension});fileID.current+=1;}}catch(err){_iterator.e(err);}finally{_iterator.f();}props.onSelect(fileData);};var onUploadClick=function onUploadClick(){fileInputRef.current.click();};return/*#__PURE__*/_react.default.createElement("div",{className:"uploadable-item-selector"},/*#__PURE__*/_react.default.createElement("input",{ref:fileInputRef,className:"uploadable-item-selector-input",type:"file",accept:allowedExtensions,multiple:true,onChange:uploadFiles}),/*#__PURE__*/_react.default.createElement("div",{ref:selectorButtonRef,className:"uploadable-item-selector-button",onClick:onUploadClick,"data-title":vikinger_translation.upload_photo},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"plus-small",modifiers:"uploadable-item-selector-button-icon"})));}

},{"../../utils/plugins":356,"../icon/IconSVG":201,"react":380}],210:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=MemberPreview;var _react=_interopRequireWildcard(require("react"));var _friend=_interopRequireDefault(require("../utils/friend"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _BadgeItemList=_interopRequireDefault(require("../badge/BadgeItemList"));var _BadgeVerified=_interopRequireDefault(require("../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../user-status/user-status-level/UserStatusLevel"));var _UserStatusTypeList=_interopRequireDefault(require("../user-status/user-status-type/UserStatusTypeList"));var _SocialLinkList=_interopRequireDefault(require("../social-link/SocialLinkList"));var _SocialLink=_interopRequireDefault(require("../social-link/SocialLink"));var _AddFriendButton=_interopRequireDefault(require("../button/action-button/action-button-friend/AddFriendButton"));var _AcceptFriendRequestButton=_interopRequireDefault(require("../button/action-button/action-button-friend/AcceptFriendRequestButton"));var _WithdrawFriendRequestButton=_interopRequireDefault(require("../button/action-button/action-button-friend/WithdrawFriendRequestButton"));var _RemoveFriendButton=_interopRequireDefault(require("../button/action-button/action-button-friend/RemoveFriendButton"));var _ButtonLink=_interopRequireDefault(require("../button/ButtonLink"));var _plugins=require("../../utils/plugins");var _xprofile=require("../utils/xprofile");var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function MemberPreview(props){var socialLinksSlidesPerView=4;var socialLinks=[];if(props.data.profile_data.group.Social_Links){var _iterator=_createForOfIteratorHelper(props.data.profile_data.group.Social_Links),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var socialField=_step.value;if(socialField.value!==''){socialLinks.push({name:(0,_xprofile.getURLIcon)(socialField.name),link:socialField.value});}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}var socialLinksSliderRef=(0,_react.useRef)(null);var socialLinksControlPrevRef=(0,_react.useRef)(null);var socialLinksControlNextRef=(0,_react.useRef)(null);var socialLinksSlider=undefined;(0,_react.useEffect)(function(){if(socialLinks.length>socialLinksSlidesPerView){socialLinksSlider=(0,_plugins.createSlider)(socialLinksSliderRef.current,{navigation:{prevEl:socialLinksControlPrevRef.current,nextEl:socialLinksControlNextRef.current},slidesPerView:socialLinksSlidesPerView,spaceBetween:8});}return function(){if(socialLinksSlider){// Destroy slider instance and detach all events listeners
socialLinksSlider.destroy();}};},[]);var friendable=(0,_friend.default)(props.loggedUser,props.data.id);var postCountText=props.data.stats.post_count===1?vikinger_translation.post:vikinger_translation.posts,friendCountText=props.data.stats.friend_count===1?vikinger_translation.friend:vikinger_translation.friends,commentCountText=props.data.stats.comment_count===1?vikinger_translation.comment:vikinger_translation.comments;var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_members_lists&&props.data.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.membership;var memberTypes=props.data.member_types.filter(function(memberType){return vikinger_constants.settings.member_types[memberType].show_in_list==='1';});return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview small"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-top"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url(".concat(props.data.cover_url,") center center / cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{modifiers:"user-short-description-avatar",data:props.data}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},props.data.name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.membership.name}),memberTypes.length>0&&/*#__PURE__*/_react.default.createElement(_UserStatusTypeList.default,{tags:memberTypes}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-text"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},"@",props.data.mention_name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null))))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-bottom"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},vikinger_constants.gamipress_badge_type_exists&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,props.data.badges.length>0&&/*#__PURE__*/_react.default.createElement(_BadgeItemList.default,{data:props.data.badges,maxDisplayCount:4,moreLink:props.data.badges_link,modifiers:"small"}),props.data.badges.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_badges_unlocked)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postCountText)),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.friend_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},friendCountText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.comment_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},commentCountText))),socialLinks.length>0&&socialLinks.length<=socialLinksSlidesPerView&&/*#__PURE__*/_react.default.createElement(_SocialLinkList.default,{data:socialLinks,modifiers:"small"}),socialLinks.length>socialLinksSlidesPerView&&/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-social-links-wrap"},/*#__PURE__*/_react.default.createElement("div",{ref:socialLinksSliderRef,className:"user-preview-social-links-slider swiper-container"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-social-links swiper-wrapper"},socialLinks.map(function(socialItem,i){return/*#__PURE__*/_react.default.createElement("div",{key:i,className:"user-preview-social-link swiper-slide"},/*#__PURE__*/_react.default.createElement(_SocialLink.default,{data:socialItem,modifiers:"small"}));}))),/*#__PURE__*/_react.default.createElement("div",{className:"slider-controls"},/*#__PURE__*/_react.default.createElement("div",{ref:socialLinksControlPrevRef,className:"slider-control left"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})),/*#__PURE__*/_react.default.createElement("div",{ref:socialLinksControlNextRef,className:"slider-control right"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})))),socialLinks.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text no-results-social"},vikinger_translation.no_social_networks_linked)),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-footer"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-footer-action"},props.loggedUser&&props.loggedUser.id!==props.data.id&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,_membership.friendshipPermissions.sendFriendRequest&&!friendable.friendRequestSent()&&!friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AddFriendButton.default,{modifiers:"void void-secondary",icon:"add-friend",title:vikinger_translation.add_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete}),friendable.friendRequestSent()&&/*#__PURE__*/_react.default.createElement(_WithdrawFriendRequestButton.default,{modifiers:"void void-tertiary",icon:"remove-friend",title:vikinger_translation.withdraw_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete}),friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AcceptFriendRequestButton.default,{modifiers:"void void-secondary",icon:"add-friend",title:vikinger_translation.accept_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete})),friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_RemoveFriendButton.default,{modifiers:"void void-tertiary",icon:"remove-friend",title:vikinger_translation.remove_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete}))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-footer-action"},_membership.messagePermissions.createMessage&&vikinger_constants.plugin_active.buddypress_messages&&props.loggedUser&&props.loggedUser.id!==props.data.id&&friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_ButtonLink.default,{modifiers:"void void-primary",title:vikinger_translation.send_message,icon:"messages",link:"".concat(props.loggedUser.messages_link,"?user_id=").concat(props.data.id)})))));}

},{"../../utils/plugins":356,"../avatar/Avatar":55,"../badge/BadgeItemList":80,"../badge/BadgeVerified":82,"../button/ButtonLink":84,"../button/action-button/action-button-friend/AcceptFriendRequestButton":87,"../button/action-button/action-button-friend/AddFriendButton":88,"../button/action-button/action-button-friend/RemoveFriendButton":90,"../button/action-button/action-button-friend/WithdrawFriendRequestButton":91,"../icon/IconSVG":201,"../social-link/SocialLink":272,"../social-link/SocialLinkList":273,"../user-status/user-status-level/UserStatusLevel":292,"../user-status/user-status-type/UserStatusTypeList":297,"../utils/friend":309,"../utils/membership":312,"../utils/xprofile":317,"react":380}],211:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=MemberPreviewBig;var _react=_interopRequireWildcard(require("react"));var _friend=_interopRequireDefault(require("../utils/friend"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _BadgeItemList=_interopRequireDefault(require("../badge/BadgeItemList"));var _BadgeVerified=_interopRequireDefault(require("../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../user-status/user-status-level/UserStatusLevel"));var _UserStatusTypeList=_interopRequireDefault(require("../user-status/user-status-type/UserStatusTypeList"));var _SocialLinkList=_interopRequireDefault(require("../social-link/SocialLinkList"));var _SocialLink=_interopRequireDefault(require("../social-link/SocialLink"));var _AddFriendButton=_interopRequireDefault(require("../button/action-button/action-button-friend/AddFriendButton"));var _AcceptFriendRequestButton=_interopRequireDefault(require("../button/action-button/action-button-friend/AcceptFriendRequestButton"));var _WithdrawFriendRequestButton=_interopRequireDefault(require("../button/action-button/action-button-friend/WithdrawFriendRequestButton"));var _RemoveFriendButton=_interopRequireDefault(require("../button/action-button/action-button-friend/RemoveFriendButton"));var _ButtonLink=_interopRequireDefault(require("../button/ButtonLink"));var _core=require("../../utils/core");var _plugins=require("../../utils/plugins");var _xprofile=require("../utils/xprofile");var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function MemberPreviewBig(props){var socialLinksSlidesPerView=5;var socialLinks=[];if(props.data.profile_data.group.Social_Links){var _iterator=_createForOfIteratorHelper(props.data.profile_data.group.Social_Links),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var socialField=_step.value;if(socialField.value!==''){socialLinks.push({name:(0,_xprofile.getURLIcon)(socialField.name),link:socialField.value});}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}var statsSliderRef=(0,_react.useRef)(null);var statsPaginationRef=(0,_react.useRef)(null);var statsSlider=undefined;var bioAbout=props.data.profile_data.field.Profile_Bio_About?props.data.profile_data.field.Profile_Bio_About.value:'';(0,_react.useEffect)(function(){if(bioAbout!==''){statsSlider=(0,_plugins.createSlider)(statsSliderRef.current,{pagination:{el:statsPaginationRef.current,type:'bullets',clickable:true,bulletClass:'slider-roster-item',bulletActiveClass:'active',renderBullet:function renderBullet(index,className){return"<div class=\"".concat(className,"\"></div>");}}});}return function(){if(statsSlider){// Destroy slider instance and detach all events listeners
statsSlider.destroy();}};},[]);var socialLinksSliderRef=(0,_react.useRef)(null);var socialLinksControlPrevRef=(0,_react.useRef)(null);var socialLinksControlNextRef=(0,_react.useRef)(null);var socialLinksSlider=undefined;(0,_react.useEffect)(function(){if(socialLinks.length>socialLinksSlidesPerView){socialLinksSlider=(0,_plugins.createSlider)(socialLinksSliderRef.current,{navigation:{prevEl:socialLinksControlPrevRef.current,nextEl:socialLinksControlNextRef.current},slidesPerView:socialLinksSlidesPerView,spaceBetween:8});}return function(){if(socialLinksSlider){// Destroy slider instance and detach all events listeners
socialLinksSlider.destroy();}};},[]);var friendable=(0,_friend.default)(props.loggedUser,props.data.id);var postCountText=props.data.stats.post_count===1?vikinger_translation.post:vikinger_translation.posts,friendCountText=props.data.stats.friend_count===1?vikinger_translation.friend:vikinger_translation.friends,commentCountText=props.data.stats.comment_count===1?vikinger_translation.comment:vikinger_translation.comments;var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_members_lists&&props.data.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.membership;var memberTypes=props.data.member_types.filter(function(memberType){return vikinger_constants.settings.member_types[memberType].show_in_list==='1';});return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-top"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url(".concat(props.data.cover_url,") center center / cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"medium",modifiers:"user-short-description-avatar",data:props.data}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},props.data.name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.membership.name}),memberTypes.length>0&&/*#__PURE__*/_react.default.createElement(_UserStatusTypeList.default,{tags:memberTypes}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-text"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},"@",props.data.mention_name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null))))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-bottom"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},vikinger_constants.gamipress_badge_type_exists&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,props.data.badges.length>0&&/*#__PURE__*/_react.default.createElement(_BadgeItemList.default,{data:props.data.badges,maxDisplayCount:4,moreLink:props.data.badges_link,modifiers:"small"}),props.data.badges.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_badges_unlocked)),bioAbout===''&&/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-stats-slides"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-stats-slide"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postCountText)),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.friend_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},friendCountText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.comment_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},commentCountText))))),bioAbout!==''&&/*#__PURE__*/_react.default.createElement("div",{ref:statsSliderRef,className:"user-preview-stats-slides swiper-container"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-stats-slide swiper-wrapper"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stats swiper-slide"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postCountText)),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.friend_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},friendCountText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.comment_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},commentCountText))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-stats-slide swiper-slide"},/*#__PURE__*/_react.default.createElement("p",{className:"user-preview-text"},(0,_core.truncateText)(bioAbout,120))))),/*#__PURE__*/_react.default.createElement("div",{ref:statsPaginationRef,className:"user-preview-stats-roster slider-roster"}),socialLinks.length>0&&socialLinks.length<=socialLinksSlidesPerView&&/*#__PURE__*/_react.default.createElement(_SocialLinkList.default,{data:socialLinks,modifiers:"small"}),socialLinks.length>socialLinksSlidesPerView&&/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-social-links-wrap"},/*#__PURE__*/_react.default.createElement("div",{ref:socialLinksSliderRef,className:"user-preview-social-links-slider swiper-container"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-social-links swiper-wrapper"},socialLinks.map(function(socialItem,i){return/*#__PURE__*/_react.default.createElement("div",{key:i,className:"user-preview-social-link swiper-slide"},/*#__PURE__*/_react.default.createElement(_SocialLink.default,{data:socialItem,modifiers:"small"}));}))),/*#__PURE__*/_react.default.createElement("div",{className:"slider-controls"},/*#__PURE__*/_react.default.createElement("div",{ref:socialLinksControlPrevRef,className:"slider-control left"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})),/*#__PURE__*/_react.default.createElement("div",{ref:socialLinksControlNextRef,className:"slider-control right"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})))),socialLinks.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text no-results-social"},vikinger_translation.no_social_networks_linked),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-actions"},props.loggedUser&&props.loggedUser.id!==props.data.id&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,_membership.friendshipPermissions.sendFriendRequest&&!friendable.friendRequestSent()&&!friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AddFriendButton.default,{modifiers:"secondary",text:vikinger_translation.add_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete}),friendable.friendRequestSent()&&/*#__PURE__*/_react.default.createElement(_WithdrawFriendRequestButton.default,{modifiers:"tertiary",text:vikinger_translation.withdraw_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete}),friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AcceptFriendRequestButton.default,{modifiers:"secondary",text:vikinger_translation.accept_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete})),friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_RemoveFriendButton.default,{modifiers:"tertiary",text:vikinger_translation.remove_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete}),_membership.messagePermissions.createMessage&&vikinger_constants.plugin_active.buddypress_messages&&friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_ButtonLink.default,{modifiers:"primary",text:vikinger_translation.send_message,link:"".concat(props.loggedUser.messages_link,"?user_id=").concat(props.data.id)}))))));}

},{"../../utils/core":355,"../../utils/plugins":356,"../avatar/Avatar":55,"../badge/BadgeItemList":80,"../badge/BadgeVerified":82,"../button/ButtonLink":84,"../button/action-button/action-button-friend/AcceptFriendRequestButton":87,"../button/action-button/action-button-friend/AddFriendButton":88,"../button/action-button/action-button-friend/RemoveFriendButton":90,"../button/action-button/action-button-friend/WithdrawFriendRequestButton":91,"../icon/IconSVG":201,"../social-link/SocialLink":272,"../social-link/SocialLinkList":273,"../user-status/user-status-level/UserStatusLevel":292,"../user-status/user-status-type/UserStatusTypeList":297,"../utils/friend":309,"../utils/membership":312,"../utils/xprofile":317,"react":380}],212:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=MemberPreviewSmall;var _react=_interopRequireWildcard(require("react"));var _friend=_interopRequireDefault(require("../utils/friend"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _BadgeItemList=_interopRequireDefault(require("../badge/BadgeItemList"));var _BadgeVerified=_interopRequireDefault(require("../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../user-status/user-status-level/UserStatusLevel"));var _UserStatusTypeList=_interopRequireDefault(require("../user-status/user-status-type/UserStatusTypeList"));var _SocialLinkList=_interopRequireDefault(require("../social-link/SocialLinkList"));var _SocialLink=_interopRequireDefault(require("../social-link/SocialLink"));var _AddFriendButton=_interopRequireDefault(require("../button/action-button/action-button-friend/AddFriendButton"));var _AcceptFriendRequestButton=_interopRequireDefault(require("../button/action-button/action-button-friend/AcceptFriendRequestButton"));var _WithdrawFriendRequestButton=_interopRequireDefault(require("../button/action-button/action-button-friend/WithdrawFriendRequestButton"));var _RemoveFriendButton=_interopRequireDefault(require("../button/action-button/action-button-friend/RemoveFriendButton"));var _ButtonLink=_interopRequireDefault(require("../button/ButtonLink"));var _plugins=require("../../utils/plugins");var _xprofile=require("../utils/xprofile");var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function MemberPreviewSmall(props){var socialLinksSlidesPerView=4;var socialLinks=[];if(props.data.profile_data.group.Social_Links){var _iterator=_createForOfIteratorHelper(props.data.profile_data.group.Social_Links),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var socialField=_step.value;if(socialField.value!==''){socialLinks.push({name:(0,_xprofile.getURLIcon)(socialField.name),link:socialField.value});}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}var socialLinksSliderRef=(0,_react.useRef)(null);var socialLinksControlPrevRef=(0,_react.useRef)(null);var socialLinksControlNextRef=(0,_react.useRef)(null);var socialLinksSlider=undefined;(0,_react.useEffect)(function(){if(socialLinks.length>socialLinksSlidesPerView){socialLinksSlider=(0,_plugins.createSlider)(socialLinksSliderRef.current,{navigation:{prevEl:socialLinksControlPrevRef.current,nextEl:socialLinksControlNextRef.current},slidesPerView:socialLinksSlidesPerView,spaceBetween:8});}return function(){if(socialLinksSlider){// Destroy slider instance and detach all events listeners
socialLinksSlider.destroy();}};},[]);var friendable=(0,_friend.default)(props.loggedUser,props.data.id);var postCountText=props.data.stats.post_count===1?vikinger_translation.post:vikinger_translation.posts,friendCountText=props.data.stats.friend_count===1?vikinger_translation.friend:vikinger_translation.friends,commentCountText=props.data.stats.comment_count===1?vikinger_translation.comment:vikinger_translation.comments;var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&vikinger_constants.settings.bp_verified_member_display_badge_in_members_lists&&props.data.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.membership;var memberTypes=props.data.member_types.filter(function(memberType){return vikinger_constants.settings.member_types[memberType].show_in_list==='1';});return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview landscape"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url(".concat(props.data.cover_url,") center center / cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description landscape tiny"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-short-description-avatar",data:props.data}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},props.data.name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.membership.name}),memberTypes.length>0&&/*#__PURE__*/_react.default.createElement(_UserStatusTypeList.default,{tags:memberTypes}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-text"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},"@",props.data.mention_name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null))),vikinger_constants.gamipress_badge_type_exists&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,props.data.badges.length>0&&/*#__PURE__*/_react.default.createElement(_BadgeItemList.default,{data:props.data.badges,maxDisplayCount:4,moreLink:props.data.badges_link,modifiers:"small"}),props.data.badges.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_badges_unlocked)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stats"},/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.post_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},postCountText)),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.friend_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},friendCountText)),/*#__PURE__*/_react.default.createElement("div",{className:"user-stat"},/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-title"},props.data.stats.comment_count),/*#__PURE__*/_react.default.createElement("p",{className:"user-stat-text"},commentCountText))),socialLinks.length>0&&socialLinks.length<=socialLinksSlidesPerView&&/*#__PURE__*/_react.default.createElement(_SocialLinkList.default,{data:socialLinks,modifiers:"small"}),socialLinks.length>socialLinksSlidesPerView&&/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-social-links-wrap"},/*#__PURE__*/_react.default.createElement("div",{ref:socialLinksSliderRef,className:"user-preview-social-links-slider swiper-container"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-social-links swiper-wrapper"},socialLinks.map(function(socialItem,i){return/*#__PURE__*/_react.default.createElement("div",{key:i,className:"user-preview-social-link swiper-slide"},/*#__PURE__*/_react.default.createElement(_SocialLink.default,{data:socialItem,modifiers:"small"}));}))),/*#__PURE__*/_react.default.createElement("div",{className:"slider-controls"},/*#__PURE__*/_react.default.createElement("div",{ref:socialLinksControlPrevRef,className:"slider-control left"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})),/*#__PURE__*/_react.default.createElement("div",{ref:socialLinksControlNextRef,className:"slider-control right"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})))),socialLinks.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text no-results-social"},vikinger_translation.no_social_networks_linked),vikinger_constants.plugin_active.buddypress_friends&&/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-actions"},props.loggedUser&&props.loggedUser.id!==props.data.id&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,_membership.friendshipPermissions.sendFriendRequest&&!friendable.friendRequestSent()&&!friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AddFriendButton.default,{modifiers:"secondary",icon:"add-friend",title:vikinger_translation.add_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete}),friendable.friendRequestSent()&&/*#__PURE__*/_react.default.createElement(_WithdrawFriendRequestButton.default,{modifiers:"tertiary",icon:"remove-friend",title:vikinger_translation.withdraw_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete}),friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AcceptFriendRequestButton.default,{modifiers:"secondary",icon:"add-friend",title:vikinger_translation.accept_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete})),friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_RemoveFriendButton.default,{modifiers:"tertiary",icon:"remove-friend",title:vikinger_translation.remove_friend,loggedUser:props.loggedUser,userID:props.data.id,onActionComplete:props.onActionComplete}),_membership.messagePermissions.createMessage&&vikinger_constants.plugin_active.buddypress_messages&&friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_ButtonLink.default,{modifiers:"primary",title:vikinger_translation.send_message,icon:"messages",link:"".concat(props.loggedUser.messages_link,"?user_id=").concat(props.data.id)})))));}

},{"../../utils/plugins":356,"../avatar/Avatar":55,"../badge/BadgeItemList":80,"../badge/BadgeVerified":82,"../button/ButtonLink":84,"../button/action-button/action-button-friend/AcceptFriendRequestButton":87,"../button/action-button/action-button-friend/AddFriendButton":88,"../button/action-button/action-button-friend/RemoveFriendButton":90,"../button/action-button/action-button-friend/WithdrawFriendRequestButton":91,"../icon/IconSVG":201,"../social-link/SocialLink":272,"../social-link/SocialLinkList":273,"../user-status/user-status-level/UserStatusLevel":292,"../user-status/user-status-type/UserStatusTypeList":297,"../utils/friend":309,"../utils/membership":312,"../utils/xprofile":317,"react":380}],213:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MemberOnlyContentPreview;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MemberOnlyContentPreview(props){return/*#__PURE__*/_react.default.createElement("p",{className:"".concat(props.modifiers||'')},"".concat(vikinger_translation.members_only_content_text," "),/*#__PURE__*/_react.default.createElement("a",{href:vikinger_constants.settings.membership_levels_page_link},vikinger_translation.join_now));}

},{"react":380}],214:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MentionBlock;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MentionBlock(props){return/*#__PURE__*/_react.default.createElement("div",{className:"mention-block"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"tiny",modifiers:"mention-block-avatar",data:props.data,noBorder:true,noLink:true}),/*#__PURE__*/_react.default.createElement("p",{className:"mention-block-title"},props.data.mention_name),/*#__PURE__*/_react.default.createElement("div",{className:"mention-block-action",onClick:props.onActionClick},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"cross",modifiers:"mention-block-action-icon"})));}

},{"../avatar/Avatar":55,"../icon/IconSVG":201,"react":380}],215:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MentionItem;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MentionItem(props){var handleClick=function handleClick(){props.onClick(props.data);};var wrapSearchTextRegex=new RegExp(props.searchText,'igm'),name=props.data.mention_name,wrappedName=props.searchText===''?props.data.mention_name:name.replace(wrapSearchTextRegex,'<span class="highlighted">$&</span>');return/*#__PURE__*/_react.default.createElement("div",{className:"mention-list-item ".concat(props.active?'active':''),onClick:handleClick,onMouseEnter:props.activateItem},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"micro",data:props.data,noBorder:true,noLink:true}),/*#__PURE__*/_react.default.createElement("p",{className:"mention-list-item-text",dangerouslySetInnerHTML:{__html:"@".concat(wrappedName)}}));}

},{"../avatar/Avatar":55,"react":380}],216:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=MentionList;var _react=_interopRequireWildcard(require("react"));var _MentionItem=_interopRequireDefault(require("./MentionItem"));var _simplebarReact=_interopRequireDefault(require("simplebar-react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function MentionList(props){var _useState=(0,_react.useState)(0),_useState2=_slicedToArray(_useState,2),activeUserIndex=_useState2[0],_setActiveUserIndex=_useState2[1];var activeUserIndexRef=(0,_react.useRef)(0);var setActiveUserIndex=function setActiveUserIndex(i){var index=i;if(typeof i==='function'){index=i(activeUserIndex);}activeUserIndexRef.current=index;_setActiveUserIndex(index);};var mentionListRef=(0,_react.useRef)(null);var simplebarStyles=(0,_react.useRef)({maxHeight:140});var userMatches=(0,_react.useRef)([]);var handleClick=function handleClick(data){props.onItemSelection(data,'click');};var activatePreviousUser=function activatePreviousUser(){setActiveUserIndex(function(previousActiveUserIndex){return previousActiveUserIndex===0?userMatches.current.length-1:previousActiveUserIndex-1;});};var activateNextUser=function activateNextUser(){setActiveUserIndex(function(previousActiveUserIndex){return previousActiveUserIndex===userMatches.current.length-1?0:previousActiveUserIndex+1;});};var activatePreviousUserOnArrowUpPressed=function activatePreviousUserOnArrowUpPressed(e){// arrow up key pressed
if(e.keyCode===38){activatePreviousUser();}};var activateNextUserOnArrowDownPressed=function activateNextUserOnArrowDownPressed(e){// arrow down key pressed
if(e.keyCode===40){activateNextUser();}};var activateUserOnKeyPressed=function activateUserOnKeyPressed(e){// spacebar or enter key pressed
if(e.keyCode===32||e.keyCode===13){if(userMatches.current.length>0){//   console.log('MENTION LIST - ON KEY PRESSED ACTIVE USER INDEX: ', activeUserIndexRef.current);
//   console.log('MENTION LIST - ON KEY PRESSED USER MATCHES: ', userMatches.current);
props.onItemSelection(userMatches.current[activeUserIndexRef.current],'keydown');}}};var userMatchCompareFunction=function userMatchCompareFunction(a,b){var aExec=new RegExp(props.searchText,'igm').exec(a.mention_name),bExec=new RegExp(props.searchText,'igm').exec(b.mention_name);if(aExec.index<bExec.index){return-1;}if(aExec.index>bExec.index){return 1;}return 0;};(0,_react.useEffect)(function(){mentionListRef.current.style.top="".concat(props.positionData.relTop+props.positionData.height,"px");mentionListRef.current.style.left="".concat(props.positionData.relLeft,"px");window.addEventListener('keydown',activateUserOnKeyPressed);window.addEventListener('keydown',activatePreviousUserOnArrowUpPressed);window.addEventListener('keydown',activateNextUserOnArrowDownPressed);return function(){window.removeEventListener('keydown',activateUserOnKeyPressed);window.removeEventListener('keydown',activatePreviousUserOnArrowUpPressed);window.removeEventListener('keydown',activateNextUserOnArrowDownPressed);};});(0,_react.useEffect)(function(){// console.log('MENTION LIST - USE EFFECT SEARCH TEXT: ', props.searchText);
setActiveUserIndex(0);},[props.searchText]);// console.log('MENTION LIST - DATA: ', props.data);
userMatches.current=[];// get users that matches searchText
var _iterator=_createForOfIteratorHelper(props.data),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var user=_step.value;var searchTextRegex=new RegExp(props.searchText,'igm');if(searchTextRegex.test(user.mention_name)){userMatches.current.push(user);}}// // sort users that matched searchText by lower index
}catch(err){_iterator.e(err);}finally{_iterator.f();}userMatches.current.sort(userMatchCompareFunction);// console.log('MENTION LIST - ACTIVE USER INDEX: ', activeUserIndex);
// console.log('MENTION LIST - USER MATCHES: ', userMatches.current);
return/*#__PURE__*/_react.default.createElement("div",{ref:mentionListRef,className:"mention-list"},/*#__PURE__*/_react.default.createElement(_simplebarReact.default,{style:simplebarStyles.current},userMatches.current.map(function(user,i){return/*#__PURE__*/_react.default.createElement(_MentionItem.default,{key:user.id,data:user,searchText:props.searchText,onClick:handleClick,active:activeUserIndex===i,activateItem:function activateItem(){setActiveUserIndex(i);}});}),userMatches.current.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"mention-list-error-text"},vikinger_translation.no_members_found)));}

},{"./MentionItem":215,"react":380,"simplebar-react":388}],217:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MessageBox;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MessageBox(props){var iconColor='secondary',iconType='info';if(props.success){iconColor='primary';iconType='success';}else if(props.error){iconColor='tertiary';iconType='error';}else if(props.warning){iconColor='tertiary';}return/*#__PURE__*/_react.default.createElement("div",{ref:props.forwardedRef,className:"message-box ".concat(props.confirm||props.continue?'no-padding-bottom':'')},/*#__PURE__*/_react.default.createElement("div",{className:"message-box-icon-wrap ".concat(iconColor)},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:iconType,modifiers:"message-box-icon"})),/*#__PURE__*/_react.default.createElement("p",{className:"message-box-title"},props.data.title),/*#__PURE__*/_react.default.createElement("p",{className:"message-box-text"},props.data.text),props.confirm&&/*#__PURE__*/_react.default.createElement("div",{className:"message-box-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"message-box-action button white",onClick:props.onCancel},vikinger_translation.cancel),/*#__PURE__*/_react.default.createElement("p",{className:"message-box-action button secondary",onClick:props.onAccept},vikinger_translation.accept)),props.continue&&/*#__PURE__*/_react.default.createElement("div",{className:"message-box-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"message-box-action button secondary",onClick:props.onContinue},vikinger_translation.continue)));}

},{"../icon/IconSVG":201,"react":380}],218:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Notification;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Notification(props){return/*#__PURE__*/_react.default.createElement("div",{className:"notification-section animate-slide-down"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"no-results",modifiers:"notification-section-icon"}),/*#__PURE__*/_react.default.createElement("p",{className:"notification-section-title"},props.title),/*#__PURE__*/_react.default.createElement("p",{className:"notification-section-text"},props.text));}

},{"../icon/IconSVG":201,"react":380}],219:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=NotificationBox;var _react=_interopRequireDefault(require("react"));var _NotificationStatus=_interopRequireDefault(require("../user-status/user-status-notification/NotificationStatus"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function NotificationBox(props){return/*#__PURE__*/_react.default.createElement("div",{className:"notification-box ".concat(props.data.is_new?'unread':'')},/*#__PURE__*/_react.default.createElement(_NotificationStatus.default,{data:props.data,selectable:props.selectable,selected:props.selected,toggleSelectableActive:props.toggleSelectableActive}));}

},{"../user-status/user-status-notification/NotificationStatus":294,"react":380}],220:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=NotificationBoxList;var _react=_interopRequireDefault(require("react"));var _NotificationBox=_interopRequireDefault(require("./NotificationBox"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function NotificationBoxList(props){var renderedNotificationBoxList=props.data.map(function(notification,i){return/*#__PURE__*/_react.default.createElement(_NotificationBox.default,{key:notification.id,data:notification,selectable:props.selectable,selected:props.selectedItems[i],toggleSelectableActive:function toggleSelectableActive(){props.toggleSelectableActive(i);}});});return/*#__PURE__*/_react.default.createElement("div",{className:"notification-box-list"},renderedNotificationBoxList);}

},{"./NotificationBox":219,"react":380}],221:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Pager;var _react=_interopRequireDefault(require("react"));var _PagerItem=_interopRequireDefault(require("./PagerItem"));var _SliderControl=_interopRequireDefault(require("../controls/SliderControl"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Pager(props){var pagerLength=3;var showPreviousPage=function showPreviousPage(){if(props.activePage!==1){props.showPage(props.activePage-1);}};var showNextPage=function showNextPage(){if(props.activePage!==props.pageCount){props.showPage(props.activePage+1);}};var renderedPages=[];var startPage,endPage;// if page count is lower than pager length, then show all pages
if(props.pageCount<pagerLength){startPage=1;endPage=props.pageCount;}else if(props.activePage+pagerLength-1<props.pageCount){// if active page plus pager length is lower than last page, show active page first
startPage=props.activePage;endPage=props.activePage+pagerLength-1;}else{// if active page plus pager length is higher than last page, show last page minus pager length first
startPage=props.pageCount-pagerLength+1;endPage=props.pageCount;}// show go previous page
if(props.activePage>1){renderedPages.push(/*#__PURE__*/_react.default.createElement(_SliderControl.default,{key:startPage-1,direction:"left",disabled:props.activePage===1,controlClicked:showPreviousPage}));}// show pagerLength pages
for(var i=startPage;i<=endPage;i++){renderedPages.push(/*#__PURE__*/_react.default.createElement(_PagerItem.default,{key:i,pageNumber:i,active:props.activePage===i,pageClicked:props.showPage}));}// show go to next page
if(props.activePage!==props.pageCount){renderedPages.push(/*#__PURE__*/_react.default.createElement(_SliderControl.default,{key:endPage+1,direction:"right",disabled:props.activePage===props.pageCount,controlClicked:showNextPage}));}return/*#__PURE__*/_react.default.createElement("div",{className:"section-pager-bar-wrap align-center"},/*#__PURE__*/_react.default.createElement("div",{className:"section-pager-bar"},/*#__PURE__*/_react.default.createElement("div",{className:"section-pager ".concat(props.themeColor)},renderedPages)));}

},{"../controls/SliderControl":131,"./PagerItem":222,"react":380}],222:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PagerItem;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PagerItem(props){var handlePageClick=function handlePageClick(){props.pageClicked(props.pageNumber);};return/*#__PURE__*/_react.default.createElement("div",{className:"section-pager-item ".concat(props.static?'section-pager-item-no-link':''," ").concat(props.active?'active':''),onClick:handlePageClick},/*#__PURE__*/_react.default.createElement("p",{className:"section-pager-item-text"},props.pageNumber<10?"0".concat(props.pageNumber):props.pageNumber));}

},{"react":380}],223:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ScrollPager;var _react=_interopRequireWildcard(require("react"));var _Loader=_interopRequireDefault(require("../loader/Loader"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ScrollPager(props){var loaderRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(!props.initialFetch&&props.moreItems){window.addEventListener('scroll',loadMoreOnScroll);}return function(){window.removeEventListener('scroll',loadMoreOnScroll);};},[props.initialFetch]);var scrolledThrough=function scrolledThrough(el){var elementScrollPosition={y:el.offsetTop+el.offsetHeight-window.innerHeight},windowScrollPosition={y:window.scrollY};return windowScrollPosition.y>elementScrollPosition.y;};var loadMoreOnScroll=function loadMoreOnScroll(){// console.log('SCROLL PAGER - LOAD MORE ON SCROLL: ', this.loaderRef.current);
if(scrolledThrough(loaderRef.current)){window.removeEventListener('scroll',loadMoreOnScroll);loadMoreItems();}};var loadMoreItems=function loadMoreItems(){props.loadMoreItems(function(moreItems){if(moreItems){window.addEventListener('scroll',loadMoreOnScroll);}});};return/*#__PURE__*/_react.default.createElement("div",{ref:loaderRef,className:"".concat(props.modifiers||'')},props.children,props.moreItems&&/*#__PURE__*/_react.default.createElement(_Loader.default,null));}

},{"../loader/Loader":203,"react":380}],224:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PhotoPreview;var _react=_interopRequireWildcard(require("react"));var _Checkbox=_interopRequireDefault(require("../form/Checkbox"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _ActivityMediaPopup=_interopRequireDefault(require("../activity/activity-popup/ActivityMediaPopup"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function PhotoPreview(props){var activityMediaPopupTriggerRef=(0,_react.useRef)(null);return/*#__PURE__*/_react.default.createElement("div",{className:"photo-preview-wrap"},/*#__PURE__*/_react.default.createElement("div",{className:"photo-preview ".concat(props.modifiers||'')},/*#__PURE__*/_react.default.createElement("div",{className:"photo-preview-image",style:{background:"url('".concat(props.data.media.link,"') center center / cover no-repeat")}}),props.selectable&&/*#__PURE__*/_react.default.createElement(_Checkbox.default,{active:props.selected,toggleActive:props.toggleSelectableActive}),/*#__PURE__*/_react.default.createElement("div",{ref:activityMediaPopupTriggerRef,className:"photo-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"reaction-count-list"},vikinger_constants.plugin_active.vkreact&&vikinger_constants.plugin_active['vkreact-buddypress']&&/*#__PURE__*/_react.default.createElement("div",{className:"reaction-count negative"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"thumbs-up",modifiers:"reaction-count-icon"}),/*#__PURE__*/_react.default.createElement("p",{className:"reaction-count-text"},props.data.reactions.length)),/*#__PURE__*/_react.default.createElement("div",{className:"reaction-count negative"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"comment",modifiers:"reaction-count-icon"}),/*#__PURE__*/_react.default.createElement("p",{className:"reaction-count-text"},props.data.comment_count))))),!props.noPopup&&/*#__PURE__*/_react.default.createElement("div",null,/*#__PURE__*/_react.default.createElement(_ActivityMediaPopup.default,{data:props.data,user:props.user,reactions:props.reactions,activityMediaPopupTriggerRef:activityMediaPopupTriggerRef,onActivityUpdate:props.onActivityUpdate})));}

},{"../activity/activity-popup/ActivityMediaPopup":44,"../form/Checkbox":142,"../icon/IconSVG":201,"react":380}],225:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PhotoPreviewList;var _react=_interopRequireDefault(require("react"));var _PhotoPreview=_interopRequireDefault(require("./PhotoPreview"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PhotoPreviewList(props){return props.data.map(function(item,i){return/*#__PURE__*/_react.default.createElement(_PhotoPreview.default,{key:item.id,data:item,user:props.user,reactions:props.reactions,modifiers:props.modifiers,selectable:props.selectable,selected:props.selectedItems[i],toggleSelectableActive:function toggleSelectableActive(){props.toggleSelectableActive(i);},onActivityUpdate:props.onActivityUpdate});});}

},{"./PhotoPreview":224,"react":380}],226:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PictureCollage;var _react=_interopRequireDefault(require("react"));var _PictureCollageRow=_interopRequireDefault(require("./PictureCollageRow"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PictureCollage(props){var collageRows=[];if(props.data.length%2===0){var rowCount=props.data.length/2;for(var i=0;i<rowCount;i++){collageRows.push({data:props.data.slice(i*2,i*2+2),modifier:'medium'});}}else{if(props.data.length===3){collageRows.push({data:props.data});}else{if(props.data.length===5){// if more data, add more information to last item
if(props.metadata){props.data[props.data.length-1].media.more=props.metadata.more;props.data[props.data.length-1].media.more_link=props.metadata.more_link;}collageRows.push({data:props.data.slice(0,2),modifier:'medium'});collageRows.push({data:props.data.slice(2)});}}}return/*#__PURE__*/_react.default.createElement("div",{className:"picture-collage"},collageRows.map(function(row,i){return/*#__PURE__*/_react.default.createElement(_PictureCollageRow.default,{key:i,data:row.data,modifiers:row.modifier||'',user:props.user,reactions:props.reactions,noPopup:props.noPopup,onActivityUpdate:props.onActivityUpdate});}));}

},{"./PictureCollageRow":228,"react":380}],227:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PictureCollageItem;var _react=_interopRequireDefault(require("react"));var _PhotoPreview=_interopRequireDefault(require("./PhotoPreview"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PictureCollageItem(props){return/*#__PURE__*/_react.default.createElement("div",{className:"picture-collage-item"},props.data.media.more>0&&/*#__PURE__*/_react.default.createElement("a",{className:"picture-collage-item-overlay",href:props.data.media.more_link},/*#__PURE__*/_react.default.createElement("p",{className:"picture-collage-item-overlay-text"},"+",props.data.media.more)),/*#__PURE__*/_react.default.createElement(_PhotoPreview.default,{data:props.data,user:props.user,reactions:props.reactions,noPopup:props.data.media.more||props.noPopup,onActivityUpdate:props.onActivityUpdate}));}

},{"./PhotoPreview":224,"react":380}],228:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PictureCollageRow;var _react=_interopRequireDefault(require("react"));var _PictureCollageItem=_interopRequireDefault(require("./PictureCollageItem"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PictureCollageRow(props){return/*#__PURE__*/_react.default.createElement("div",{className:"picture-collage-row ".concat(props.modifiers||'')},props.data.map(function(item){return/*#__PURE__*/_react.default.createElement(_PictureCollageItem.default,{key:item.id,data:item,user:props.user,reactions:props.reactions,noPopup:props.noPopup,onActivityUpdate:props.onActivityUpdate});}));}

},{"./PictureCollageItem":227,"react":380}],229:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PictureItem;var _react=_interopRequireWildcard(require("react"));var _ActivityMediaPopup=_interopRequireDefault(require("../activity/activity-popup/ActivityMediaPopup"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function PictureItem(props){var activityMediaPopupTriggerRef=(0,_react.useRef)(null);return/*#__PURE__*/_react.default.createElement("div",{className:"picture-item-wrap"},/*#__PURE__*/_react.default.createElement("div",{ref:activityMediaPopupTriggerRef,className:"picture-item"},/*#__PURE__*/_react.default.createElement("div",{className:"picture round",style:{background:"url('".concat(props.data.media.link,"') center center / cover no-repeat")}}),props.moreItems&&/*#__PURE__*/_react.default.createElement("a",{className:"picture-item-overlay round",href:props.user.media_link},/*#__PURE__*/_react.default.createElement("p",{className:"picture-item-overlay-text"},"+"))),!props.noPopup&&/*#__PURE__*/_react.default.createElement("div",null,/*#__PURE__*/_react.default.createElement(_ActivityMediaPopup.default,{data:props.data,user:props.loggedUser,reactions:props.reactions,activityMediaPopupTriggerRef:activityMediaPopupTriggerRef,onActivityUpdate:props.onActivityUpdate})));}

},{"../activity/activity-popup/ActivityMediaPopup":44,"react":380}],230:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PictureItemList;var _react=_interopRequireWildcard(require("react"));var _PictureItem=_interopRequireDefault(require("./PictureItem"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function PictureItemList(props){var displayMax=(0,_react.useRef)(props.displayMax?props.displayMax:12);var pictures=[],totalCount=props.data.length,showMore=displayMax.current===props.data.length,pictureCount=showMore?totalCount-1:totalCount;for(var i=0;i<pictureCount;i++){var picture=props.data[i];pictures.push(/*#__PURE__*/_react.default.createElement(_PictureItem.default,{key:picture.id,data:picture,loggedUser:props.loggedUser,reactions:props.reactions,onActivityUpdate:props.onActivityUpdate}));}return/*#__PURE__*/_react.default.createElement("div",{className:"picture-item-list ".concat(props.modifiers||'')},pictures,showMore&&/*#__PURE__*/_react.default.createElement(_PictureItem.default,{data:props.data[pictureCount],user:props.user,moreItems:true,noPopup:true}));}

},{"./PictureItem":229,"react":380}],231:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=OpenPostFooter;var _react=_interopRequireWildcard(require("react"));var _PostFooter=_interopRequireDefault(require("./PostFooter"));var _PostCommentList=_interopRequireDefault(require("../comment/PostCommentList"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var postRouter=_interopRequireWildcard(require("../../router/post/post-router"));var reactionRouter=_interopRequireWildcard(require("../../router/reaction/reaction-router"));var _reaction=require("../utils/reaction");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function OpenPostFooter(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),post=_useState2[0],setPost=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),loggedUser=_useState4[0],setLoggedUser=_useState4[1];var _useState5=(0,_react.useState)([]),_useState6=_slicedToArray(_useState5,2),reactions=_useState6[0],setReactions=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),loading=_useState8[0],setLoading=_useState8[1];var postType=props.postType?props.postType:'post';(0,_react.useEffect)(function(){setLoading(true);var getPosts=postRouter.getPosts;var getPostsArgs={include:[props.postID]};if(postType==='page'){getPosts=postRouter.getPages;}// get posts promise
var getPostsPromise=getPosts(getPostsArgs),getLoggedInMemberPromise=userRouter.getLoggedInMember('user-activity');var getReactionsPromise={no_result:true};if(vikinger_constants.plugin_active.vkreact){getReactionsPromise=reactionRouter.getReactions();}jQuery.when(getPostsPromise,getLoggedInMemberPromise,getReactionsPromise).done(function(getPostsResponse,getLoggedInMemberResponse,getReactionsResponse){// console.log('OPEN POST FOOTER - POST DATA: ', getPostsResponse);
// console.log('OPEN POST FOOTER - LOGGED IN USER: ', getLoggedInMemberResponse);
// console.log('OPEN POST FOOTER - REACTIONS: ', getReactionsResponse);
var postResponse=getPostsResponse[0],loggedUserResponse=getLoggedInMemberResponse[0];var reactions=[];if(vikinger_constants.plugin_active.vkreact){reactions=getReactionsResponse[0];}setPost(postResponse[0]);setLoggedUser(loggedUserResponse);setReactions(reactions);setLoading(false);});},[]);var onPostUpdate=function onPostUpdate(newPostData){// console.log('OPEN POST FOOTER - ON POST UPDATE - NEW POST DATA: ', newPostData);
setPost(newPostData);};var postReactionableProps={entityData:{post_id:props.postID},user:loggedUser,reactions:reactions,reactionData:post?post.reactions:[],onUserReactionUpdate:function onUserReactionUpdate(newReactionData){var newPostData=(0,_reaction.updatePostReactions)(post,newReactionData);onPostUpdate(newPostData);}};var postReactionable=(0,_reaction.PostReactionable)(postReactionableProps);return/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,loading&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),!loading&&/*#__PURE__*/_react.default.createElement(_PostFooter.default,{commentCount:post?post.comment_count:0,shareType:"post",shareData:loggedUser&&postType!=='page'?post:false,shareCount:post&&postType!=='page'?post.share_count:false,user:loggedUser,reactions:reactions,reactionData:post?post.reactions:[],userReaction:postReactionable.getUserReaction(),createUserReaction:postReactionable.createUserReaction,deleteUserReaction:postReactionable.deleteUserReaction,disableActions:post.comment_status!=='open',postType:"post"},function(updateCommentCount){return/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!post.password_required&&/*#__PURE__*/_react.default.createElement(_PostCommentList.default,{postID:props.postID,commentCount:post?post.comment_count:0,updateCommentCount:updateCommentCount,perPage:2,order:props.order,user:loggedUser,reactions:reactions,formPosition:"bottom",disableComments:post.comment_status!=='open'}));}));}

},{"../../router/post/post-router":351,"../../router/reaction/reaction-router":352,"../../router/user/user-router":353,"../comment/PostCommentList":125,"../loader/Loader":203,"../utils/reaction":315,"./PostFooter":232,"react":380}],232:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostFooter;var _react=_interopRequireWildcard(require("react"));var _ContentActions=_interopRequireDefault(require("../content-actions/ContentActions"));var _PostShareOption=_interopRequireDefault(require("./PostShareOption"));var _ReactionOptionPost=_interopRequireDefault(require("../reaction/reaction-option/reaction-option-post/ReactionOptionPost"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var activityRouter=_interopRequireWildcard(require("../../router/activity/activity-router"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function PostFooter(props){var _useState=(0,_react.useState)(props.commentCount),_useState2=_slicedToArray(_useState,2),commentCount=_useState2[0],setCommentCount=_useState2[1];var _useState3=(0,_react.useState)(props.shareCount),_useState4=_slicedToArray(_useState3,2),shareCount=_useState4[0],setShareCount=_useState4[1];var onShare=function onShare(data,callback){// console.log('POST FOOTER - SHARE DATA: ', data);
var itemID=Number.parseInt(data.postIn,10);// post public by default
var hideSitewide=false;// if posting to a group, get group privacy to set hideSitewide
if(itemID!==0){var _iterator=_createForOfIteratorHelper(props.user.groups),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var group=_step.value;// user is a member of the group
if(group.id===itemID){// hide sitewide if not public group
hideSitewide=group.status!=='public';break;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}var activityData={creation_config:{item_id:itemID,secondary_item_id:props.shareData.id,component:itemID===0?'activity':'groups',type:"".concat(props.shareType,"_share"),content:data.text.trim(),hide_sitewide:hideSitewide},share_config:{id:props.shareData.id,type:props.shareType,count:shareCount+1}};// console.log('POST FOOTER - SHARE: ', activityData);
activityRouter.createActivity(activityData,function(response){// activity created successfully
if(response){// update feed to show shared activity dynamically on share
if(props.onShare){props.onShare(response,itemID,callback);}else{callback(response);}// increment share count
setShareCount(function(previousShareCount){return previousShareCount+1;});}else{callback(response);}});};var updateCommentCount=function updateCommentCount(value){setCommentCount(function(previousCommentCount){return previousCommentCount+value;});};return/*#__PURE__*/_react.default.createElement("div",{className:"post-footer"},/*#__PURE__*/_react.default.createElement(_ContentActions.default,{commentCount:commentCount,shareData:props.shareData,shareCount:shareCount,reactionData:props.reactionData}),!props.disableActions&&props.user&&/*#__PURE__*/_react.default.createElement("div",{className:"post-options"},(props.postType==='post'&&vikinger_constants.plugin_active.vkreact||props.postType==='activity'&&vikinger_constants.plugin_active.vkreact&&vikinger_constants.plugin_active['vkreact-buddypress'])&&/*#__PURE__*/_react.default.createElement(_ReactionOptionPost.default,{reactions:props.reactions,userReaction:props.userReaction,createUserReaction:props.createUserReaction,deleteUserReaction:props.deleteUserReaction,simpleOptions:props.simpleOptions}),/*#__PURE__*/_react.default.createElement("div",{className:"post-option active ".concat(props.simpleOptions?'no-text':'')},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"comment",modifiers:"post-option-icon"}),!props.simpleOptions&&/*#__PURE__*/_react.default.createElement("p",{className:"post-option-text"},vikinger_translation.comment_action)),_membership.activityPermissions.createActivity&&props.shareData&&vikinger_constants.plugin_active.buddypress&&/*#__PURE__*/_react.default.createElement(_PostShareOption.default,{user:props.user,shareData:props.shareData,onShare:onShare,onPlay:props.onPlay,postType:props.postType})),props.children(updateCommentCount));}

},{"../../router/activity/activity-router":341,"../content-actions/ContentActions":130,"../icon/IconSVG":201,"../reaction/reaction-option/reaction-option-post/ReactionOptionPost":254,"../utils/membership":312,"./PostShareOption":233,"react":380}],233:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostShareOption;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _ActivityForm=_interopRequireDefault(require("../activity/activity-form/ActivityForm"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function PostShareOption(props){var shareBoxRef=(0,_react.useRef)(null);var shareBoxTriggerRef=(0,_react.useRef)(null);var popup=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){popup.current=(0,_plugins.createPopup)({triggerElement:shareBoxTriggerRef.current,premadeContentElement:shareBoxRef.current,type:'premade',popupSelectors:['share-box-popup','animate-slide-down'],onOverlayCreate:function onOverlayCreate(overlay){overlay.setAttribute('data-simplebar','');}});},[]);(0,_react.useEffect)(function(){if(props.postType==='activity'&&vikinger_constants.settings.newsfeed_yt_playback_limit==='yes'){shareBoxTriggerRef.current.addEventListener('mousedown',props.onPlay);}return function(){if(props.postType==='activity'&&vikinger_constants.settings.newsfeed_yt_playback_limit==='yes'){shareBoxTriggerRef.current.removeEventListener('mousedown',props.onPlay);}};});return/*#__PURE__*/_react.default.createElement("div",{className:"post-option-wrap"},/*#__PURE__*/_react.default.createElement("div",{ref:shareBoxTriggerRef,className:"post-option"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"share",modifiers:"post-option-icon"}),/*#__PURE__*/_react.default.createElement("p",{className:"post-option-text"},vikinger_translation.share_action)),/*#__PURE__*/_react.default.createElement(_ActivityForm.default,{forwardedRef:shareBoxRef,user:props.user,onSubmit:props.onShare,shareData:props.shareData,popup:popup}));}

},{"../../utils/plugins":356,"../activity/activity-form/ActivityForm":34,"../icon/IconSVG":201,"react":380}],234:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostPreview;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../../icon/IconSVG"));var _ContentActions=_interopRequireDefault(require("../../content-actions/ContentActions"));var _MemberOnlyContentPreview=_interopRequireDefault(require("../../membership/MemberOnlyContentPreview"));var _core=require("../../../utils/core");var _post=_interopRequireDefault(require("../../utils/post"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PostPreview(props){var titleWordLimit=75;var excerptWordLimit=220;var coverStyle=props.data.cover_url?{background:"url(".concat(props.data.cover_url,") center center / cover no-repeat")}:{};var categories=props.data.categories.slice(0,3);var postFormatIcon=_post.default.getPostFormatIcon(props.data.format);return/*#__PURE__*/_react.default.createElement("div",{className:"post-preview ".concat(!props.data.cover_url?'post-preview-no-cover':'')},props.data.cover_url&&/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image",style:coverStyle})),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info fixed-height"},!props.data.cover_url&&/*#__PURE__*/_react.default.createElement("div",{className:"post-format-tag"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{modifiers:"post-format-tag-icon",icon:postFormatIcon})),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-top"},/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-timestamp"},categories.map(function(category){return/*#__PURE__*/_react.default.createElement("span",{key:category.id},/*#__PURE__*/_react.default.createElement("a",{href:category.link},category.name)," - ");}),props.data.timestamp),/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink,dangerouslySetInnerHTML:{__html:(0,_core.truncateText)(props.data.title,titleWordLimit)}}))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-bottom"},!props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-text",dangerouslySetInnerHTML:{__html:(0,_core.truncateText)(props.data.excerpt,excerptWordLimit)}}),props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement(_MemberOnlyContentPreview.default,{modifiers:"post-preview-text"}),/*#__PURE__*/_react.default.createElement("a",{className:"post-preview-link",href:props.data.permalink},vikinger_translation.read_more))),!props.sharePopupActivity&&/*#__PURE__*/_react.default.createElement(_ContentActions.default,{reactionData:props.data.reactions,link:props.data.permalink,commentCount:props.data.comment_count,shareCount:props.data.share_count}));}

},{"../../../utils/core":355,"../../content-actions/ContentActions":130,"../../icon/IconSVG":201,"../../membership/MemberOnlyContentPreview":213,"../../utils/post":314,"react":380}],235:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostPreviewBig;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../../icon/IconSVG"));var _ContentActions=_interopRequireDefault(require("../../content-actions/ContentActions"));var _TagList=_interopRequireDefault(require("../../tag/TagList"));var _MemberOnlyContentPreview=_interopRequireDefault(require("../../membership/MemberOnlyContentPreview"));var _core=require("../../../utils/core");var _post=_interopRequireDefault(require("../../utils/post"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PostPreviewBig(props){var titleWordLimit=70;var excerptWordLimit=400;var coverStyle=props.data.cover_url?{background:"url(".concat(props.data.cover_url,") center center / cover no-repeat")}:{};var categories=props.data.categories.slice(0,3);var postFormatIcon=_post.default.getPostFormatIcon(props.data.format);return/*#__PURE__*/_react.default.createElement("div",{className:"post-preview medium post-preview-normal ".concat(!props.data.cover_url?'post-preview-no-cover':'')},props.data.cover_url&&/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image",style:coverStyle})),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info fixed-height"},!props.data.cover_url&&/*#__PURE__*/_react.default.createElement("div",{className:"post-format-tag"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{modifiers:"post-format-tag-icon",icon:postFormatIcon})),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-top"},/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-timestamp"},categories.map(function(category){return/*#__PURE__*/_react.default.createElement("span",{key:category.id},/*#__PURE__*/_react.default.createElement("a",{href:category.link},category.name)," - ");}),props.data.timestamp),/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-title medium"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink,dangerouslySetInnerHTML:{__html:(0,_core.truncateText)(props.data.title,titleWordLimit)}}))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-bottom"},!props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-text",dangerouslySetInnerHTML:{__html:(0,_core.truncateText)(props.data.excerpt,excerptWordLimit)}}),props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement(_MemberOnlyContentPreview.default,{modifiers:"post-preview-text"}),/*#__PURE__*/_react.default.createElement("a",{className:"post-preview-link",href:props.data.permalink},vikinger_translation.read_more))),/*#__PURE__*/_react.default.createElement(_TagList.default,{tags:props.data.tags}),/*#__PURE__*/_react.default.createElement(_ContentActions.default,{reactionData:props.data.reactions,link:props.data.permalink,commentCount:props.data.comment_count,shareCount:props.data.share_count}));}

},{"../../../utils/core":355,"../../content-actions/ContentActions":130,"../../icon/IconSVG":201,"../../membership/MemberOnlyContentPreview":213,"../../tag/TagList":275,"../../utils/post":314,"react":380}],236:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostPreviewSmall;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../../icon/IconSVG"));var _ContentActions=_interopRequireDefault(require("../../content-actions/ContentActions"));var _core=require("../../../utils/core");var _post=_interopRequireDefault(require("../../utils/post"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function PostPreviewSmall(props){var titleWordLimit=75;var coverStyle=props.data.cover_url?{background:"url(".concat(props.data.cover_url,") center center / cover no-repeat")}:{};var categories=props.data.categories.slice(0,3);var postFormatIcon=_post.default.getPostFormatIcon(props.data.format);return/*#__PURE__*/_react.default.createElement("div",{className:"post-preview small ".concat(!props.data.cover_url?'post-preview-no-cover':'')},props.data.cover_url&&/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image",style:coverStyle})),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info"},!props.data.cover_url&&/*#__PURE__*/_react.default.createElement("div",{className:"post-format-tag"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{modifiers:"post-format-tag-icon",icon:postFormatIcon})),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-top"},/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-timestamp"},categories.map(function(category){return/*#__PURE__*/_react.default.createElement("span",{key:category.id},/*#__PURE__*/_react.default.createElement("a",{href:category.link},category.name)," - ");}),props.data.timestamp),/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink,dangerouslySetInnerHTML:{__html:(0,_core.truncateText)(props.data.title,titleWordLimit)}})))),/*#__PURE__*/_react.default.createElement(_ContentActions.default,{reactionData:props.data.reactions,link:props.data.permalink,commentCount:props.data.comment_count,shareCount:props.data.share_count}));}

},{"../../../utils/core":355,"../../content-actions/ContentActions":130,"../../icon/IconSVG":201,"../../utils/post":314,"react":380}],237:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostPreviewGallery;var _react=_interopRequireWildcard(require("react"));var _ContentActions=_interopRequireDefault(require("../../../content-actions/ContentActions"));var _MemberOnlyContentPreview=_interopRequireDefault(require("../../../membership/MemberOnlyContentPreview"));var _IconSVG=_interopRequireDefault(require("../../../icon/IconSVG"));var _core=require("../../../../utils/core");var _plugins=require("../../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function PostPreviewGallery(props){var titleWordLimit=75;var excerptWordLimit=220;var categories=props.data.categories.slice(0,3);var galleryPopupRef=(0,_react.useRef)(null);var gallerySliderRef=(0,_react.useRef)(null);var gallerySlider=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(!props.sharePopupActivity){(0,_plugins.createPopup)({triggerElement:galleryPopupRef.current,type:'gallery'});gallerySlider.current=(0,_plugins.createSlider)(gallerySliderRef.current,{navigation:{prevEl:'.slider-control.left',nextEl:'.slider-control.right'},loop:true,effect:'fade',speed:800,fadeEffect:{crossFade:true},autoplay:{delay:5000}});}return function(){if(gallerySlider.current){// Destroy slider instance and detach all events listeners
gallerySlider.current.destroy();}};},[]);var galleryData=[];var _iterator=_createForOfIteratorHelper(props.data.gallery),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var image=_step.value;galleryData.push(image.url);}}catch(err){_iterator.e(err);}finally{_iterator.f();}return/*#__PURE__*/_react.default.createElement("div",{className:"post-preview post-preview-type-gallery"},!props.sharePopupActivity&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{ref:galleryPopupRef,className:"gallery-popup-button","data-gallery":JSON.stringify(galleryData)},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"gallery"})),/*#__PURE__*/_react.default.createElement("div",{ref:gallerySliderRef,className:"post-preview-gallery swiper-container"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-gallery-slider swiper-wrapper"},props.data.gallery.map(function(galleryItem){return/*#__PURE__*/_react.default.createElement("div",{key:galleryItem.id,className:"post-preview-gallery-slider-item swiper-slide",style:{background:"url(".concat(galleryItem.url,") center center / cover no-repeat")}});})),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-gallery-controls"},/*#__PURE__*/_react.default.createElement("div",{className:"slider-control medium solid left"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})),/*#__PURE__*/_react.default.createElement("div",{className:"slider-control medium solid right"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"}))))),props.sharePopupActivity&&/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-gallery"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-gallery-slider"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-gallery-slider-item",style:{background:"url(".concat(props.data.gallery[0].url,") center center / cover no-repeat")}}))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info fixed-height"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-top"},/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-timestamp"},categories.map(function(category){return/*#__PURE__*/_react.default.createElement("span",{key:category.id},/*#__PURE__*/_react.default.createElement("a",{href:category.link},category.name)," - ");}),props.data.timestamp),/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink},(0,_core.truncateText)(props.data.title,titleWordLimit)))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-bottom"},!props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-text",dangerouslySetInnerHTML:{__html:(0,_core.truncateText)(props.data.excerpt,excerptWordLimit)}}),props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement(_MemberOnlyContentPreview.default,{modifiers:"post-preview-text"}),/*#__PURE__*/_react.default.createElement("a",{className:"post-preview-link",href:props.data.permalink},vikinger_translation.read_more))),!props.sharePopupActivity&&/*#__PURE__*/_react.default.createElement(_ContentActions.default,{reactionData:props.data.reactions,link:props.data.permalink,commentCount:props.data.comment_count,shareCount:props.data.share_count}));}

},{"../../../../utils/core":355,"../../../../utils/plugins":356,"../../../content-actions/ContentActions":130,"../../../icon/IconSVG":201,"../../../membership/MemberOnlyContentPreview":213,"react":380}],238:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostPreviewGalleryBig;var _react=_interopRequireWildcard(require("react"));var _ContentActions=_interopRequireDefault(require("../../../content-actions/ContentActions"));var _TagList=_interopRequireDefault(require("../../../tag/TagList"));var _MemberOnlyContentPreview=_interopRequireDefault(require("../../../membership/MemberOnlyContentPreview"));var _IconSVG=_interopRequireDefault(require("../../../icon/IconSVG"));var _core=require("../../../../utils/core");var _plugins=require("../../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function PostPreviewGalleryBig(props){var titleWordLimit=70;var excerptWordLimit=400;var categories=props.data.categories.slice(0,3);var galleryPopupRef=(0,_react.useRef)(null);var gallerySliderRef=(0,_react.useRef)(null);var gallerySlider=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createPopup)({triggerElement:galleryPopupRef.current,type:'gallery'});gallerySlider.current=(0,_plugins.createSlider)(gallerySliderRef.current,{navigation:{prevEl:'.slider-control.left',nextEl:'.slider-control.right'},loop:true,effect:'fade',speed:800,fadeEffect:{crossFade:true},autoplay:{delay:5000}});return function(){if(gallerySlider.current){// Destroy slider instance and detach all events listeners
gallerySlider.current.destroy();}};},[]);var galleryData=[];var _iterator=_createForOfIteratorHelper(props.data.gallery),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var image=_step.value;galleryData.push(image.url);}}catch(err){_iterator.e(err);}finally{_iterator.f();}return/*#__PURE__*/_react.default.createElement("div",{className:"post-preview medium post-preview-normal post-preview-type-gallery"},/*#__PURE__*/_react.default.createElement("div",{ref:galleryPopupRef,className:"gallery-popup-button","data-gallery":JSON.stringify(galleryData)},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"gallery"})),/*#__PURE__*/_react.default.createElement("div",{ref:gallerySliderRef,className:"post-preview-gallery swiper-container"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-gallery-slider swiper-wrapper"},props.data.gallery.map(function(galleryItem){return/*#__PURE__*/_react.default.createElement("div",{key:galleryItem.id,className:"post-preview-gallery-slider-item swiper-slide",style:{background:"url(".concat(galleryItem.url,") center center / cover no-repeat")}});})),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-gallery-controls"},/*#__PURE__*/_react.default.createElement("div",{className:"slider-control medium solid left"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})),/*#__PURE__*/_react.default.createElement("div",{className:"slider-control medium solid right"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info fixed-height"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-top"},/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-timestamp"},categories.map(function(category){return/*#__PURE__*/_react.default.createElement("span",{key:category.id},/*#__PURE__*/_react.default.createElement("a",{href:category.link},category.name)," - ");}),props.data.timestamp),/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-title medium"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink},(0,_core.truncateText)(props.data.title,titleWordLimit)))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-bottom"},!props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-text",dangerouslySetInnerHTML:{__html:(0,_core.truncateText)(props.data.excerpt,excerptWordLimit)}}),props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement(_MemberOnlyContentPreview.default,{modifiers:"post-preview-text"}),/*#__PURE__*/_react.default.createElement("a",{className:"post-preview-link",href:props.data.permalink},vikinger_translation.read_more))),/*#__PURE__*/_react.default.createElement(_TagList.default,{tags:props.data.tags}),/*#__PURE__*/_react.default.createElement(_ContentActions.default,{reactionData:props.data.reactions,link:props.data.permalink,commentCount:props.data.comment_count,shareCount:props.data.share_count}));}

},{"../../../../utils/core":355,"../../../../utils/plugins":356,"../../../content-actions/ContentActions":130,"../../../icon/IconSVG":201,"../../../membership/MemberOnlyContentPreview":213,"../../../tag/TagList":275,"react":380}],239:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostPreviewGallerySmall;var _react=_interopRequireWildcard(require("react"));var _ContentActions=_interopRequireDefault(require("../../../content-actions/ContentActions"));var _IconSVG=_interopRequireDefault(require("../../../icon/IconSVG"));var _core=require("../../../../utils/core");var _plugins=require("../../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function PostPreviewGallerySmall(props){var titleWordLimit=75;var categories=props.data.categories.slice(0,3);var galleryPopupRef=(0,_react.useRef)(null);var gallerySliderRef=(0,_react.useRef)(null);var galleryControlPrevRef=(0,_react.useRef)(null);var galleryControlNextRef=(0,_react.useRef)(null);var gallerySlider=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createPopup)({triggerElement:galleryPopupRef.current,type:'gallery'});gallerySlider.current=(0,_plugins.createSlider)(gallerySliderRef.current,{navigation:{prevEl:galleryControlPrevRef.current,nextEl:galleryControlNextRef.current},loop:true,effect:'fade',speed:800,fadeEffect:{crossFade:true},autoplay:{delay:5000}});return function(){if(gallerySlider.current){// Destroy slider instance and detach all events listeners
gallerySlider.current.destroy();}};},[]);var galleryData=[];var _iterator=_createForOfIteratorHelper(props.data.gallery),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var image=_step.value;galleryData.push(image.url);}}catch(err){_iterator.e(err);}finally{_iterator.f();}return/*#__PURE__*/_react.default.createElement("div",{className:"post-preview small"},/*#__PURE__*/_react.default.createElement("div",{ref:galleryPopupRef,className:"gallery-popup-button","data-gallery":JSON.stringify(galleryData)},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"gallery"})),/*#__PURE__*/_react.default.createElement("div",{ref:gallerySliderRef,className:"post-preview-gallery swiper-container"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-gallery-slider swiper-wrapper"},props.data.gallery.map(function(galleryItem){return/*#__PURE__*/_react.default.createElement("div",{key:galleryItem.id,className:"post-preview-gallery-slider-item swiper-slide",style:{background:"url(".concat(galleryItem.url,") center center / cover no-repeat")}});}))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-gallery-controls"},/*#__PURE__*/_react.default.createElement("div",{ref:galleryControlPrevRef,className:"slider-control medium solid left"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"})),/*#__PURE__*/_react.default.createElement("div",{ref:galleryControlNextRef,className:"slider-control medium solid right"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"small-arrow",modifiers:"slider-control-icon"}))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-top"},/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-timestamp"},categories.map(function(category){return/*#__PURE__*/_react.default.createElement("span",{key:category.id},/*#__PURE__*/_react.default.createElement("a",{href:category.link},category.name)," - ");}),props.data.timestamp),/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink},(0,_core.truncateText)(props.data.title,titleWordLimit))))),/*#__PURE__*/_react.default.createElement(_ContentActions.default,{reactionData:props.data.reactions,link:props.data.permalink,commentCount:props.data.comment_count,shareCount:props.data.share_count}));}

},{"../../../../utils/core":355,"../../../../utils/plugins":356,"../../../content-actions/ContentActions":130,"../../../icon/IconSVG":201,"react":380}],240:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostPreviewIframe;var _react=_interopRequireWildcard(require("react"));var _ContentActions=_interopRequireDefault(require("../../../content-actions/ContentActions"));var _MemberOnlyContentPreview=_interopRequireDefault(require("../../../membership/MemberOnlyContentPreview"));var _IconSVG=_interopRequireDefault(require("../../../icon/IconSVG"));var _core=require("../../../../utils/core");var _plugins=require("../../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function PostPreviewIframe(props){var titleWordLimit=75;var excerptWordLimit=220;var coverStyle=props.data.cover_url?{background:"url(".concat(props.data.cover_url,") center center / cover no-repeat")}:{};var categories=props.data.categories.slice(0,3);var iframePopupRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(!props.sharePopupActivity){(0,_plugins.createPopup)({triggerElement:iframePopupRef.current,type:'iframe'});}},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"post-preview post-preview-type-iframe"},/*#__PURE__*/_react.default.createElement("a",{ref:iframePopupRef,"data-iframe-url":props.data.format==='video'?props.data.video_url:props.data.audio_url},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image",style:coverStyle},props.data.format==='video'&&/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image-action play-button medium"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"play",modifiers:"play-button-icon medium"})),props.data.format==='audio'&&/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image-action play-button medium centered"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"speaker",modifiers:"play-button-icon"})))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info fixed-height"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-top"},/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-timestamp"},categories.map(function(category){return/*#__PURE__*/_react.default.createElement("span",{key:category.id},/*#__PURE__*/_react.default.createElement("a",{href:category.link},category.name)," - ");}),props.data.timestamp),/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink},(0,_core.truncateText)(props.data.title,titleWordLimit)))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-bottom"},!props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-text",dangerouslySetInnerHTML:{__html:(0,_core.truncateText)(props.data.excerpt,excerptWordLimit)}}),props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement(_MemberOnlyContentPreview.default,{modifiers:"post-preview-text"}),/*#__PURE__*/_react.default.createElement("a",{className:"post-preview-link",href:props.data.permalink},vikinger_translation.read_more))),!props.sharePopupActivity&&/*#__PURE__*/_react.default.createElement(_ContentActions.default,{reactionData:props.data.reactions,link:props.data.permalink,commentCount:props.data.comment_count,shareCount:props.data.share_count}));}

},{"../../../../utils/core":355,"../../../../utils/plugins":356,"../../../content-actions/ContentActions":130,"../../../icon/IconSVG":201,"../../../membership/MemberOnlyContentPreview":213,"react":380}],241:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostPreviewIframeBig;var _react=_interopRequireWildcard(require("react"));var _ContentActions=_interopRequireDefault(require("../../../content-actions/ContentActions"));var _TagList=_interopRequireDefault(require("../../../tag/TagList"));var _MemberOnlyContentPreview=_interopRequireDefault(require("../../../membership/MemberOnlyContentPreview"));var _IconSVG=_interopRequireDefault(require("../../../icon/IconSVG"));var _core=require("../../../../utils/core");var _plugins=require("../../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function PostPreviewIframeBig(props){var titleWordLimit=70;var excerptWordLimit=400;var coverStyle=props.data.cover_url?{background:"url(".concat(props.data.cover_url,") center center / cover no-repeat")}:{};var categories=props.data.categories.slice(0,3);var iframePopupRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createPopup)({triggerElement:iframePopupRef.current,type:'iframe'});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"post-preview medium post-preview-normal post-preview-type-iframe"},/*#__PURE__*/_react.default.createElement("a",{ref:iframePopupRef,"data-iframe-url":props.data.format==='video'?props.data.video_url:props.data.audio_url},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image",style:coverStyle},props.data.format==='video'&&/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image-action play-button medium"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"play",modifiers:"play-button-icon medium"})),props.data.format==='audio'&&/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image-action play-button medium centered"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"speaker",modifiers:"play-button-icon"})))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info fixed-height"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-top"},/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-timestamp"},categories.map(function(category){return/*#__PURE__*/_react.default.createElement("span",{key:category.id},/*#__PURE__*/_react.default.createElement("a",{href:category.link},category.name)," - ");}),props.data.timestamp),/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-title medium"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink},(0,_core.truncateText)(props.data.title,titleWordLimit)))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-bottom"},!props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-text",dangerouslySetInnerHTML:{__html:(0,_core.truncateText)(props.data.excerpt,excerptWordLimit)}}),props.hidePostExcerpt&&/*#__PURE__*/_react.default.createElement(_MemberOnlyContentPreview.default,{modifiers:"post-preview-text"}),/*#__PURE__*/_react.default.createElement("a",{className:"post-preview-link",href:props.data.permalink},vikinger_translation.read_more))),/*#__PURE__*/_react.default.createElement(_TagList.default,{tags:props.data.tags}),/*#__PURE__*/_react.default.createElement(_ContentActions.default,{reactionData:props.data.reactions,link:props.data.permalink,commentCount:props.data.comment_count,shareCount:props.data.share_count}));}

},{"../../../../utils/core":355,"../../../../utils/plugins":356,"../../../content-actions/ContentActions":130,"../../../icon/IconSVG":201,"../../../membership/MemberOnlyContentPreview":213,"../../../tag/TagList":275,"react":380}],242:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PostPreviewIframeSmall;var _react=_interopRequireWildcard(require("react"));var _ContentActions=_interopRequireDefault(require("../../../content-actions/ContentActions"));var _IconSVG=_interopRequireDefault(require("../../../icon/IconSVG"));var _core=require("../../../../utils/core");var _plugins=require("../../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function PostPreviewIframeSmall(props){var titleWordLimit=75;var coverStyle=props.data.cover_url?{background:"url(".concat(props.data.cover_url,") center center / cover no-repeat")}:{};var categories=props.data.categories.slice(0,3);var iframePopupRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createPopup)({triggerElement:iframePopupRef.current,type:'iframe'});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"post-preview small post-preview-type-iframe"},/*#__PURE__*/_react.default.createElement("a",{ref:iframePopupRef,"data-iframe-url":props.data.format==='video'?props.data.video_url:props.data.audio_url},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image",style:coverStyle},props.data.format==='video'&&/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image-action play-button medium"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"play",modifiers:"play-button-icon medium"})),props.data.format==='audio'&&/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-image-action play-button medium centered"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"speaker",modifiers:"play-button-icon"})))),/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info"},/*#__PURE__*/_react.default.createElement("div",{className:"post-preview-info-top"},/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-timestamp"},categories.map(function(category){return/*#__PURE__*/_react.default.createElement("span",{key:category.id},/*#__PURE__*/_react.default.createElement("a",{href:category.link},category.name)," - ");}),props.data.timestamp),/*#__PURE__*/_react.default.createElement("p",{className:"post-preview-title"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.permalink},(0,_core.truncateText)(props.data.title,titleWordLimit))))),/*#__PURE__*/_react.default.createElement(_ContentActions.default,{reactionData:props.data.reactions,link:props.data.permalink,commentCount:props.data.comment_count,shareCount:props.data.share_count}));}

},{"../../../../utils/core":355,"../../../../utils/plugins":356,"../../../content-actions/ContentActions":130,"../../../icon/IconSVG":201,"react":380}],243:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupHeaderActions;var _react=_interopRequireWildcard(require("react"));var _TagSticker=_interopRequireDefault(require("../tag/TagSticker"));var _JoinGroupButton=_interopRequireDefault(require("../button/action-button/action-button-group/JoinGroupButton"));var _LeaveGroupButton=_interopRequireDefault(require("../button/action-button/action-button-group/LeaveGroupButton"));var _RequestGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/RequestGroupMembershipButton"));var _RemoveGroupMembershipButton=_interopRequireDefault(require("../button/action-button/action-button-group/RemoveGroupMembershipButton"));var _ButtonLink=_interopRequireDefault(require("../button/ButtonLink"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var groupRouter=_interopRequireWildcard(require("../../router/group/group-router"));var _group=_interopRequireDefault(require("../utils/group"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function GroupHeaderActions(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),group=_useState4[0],setGroup=_useState4[1];var getLoggedInMember=function getLoggedInMember(){var callback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(){};userRouter.getLoggedInMember('user-groups').done(function(response){// console.log('GROUP HEADER ACTIONS - GET LOGGED USER RESPONSE: ', response);
setLoggedUser(response);callback();});};var getGroup=function getGroup(){groupRouter.getGroups({include:[props.groupID]}).done(function(response){// console.log('GROUP HEADER ACTIONS - GET GROUP RESPONSE: ', response);
setGroup(response[0]);});};var reloadWindow=function reloadWindow(){window.location.reload();};(0,_react.useEffect)(function(){getLoggedInMember();getGroup();},[]);var groupable=(0,_group.default)(loggedUser,group);return/*#__PURE__*/_react.default.createElement("div",{className:"profile-header-info-actions"},loggedUser&&group&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,groupable.isBannedFromGroup()&&/*#__PURE__*/_react.default.createElement(_TagSticker.default,{modifiers:"button-tag tertiary",title:"Banned",icon:"ban",iconModifiers:"white"}),!groupable.isBannedFromGroup()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,_membership.groupPermissions.joinGroup&&groupable.isGroupPublic()&&!groupable.isGroupMember()&&/*#__PURE__*/_react.default.createElement(_JoinGroupButton.default,{modifiers:"profile-header-info-action secondary",title:vikinger_translation.join_group,icon:"join-group",loggedUser:loggedUser,group:group,onActionComplete:reloadWindow}),groupable.isGroupMember()&&!groupable.isGroupAdmin()&&/*#__PURE__*/_react.default.createElement(_LeaveGroupButton.default,{modifiers:"profile-header-info-action tertiary",title:vikinger_translation.leave_group,icon:"leave-group",loggedUser:loggedUser,group:group,onActionComplete:reloadWindow}),_membership.groupPermissions.joinGroup&&groupable.isGroupPrivate()&&!groupable.isGroupMember()&&!groupable.groupMembershipRequestSent()&&/*#__PURE__*/_react.default.createElement(_RequestGroupMembershipButton.default,{modifiers:"profile-header-info-action secondary",title:vikinger_translation.send_join_request,icon:"join-group",loggedUser:loggedUser,group:group,onActionComplete:getLoggedInMember}),groupable.isGroupPrivate()&&!groupable.isGroupMember()&&groupable.groupMembershipRequestSent()&&/*#__PURE__*/_react.default.createElement(_RemoveGroupMembershipButton.default,{modifiers:"profile-header-info-action tertiary",title:vikinger_translation.cancel_join_request,icon:"leave-group",loggedUser:loggedUser,group:group,onActionComplete:getLoggedInMember}),(groupable.isGroupAdmin()||groupable.isGroupMod())&&/*#__PURE__*/_react.default.createElement(_ButtonLink.default,{link:loggedUser.manage_groups_link,modifiers:"profile-header-info-action",icon:"more-dots",title:vikinger_translation.manage_groups}))));}

},{"../../router/group/group-router":347,"../../router/user/user-router":353,"../button/ButtonLink":84,"../button/action-button/action-button-group/JoinGroupButton":95,"../button/action-button/action-button-group/LeaveGroupButton":96,"../button/action-button/action-button-group/RemoveGroupMembershipButton":99,"../button/action-button/action-button-group/RequestGroupMembershipButton":100,"../tag/TagSticker":276,"../utils/group":311,"../utils/membership":312,"react":380}],244:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ProfileHeaderActions;var _react=_interopRequireWildcard(require("react"));var _AddFriendButton=_interopRequireDefault(require("../button/action-button/action-button-friend/AddFriendButton"));var _AcceptFriendRequestButton=_interopRequireDefault(require("../button/action-button/action-button-friend/AcceptFriendRequestButton"));var _RejectFriendRequestButton=_interopRequireDefault(require("../button/action-button/action-button-friend/RejectFriendRequestButton"));var _WithdrawFriendRequestButton=_interopRequireDefault(require("../button/action-button/action-button-friend/WithdrawFriendRequestButton"));var _RemoveFriendButton=_interopRequireDefault(require("../button/action-button/action-button-friend/RemoveFriendButton"));var _ButtonLink=_interopRequireDefault(require("../button/ButtonLink"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var _friend=_interopRequireDefault(require("../utils/friend"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ProfileHeaderActions(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),rejecting=_useState4[0],setRejecting=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),accepting=_useState6[0],setAccepting=_useState6[1];var startRejecting=function startRejecting(){setRejecting(true);};var startAccepting=function startAccepting(){setAccepting(true);};var getLoggedInMember=function getLoggedInMember(){var callback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(){};userRouter.getLoggedInMember('user-friends').done(function(response){// console.log('PROFILE HEADER ACTIONS - LOGGED USER: ', response);
setLoggedUser(response);setRejecting(false);setAccepting(false);callback();});};var reloadWindow=function reloadWindow(){window.location.reload();};(0,_react.useEffect)(function(){getLoggedInMember();},[]);var friendable=(0,_friend.default)(loggedUser,props.userID);return/*#__PURE__*/_react.default.createElement("div",{className:"profile-header-info-actions"},loggedUser&&loggedUser.id!==props.userID&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,_membership.friendshipPermissions.sendFriendRequest&&!friendable.friendRequestSent()&&!friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AddFriendButton.default,{modifiers:"profile-header-info-action secondary",text:vikinger_translation.add_friend,loggedUser:loggedUser,userID:props.userID,onActionComplete:getLoggedInMember}),friendable.friendRequestSent()&&/*#__PURE__*/_react.default.createElement(_WithdrawFriendRequestButton.default,{modifiers:"profile-header-info-action tertiary",text:vikinger_translation.withdraw_friend,loggedUser:loggedUser,userID:props.userID,onActionComplete:getLoggedInMember}),friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_RejectFriendRequestButton.default,{modifiers:"profile-header-info-action tertiary",text:vikinger_translation.reject_friend,loggedUser:loggedUser,userID:props.userID,onActionStart:startRejecting,onActionComplete:getLoggedInMember,locked:accepting}),friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AcceptFriendRequestButton.default,{modifiers:"profile-header-info-action secondary",text:vikinger_translation.accept_friend,loggedUser:loggedUser,userID:props.userID,onActionStart:startAccepting,onActionComplete:reloadWindow,locked:rejecting})),friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_RemoveFriendButton.default,{modifiers:"profile-header-info-action tertiary",text:vikinger_translation.remove_friend,loggedUser:loggedUser,userID:props.userID,onActionComplete:reloadWindow}),_membership.messagePermissions.createMessage&&vikinger_constants.plugin_active.buddypress_messages&&/*#__PURE__*/_react.default.createElement(_ButtonLink.default,{modifiers:"profile-header-info-action primary",text:vikinger_translation.send_message,link:"".concat(loggedUser.messages_link,"?user_id=").concat(props.userID)}))));}

},{"../../router/user/user-router":353,"../button/ButtonLink":84,"../button/action-button/action-button-friend/AcceptFriendRequestButton":87,"../button/action-button/action-button-friend/AddFriendButton":88,"../button/action-button/action-button-friend/RejectFriendRequestButton":89,"../button/action-button/action-button-friend/RemoveFriendButton":90,"../button/action-button/action-button-friend/WithdrawFriendRequestButton":91,"../utils/friend":309,"../utils/membership":312,"react":380}],245:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=CircleProgressBar;var _react=_interopRequireWildcard(require("react"));var _progressbar=_interopRequireDefault(require("progressbar.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var progressBarConfig={small:{color:'url(#vk-avatar-gradient)',trailColor:vikinger_constants.colors['--color-progressbar-underline'],strokeWidth:8,trailWidth:8,svgStyle:{width:'40px',height:'40px'}},regular:{color:'url(#vk-avatar-gradient)',trailColor:vikinger_constants.colors['--color-progressbar-underline'],strokeWidth:5,trailWidth:5,svgStyle:{width:'90px',height:'90px'}},medium:{color:'url(#vk-avatar-gradient)',trailColor:vikinger_constants.colors['--color-progressbar-underline'],strokeWidth:5,trailWidth:5,svgStyle:{width:'108px',height:'108px'}},big:{color:'url(#vk-avatar-gradient)',trailColor:vikinger_constants.colors['--color-progressbar-underline'],strokeWidth:6,trailWidth:6,svgStyle:{width:'134px',height:'134px'}}};function CircleProgressBar(props){var progressBarRef=(0,_react.useRef)(null);var size=props.size||'regular';var fillAmount=props.fillAmount?Math.min(Math.max(props.fillAmount,0),1):1;var progressBarElement=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){progressBarElement.current=new _progressbar.default.Circle(progressBarRef.current,progressBarConfig[size]);progressBarElement.current.set(fillAmount);return function(){if(progressBarElement.current){progressBarElement.current.destroy();}};});return/*#__PURE__*/_react.default.createElement("div",{ref:progressBarRef,className:"user-avatar-circle-progress"});}

},{"progressbar.js":361,"react":380}],246:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=SquareProgressBar;var _react=_interopRequireWildcard(require("react"));var _progressbar=_interopRequireDefault(require("progressbar.js"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}var svgConfig={small:{width:40,strokeWidth:8},regular:{width:90,strokeWidth:5},medium:{width:108,strokeWidth:5},big:{width:134,strokeWidth:6}};function SquareProgressBar(props){var linePathRef=(0,_react.useRef)(null);var size=props.size||'regular';var fillAmount=props.fillAmount?Math.min(Math.max(props.fillAmount,0),1):1;var progressBarElement=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){progressBarElement.current=new _progressbar.default.Path(linePathRef.current);progressBarElement.current.set(fillAmount);},[]);return/*#__PURE__*/_react.default.createElement("svg",{viewBox:"0 0 100 100",width:svgConfig[size].width},/*#__PURE__*/_react.default.createElement("path",{fillOpacity:"0",strokeWidth:svgConfig[size].strokeWidth,stroke:vikinger_constants.colors['--color-progressbar-underline'],d:"M 0,2 L 98,2 L 98,98 L 2,98 L 2,4"}),/*#__PURE__*/_react.default.createElement("path",{ref:linePathRef,fillOpacity:"0",strokeWidth:svgConfig[size].strokeWidth,stroke:"url(#vk-avatar-gradient)",d:"M 0,2 L 98,2 L 98,98 L 2,98 L 2,4"}));}

},{"progressbar.js":361,"react":380}],247:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ReactionBox;var _react=_interopRequireDefault(require("react"));var _UserStatusList=_interopRequireDefault(require("../user-status/UserStatusList"));var _reaction=require("../utils/reaction");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ReactionBox(props){var activeTabSelector='active';var allReactionUsers=(0,_reaction.getAllReactionUsers)(props.data);var reactions=(0,_reaction.getAllUsersByReaction)(props.data.slice().reverse());return/*#__PURE__*/_react.default.createElement("div",{ref:props.forwardedRef,className:"reaction-box"},/*#__PURE__*/_react.default.createElement("div",{className:"reaction-box-options"},/*#__PURE__*/_react.default.createElement("div",{className:"reaction-box-option ".concat(props.activeTab===0&&activeTabSelector),onClick:function onClick(){props.showTab(0);}},/*#__PURE__*/_react.default.createElement("p",{className:"reaction-box-option-text"},"".concat(vikinger_translation.all,": ").concat(props.reactionCount))),reactions.map(function(reaction,i){return/*#__PURE__*/_react.default.createElement("div",{key:reaction.id,className:"reaction-box-option ".concat(props.activeTab===i+1&&activeTabSelector),onClick:function onClick(){props.showTab(i+1);}},/*#__PURE__*/_react.default.createElement("img",{className:"reaction-box-option-image",src:reaction.image_url,alt:"reaction-".concat(reaction.name)}),/*#__PURE__*/_react.default.createElement("p",{className:"reaction-box-option-text"},reaction.reaction_count));})),/*#__PURE__*/_react.default.createElement("div",{className:"reaction-box-content"},props.activeTab===0&&/*#__PURE__*/_react.default.createElement("div",{className:"reaction-box-item","data-simplebar":true},/*#__PURE__*/_react.default.createElement(_UserStatusList.default,{data:allReactionUsers,showVerifiedBadge:vikinger_constants.settings.bp_verified_member_display_badge_in_members_lists})),reactions.map(function(reaction,i){return props.activeTab===i+1&&/*#__PURE__*/_react.default.createElement("div",{key:reaction.id,className:"reaction-box-item","data-simplebar":true},/*#__PURE__*/_react.default.createElement(_UserStatusList.default,{data:reaction.users,showVerifiedBadge:vikinger_constants.settings.bp_verified_member_display_badge_in_members_lists}));})));}

},{"../user-status/UserStatusList":285,"../utils/reaction":315,"react":380}],248:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ReactionMetaLine;var _react=_interopRequireWildcard(require("react"));var _ReactionItemList=_interopRequireDefault(require("./reaction-item/ReactionItemList"));var _ReactionBox=_interopRequireDefault(require("./ReactionBox"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ReactionMetaLine(props){var _useState=(0,_react.useState)(0),_useState2=_slicedToArray(_useState,2),reactionBoxActiveTab=_useState2[0],setReactionBoxActiveTab=_useState2[1];var reactionBoxRef=(0,_react.useRef)(null);var reactionBoxTriggerRef=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){(0,_plugins.createPopup)({triggerElement:reactionBoxTriggerRef.current,premadeContentElement:reactionBoxRef.current,type:'premade',popupSelectors:['reaction-box-popup','animate-slide-down']});},[]);var activateFirstReactionBoxTab=function activateFirstReactionBoxTab(){setReactionBoxActiveTab(0);};(0,_react.useEffect)(function(){reactionBoxTriggerRef.current.addEventListener('mousedown',activateFirstReactionBoxTab);return function(){reactionBoxTriggerRef.current.removeEventListener('mousedown',activateFirstReactionBoxTab);};},[]);var reactionCount=0;var _iterator=_createForOfIteratorHelper(props.data),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var reaction=_step.value;reactionCount+=Number.parseInt(reaction.reaction_count,10);}}catch(err){_iterator.e(err);}finally{_iterator.f();}return/*#__PURE__*/_react.default.createElement("div",{className:"meta-line"},/*#__PURE__*/_react.default.createElement(_ReactionItemList.default,{modifiers:"meta-line-list ".concat(props.modifiers||''),data:props.data,reactionCount:reactionCount}),/*#__PURE__*/_react.default.createElement("p",{ref:reactionBoxTriggerRef,className:"meta-line-text meta-line-text-trigger"},reactionCount),/*#__PURE__*/_react.default.createElement(_ReactionBox.default,{forwardedRef:reactionBoxRef,data:props.data,reactionCount:reactionCount,activeTab:reactionBoxActiveTab,showTab:setReactionBoxActiveTab}));}

},{"../../utils/plugins":356,"./ReactionBox":247,"./reaction-item/ReactionItemList":250,"react":380}],249:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ReactionItem;var _react=_interopRequireWildcard(require("react"));var _ReactionBox=_interopRequireDefault(require("../ReactionBox"));var _core=require("../../../utils/core");var _plugins=require("../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ReactionItem(props){var _useState=(0,_react.useState)(0),_useState2=_slicedToArray(_useState,2),reactionBoxActiveTab=_useState2[0],setReactionBoxActiveTab=_useState2[1];var reactionDropdownTriggerRef=(0,_react.useRef)(null);var reactionDropdownContentRef=(0,_react.useRef)(null);var reactionBoxRef=(0,_react.useRef)(null);var reactionBoxTriggerRef=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){(0,_plugins.createDropdown)({triggerElement:reactionDropdownTriggerRef.current,containerElement:reactionDropdownContentRef.current,triggerEvent:'hover',offset:{bottom:38,left:-16},animation:{type:'translate-bottom',speed:.3,translateOffset:{vertical:20}}});(0,_plugins.createPopup)({triggerElement:reactionBoxTriggerRef.current,premadeContentElement:reactionBoxRef.current,type:'premade',popupSelectors:['reaction-box-popup','animate-slide-down']});},[]);var setReactionBoxActiveTabFromProps=function setReactionBoxActiveTabFromProps(){setReactionBoxActiveTab(props.index);};(0,_react.useEffect)(function(){reactionBoxTriggerRef.current.addEventListener('mousedown',setReactionBoxActiveTabFromProps);return function(){reactionBoxTriggerRef.current.removeEventListener('mousedown',setReactionBoxActiveTabFromProps);};},[props.index]);var maxReactionUsers=6,reactionUsersCount=Math.min(maxReactionUsers,props.data.users.length),moreUsersCount=props.data.users.length<=maxReactionUsers?false:props.data.users.length-maxReactionUsers;var renderedReactionUsers=[];for(var i=0;i<reactionUsersCount;i++){renderedReactionUsers.push(/*#__PURE__*/_react.default.createElement("p",{key:props.data.users[i].id,className:"simple-dropdown-text"},props.data.users[i].name));}return/*#__PURE__*/_react.default.createElement("div",{className:"reaction-item-wrap"},/*#__PURE__*/_react.default.createElement("div",{ref:reactionBoxTriggerRef,className:"reaction-item"},/*#__PURE__*/_react.default.createElement("img",{ref:reactionDropdownTriggerRef,className:"reaction-image",src:props.data.image_url,alt:"reaction-".concat(props.data.name)}),/*#__PURE__*/_react.default.createElement("div",{ref:reactionDropdownContentRef,className:"simple-dropdown padded"},/*#__PURE__*/_react.default.createElement("p",{className:"simple-dropdown-text"},/*#__PURE__*/_react.default.createElement("img",{className:"reaction",src:props.data.image_url,alt:"reaction-".concat(props.data.name)}),/*#__PURE__*/_react.default.createElement("span",{className:"bold"},(0,_core.ucfirst)(props.data.name))),renderedReactionUsers,moreUsersCount&&/*#__PURE__*/_react.default.createElement("p",{className:"simple-dropdown-text"},/*#__PURE__*/_react.default.createElement("span",{className:"bold"},"".concat(vikinger_translation.more_reactions_text_1," ").concat(moreUsersCount," ").concat(vikinger_translation.more_reactions_text_2))))),/*#__PURE__*/_react.default.createElement(_ReactionBox.default,{forwardedRef:reactionBoxRef,data:props.reactionData,reactionCount:props.reactionCount,activeTab:reactionBoxActiveTab,showTab:setReactionBoxActiveTab}));}

},{"../../../utils/core":355,"../../../utils/plugins":356,"../ReactionBox":247,"react":380}],250:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ReactionItemList;var _react=_interopRequireDefault(require("react"));var _ReactionItem=_interopRequireDefault(require("./ReactionItem"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ReactionItemList(props){var renderedReactionItemList=props.data.map(function(reactionData,i){return/*#__PURE__*/_react.default.createElement(_ReactionItem.default,{key:reactionData.id,data:reactionData,reactionData:props.data,reactionCount:props.reactionCount,index:props.data.length-i});});return/*#__PURE__*/_react.default.createElement("div",{className:"reaction-item-list ".concat(props.modifiers||'')},renderedReactionItemList);}

},{"./ReactionItem":249,"react":380}],251:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ReactionOption;var _react=_interopRequireWildcard(require("react"));var _core=require("../../../utils/core");var _plugins=require("../../../utils/plugins");function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ReactionOption(props){var reactionTooltipRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createTooltip)({containerElement:reactionTooltipRef.current,offset:4,direction:'top',animation:{type:'translate-out-fade'}});},[]);var createUserReaction=function createUserReaction(){props.createUserReaction(props.data.id);};return/*#__PURE__*/_react.default.createElement("div",{ref:reactionTooltipRef,className:"reaction-option","data-title":(0,_core.ucfirst)(props.data.name),onClick:createUserReaction},/*#__PURE__*/_react.default.createElement("img",{className:"reaction-option-image",src:props.data.image_url,alt:"reaction-".concat(props.data.name)}));}

},{"../../../utils/core":355,"../../../utils/plugins":356,"react":380}],252:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=ReactionOptionList;var _react=_interopRequireDefault(require("react"));var _ReactionOption=_interopRequireDefault(require("./ReactionOption"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function ReactionOptionList(props){var renderedReactionOptionList=props.data.map(function(reaction){return/*#__PURE__*/_react.default.createElement(_ReactionOption.default,{key:reaction.id,data:reaction,createUserReaction:props.createUserReaction});});return/*#__PURE__*/_react.default.createElement("div",{ref:props.forwardedRef,className:"reaction-options ".concat(props.modifiers||'')},renderedReactionOptionList);}

},{"./ReactionOption":251,"react":380}],253:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ReactionOptionComment;var _react=_interopRequireWildcard(require("react"));var _ReactionOptionList=_interopRequireDefault(require("../ReactionOptionList"));var _plugins=require("../../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function ReactionOptionComment(props){var reactionOptionsDropdownTriggerRef=(0,_react.useRef)(null);var reactionOptionsDropdownContentRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createDropdown)({triggerElement:reactionOptionsDropdownTriggerRef.current,containerElement:reactionOptionsDropdownContentRef.current,triggerEvent:'hover',offset:{bottom:30,left:-80},animation:{type:'translate-bottom',speed:.3,translateOffset:{vertical:16}},closeOnDropdownClick:true});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"meta-line"},/*#__PURE__*/_react.default.createElement("div",_extends({ref:reactionOptionsDropdownTriggerRef,className:"meta-line-link-wrap"},props.userReaction&&{onClick:props.deleteUserReaction}),!props.userReaction&&/*#__PURE__*/_react.default.createElement("p",{className:"meta-line-link light"},vikinger_translation.react),props.userReaction&&/*#__PURE__*/_react.default.createElement("p",{className:"meta-line-link"},props.userReaction.name[0].toUpperCase()+props.userReaction.name.slice(1))),/*#__PURE__*/_react.default.createElement(_ReactionOptionList.default,{forwardedRef:reactionOptionsDropdownContentRef,modifiers:"small",data:props.reactions,createUserReaction:props.createUserReaction}));}

},{"../../../../utils/plugins":356,"../ReactionOptionList":252,"react":380}],254:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ReactionOptionPost;var _react=_interopRequireWildcard(require("react"));var _ReactionOptionList=_interopRequireDefault(require("../ReactionOptionList"));var _IconSVG=_interopRequireDefault(require("../../../icon/IconSVG"));var _plugins=require("../../../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function ReactionOptionPost(props){var reactionOptionsDropdownTriggerRef=(0,_react.useRef)(null);var reactionOptionsDropdownContentRef=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){(0,_plugins.createDropdown)({triggerElement:reactionOptionsDropdownTriggerRef.current,containerElement:reactionOptionsDropdownContentRef.current,triggerEvent:'hover',offset:{bottom:54,left:-16},animation:{type:'translate-bottom',speed:.3,translateOffset:{vertical:20}},closeOnDropdownClick:true});},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"post-option-wrap"},/*#__PURE__*/_react.default.createElement("div",_extends({ref:reactionOptionsDropdownTriggerRef,className:"post-option ".concat(props.userReaction?'reaction-active':'')},props.userReaction&&{onClick:props.deleteUserReaction}),!props.userReaction&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"thumbs-up",modifiers:"post-option-icon"}),/*#__PURE__*/_react.default.createElement("p",{className:"post-option-text"},vikinger_translation.react)),props.userReaction&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("img",{className:"post-option-image",src:props.userReaction.image_url,alt:"reaction-".concat(props.userReaction.name)}),/*#__PURE__*/_react.default.createElement("p",{className:"post-option-text"},props.userReaction.name[0].toUpperCase()+props.userReaction.name.slice(1)))),/*#__PURE__*/_react.default.createElement(_ReactionOptionList.default,{forwardedRef:reactionOptionsDropdownContentRef,modifiers:"".concat(props.simpleOptions?'small':''),data:props.reactions,createUserReaction:props.createUserReaction}));}

},{"../../../../utils/plugins":356,"../../../icon/IconSVG":201,"../ReactionOptionList":252,"react":380}],255:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=SearchForm;var _react=_interopRequireWildcard(require("react"));var _SearchFormSection=_interopRequireDefault(require("./SearchFormSection"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _simplebarReact=_interopRequireDefault(require("simplebar-react"));var _plugins=require("../../utils/plugins");var postRouter=_interopRequireWildcard(require("../../router/post/post-router"));var memberRouter=_interopRequireWildcard(require("../../router/member/member-router"));var groupRouter=_interopRequireWildcard(require("../../router/group/group-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var searchPlaceholderText=vikinger_translation.search_placeholder;var postTypeSplitIsEnabled=vikinger_constants.settings.post_type_split_display_is_enabled;var postTypes=vikinger_constants.settings.post_types_to_display_in_search;var splitPostsByPostType=function splitPostsByPostType(posts,postTypes,postTypeProp){var splittedPosts={};var _iterator=_createForOfIteratorHelper(postTypes),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var postType=_step.value;splittedPosts[postType]=[];var _iterator2=_createForOfIteratorHelper(posts),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var post=_step2.value;if(post[postTypeProp]===postType){splittedPosts[postType].push(post);}}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}}}catch(err){_iterator.e(err);}finally{_iterator.f();}return splittedPosts;};function SearchForm(props){var _useState=(0,_react.useState)(''),_useState2=_slicedToArray(_useState,2),searchText=_useState2[0],setSearchText=_useState2[1];var _useState3=(0,_react.useState)([]),_useState4=_slicedToArray(_useState3,2),posts=_useState4[0],setPosts=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),loadingPosts=_useState6[0],setLoadingPosts=_useState6[1];var _useState7=(0,_react.useState)([]),_useState8=_slicedToArray(_useState7,2),members=_useState8[0],setMembers=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),loadingMembers=_useState10[0],setLoadingMembers=_useState10[1];var _useState11=(0,_react.useState)([]),_useState12=_slicedToArray(_useState11,2),groups=_useState12[0],setGroups=_useState12[1];var _useState13=(0,_react.useState)(false),_useState14=_slicedToArray(_useState13,2),loadingGroups=_useState14[0],setLoadingGroups=_useState14[1];var searchPostsTimeoutID=(0,_react.useRef)(0);var searchMembersTimeoutID=(0,_react.useRef)(0);var searchGroupsTimeoutID=(0,_react.useRef)(0);var searchDropdownRef=(0,_react.useRef)(null);var searchDropdown=(0,_react.useRef)(false);var simplebarStyles=(0,_react.useRef)({overflowX:'hidden',maxHeight:'420px',paddingBottom:'14px'});var postsByPostType=postTypeSplitIsEnabled?splitPostsByPostType(posts,postTypes,'post_type'):{};var categoryExclude=props.categoryExclude?props.categoryExclude.split(','):[];var postExclude=props.postExclude?props.postExclude.split(','):[];(0,_react.useLayoutEffect)(function(){searchDropdown.current=(0,_plugins.createDropdown)({containerElement:searchDropdownRef.current,offset:{top:57,left:0},animation:{type:'translate-top'},controlToggle:true,closeOnWindowClick:false});},[]);var handleSearchTextChange=function handleSearchTextChange(e){setSearchText(e.target.value);};(0,_react.useEffect)(function(){if(searchText!==''){setLoadingPosts(true);setLoadingMembers(true);setLoadingGroups(true);searchDropdown.current.showDropdowns();// only do member and group search if the BuddyPress plugin is active
if(vikinger_constants.plugin_active.buddypress){if(vikinger_constants.settings.search_members_enabled){// cancel previous search
if(searchMembersTimeoutID.current){window.clearTimeout(searchMembersTimeoutID.current);}searchMembersTimeoutID.current=window.setTimeout(searchMembers,500);}if(vikinger_constants.plugin_active.buddypress_groups&&vikinger_constants.settings.search_groups_enabled){// cancel previous search
if(searchGroupsTimeoutID.current){window.clearTimeout(searchGroupsTimeoutID.current);}searchGroupsTimeoutID.current=window.setTimeout(searchGroups,500);}}if(vikinger_constants.settings.search_blog_enabled){// cancel previous search
if(searchPostsTimeoutID.current){window.clearTimeout(searchPostsTimeoutID.current);}searchPostsTimeoutID.current=window.setTimeout(searchPosts,500);}}else{// cancel previous search
if(searchMembersTimeoutID.current){window.clearTimeout(searchMembersTimeoutID.current);}// cancel previous search
if(searchGroupsTimeoutID.current){window.clearTimeout(searchGroupsTimeoutID.current);}// cancel previous search
if(searchPostsTimeoutID.current){window.clearTimeout(searchPostsTimeoutID.current);}clearSearch();}},[searchText]);var clearSearch=function clearSearch(){searchDropdown.current.hideDropdowns();setSearchText('');setPosts([]);setLoadingPosts(false);setMembers([]);setLoadingMembers(false);setGroups([]);setLoadingGroups(false);};var searchMembers=function searchMembers(){setLoadingMembers(true);var searchMembersFilters={per_page:4,search:searchText};// exclude provided user id (logged user)
if(props.userID){searchMembersFilters.exclude=props.userID;}var searchMembersPromise=memberRouter.getMembers(searchMembersFilters),currentSearch=searchText;searchMembersPromise.done(function(response){// console.log('SEARCH FORM - SEARCH MEMBERS RESPONSE: ', response);
// cancel search if there was a new one made after this one
if(searchText!==currentSearch){return;}else{setMembers(response);}}).fail(function(error){// console.log('SEARCH FORM - SEARCH MEMBERS ERROR: ', error);
}).always(function(){setLoadingMembers(false);});};var searchGroups=function searchGroups(){setLoadingGroups(true);var searchGroupsFilters={per_page:4,search:searchText// search_columns: ['name']
};var searchGroupsPromise=groupRouter.getGroups(searchGroupsFilters),currentSearch=searchText;searchGroupsPromise.done(function(response){// console.log('SEARCH FORM - SEARCH GROUPS RESPONSE: ', response);
// cancel search if there was a new one made after this one
if(searchText!==currentSearch){return;}else{setGroups(response);}}).fail(function(error){// console.log('SEARCH FORM - SEARCH GROUPS ERROR: ', error);
}).always(function(){setLoadingGroups(false);});};var searchPosts=function searchPosts(){var _jQuery;setLoadingPosts(true);var getPostsPromises=[];var _iterator3=_createForOfIteratorHelper(postTypes),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var postType=_step3.value;var searchPostsFilters={per_page:4,s:searchText,post_type:[postType]};if(props.categoryExclude){searchPostsFilters.category__not_in=categoryExclude;}if(props.postExclude){searchPostsFilters.post__not_in=postExclude;}var searchPostsPromise=postRouter.getPosts(searchPostsFilters);getPostsPromises.push(searchPostsPromise);}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}var currentSearch=searchText;(_jQuery=jQuery).when.apply(_jQuery,getPostsPromises).done(function(){if(searchText!==currentSearch){return;}else{// console.log('SEARCH FORM - GET POSTS PROMISES - GET POSTS RESULTS: ', getPostsResults);
var postResults=[];for(var _len=arguments.length,getPostsResults=new Array(_len),_key=0;_key<_len;_key++){getPostsResults[_key]=arguments[_key];}if(getPostsPromises.length===1){postResults=getPostsResults[0];}else{var _iterator4=_createForOfIteratorHelper(getPostsResults),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var getPostsResult=_step4.value;postResults=postResults.concat(getPostsResult[0]);}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}}// console.log('SEARCH FORM - GET POSTS PROMISES - POST RESULTS: ', postResults);
setPosts(postResults);}}).fail(function(error){// console.log('SEARCH FORM - SEARCH POSTS ERROR: ', error);
}).always(function(){setLoadingPosts(false);});};return/*#__PURE__*/_react.default.createElement("div",{className:"search-form-wrap"},/*#__PURE__*/_react.default.createElement("div",{className:"interactive-input dark"},/*#__PURE__*/_react.default.createElement("form",{className:"form",method:"get",action:vikinger_constants.home_url},/*#__PURE__*/_react.default.createElement("input",{type:"text",name:"s",value:searchText,placeholder:searchPlaceholderText,onChange:handleSearchTextChange}),/*#__PURE__*/_react.default.createElement("button",{style:{display:'none'}})),searchText===''&&/*#__PURE__*/_react.default.createElement("div",{className:"interactive-input-icon-wrap"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"magnifying-glass",modifiers:"interactive-input-icon"})),searchText!==''&&/*#__PURE__*/_react.default.createElement("div",{className:"interactive-input-action",onClick:clearSearch},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"cross-thin",modifiers:"interactive-input-action-icon"}))),/*#__PURE__*/_react.default.createElement("div",{ref:searchDropdownRef,className:"dropdown-box padding-bottom-small"},/*#__PURE__*/_react.default.createElement(_simplebarReact.default,{style:simplebarStyles.current},vikinger_constants.plugin_active.buddypress&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_constants.settings.search_members_enabled&&/*#__PURE__*/_react.default.createElement(_SearchFormSection.default,{title:vikinger_translation.members,type:"user",data:members,itemLinkProp:"link",loading:loadingMembers}),vikinger_constants.plugin_active.buddypress_groups&&vikinger_constants.settings.search_groups_enabled&&/*#__PURE__*/_react.default.createElement(_SearchFormSection.default,{title:vikinger_translation.groups,type:"group",data:groups,itemLinkProp:"link",loading:loadingGroups})),vikinger_constants.settings.search_blog_enabled&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!postTypeSplitIsEnabled&&/*#__PURE__*/_react.default.createElement(_SearchFormSection.default,{title:vikinger_translation.posts,type:"post",data:posts,itemLinkProp:"permalink",loading:loadingPosts}),postTypeSplitIsEnabled&&Object.keys(postsByPostType).map(function(key){return/*#__PURE__*/_react.default.createElement(_SearchFormSection.default,{key:key,title:key,type:"post",data:postsByPostType[key],itemLinkProp:"permalink",loading:loadingPosts});})))));}

},{"../../router/group/group-router":347,"../../router/member/member-router":348,"../../router/post/post-router":351,"../../utils/plugins":356,"../icon/IconSVG":201,"./SearchFormSection":256,"react":380,"simplebar-react":388}],256:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=SearchFormSection;var _react=_interopRequireDefault(require("react"));var _SearchStatus=_interopRequireDefault(require("../user-status/user-status-search/SearchStatus"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SearchFormSection(props){return/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-category"},/*#__PURE__*/_react.default.createElement("p",{className:"dropdown-box-category-title"},props.title)),props.loading&&/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null),!props.loading&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,props.data.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},props.noResultsText||vikinger_translation.no_results_found),props.data.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"dropdown-box-list small no-scroll"},props.data.map(function(item){return/*#__PURE__*/_react.default.createElement("a",{key:item.id,className:"dropdown-box-list-item",href:item[props.itemLinkProp]},/*#__PURE__*/_react.default.createElement(_SearchStatus.default,{type:props.type,data:item}));}))));}

},{"../loader/LoaderSpinnerSmall":205,"../user-status/user-status-search/SearchStatus":295,"react":380}],257:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=SectionHeader;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SectionHeader(props){return/*#__PURE__*/_react.default.createElement("div",{className:"section-header"},/*#__PURE__*/_react.default.createElement("div",{className:"section-header-info"},/*#__PURE__*/_react.default.createElement("p",{className:"section-pretitle"},props.pretitle),/*#__PURE__*/_react.default.createElement("h2",{className:"section-title"},props.title,typeof props.titleCount!=='undefined'&&/*#__PURE__*/_react.default.createElement("span",{className:"highlighted"}," ".concat(props.titleCount)))),props.children);}

},{"react":380}],258:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=AccountInfoSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _SettingsWidget=_interopRequireDefault(require("./SettingsWidget"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var memberRouter=_interopRequireWildcard(require("../../router/member/member-router"));var _xprofile=require("../utils/xprofile");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function AccountInfoSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)([]),_useState4=_slicedToArray(_useState3,2),profileDataGroups=_useState4[0],setProfileDataGroups=_useState4[1];var _useState5=(0,_react.useState)({}),_useState6=_slicedToArray(_useState5,2),profileDataFields=_useState6[0],setProfileDataFields=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),saving=_useState8[0],setSaving=_useState8[1];var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-settings').done(function(response){// console.log('ACCOUNT INFO SETTINGS SCREEN - LOGGED IN USER: ', response);
// get social data
var loggedUserProfileDataGroups=(0,_xprofile.getGroups)(response.profile_data,'account');setLoggedUser(response);setProfileDataGroups(loggedUserProfileDataGroups);});};(0,_react.useEffect)(function(){getLoggedInMember();},[]);var updateProfileData=function updateProfileData(field,value){// update profile data fields with new value
// this is used to update fields when saving
setProfileDataFields(function(previousProfileDataFields){return _objectSpread(_objectSpread({},previousProfileDataFields),{},_defineProperty({},field.id,value));});};var save=function save(){// return if already saving
if(saving){return;}var profileDataChanged=Object.keys(profileDataFields).length>0;// only process data if it changed
if(profileDataChanged){setSaving(true);var updateProfileDataPromise=memberRouter.updateMemberXProfileData({fields:profileDataFields,member_id:loggedUser.id});updateProfileDataPromise.then(function(updateProfileDataResponse){// console.log('ACCOUNT INFO SETTINGS SCREEN - UPDATE PROFILE DATA RESPONSE:', updateProfileDataResponse);
// refresh page
window.location.reload();},function(error){// console.log('ACCOUNT INFO SETTINGS SCREEN - ERROR WHEN SAVING: ', error);
});}};// console.log('ACCOUNT INFO SETTINGS SCREEN - PROFILE DATA GROUPS: ', profileDataGroups);
// console.log('ACCOUNT INFO SETTINGS SCREEN - PROFILE DATA FIELDS: ', profileDataFields);
return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.account,title:vikinger_translation.account_info}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,profileDataGroups.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"grid-column"},profileDataGroups.map(function(group){return/*#__PURE__*/_react.default.createElement(_SettingsWidget.default,{key:group.id,data:group,onFieldUpdate:updateProfileData});}),/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content-options"},/*#__PURE__*/_react.default.createElement("div",{className:"button primary",onClick:save},!saving&&vikinger_translation.save_changes,saving&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_translation.saving,/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))))),profileDataGroups.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_account_info_available)));}

},{"../../router/member/member-router":348,"../../router/user/user-router":353,"../loader/Loader":203,"../loader/LoaderSpinnerSmall":205,"../section/SectionHeader":257,"../utils/xprofile":317,"./SettingsWidget":269,"react":380}],259:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=EmailSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _core=require("../../utils/core");var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var memberRouter=_interopRequireWildcard(require("../../router/member/member-router"));var _notification=require("../utils/notification");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var emailSettings=(0,_notification.getEmailSettings)();function EmailSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)([]),_useState4=_slicedToArray(_useState3,2),settings=_useState4[0],setSettings=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),savingSettings=_useState6[0],setSavingSettings=_useState6[1];var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-settings-notification').done(function(response){// console.log('EMAIL SETTINGS SCREEN - LOGGED IN USER: ', response);
setLoggedUser(response);setSettings((0,_core.deepMerge)(response.email_settings));});};(0,_react.useEffect)(function(){getLoggedInMember();},[]);var toggleSetting=function toggleSetting(settingID){setSettings(function(previousSettings){var newSettings=(0,_core.deepMerge)(previousSettings);newSettings[settingID]=newSettings[settingID]==='yes'?'no':'yes';return newSettings;});};var saveSettings=function saveSettings(){// return if already saving
if(savingSettings){return;}setSavingSettings(true);var saveSettingsPromise=memberRouter.updateUserMetadata({user_id:loggedUser.id,metadata:settings});saveSettingsPromise.done(function(response){// refresh page
window.location.reload();}).fail(function(error){setSavingSettings(false);});};return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.my_profile,title:vikinger_translation.email_settings}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"grid-column"},emailSettings.map(function(section){return/*#__PURE__*/_react.default.createElement("div",{key:section.name,className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},section.name),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("div",{className:"switch-option-list"},section.options.map(function(option){return/*#__PURE__*/_react.default.createElement("div",{key:option.id,className:"switch-option"},/*#__PURE__*/_react.default.createElement("p",{className:"switch-option-title"},option.name),/*#__PURE__*/_react.default.createElement("p",{className:"switch-option-text"},option.description),/*#__PURE__*/_react.default.createElement("div",{className:"form-switch ".concat(settings[option.id]!=='no'?'active':''),onClick:function onClick(){toggleSetting(option.id);}},/*#__PURE__*/_react.default.createElement("div",{className:"form-switch-button"})));}))));})),/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content-options"},/*#__PURE__*/_react.default.createElement("div",{className:"button primary",onClick:saveSettings},!savingSettings&&vikinger_translation.save_changes,savingSettings&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_translation.saving,/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))))));}

},{"../../router/member/member-router":348,"../../router/user/user-router":353,"../../utils/core":355,"../loader/Loader":203,"../loader/LoaderSpinnerSmall":205,"../section/SectionHeader":257,"../utils/notification":313,"react":380}],260:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FriendRequestsSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _Notification=_interopRequireDefault(require("../notification/Notification"));var _FriendRequestList=_interopRequireDefault(require("../friend/FriendRequestList"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FriendRequestsSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-friends').done(function(response){// console.log('FRIEND REQUESTS SETTINGS SCREEN - LOGGED IN USER: ', response);
setLoggedUser(response);});};(0,_react.useEffect)(function(){getLoggedInMember();},[]);return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.my_profile,title:vikinger_translation.friend_requests_received}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,loggedUser.friend_requests_received.length>0&&/*#__PURE__*/_react.default.createElement(_FriendRequestList.default,{data:loggedUser.friend_requests_received,loggedUser:loggedUser,onActionComplete:getLoggedInMember}),loggedUser.friend_requests_received.length===0&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.friend_requests_received_no_results_title,text:vikinger_translation.friend_requests_received_no_results_text})),/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.my_profile,title:vikinger_translation.friend_requests_sent}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,loggedUser.friend_requests_sent.length>0&&/*#__PURE__*/_react.default.createElement(_FriendRequestList.default,{data:loggedUser.friend_requests_sent,loggedUser:loggedUser,onActionComplete:getLoggedInMember}),loggedUser.friend_requests_sent.length===0&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.friend_requests_sent_no_results_title,text:vikinger_translation.friend_requests_sent_no_results_text})));}

},{"../../router/user/user-router":353,"../friend/FriendRequestList":157,"../loader/Loader":203,"../notification/Notification":218,"../section/SectionHeader":257,"react":380}],261:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupMembershipRequestsSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _GroupReceivedMembershipRequestPreview=_interopRequireDefault(require("../group/GroupReceivedMembershipRequestPreview"));var _GroupSentMembershipRequestPreview=_interopRequireDefault(require("../group/GroupSentMembershipRequestPreview"));var _Notification=_interopRequireDefault(require("../notification/Notification"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function GroupMembershipRequestsSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-groups-memberships').done(function(response){// console.log('GROUP MEMBERSHIP REQUESTS SETTINGS SCREEN - LOGGED IN USER: ', response);
setLoggedUser(response);});};(0,_react.useEffect)(function(){getLoggedInMember();},[]);var receivedMembershipRequestsCount=loggedUser?loggedUser.group_membership_requests_received.length:0,sentMembershipRequestsCount=loggedUser?loggedUser.group_membership_requests_sent.length:0;return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.groups,title:vikinger_translation.received_membership_requests,titleCount:receivedMembershipRequestsCount}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,loggedUser.group_membership_requests_received.length===0&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.received_membership_requests_no_results_title,text:vikinger_translation.received_membership_requests_no_results_text}),loggedUser.group_membership_requests_received.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"grid grid-3-3-3 centered-on-mobile"},loggedUser.group_membership_requests_received.map(function(membershipRequest){return/*#__PURE__*/_react.default.createElement(_GroupReceivedMembershipRequestPreview.default,{key:membershipRequest.id,data:membershipRequest,onActionComplete:getLoggedInMember});}))),/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.groups,title:vikinger_translation.sent_membership_requests,titleCount:sentMembershipRequestsCount}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,loggedUser.group_membership_requests_sent.length===0&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.sent_membership_requests_no_results_title,text:vikinger_translation.sent_membership_requests_no_results_text}),loggedUser.group_membership_requests_sent.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"grid grid-3-3-3 centered-on-mobile"},loggedUser.group_membership_requests_sent.map(function(membershipRequest){return/*#__PURE__*/_react.default.createElement(_GroupSentMembershipRequestPreview.default,{key:membershipRequest.id,data:membershipRequest,onActionComplete:getLoggedInMember});}))));}

},{"../../router/user/user-router":353,"../group/GroupReceivedMembershipRequestPreview":169,"../group/GroupSentMembershipRequestPreview":170,"../loader/Loader":203,"../notification/Notification":218,"../section/SectionHeader":257,"react":380}],262:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ManageGroupsSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _UserGroupManagePreview=_interopRequireDefault(require("../user-preview/UserGroupManagePreview"));var _ActionBox=_interopRequireDefault(require("../action/ActionBox"));var _Notification=_interopRequireDefault(require("../notification/Notification"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var _group=_interopRequireDefault(require("../utils/group"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ManageGroupsSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-groups-preview').done(function(response){// console.log('MANAGE GROUPS SETTINGS SCREEN - LOGGED IN USER: ', response);
setLoggedUser(response);});};(0,_react.useEffect)(function(){getLoggedInMember();},[]);// only show groups the user is an admin or mod of
var groups=loggedUser?loggedUser.groups.filter(function(group){return group.is_admin||group.is_mod;}):[],userCanCreateGroups=!vikinger_constants.settings.bp_restrict_group_creation||vikinger_constants.settings.current_user_is_admin;return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.groups,title:vikinger_translation.manage_groups}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,(userCanCreateGroups||groups.length>0)&&/*#__PURE__*/_react.default.createElement("div",{className:"grid grid-3-3-3 centered-on-mobile"},_membership.groupPermissions.createGroup&&userCanCreateGroups&&/*#__PURE__*/_react.default.createElement(_ActionBox.default,{title:vikinger_translation.create_new_group,text:vikinger_translation.create_new_group_text,actionText:vikinger_translation.start_creating,loggedUser:loggedUser}),groups.length>0&&groups.map(function(group){var groupPreviewDescriptionText='';var groupable=(0,_group.default)(loggedUser,group);if(groupable.isGroupCreator()){groupPreviewDescriptionText=vikinger_translation.group_creator;}else if(groupable.isGroupAdmin()){groupPreviewDescriptionText=vikinger_translation.group_admin;}else if(groupable.isGroupMod()){groupPreviewDescriptionText=vikinger_translation.group_mod;}return/*#__PURE__*/_react.default.createElement(_UserGroupManagePreview.default,{key:group.id,data:group,loggedUser:loggedUser,descriptionText:groupPreviewDescriptionText});})),!userCanCreateGroups&&groups.length===0&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.no_groups_found,text:vikinger_translation.cant_manage_groups_message})));}

},{"../../router/user/user-router":353,"../action/ActionBox":28,"../loader/Loader":203,"../notification/Notification":218,"../section/SectionHeader":257,"../user-preview/UserGroupManagePreview":278,"../utils/group":311,"../utils/membership":312,"react":380}],263:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=MessagesSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _MessageBox=_interopRequireDefault(require("../message/MessageBox"));var _ChatMessages=_interopRequireDefault(require("../chat/ChatMessages"));var _core=require("../../utils/core");var _plugins=require("../../utils/plugins");var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var messageRouter=_interopRequireWildcard(require("../../router/message/message-router"));var _membership=require("../utils/membership");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function MessagesSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)(props.userID),_useState4=_slicedToArray(_useState3,2),userID=_useState4[0],setUserID=_useState4[1];var _useState5=(0,_react.useState)(props.messageID),_useState6=_slicedToArray(_useState5,2),messageID=_useState6[0],setMessageID=_useState6[1];var _useState7=(0,_react.useState)([]),_useState8=_slicedToArray(_useState7,2),messages=_useState8[0],setMessages=_useState8[1];var _useState9=(0,_react.useState)(true),_useState10=_slicedToArray(_useState9,2),moreItems=_useState10[0],setMoreItems=_useState10[1];var _useState11=(0,_react.useState)(true),_useState12=_slicedToArray(_useState11,2),initialFetch=_useState12[0],setInitialFetch=_useState12[1];var _useState13=(0,_react.useState)(true),_useState14=_slicedToArray(_useState13,2),loading=_useState14[0],setLoading=_useState14[1];var _useState15=(0,_react.useState)(false),_useState16=_slicedToArray(_useState15,2),loadingMore=_useState16[0],setLoadingMore=_useState16[1];var _useState17=(0,_react.useState)(true),_useState18=_slicedToArray(_useState17,2),creatingNewMessage=_useState18[0],setCreatingNewMessage=_useState18[1];var _useState19=(0,_react.useState)({page:1,per_page:100,box:'inbox'}),_useState20=_slicedToArray(_useState19,2),filters=_useState20[0],setFilters=_useState20[1];var _useState21=(0,_react.useState)(false),_useState22=_slicedToArray(_useState21,2),selectedMessage=_useState22[0],setSelectedMessage=_useState22[1];var _useState23=(0,_react.useState)(false),_useState24=_slicedToArray(_useState23,2),sendingMessage=_useState24[0],setSendingMessage=_useState24[1];var _useState25=(0,_react.useState)(false),_useState26=_slicedToArray(_useState25,2),deletingThread=_useState26[0],setDeletingThread=_useState26[1];var replaceMessages=(0,_react.useRef)(false);var messageBoxRef=(0,_react.useRef)(null);var popup=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){popup.current=(0,_plugins.createPopup)({premadeContentElement:messageBoxRef.current,type:'premade',popupSelectors:['message-box-popup','animate-slide-down'],onOverlayCreate:function onOverlayCreate(overlay){overlay.setAttribute('data-simplebar','');}});},[]);var mergeFilters=function mergeFilters(oldFilters,newFilters){var mergedFilters=(0,_core.deepMerge)(oldFilters,newFilters);// remove search filter if it is empty
if(typeof mergedFilters.search!=='undefined'&&mergedFilters.search===''){delete mergedFilters.search;}return mergedFilters;};var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-friends').done(function(response){// console.log('MESSAGES SETTINGS SCREEN - LOGGED IN USER: ', response);
setLoggedUser(response);var newFilters=mergeFilters(filters,{user_id:response.id});setFilters(newFilters);getMessagesPage(false,newFilters);});};(0,_react.useEffect)(function(){getLoggedInMember();},[]);var refreshMessages=function refreshMessages(){var selectFirst=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var refreshMessagesFilters=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;// console.log('MESSAGES SETTINGS SCREEN - REFRESH MESSAGES');
replaceMessages.current=true;setLoading(true);var newFilters=refreshMessagesFilters?refreshMessagesFilters:filters;var updatedFilters=mergeFilters(newFilters,{page:1});setFilters(updatedFilters);getMessagesPage(selectFirst,updatedFilters);};var updateFiltersRefresh=function updateFiltersRefresh(newFilters){// console.log('MESSAGES SETTINGS SCREEN - UPDATE FILTERS REFRESH: ', filters);
var updatedFilters=mergeFilters(filters,newFilters);setFilters(updatedFilters);refreshMessages(false,updatedFilters);};var getMessagesPage=function getMessagesPage(){var selectFirst=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var getFilters=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;setLoadingMore(true);var getMessagesPageFilters=getFilters?getFilters:filters;var getMessagesPromise=messageRouter.getMessages(getMessagesPageFilters);getMessagesPromise.done(function(response){// console.log('MESSAGES SETTINGS SCREEN - GET MESSAGES PAGE ', getMessagesPageFilters.page, ' RESPONSE: ', response);
var newMessages=replaceMessages.current?response.data:messages.concat(response.data);var moreItems=response.headers['X-WP-TotalPages']>getMessagesPageFilters.page;var newSelectedMessage=typeof selectFirst==='boolean'&&selectFirst&&newMessages.length>0?newMessages[0]:selectedMessage;// pre selected message
if(messageID){var _iterator=_createForOfIteratorHelper(newMessages),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var message=_step.value;if(message.id===messageID){newSelectedMessage=message;// if selected message thread is unread, mark it as read
if(message.unread_count>0){markMessageThreadAsRead(message);}break;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}replaceMessages.current=false;setMessages(newMessages);setMoreItems(moreItems);setSelectedMessage(newSelectedMessage);setCreatingNewMessage(!newSelectedMessage);setFilters(function(previousFilters){return mergeFilters(previousFilters,{page:previousFilters.page+1});});setMessageID(false);setInitialFetch(false);setLoading(false);setLoadingMore(false);}).fail(function(error){// console.log('MESSAGES SETTINGS SCREEN - GET MESSAGES PAGE ', getMessagesPageFilters.page, ' ERROR: ', error);
});};var markMessageThreadAsRead=function markMessageThreadAsRead(message){var markMessageThreadAsReadPromise=messageRouter.markMessageThreadAsRead(message.id);markMessageThreadAsReadPromise.done(function(response){// console.log('MESSAGE SETTINGS SCREEN - MARK THREAD AS READ RESPONSE: ', response);
}).fail(function(error){// console.log('MESSAGE SETTINGS SCREEN - MARK THREAD AS READ ERROR: ', error);
});// optimistic mark as read
message.unread_count=0;};var selectMessage=function selectMessage(message){// if message already selected, return
if(selectedMessage===message){return;}// console.log('MESSAGE SETTINGS SCREEN - SELECTED MESSAGE: ', message);
// if selected message thread is unread, mark it as read
if(message.unread_count>0){markMessageThreadAsRead(message);}setSelectedMessage(message);setCreatingNewMessage(false);};var createNewMessage=function createNewMessage(){setSelectedMessage(false);setCreatingNewMessage(true);};var onStarMessage=function onStarMessage(){var messageInBox=messages.some(function(message){return message.id===selectedMessage.id;});// if message is not on the currently selected box, return
// this can happen due to the previous selected message display function, that displays previous selected message
// even when changing boxes and the message is in another box
if(!messageInBox){return;}var newMessages=messages.slice();var newSelectedMessage;var _iterator2=_createForOfIteratorHelper(newMessages),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var message=_step2.value;if(message.id===selectedMessage.id){newSelectedMessage=message;message.starred=true;break;}}// console.log('MESSAGE SETTINGS SCREEN - NEW MESSAGES: ', newMessages);
// console.log('MESSAGE SETTINGS SCREEN - NEW SELECTED MESSAGE: ', newSelectedMessage);
}catch(err){_iterator2.e(err);}finally{_iterator2.f();}setSelectedMessage(newSelectedMessage);setMessages(newMessages);};var onUnstarMessage=function onUnstarMessage(){var messageInBox=messages.some(function(message){return message.id===selectedMessage.id;});// if message is not on the currently selected box, return
// this can happen due to the previous selected message display function, that displays previous selected message
// even when changing boxes and the message is in another box
if(!messageInBox){return;}var newMessages=messages.slice();var newSelectedMessage;var _iterator3=_createForOfIteratorHelper(newMessages),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var message=_step3.value;if(message.id===selectedMessage.id){newSelectedMessage=message;message.starred=false;break;}}// console.log('MESSAGE SETTINGS SCREEN - NEW MESSAGES: ', newMessages);
// console.log('MESSAGE SETTINGS SCREEN - NEW SELECTED MESSAGE: ', newSelectedMessage);
}catch(err){_iterator3.e(err);}finally{_iterator3.f();}setSelectedMessage(newSelectedMessage);setMessages(newMessages);};var deleteThread=function deleteThread(){// if already deleting thread, return
if(deletingThread){return;}setDeletingThread(true);var threadID=selectedMessage.id;var deleteMessagePromise=messageRouter.deleteMessageThread({thread_id:threadID,user_id:loggedUser.id});deleteMessagePromise.done(function(response){// console.log('CHAT MESSAGE OPEN - DELETE MESSAGE RESPONSE: ', response);
}).fail(function(error){// console.log('CHAT MESSAGE OPEN - DELETE MESSAGE ERROR: ', error);
});// check if user wants to delete message while being on another box
// i.e. selected a message, changed box, and trying to delete message (last selected message feature)
var messageInThisBox=messages.some(function(thread){return thread.id===threadID;});// if message is in this box, delete it
if(messageInThisBox){// optimistic delete
// get selected message index
var selectedMessageIndex;for(var i=0;i<messages.length;i++){var thread=messages[i];if(thread.id===threadID){selectedMessageIndex=i;break;}}var newMessages=messages.slice().filter(function(thread){return thread.id!==threadID;});var newSelectedMessage=newMessages.length>0;if(newSelectedMessage){if(typeof newMessages[selectedMessageIndex]!=='undefined'){newSelectedMessage=newMessages[selectedMessageIndex];}else{newSelectedMessage=newMessages[selectedMessageIndex-1];}}// console.log('MESSAGE SETTINGS SCREEN - MESSAGES AFTER DELETION: ', newMessages);
// console.log('MESSAGE SETTINGS SCREEN - SELECTED MESSAGE INDEX: ', selectedMessageIndex);
// console.log('MESSAGE SETTINGS SCREEN - NEW SELECTED MESSAGE: ', newSelectedMessage);
setMessages(newMessages);setSelectedMessage(newSelectedMessage);setCreatingNewMessage(typeof newSelectedMessage==='boolean');}else{// show new message screen
setSelectedMessage(false);setCreatingNewMessage(true);}setDeletingThread(false);};var createThread=function createThread(messageContent,recipients){// console.log('MESSAGE SETTINGS SCREEN - CREATE THREAD: ', messageContent, recipients);
var createThreadPromise=messageRouter.sendMessage({message:messageContent,recipients:recipients,sender_id:loggedUser.id});createThreadPromise.done(function(response){// console.log('MESSAGE SETTINGS SCREEN - CREATE THREAD RESPONSE: ', response);
var newFilters=mergeFilters(filters,{box:'sentbox'});setFilters(newFilters);refreshMessages(true,newFilters);}).fail(function(error){// console.log('MESSAGE SETTINGS SCREEN - CREATE THREAD ERROR: ', error);
});};var sendMessage=function sendMessage(threadID,messageContent,recipients){var callback=arguments.length>3&&arguments[3]!==undefined?arguments[3]:function(){};// if already sending a message, return
if(sendingMessage){return;}setSendingMessage(true);var sendMessageConfig={id:threadID,message:messageContent,recipients:recipients,sender_id:loggedUser.id};var sendMessagePromise=messageRouter.sendMessage(sendMessageConfig);// console.log('MESSAGE SETTINGS SCREEN - SEND MESSAGE: ', sendMessageConfig);
sendMessagePromise.done(function(response){// console.log('MESSAGE SETTINGS SCREEN - SEND MESSAGE RESPONSE: ', response);
var getSentMessagePromise=messageRouter.getMessage(threadID);getSentMessagePromise.done(function(response){// console.log('MESSAGE SETTINGS SCREEN - GET SENT MESSAGE RESPONSE: ', response);
callback();var newMessages=messages.slice();// console.log('MESSAGE SETTINGS SCREEN - NEW MESSAGES TO SHOW: ', newMessages);
var _iterator4=_createForOfIteratorHelper(newMessages),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var message=_step4.value;if(message.id===threadID){message.messages=response.messages;}}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}setMessages(newMessages);setSendingMessage(false);}).fail(function(error){// console.log('MESSAGE SETTINGS SCREEN - GET SENT MESSAGE ERROR: ', error);
setSendingMessage(false);});}).fail(function(error){// console.log('MESSAGE SETTINGS SCREEN - SEND MESSAGE ERROR: ', error);
setSendingMessage(false);});};var clearSendMessageUser=function clearSendMessageUser(){setUserID(false);};var searching=typeof filters.search!=='undefined';return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.my_profile,title:vikinger_translation.messages},_membership.messagePermissions.createMessage&&/*#__PURE__*/_react.default.createElement("div",{className:"section-header-actions"},/*#__PURE__*/_react.default.createElement("p",{className:"section-header-action",onClick:createNewMessage},vikinger_translation.new_message))),/*#__PURE__*/_react.default.createElement(_MessageBox.default,{forwardedRef:messageBoxRef,data:{title:vikinger_translation.delete,text:vikinger_translation.delete_item_message},error:true,confirm:true,onAccept:function onAccept(){deleteThread();popup.current.hide();},onCancel:function onCancel(){popup.current.hide();}}),!loggedUser&&initialFetch&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_ChatMessages.default,{data:messages,loggedUser:loggedUser,userID:userID,clearSendMessageUser:clearSendMessageUser,onFiltersChange:updateFiltersRefresh,loading:loading,onLoadMore:getMessagesPage,loadingMore:loadingMore,moreItems:moreItems,searching:searching,onSelectMessage:selectMessage,selectedMessage:selectedMessage,creatingNewMessage:creatingNewMessage,onStarMessage:onStarMessage,onUnstarMessage:onUnstarMessage,onSendMessage:sendMessage,sendingMessage:sendingMessage,onCreateThread:createThread,onDeleteThread:function onDeleteThread(){popup.current.show();},deletingThread:deletingThread,filters:filters}));}

},{"../../router/message/message-router":349,"../../router/user/user-router":353,"../../utils/core":355,"../../utils/plugins":356,"../chat/ChatMessages":118,"../loader/Loader":203,"../message/MessageBox":217,"../section/SectionHeader":257,"../utils/membership":312,"react":380}],264:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=NotificationsSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _Notification=_interopRequireDefault(require("../notification/Notification"));var _NotificationBoxList=_interopRequireDefault(require("../notification/NotificationBoxList"));var _MessageBox=_interopRequireDefault(require("../message/MessageBox"));var _ScrollPager=_interopRequireDefault(require("../pager/ScrollPager"));var _plugins=require("../../utils/plugins");var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var notificationRouter=_interopRequireWildcard(require("../../router/notification/notification-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function NotificationsSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)([]),_useState4=_slicedToArray(_useState3,2),notifications=_useState4[0],setNotifications=_useState4[1];var _useState5=(0,_react.useState)(true),_useState6=_slicedToArray(_useState5,2),initialFetch=_useState6[0],setInitialFetch=_useState6[1];var _useState7=(0,_react.useState)(true),_useState8=_slicedToArray(_useState7,2),moreItems=_useState8[0],setMoreItems=_useState8[1];var _useState9=(0,_react.useState)([]),_useState10=_slicedToArray(_useState9,2),selectedNotifications=_useState10[0],setSelectedNotifications=_useState10[1];var _useState11=(0,_react.useState)(false),_useState12=_slicedToArray(_useState11,2),selectedAll=_useState12[0],setSelectedAll=_useState12[1];var currentPage=(0,_react.useRef)(1);var messageBoxRef=(0,_react.useRef)(null);;var popup=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){popup.current=(0,_plugins.createPopup)({premadeContentElement:messageBoxRef.current,type:'premade',popupSelectors:['message-box-popup','animate-slide-down'],onOverlayCreate:function onOverlayCreate(overlay){overlay.setAttribute('data-simplebar','');}});},[]);(0,_react.useEffect)(function(){getLoggedInMember();getNotificationsPage();},[]);var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember().done(function(response){// console.log('NOTIFICATIONS SETTINGS SCREEN - LOGGED IN USER: ', response);
setLoggedUser(response);});};var notificationsSelected=function notificationsSelected(){return selectedNotifications.some(function(selected){return selected;});};var deleteSelected=function deleteSelected(){var notificationsToDelete=[];selectedNotifications.forEach(function(selectedNotification,i){// add notification to be deleted if it is selected
if(selectedNotification){notificationsToDelete.push(notifications[i].id);}});// console.log('NOTIFICATIONS SETTINGS SCREEN - DELETE: ', notificationsToDelete);
var deleteNotificationsPromise=notificationRouter.deleteNotifications(notificationsToDelete);deleteNotificationsPromise.done(function(response){// console.log('NOTIFICATIONS SETTINGS SCREEN - DELETE RESPONSE: ', response);
}).fail(function(error){// console.log('NOTIFICATIONS SETTINGS SCREEN - DELETE ERROR: ', error);
});// delete notifications (optimistic approach)
var newNotifications=notifications.slice().filter(function(notification){return!notificationsToDelete.includes(notification.id);});// console.log('NOTIFICATIONS SETTINGS SCREEN - UPDATED NOTIFICATIONS: ', newNotifications);
setNotifications(newNotifications);setSelectedNotifications(new Array(newNotifications.length).fill(false));setSelectedAll(false);};var markSelectedAsRead=function markSelectedAsRead(){var notificationsToMarkAsRead=[];selectedNotifications.forEach(function(selectedNotification,i){// add notification to be marked as read if it is selected
if(selectedNotification){notificationsToMarkAsRead.push(notifications[i].id);}});// console.log('NOTIFICATIONS SETTINGS SCREEN - MARK AS READ: ', notificationsToMarkAsRead);
var markNotificationsAsReadPromise=notificationRouter.markNotificationsAsRead(notificationsToMarkAsRead);markNotificationsAsReadPromise.done(function(response){// console.log('NOTIFICATIONS SETTINGS SCREEN - MARK AS READ RESPONSE: ', response);
}).fail(function(error){// console.log('NOTIFICATIONS SETTINGS SCREEN - MARK AS READ ERROR: ', error);
});// mark notifications as read in state (optimistic approach)
var newNotifications=notifications.slice();var _iterator=_createForOfIteratorHelper(newNotifications),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var notification=_step.value;// if notification was marked as read, update it
if(notificationsToMarkAsRead.includes(notification.id)){notification.is_new=0;}}// console.log('NOTIFICATIONS SETTINGS SCREEN - UPDATED NOTIFICATIONS: ', newNotifications);
}catch(err){_iterator.e(err);}finally{_iterator.f();}setNotifications(newNotifications);};var toggleSelectableActive=function toggleSelectableActive(i){var newSelectedNotifications=selectedNotifications.slice();newSelectedNotifications[i]=!newSelectedNotifications[i];// console.log('NOTIFICATIONS SETTINGS SCREEN - SELECTED NOTIFICATIONS: ', newSelectedNotifications);
setSelectedNotifications(newSelectedNotifications);};var toggleAllSelectable=function toggleAllSelectable(){if(!selectedAll){selectAll();}else{unselectAll();}};var selectAll=function selectAll(){setSelectedNotifications(new Array(notifications.length).fill(true));setSelectedAll(true);};var unselectAll=function unselectAll(){setSelectedNotifications(new Array(notifications.length).fill(false));setSelectedAll(false);};var getNotificationsPage=function getNotificationsPage(){var callback=arguments.length>0&&arguments[0]!==undefined?arguments[0]:function(){};var notificationsPromise=notificationRouter.getNotifications({user_id:loggedUser.id,per_page:100,page:currentPage.current});notificationsPromise.done(function(response){// console.log('NOTIFICATIONS SETTINGS SCREEN - GET NOTIFICATIONS PAGE ', currentPage.current, ' RESPONSE: ', response);
currentPage.current+=1;var newNotifications=response?response:[];var newSelectedNotifications=new Array(newNotifications.length).fill(false);var newMoreItems=newNotifications.length>0;setNotifications(notifications.concat(newNotifications));setSelectedNotifications(selectedNotifications.concat(newSelectedNotifications));setMoreItems(newMoreItems);setInitialFetch(false);callback(newMoreItems);});};return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.my_profile,title:vikinger_translation.notifications},notifications.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"section-header-actions"},notificationsSelected()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("p",{className:"section-header-action",onClick:function onClick(){popup.current.show();}},vikinger_translation.delete),/*#__PURE__*/_react.default.createElement("p",{className:"section-header-action",onClick:markSelectedAsRead},vikinger_translation.mark_as_read)),/*#__PURE__*/_react.default.createElement("p",{className:"section-header-action",onClick:toggleAllSelectable},!selectedAll?vikinger_translation.select_all:vikinger_translation.unselect_all))),/*#__PURE__*/_react.default.createElement(_MessageBox.default,{forwardedRef:messageBoxRef,data:{title:vikinger_translation.delete,text:vikinger_translation.delete_selected_message},error:true,confirm:true,onAccept:function onAccept(){deleteSelected();popup.current.hide();},onCancel:function onCancel(){popup.current.hide();}}),loggedUser&&/*#__PURE__*/_react.default.createElement(_ScrollPager.default,{loadMoreItems:getNotificationsPage,moreItems:moreItems,initialFetch:initialFetch},/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,notifications.length===0&&!moreItems&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.notifications_received_no_results_title,text:vikinger_translation.notifications_received_no_results_text}),/*#__PURE__*/_react.default.createElement(_NotificationBoxList.default,{data:notifications,selectable:true,selectedItems:selectedNotifications,toggleSelectableActive:toggleSelectableActive}))));}

},{"../../router/notification/notification-router":350,"../../router/user/user-router":353,"../../utils/plugins":356,"../message/MessageBox":217,"../notification/Notification":218,"../notification/NotificationBoxList":220,"../pager/ScrollPager":223,"../section/SectionHeader":257,"react":380}],265:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=PasswordSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _MessageBox=_interopRequireDefault(require("../message/MessageBox"));var _FormInputPassword=_interopRequireDefault(require("../form/FormInputPassword"));var _plugins=require("../../utils/plugins");var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var memberRouter=_interopRequireWildcard(require("../../router/member/member-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function PasswordSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),currentPassword=_useState4[0],setCurrentPassword=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),newPassword=_useState6[0],setNewPassword=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),newPasswordRepeat=_useState8[0],setNewPasswordRepeat=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),saving=_useState10[0],setSaving=_useState10[1];var _useState11=(0,_react.useState)(''),_useState12=_slicedToArray(_useState11,2),messageBoxTitle=_useState12[0],setMessageBoxTitle=_useState12[1];var _useState13=(0,_react.useState)(''),_useState14=_slicedToArray(_useState13,2),messageBoxText=_useState14[0],setMessageBoxText=_useState14[1];var messageBoxRef=(0,_react.useRef)(null);var popup=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){popup.current=(0,_plugins.createPopup)({premadeContentElement:messageBoxRef.current,type:'premade',popupSelectors:['message-box-popup','animate-slide-down'],onOverlayCreate:function onOverlayCreate(overlay){overlay.setAttribute('data-simplebar','');}});},[]);(0,_react.useEffect)(function(){getLoggedInMember();},[]);var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-settings-password').done(function(response){// console.log('PASSWORD SETTINGS SCREEN - LOGGED IN USER: ', response);
setLoggedUser(response);});};var save=function save(){// return if already saving
if(saving){return;}setSaving(true);// only process data if all fields where entered
if(currentPassword&&newPassword&&newPasswordRepeat){// if new password doesn't match confirmation, show error popup
if(newPassword!==newPasswordRepeat){setMessageBoxTitle(vikinger_translation.new_password_mismatch_error_title);setMessageBoxText(vikinger_translation.new_password_mismatch_error_text);popup.current.show();setSaving(false);return;}// check if current password is correct
var passwordCheckPromise=memberRouter.checkPassword({password_plain:currentPassword,password_hash:loggedUser.password,user_id:loggedUser.id});passwordCheckPromise.done(function(passwordMatches){// console.log('PASSWORD SETTINGS SCREEN - CHECK PASSWORD RESPONSE: ', passwordMatches);
if(passwordMatches){// console.log('PASSWORD SETTINGS SCREEN - ENTERED PASSWORD MATCHES CURRENT PASSWORD');
// update password
var updatePasswordPromise=memberRouter.updatePassword({password:newPassword,user_id:loggedUser.id});updatePasswordPromise.done(function(response){// console.log('PASSWORD SETTINGS SCREEN - UPDATE PASSWORD RESPONSE: ', response);
// if password updated
if(response){// console.log('PASSWORD SETTINGS SCREEN - PASSWORD UPDATED CORRECTLY');
window.location.reload();}else{// password couldn't be updated
setMessageBoxTitle(vikinger_translation.change_password_error_title);setMessageBoxText(vikinger_translation.change_password_error_text);setSaving(false);popup.current.show();}}).fail(function(error){// password couldn't be updated
setMessageBoxTitle(vikinger_translation.change_password_error_title);setMessageBoxText(vikinger_translation.change_password_error_text);setSaving(false);popup.current.show();});}else{// password doesn't match, show error popup
setMessageBoxTitle(vikinger_translation.current_password_mismatch_error_title);setMessageBoxText(vikinger_translation.current_password_mismatch_error_text);setSaving(false);popup.current.show();}}).fail(function(error){// console.log('PASSWORD SETTINGS SCREEN - CHECK PASSWORD ERROR: ', error);
setSaving(false);});}else{setSaving(false);}};return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.account,title:vikinger_translation.change_password}),/*#__PURE__*/_react.default.createElement(_MessageBox.default,{forwardedRef:messageBoxRef,data:{title:messageBoxTitle,text:messageBoxText},error:true}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement("div",{className:"grid-column"},/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("div",{className:"form"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_FormInputPassword.default,{label:vikinger_translation.enter_your_current_password,name:"current_password",modifiers:"small",onChange:setCurrentPassword}))),/*#__PURE__*/_react.default.createElement("div",{className:"form-row split"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_FormInputPassword.default,{label:vikinger_translation.your_new_password,name:"new_password",modifiers:"small",onChange:setNewPassword})),/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_FormInputPassword.default,{label:vikinger_translation.confirm_new_password,name:"new_password_repeat",modifiers:"small",onChange:setNewPasswordRepeat})))))),/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content-options"},/*#__PURE__*/_react.default.createElement("div",{className:"button primary",onClick:save},!saving&&vikinger_translation.save_changes,saving&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_translation.saving,/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))))));}

},{"../../router/member/member-router":348,"../../router/user/user-router":353,"../../utils/plugins":356,"../form/FormInputPassword":149,"../loader/Loader":203,"../loader/LoaderSpinnerSmall":205,"../message/MessageBox":217,"../section/SectionHeader":257,"react":380}],266:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ProfileSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _UserPreview=_interopRequireDefault(require("../user-preview/UserPreview"));var _UploadBox=_interopRequireDefault(require("../upload/UploadBox"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _MessageBox=_interopRequireDefault(require("../message/MessageBox"));var _SettingsWidget=_interopRequireDefault(require("./SettingsWidget"));var _plugins=require("../../utils/plugins");var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var memberRouter=_interopRequireWildcard(require("../../router/member/member-router"));var _xprofile=require("../utils/xprofile");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ProfileSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),avatarFile=_useState4[0],setAvatarFile=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),deleteAvatar=_useState6[0],setDeleteAvatar=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),coverFile=_useState8[0],setCoverFile=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),deleteCover=_useState10[0],setDeleteCover=_useState10[1];var _useState11=(0,_react.useState)([]),_useState12=_slicedToArray(_useState11,2),profileDataGroups=_useState12[0],setProfileDataGroups=_useState12[1];var _useState13=(0,_react.useState)({}),_useState14=_slicedToArray(_useState13,2),profileDataFields=_useState14[0],setProfileDataFields=_useState14[1];var _useState15=(0,_react.useState)(false),_useState16=_slicedToArray(_useState15,2),saving=_useState16[0],setSaving=_useState16[1];var _useState17=(0,_react.useState)(''),_useState18=_slicedToArray(_useState17,2),messageBoxTitle=_useState18[0],setMessageBoxTitle=_useState18[1];var _useState19=(0,_react.useState)(''),_useState20=_slicedToArray(_useState19,2),messageBoxText=_useState20[0],setMessageBoxText=_useState20[1];var messageBoxRef=(0,_react.useRef)(null);var popup=(0,_react.useRef)(null);(0,_react.useLayoutEffect)(function(){popup.current=(0,_plugins.createPopup)({premadeContentElement:messageBoxRef.current,type:'premade',popupSelectors:['message-box-popup','animate-slide-down'],onOverlayCreate:function onOverlayCreate(overlay){overlay.setAttribute('data-simplebar','');}});},[]);(0,_react.useEffect)(function(){getLoggedInMember();},[]);var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-settings-profile').done(function(response){// console.log('PROFILE SETTINGS SCREEN - LOGGED IN USER: ', response);
// get profile data
var loggedUserProfileDataGroups=(0,_xprofile.getGroups)(response.profile_data,'profile');setLoggedUser(response);setProfileDataGroups(loggedUserProfileDataGroups);});};var updateAvatarFile=function updateAvatarFile(file){// console.log('PROFILE SETTINGS SCREEN - AVATAR FILE: ', file);
setAvatarFile(file);setDeleteAvatar(false);setLoggedUser(function(previousLoggedUser){return _objectSpread(_objectSpread({},previousLoggedUser),{},{avatar_url:file.url});});};var deleteAvatarFile=function deleteAvatarFile(){setLoggedUser(function(previousLoggedUser){return _objectSpread(_objectSpread({},previousLoggedUser),{},{avatar_url:vikinger_constants.settings.member_avatar_url_default});});setDeleteAvatar(true);};var updateCoverFile=function updateCoverFile(file){// console.log('PROFILE SETTINGS SCREEN - COVER FILE: ', file);
setCoverFile(file);setDeleteCover(false);setLoggedUser(function(previousLoggedUser){return _objectSpread(_objectSpread({},previousLoggedUser),{},{cover_url:file.url});});};var deleteCoverFile=function deleteCoverFile(){setLoggedUser(function(previousLoggedUser){return _objectSpread(_objectSpread({},previousLoggedUser),{},{cover_url:vikinger_constants.settings.member_cover_image_url_default});});setDeleteCover(true);};var updateProfileData=function updateProfileData(field,value){// console.log('PROFILE SETTINGS SCREEN - UPDATE PROFILE DATA: ', field, value);
setProfileDataFields(function(previousProfileDataFields){return _objectSpread(_objectSpread({},previousProfileDataFields),{},_defineProperty({},field.id,value));});};var save=function save(){// return if already saving
if(saving){return;}setSaving(true);var profileDataChanged=Object.keys(profileDataFields).length>0;// only process data if it changed
if(avatarFile||coverFile||deleteAvatar||deleteCover||profileDataChanged){var uploadAvatarPromise={no_result:true},deleteAvatarPromise={no_result:true},uploadCoverPromise={no_result:true},deleteCoverPromise={no_result:true},updateProfileDataPromise={no_result:true};// if user changed avatar, save it
if(avatarFile){uploadAvatarPromise=memberRouter.uploadMemberAvatar({user_id:loggedUser.id,file:avatarFile.file});}// if user wants to delete avatar, delete it
if(deleteAvatar){deleteAvatarPromise=memberRouter.deleteMemberAvatar({user_id:loggedUser.id});}// if user changed cover, save it
if(coverFile){uploadCoverPromise=memberRouter.uploadMemberCover({user_id:loggedUser.id,file:coverFile.file});}// if user wants to delete cover, delete it
if(deleteCover){deleteCoverPromise=memberRouter.deleteMemberCover({user_id:loggedUser.id});}// if user changed profile data
if(profileDataChanged){updateProfileDataPromise=memberRouter.updateMemberXProfileData({fields:profileDataFields,member_id:loggedUser.id});}jQuery.when(uploadAvatarPromise,deleteAvatarPromise,uploadCoverPromise,deleteCoverPromise,updateProfileDataPromise).done(function(avatarUploadResponse,deleteAvatarResponse,coverUploadResponse,deleteCoverResponse,updateProfileDataResponse){// console.log('PROFILE SETTINGS SCREEN - AVATAR UPLOAD RESPONSE:', avatarUploadResponse);
// console.log('PROFILE SETTINGS SCREEN - COVER UPLOAD RESPONSE:', coverUploadResponse);
// console.log('PROFILE SETTINGS SCREEN - UPDATE PROFILE DATA RESPONSE:', updateProfileDataResponse);
// check if avatar was selected to be uploaded
if(typeof avatarUploadResponse.no_result!=='undefined'){// console.log('PROFILE SETTINGS SCREEN - USER DIDN\'T SELECT AVATAR TO CHANGE');
}else{// success, release blob image resource
// console.log('PROFILE SETTINGS SCREEN - AVATAR UPLOAD RESPONSE:', avatarUploadResponse);
}// check if avatar was selected to be deleted
if(typeof deleteAvatarResponse.no_result!=='undefined'){// console.log('PROFILE SETTINGS SCREEN - USER DIDN\'T SELECT AVATAR TO DELETE');
}else{// console.log('PROFILE SETTINGS SCREEN - AVATAR DELETE RESPONSE:', deleteAvatarResponse);
}// check if cover was selected to be uploaded
if(typeof coverUploadResponse.no_result!=='undefined'){// console.log('PROFILE SETTINGS SCREEN - USER DIDN\'T SELECT COVER TO CHANGE');
}else{// success, release blob image resource
// console.log('PROFILE SETTINGS SCREEN - COVER UPLOAD SUCCESS');
}// check if cover was selected to be deleted
if(typeof deleteCoverResponse.no_result!=='undefined'){// console.log('PROFILE SETTINGS SCREEN - USER DIDN\'T SELECT COVER TO DELETE');
}else{// console.log('PROFILE SETTINGS SCREEN - COVER DELETE RESPONSE:', deleteCoverResponse);
}// check if profile data was updated
if(typeof updateProfileDataResponse.no_result!=='undefined'){// console.log('PROFILE SETTINGS SCREEN - USER DIDN\'T CHANGE ANY PROFILE FIELDS');
}else{// success
// console.log('PROFILE SETTINGS SCREEN - USER UPDATED PROFILE FIELDS');
}// refresh page
window.location.reload();}).fail(function(error){// console.log('PROFILE SETTINGS SCREEN - ERROR WHEN SAVING: ', error);
var errorJSON=error.responseJSON;var messageBoxErrorTitle;var messageBoxErrorText;if(typeof errorJSON!=='undefined'){messageBoxErrorText=errorJSON.message;if(errorJSON.code==='bp_rest_attachments_user_avatar_upload_error'){messageBoxErrorTitle=vikinger_translation.avatar_upload_error;}else if(errorJSON.code==='bp_rest_attachments_user_cover_upload_error'){messageBoxErrorTitle=vikinger_translation.cover_upload_error;}else if(errorJSON.code==='bp_rest_attachments_user_avatar_error'){messageBoxErrorTitle=vikinger_translation.avatar_upload_error;}}else{messageBoxErrorTitle=vikinger_translation.upload_error;messageBoxErrorText=vikinger_translation.upload_error_message;}setMessageBoxTitle(messageBoxErrorTitle);setMessageBoxText(messageBoxErrorText);popup.current.show();setSaving(false);});}else{setSaving(false);}};return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.my_profile,title:vikinger_translation.profile_info}),/*#__PURE__*/_react.default.createElement(_MessageBox.default,{forwardedRef:messageBoxRef,data:{title:messageBoxTitle,text:messageBoxText},error:true,continue:true,onContinue:function onContinue(){popup.current.hide();window.location.reload();}}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement("div",{className:"grid-column"},/*#__PURE__*/_react.default.createElement("div",{className:"grid grid-3-3-3 centered"},/*#__PURE__*/_react.default.createElement(_UserPreview.default,{data:loggedUser,actionableAvatar:loggedUser.avatar_url!==vikinger_constants.settings.member_avatar_url_default,actionableCover:loggedUser.cover_url!==vikinger_constants.settings.member_cover_image_url_default,onAvatarActionClick:deleteAvatarFile,onCoverActionClick:deleteCoverFile}),/*#__PURE__*/_react.default.createElement(_UploadBox.default,{title:vikinger_translation.change_avatar,onFileSelect:updateAvatarFile}),/*#__PURE__*/_react.default.createElement(_UploadBox.default,{title:vikinger_translation.change_cover,onFileSelect:updateCoverFile})),profileDataGroups.map(function(group){return/*#__PURE__*/_react.default.createElement(_SettingsWidget.default,{key:group.id,data:group,onFieldUpdate:updateProfileData});}),/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content-options"},/*#__PURE__*/_react.default.createElement("div",{className:"button primary",onClick:save},!saving&&vikinger_translation.save_changes,saving&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_translation.saving,/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))))));}

},{"../../router/member/member-router":348,"../../router/user/user-router":353,"../../utils/plugins":356,"../loader/Loader":203,"../loader/LoaderSpinnerSmall":205,"../message/MessageBox":217,"../section/SectionHeader":257,"../upload/UploadBox":277,"../user-preview/UserPreview":280,"../utils/xprofile":317,"./SettingsWidget":269,"react":380}],267:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=ReceivedGroupInvitationsSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _GroupInvitationPreview=_interopRequireDefault(require("../group/GroupInvitationPreview"));var _Notification=_interopRequireDefault(require("../notification/Notification"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function ReceivedGroupInvitationsSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];(0,_react.useEffect)(function(){getLoggedInMember();},[]);var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-groups-received-invitations').done(function(response){// console.log('RECEIVED GROUP INVITATIONS SETTINGS SCREEN - LOGGED IN USER: ', response);
setLoggedUser(response);});};var receivedInvitationsCount=loggedUser?loggedUser.group_invitations_received.length:0;return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.groups,title:vikinger_translation.received_invitations,titleCount:receivedInvitationsCount}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,loggedUser.group_invitations_received.length===0&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.received_invitations_no_results_title,text:vikinger_translation.received_invitations_no_results_text}),loggedUser.group_invitations_received.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"grid grid-3-3-3 centered-on-mobile"},loggedUser.group_invitations_received.map(function(invitation){return/*#__PURE__*/_react.default.createElement(_GroupInvitationPreview.default,{key:invitation.id,data:invitation,onActionComplete:getLoggedInMember});}))));}

},{"../../router/user/user-router":353,"../group/GroupInvitationPreview":164,"../loader/Loader":203,"../notification/Notification":218,"../section/SectionHeader":257,"react":380}],268:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=SendGroupInvitationsSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _Notification=_interopRequireDefault(require("../notification/Notification"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _FormSelect=_interopRequireDefault(require("../form/FormSelect"));var _SelectableUserStatusList=_interopRequireDefault(require("../user-status/SelectableUserStatusList"));var _GroupInvitationStatusList=_interopRequireDefault(require("../user-status/user-status-group/user-status-group-invitation/GroupInvitationStatusList"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var groupMemberRouter=_interopRequireWildcard(require("../../router/group-member/group-member-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e2){throw _e2;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e3){didErr=true;err=_e3;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var getInviteableFriends=function getInviteableFriends(user,group){var inviteableFriends=[];var _iterator=_createForOfIteratorHelper(user.friends),_step;try{var _loop=function _loop(){var friend=_step.value;// friend isn't a member of the group
if(!group.members.some(function(member){return member.id===friend.id;})){// friend isn't banned from the group
if(!group.banned.some(function(bannedMember){return bannedMember.id===friend.id;})){// friend hasn't already been invited to the group
if(!user.group_invitations_sent.some(function(invitation){return invitation.user.id===friend.id&&group.id===invitation.group.id;})){// add friend as selectable to invite
inviteableFriends.push(friend);}}}};for(_iterator.s();!(_step=_iterator.n()).done;){_loop();}}catch(err){_iterator.e(err);}finally{_iterator.f();}return inviteableFriends;};function SendGroupInvitationsSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)([]),_useState4=_slicedToArray(_useState3,2),groups=_useState4[0],setGroups=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),selectedGroupID=_useState6[0],setSelectedGroupID=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),selectedFriends=_useState8[0],setSelectedFriends=_useState8[1];var _useState9=(0,_react.useState)(false),_useState10=_slicedToArray(_useState9,2),sendingInvitations=_useState10[0],setSendingInvitations=_useState10[1];var friends=(0,_react.useRef)([]);(0,_react.useEffect)(function(){getLoggedInMember();},[]);var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-groups-invitations').done(function(response){// console.log('SEND GROUP INVITATIONS SETTINGS SCREEN - LOGGED IN USER: ', response);
var groupOptions=[];var newSelectedGroupID=false;var unbannedGroups=response.groups.filter(function(group){return!group.is_banned;});// if logged user belongs to any groups
if(unbannedGroups.length>0){groupOptions=unbannedGroups.map(function(group){return{id:group.id,name:group.name,value:group.id};});newSelectedGroupID=groupOptions[0].value;var _selectedGroup=response.groups.filter(function(group){return group.id===Number.parseInt(newSelectedGroupID,10);})[0];friends.current=getInviteableFriends(response,_selectedGroup);}setLoggedUser(response);setGroups(groupOptions);setSelectedGroupID(selectedGroupID?selectedGroupID:newSelectedGroupID);setSelectedFriends(new Array(friends.current.length).fill(false));setSendingInvitations(false);});};var handleSelectedGroupIDChange=function handleSelectedGroupIDChange(e){setSelectedGroupID(e.target.value);};var toggleSelectableActive=function toggleSelectableActive(i){setSelectedFriends(function(previousSelectedFriends){var newSelectedFriends=previousSelectedFriends.slice();newSelectedFriends[i]=!newSelectedFriends[i];return newSelectedFriends;});};var sendInvitations=function sendInvitations(){var _jQuery;var aFriendIsSelected=selectedFriends.some(function(selected){return selected;});// if already sending invitations or no friend is selected, return
if(sendingInvitations||!aFriendIsSelected){return;}setSendingInvitations(true);// send invitation promises
var sendInvitationPromises=[];for(var i=0;i<friends.current.length;i++){// if friend selected
if(selectedFriends[i]){var sendInvitationPromise=groupMemberRouter.sendGroupInvitation({group_id:selectedGroupID,user_id:friends.current[i].id});sendInvitationPromises.push(sendInvitationPromise);}}(_jQuery=jQuery).when.apply(_jQuery,sendInvitationPromises).done(function(){// console.log('SEND GROUP INVITATIONS SETTINGS SCREEN - SEND INVITATIONS RESPONSE: ', sendInvitationResults);
// update logged in member
getLoggedInMember();}).fail(function(error){// console.log('SEND GROUP INVITATIONS SETTINGS SCREEN - SEND INVITATIONS ERROR: ', error);
setSendingInvitations(false);});};var selectedGroup=loggedUser?loggedUser.groups.filter(function(group){return group.id===Number.parseInt(selectedGroupID,10);})[0]:false;if(selectedGroup){friends.current=getInviteableFriends(loggedUser,selectedGroup);}// console.log('SEND GROUP INVITATIONS SETTINGS SCREEN - SELECTED GROUP: ', selectedGroup);
// console.log('SEND GROUP INVITATIONS SETTINGS SCREEN - INVITABLE FRIENDS: ', friends.current);
var sentGroupInvitations=[];if(loggedUser){var groupedSentGroupInvitations={};var _iterator2=_createForOfIteratorHelper(loggedUser.group_invitations_sent),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var sentInvitation=_step2.value;if(typeof groupedSentGroupInvitations[sentInvitation.group.id]==='undefined'){groupedSentGroupInvitations[sentInvitation.group.id]=[];}groupedSentGroupInvitations[sentInvitation.group.id].push(sentInvitation);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}for(var groupID in groupedSentGroupInvitations){sentGroupInvitations.push(groupedSentGroupInvitations[groupID]);}}// console.log('SEND GROUP INVITATIONS SETTINGS SCREEN - SENT GROUP INVITATIONS: ', sentGroupInvitations);
return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.groups,title:vikinger_translation.send_invitations}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,loggedUser.groups.length===0&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.send_invitations_no_results_title,text:vikinger_translation.send_invitations_no_results_text_1}),loggedUser.groups.length>0&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,groups.length===0&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.send_invitations_no_results_title,text:vikinger_translation.send_invitations_no_results_text_2}),groups.length>0&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("div",{className:"widget-box no-padding"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.select_the_group),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("div",{className:"form padded"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_FormSelect.default,{options:groups,name:"selectedGroupID",value:selectedGroupID,handleValue:true,onChange:handleSelectedGroupIDChange}))))),/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.select_your_friends),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-hollow height-limit"},friends.current.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.send_invitations_friends_no_results),friends.current.length>0&&/*#__PURE__*/_react.default.createElement(_SelectableUserStatusList.default,{data:friends.current,loggedUser:loggedUser,selectedItems:selectedFriends,toggleSelectableActive:toggleSelectableActive})),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-footer-actions"},/*#__PURE__*/_react.default.createElement("div",{className:"button secondary",onClick:sendInvitations},!sendingInvitations&&vikinger_translation.send_invitations,sendingInvitations&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_translation.sending,/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))))),/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.groups,title:vikinger_translation.pending_invitations}),sentGroupInvitations.length===0&&/*#__PURE__*/_react.default.createElement(_Notification.default,{title:vikinger_translation.pending_invitations_no_results_title,text:vikinger_translation.pending_invitations_no_results_text}),sentGroupInvitations.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"grid"},sentGroupInvitations.map(function(groupInvitations){return/*#__PURE__*/_react.default.createElement("div",{key:groupInvitations[0].group.id,className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},groupInvitations[0].group.name),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement(_GroupInvitationStatusList.default,{data:groupInvitations,loggedUser:loggedUser,onActionComplete:getLoggedInMember})));}))))));}

},{"../../router/group-member/group-member-router":346,"../../router/user/user-router":353,"../form/FormSelect":154,"../loader/Loader":203,"../loader/LoaderSpinnerSmall":205,"../notification/Notification":218,"../section/SectionHeader":257,"../user-status/SelectableUserStatusList":283,"../user-status/user-status-group/user-status-group-invitation/GroupInvitationStatusList":289,"react":380}],269:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=SettingsWidget;var _react=_interopRequireDefault(require("react"));var _FormRow=_interopRequireDefault(require("../form/FormRow"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var splitFieldsInRows=function splitFieldsInRows(fields){var rowLength=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2;var formRows=[];var i=0;var formItems=[];var _iterator=_createForOfIteratorHelper(fields),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var field=_step.value;if(i===rowLength){formRows.push(formItems);i=0;formItems=[];}formItems.push(field);i++;}// dump remaining fields
}catch(err){_iterator.e(err);}finally{_iterator.f();}if(formItems.length>0){formRows.push(formItems);}return formRows;};function SettingsWidget(props){var formRows=splitFieldsInRows(props.data.fields);var renderedFormRows=formRows.map(function(formItems,i){return/*#__PURE__*/_react.default.createElement(_FormRow.default,{key:i,data:formItems,modifiers:"split",onFieldUpdate:props.onFieldUpdate});});return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},props.data.name),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("div",{className:"form"},renderedFormRows)));}

},{"../form/FormRow":153,"react":380}],270:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=SocialSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _SettingsWidget=_interopRequireDefault(require("./SettingsWidget"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var memberRouter=_interopRequireWildcard(require("../../router/member/member-router"));var _xprofile=require("../utils/xprofile");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function SocialSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)([]),_useState4=_slicedToArray(_useState3,2),profileDataGroups=_useState4[0],setProfileDataGroups=_useState4[1];var _useState5=(0,_react.useState)({}),_useState6=_slicedToArray(_useState5,2),profileDataFields=_useState6[0],setProfileDataFields=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),saving=_useState8[0],setSaving=_useState8[1];(0,_react.useEffect)(function(){getLoggedInMember();},[]);var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-settings').done(function(response){// console.log('SOCIAL SETTINGS SCREEN - LOGGED IN USER: ', response);
// get social data
var loggedUserProfileDataGroups=(0,_xprofile.getGroups)(response.profile_data,'social');setLoggedUser(response);setProfileDataGroups(loggedUserProfileDataGroups);});};var updateProfileData=function updateProfileData(field,value){setProfileDataFields(function(previousProfileDataFields){return _objectSpread(_objectSpread({},previousProfileDataFields),{},_defineProperty({},field.id,value));});};var save=function save(){// return if already saving
if(saving){return;}setSaving(true);var profileDataChanged=Object.keys(profileDataFields).length>0;// only process data if it changed
if(profileDataChanged){var updateProfileDataPromise=memberRouter.updateMemberXProfileData({fields:profileDataFields,member_id:loggedUser.id});updateProfileDataPromise.done(function(updateProfileDataResponse){// console.log('SOCIAL SETTINGS SCREEN - UPDATE PROFILE DATA RESPONSE:', updateProfileDataResponse);
// refresh page
window.location.reload();}).fail(function(error){// console.log('SOCIAL SETTINGS SCREEN - ERROR WHEN SAVING: ', error);
setSaving(false);});}else{setSaving(false);}};return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.my_profile,title:vikinger_translation.social_networks}),!loggedUser&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,profileDataGroups.length>0&&/*#__PURE__*/_react.default.createElement("div",{className:"grid-column"},profileDataGroups.map(function(group){return/*#__PURE__*/_react.default.createElement(_SettingsWidget.default,{key:group.id,data:group,onFieldUpdate:updateProfileData});}),/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content-options"},/*#__PURE__*/_react.default.createElement("div",{className:"button primary",onClick:save},!saving&&vikinger_translation.save_changes,saving&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_translation.saving,/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))))),profileDataGroups.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_social_info_available)));}

},{"../../router/member/member-router":348,"../../router/user/user-router":353,"../loader/Loader":203,"../loader/LoaderSpinnerSmall":205,"../section/SectionHeader":257,"../utils/xprofile":317,"./SettingsWidget":269,"react":380}],271:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=StreamSettingsScreen;var _react=_interopRequireWildcard(require("react"));var _SectionHeader=_interopRequireDefault(require("../section/SectionHeader"));var _Loader=_interopRequireDefault(require("../loader/Loader"));var _LoaderSpinnerSmall=_interopRequireDefault(require("../loader/LoaderSpinnerSmall"));var _FormInput=_interopRequireDefault(require("../form/FormInput"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function StreamSettingsScreen(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),loggedUser=_useState2[0],setLoggedUser=_useState2[1];var _useState3=(0,_react.useState)(''),_useState4=_slicedToArray(_useState3,2),streamerUsername=_useState4[0],setStreamerUsername=_useState4[1];var _useState5=(0,_react.useState)(true),_useState6=_slicedToArray(_useState5,2),fetchingStreamerUsername=_useState6[0],setFetchingStreamerUsername=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),saving=_useState8[0],setSaving=_useState8[1];(0,_react.useEffect)(function(){getLoggedInMember();getLoggedUserStreamUsername();},[]);var getLoggedInMember=function getLoggedInMember(){userRouter.getLoggedInMember('user-settings').done(function(response){// console.log('STREAM SETTINGS SCREEN - LOGGED IN USER: ', response);
setLoggedUser(response);});};var getLoggedUserStreamUsername=function getLoggedUserStreamUsername(){userRouter.getLoggedUserStreamUsername().done(function(response){// console.log('STREAM SETTINGS SCREEN - GET LOGGED USER STREAM USERNAME RESPONSE: ', response);
setStreamerUsername(response);setFetchingStreamerUsername(false);}).fail(function(error){// console.log('STREAM SETTINGS SCREEN - GET LOGGED USER STREAM USERNAME ERROR: ', error);
});};var handleStreamerUsernameChange=function handleStreamerUsernameChange(value){setStreamerUsername(value);};var save=function save(){// return if already saving
if(saving){return;}setSaving(true);var updateLoggedUserStreamUsernamePromise=userRouter.updateLoggedUserStreamUsername({username:streamerUsername});updateLoggedUserStreamUsernamePromise.done(function(response){// console.log('STREAM SETTINGS SCREEN - UPDATE LOGGED USER STREAM USERNAME RESPONSE: ', response);
window.location.reload();}).fail(function(error){// console.log('STREAM SETTINGS SCREEN - UPDATE LOGGED USER STREAM USERNAME ERROR: ', error);
setSaving(false);});};return/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content"},/*#__PURE__*/_react.default.createElement(_SectionHeader.default,{pretitle:vikinger_translation.my_profile,title:vikinger_translation.stream}),!loggedUser&&fetchingStreamerUsername&&/*#__PURE__*/_react.default.createElement(_Loader.default,null),loggedUser&&!fetchingStreamerUsername&&/*#__PURE__*/_react.default.createElement("div",{className:"grid-column"},/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.stream_settings_username_title),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},/*#__PURE__*/_react.default.createElement("div",{className:"form"},/*#__PURE__*/_react.default.createElement("div",{className:"form-row"},/*#__PURE__*/_react.default.createElement("div",{className:"form-item"},/*#__PURE__*/_react.default.createElement(_FormInput.default,{name:"streamerUsername",label:vikinger_translation.stream_settings_username_placeholder,modifiers:"small",value:streamerUsername,onChange:handleStreamerUsernameChange})))))),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.stream_settings_preview_title),/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-text"},vikinger_translation.stream_settings_preview_text),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},streamerUsername&&/*#__PURE__*/_react.default.createElement("div",{className:"iframe-wrap"},/*#__PURE__*/_react.default.createElement("iframe",{src:"//player.twitch.tv/?channel=".concat(streamerUsername,"&parent=").concat(vikinger_constants.settings.stream_twitch_embeds_parent),allowFullScreen:true})),!streamerUsername&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.stream_settings_preview_no_results))),/*#__PURE__*/_react.default.createElement("div",{className:"account-hub-content-options"},/*#__PURE__*/_react.default.createElement("div",{className:"button primary",onClick:save},!saving&&vikinger_translation.save_changes,saving&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_translation.saving,/*#__PURE__*/_react.default.createElement(_LoaderSpinnerSmall.default,null))))));}

},{"../../router/user/user-router":353,"../form/FormInput":145,"../loader/Loader":203,"../loader/LoaderSpinnerSmall":205,"../section/SectionHeader":257,"react":380}],272:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=SocialLink;var _react=_interopRequireDefault(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SocialLink(props){return/*#__PURE__*/_react.default.createElement("a",{key:props.data.name,className:"social-link ".concat(props.modifiers||''," ").concat(props.data.name),href:props.data.link,target:"_blank"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:props.data.name,modifiers:"social-link-icon"}));}

},{"../icon/IconSVG":201,"react":380}],273:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=SocialLinkList;var _react=_interopRequireDefault(require("react"));var _SocialLink=_interopRequireDefault(require("./SocialLink"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SocialLinkList(props){var renderedSocialLinkList=props.data.map(function(socialItem,i){return/*#__PURE__*/_react.default.createElement(_SocialLink.default,{key:i,data:socialItem,modifiers:props.modifiers});});return/*#__PURE__*/_react.default.createElement("div",{className:"social-links ".concat(props.modifiers||'')},renderedSocialLinkList);}

},{"./SocialLink":272,"react":380}],274:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=Tag;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function Tag(props){return/*#__PURE__*/_react.default.createElement("a",{className:"tag-item secondary",href:props.link},props.name);}

},{"react":380}],275:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=TagList;var _react=_interopRequireDefault(require("react"));var _Tag=_interopRequireDefault(require("./Tag"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function TagList(props){var tagItems=props.tags.map(function(tag){return/*#__PURE__*/_react.default.createElement(_Tag.default,{key:tag.id,name:tag.name,link:tag.link});});return/*#__PURE__*/_react.default.createElement("div",{className:"tag-list"},tagItems);}

},{"./Tag":274,"react":380}],276:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=TagSticker;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function TagSticker(props){var tooltipRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){if(props.title){(0,_plugins.createTooltip)({containerElement:tooltipRef.current,offset:4,direction:'top',animation:{type:'translate-out-fade'}});}},[props.title]);return/*#__PURE__*/_react.default.createElement("div",_extends({ref:tooltipRef,className:"tag-sticker ".concat(props.modifiers||'')},props.title?{'data-title':props.title}:{}),props.icon&&/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:props.icon,modifiers:"tag-sticker-icon ".concat(props.iconModifiers||''," ").concat(props.text?'spaced':'')}),props.text);}

},{"../../utils/plugins":356,"../icon/IconSVG":201,"react":380}],277:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=UploadBox;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}var allowedExtensions=".".concat(vikinger_constants.settings.media_photo_allowed_extensions.join(',.'));var allowedExtensionsText="".concat(vikinger_constants.settings.media_photo_allowed_extensions.join(', '));function UploadBox(props){var _useState=(0,_react.useState)(props.title),_useState2=_slicedToArray(_useState,2),title=_useState2[0],setTitle=_useState2[1];var _useState3=(0,_react.useState)(props.active||false),_useState4=_slicedToArray(_useState3,2),active=_useState4[0],setActive=_useState4[1];var text=props.text||allowedExtensionsText;var fileData=(0,_react.useRef)(null);var fileInputRef=(0,_react.useRef)(null);var updateFile=function updateFile(){var file=fileInputRef.current.files[0];// console.log('UPLOAD BOX - SELECTED FILE: ', file);
// if no file selected (user clicked cancel)
if(typeof file==='undefined'){return;}// release previous blob image resource if exists
if(fileData.current){URL.revokeObjectURL(fileData.current.url);// console.log('UPLOAD BOX - REVOKE FILE URL: ', fileData.current.url);
}// save new selected file
fileData.current={file:new File([file],file.name),url:URL.createObjectURL(file)};setTitle(file.name);setActive(true);props.onFileSelect(fileData.current);};(0,_react.useEffect)(function(){setTitle(props.title);},[props.title]);(0,_react.useEffect)(function(){setActive(props.active);},[props.active]);return/*#__PURE__*/_react.default.createElement("div",{className:"upload-box ".concat(props.modifiers||''," ").concat(active?'active':''),onClick:function onClick(){fileInputRef.current.click();}},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"members",modifiers:"upload-box-icon"}),/*#__PURE__*/_react.default.createElement("p",{className:"upload-box-title"},title),/*#__PURE__*/_react.default.createElement("p",{className:"upload-box-text"},text),/*#__PURE__*/_react.default.createElement("input",{ref:fileInputRef,className:"upload-box-file-input",type:"file",accept:allowedExtensions,onChange:updateFile}));}

},{"../icon/IconSVG":201,"react":380}],278:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=UserGroupManagePreview;var _react=_interopRequireWildcard(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _GroupManagePopup=_interopRequireDefault(require("../group/GroupManagePopup"));var _TagSticker=_interopRequireDefault(require("../tag/TagSticker"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function UserGroupManagePreview(props){var groupManagePopupTriggerRef=(0,_react.useRef)(null);return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview small fixed-height-medium"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url('".concat(props.data.cover_image_url,"') center center /  cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:props.data.status}),/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{data:props.data,modifiers:"user-short-description-avatar"}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title small"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},props.data.name)),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-text regular"},props.descriptionText)),/*#__PURE__*/_react.default.createElement("p",{ref:groupManagePopupTriggerRef,className:"button white full"},vikinger_translation.manage_group)),/*#__PURE__*/_react.default.createElement(_GroupManagePopup.default,{groupManagePopupTriggerRef:groupManagePopupTriggerRef,data:props.data,loggedUser:props.loggedUser,groupPreviewDescription:props.descriptionText}));}

},{"../avatar/Avatar":55,"../group/GroupManagePopup":165,"../tag/TagSticker":276,"react":380}],279:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UserGroupPreview;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _TagSticker=_interopRequireDefault(require("../tag/TagSticker"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UserGroupPreview(props){return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview small"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url('".concat(props.data.cover_image_url,"') center center /  cover no-repeat")}}),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},/*#__PURE__*/_react.default.createElement(_TagSticker.default,{icon:props.data.status}),/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{data:props.data,modifiers:"user-short-description-avatar",noLink:true}),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-title small"},props.data.name),/*#__PURE__*/_react.default.createElement("p",{className:"user-short-description-text regular"},props.descriptionText))));}

},{"../avatar/Avatar":55,"../tag/TagSticker":276,"react":380}],280:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UserPreview;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UserPreview(props){return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview small fixed-height"},/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-cover",style:{background:"url('".concat(props.data.cover_url,"') center center /  cover no-repeat")}},props.actionableCover&&/*#__PURE__*/_react.default.createElement("div",{className:"uploadable-item-remove-button",onClick:props.onCoverActionClick},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"cross",modifiers:"uploadable-item-remove-button-icon"}))),/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-info"},props.actionableAvatar&&/*#__PURE__*/_react.default.createElement("div",{className:"uploadable-item-remove-button",onClick:props.onAvatarActionClick},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"cross",modifiers:"uploadable-item-remove-button-icon"})),/*#__PURE__*/_react.default.createElement("div",{className:"user-short-description small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{data:props.data,modifiers:"user-short-description-avatar",noLink:true}))));}

},{"../avatar/Avatar":55,"../icon/IconSVG":201,"react":380}],281:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UserPreviewAuthor;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../badge/BadgeVerified"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UserPreviewAuthor(props){var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&props.data.verified;return/*#__PURE__*/_react.default.createElement("div",{className:"user-preview-author"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"micro",modifiers:"user-preview-author-image",data:props.data,noBorder:true}),/*#__PURE__*/_react.default.createElement("p",{className:"user-preview-author-title"},props.title||vikinger_translation.invited_by),/*#__PURE__*/_react.default.createElement("p",{className:"user-preview-author-text"},/*#__PURE__*/_react.default.createElement("a",{href:props.data.link},props.data.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)));}

},{"../avatar/Avatar":55,"../badge/BadgeVerified":82,"react":380}],282:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=SelectableUserStatus;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _Checkbox=_interopRequireDefault(require("../form/Checkbox"));var _BadgeVerified=_interopRequireDefault(require("../badge/BadgeVerified"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SelectableUserStatus(props){var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&props.data.verified;return/*#__PURE__*/_react.default.createElement("div",{className:"user-status user-status-selectable"},/*#__PURE__*/_react.default.createElement(_Checkbox.default,{active:props.selected,toggleActive:props.toggleSelectableActive}),/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:props.data,noBorder:true,noLink:true}),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-title"},/*#__PURE__*/_react.default.createElement("span",{className:"bold"},props.data.name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text small"},"@",props.data.mention_name,displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)));}

},{"../avatar/Avatar":55,"../badge/BadgeVerified":82,"../form/Checkbox":142,"react":380}],283:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=SelectableUserStatusList;var _react=_interopRequireDefault(require("react"));var _SelectableUserStatus=_interopRequireDefault(require("./SelectableUserStatus"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function SelectableUserStatusList(props){var renderedSelectableUserStatusList=props.data.map(function(user,i){return/*#__PURE__*/_react.default.createElement(_SelectableUserStatus.default,{key:user.id,data:user,loggedUser:props.loggedUser,selected:props.selectedItems[i],toggleSelectableActive:function toggleSelectableActive(){props.toggleSelectableActive(i);}});});return/*#__PURE__*/_react.default.createElement("div",{className:"user-status-list user-status-list-3-cols"},renderedSelectableUserStatusList);}

},{"./SelectableUserStatus":282,"react":380}],284:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UserStatus;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("./user-status-level/UserStatusLevel"));var _UserStatusType=_interopRequireDefault(require("./user-status-type/UserStatusType"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UserStatus(props){var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&props.showVerifiedBadge&&props.data.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.membership;return/*#__PURE__*/_react.default.createElement("div",{className:"user-status request-small"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:props.data,noBorder:true}),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title"},/*#__PURE__*/_react.default.createElement("a",{className:"bold",href:props.data.link},props.data.name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.membership.name,size:"small"}),props.data.member_types.length>0&&props.data.member_types.map(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];if(memberTypeSettings&&memberTypeSettings.show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}})),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text small"},"@",props.data.mention_name,displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),/*#__PURE__*/_react.default.createElement("div",{className:"action-request-list"},/*#__PURE__*/_react.default.createElement("img",{className:"user-status-reaction-image",src:props.data.reaction.image_url,alt:"reaction-".concat(props.data.reaction.name)})));}

},{"../avatar/Avatar":55,"../badge/BadgeVerified":82,"./user-status-level/UserStatusLevel":292,"./user-status-type/UserStatusType":296,"react":380}],285:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UserStatusList;var _react=_interopRequireDefault(require("react"));var _UserStatus=_interopRequireDefault(require("./UserStatus"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UserStatusList(props){var renderedUserStatusList=props.data.map(function(user){return/*#__PURE__*/_react.default.createElement(_UserStatus.default,{key:user.id,data:user,showVerifiedBadge:props.showVerifiedBadge});});return/*#__PURE__*/_react.default.createElement("div",{className:"user-status-list"},renderedUserStatusList);}

},{"./UserStatus":284,"react":380}],286:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=EditedByStatus;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../avatar/Avatar"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function EditedByStatus(props){return/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,vikinger_translation.edited_by,/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"micro",modifiers:"user-status-avatar",data:props.user,noBorder:true}),/*#__PURE__*/_react.default.createElement("a",{href:props.user.link},props.user.name));}

},{"../../avatar/Avatar":55,"react":380}],287:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=FriendStatus;var _react=_interopRequireWildcard(require("react"));var _friend=_interopRequireDefault(require("../../utils/friend"));var _Avatar=_interopRequireDefault(require("../../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../user-status-level/UserStatusLevel"));var _AddFriendIconButton=_interopRequireDefault(require("../../button/action-icon-button/action-icon-button-friend/AddFriendIconButton"));var _AcceptFriendRequestIconButton=_interopRequireDefault(require("../../button/action-icon-button/action-icon-button-friend/AcceptFriendRequestIconButton"));var _RejectFriendRequestIconButton=_interopRequireDefault(require("../../button/action-icon-button/action-icon-button-friend/RejectFriendRequestIconButton"));var _WithdrawFriendRequestIconButton=_interopRequireDefault(require("../../button/action-icon-button/action-icon-button-friend/WithdrawFriendRequestIconButton"));var _RemoveFriendIconButton=_interopRequireDefault(require("../../button/action-icon-button/action-icon-button-friend/RemoveFriendIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function FriendStatus(props){var _useState=(0,_react.useState)(false),_useState2=_slicedToArray(_useState,2),accepting=_useState2[0],setAccepting=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),rejecting=_useState4[0],setRejecting=_useState4[1];var acceptingRequest=function acceptingRequest(){setAccepting(true);};var rejectingRequest=function rejectingRequest(){setRejecting(true);};var friendable=(0,_friend.default)(props.loggedUser,props.data.id);var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&props.data.verified;var displayVerifiedMemberBadgeInUsername=displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username;var displayVerifiedMemberBadgeInFullname=displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.membership;return/*#__PURE__*/_react.default.createElement("div",{className:"user-status ".concat(props.modifiers||'')},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:props.data,noBorder:true}),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title"},/*#__PURE__*/_react.default.createElement("a",{className:"bold",href:props.data.link},props.data.name),displayVerifiedMemberBadgeInFullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.membership.name,size:"small"})),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text small"},"@",props.data.mention_name,displayVerifiedMemberBadgeInUsername&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),/*#__PURE__*/_react.default.createElement("div",{className:"action-request-list"},props.loggedUser&&props.loggedUser.id!==props.data.id&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!friendable.friendRequestSent()&&!friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AddFriendIconButton.default,{userID:props.data.id,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete}),friendable.friendRequestSent()&&/*#__PURE__*/_react.default.createElement(_WithdrawFriendRequestIconButton.default,{userID:props.data.id,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete}),friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_AcceptFriendRequestIconButton.default,{userID:props.data.id,loggedUser:props.loggedUser,onActionStart:acceptingRequest,onActionComplete:props.onActionComplete,locked:rejecting}),props.allowReject&&friendable.friendRequestReceived()&&/*#__PURE__*/_react.default.createElement(_RejectFriendRequestIconButton.default,{userID:props.data.id,loggedUser:props.loggedUser,onActionStart:rejectingRequest,onActionComplete:props.onActionComplete,locked:accepting})),friendable.isFriend()&&/*#__PURE__*/_react.default.createElement(_RemoveFriendIconButton.default,{userID:props.data.id,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete}))));}

},{"../../avatar/Avatar":55,"../../badge/BadgeVerified":82,"../../button/action-icon-button/action-icon-button-friend/AcceptFriendRequestIconButton":102,"../../button/action-icon-button/action-icon-button-friend/AddFriendIconButton":103,"../../button/action-icon-button/action-icon-button-friend/RejectFriendRequestIconButton":104,"../../button/action-icon-button/action-icon-button-friend/RemoveFriendIconButton":105,"../../button/action-icon-button/action-icon-button-friend/WithdrawFriendRequestIconButton":106,"../../utils/friend":309,"../user-status-level/UserStatusLevel":292,"react":380}],288:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupInvitationStatus;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../../../badge/BadgeVerified"));var _RemoveGroupInvitationIconButton=_interopRequireDefault(require("../../../button/action-icon-button/action-icon-button-group/RemoveGroupInvitationIconButton"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupInvitationStatus(props){var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&props.data.user.verified;return/*#__PURE__*/_react.default.createElement("div",{className:"user-status ".concat(props.modifiers||'')},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:props.data.user,noBorder:true}),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-title"},/*#__PURE__*/_react.default.createElement("a",{className:"bold",href:props.data.user.link},props.data.user.name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text small"},"@",props.data.user.mention_name,displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),/*#__PURE__*/_react.default.createElement("div",{className:"action-request-list"},/*#__PURE__*/_react.default.createElement(_RemoveGroupInvitationIconButton.default,{data:props.data,onActionComplete:props.onActionComplete})));}

},{"../../../avatar/Avatar":55,"../../../badge/BadgeVerified":82,"../../../button/action-icon-button/action-icon-button-group/RemoveGroupInvitationIconButton":112,"react":380}],289:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupInvitationStatusList;var _react=_interopRequireDefault(require("react"));var _GroupInvitationStatus=_interopRequireDefault(require("./GroupInvitationStatus"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupInvitationStatusList(props){var renderedGroupInvitationStatusList=props.data.map(function(invitation){return/*#__PURE__*/_react.default.createElement(_GroupInvitationStatus.default,{key:invitation.id,data:invitation,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete});});return/*#__PURE__*/_react.default.createElement("div",{className:"user-status-list"},renderedGroupInvitationStatusList);}

},{"./GroupInvitationStatus":288,"react":380}],290:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupMemberStatus;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../../avatar/Avatar"));var _BadgeVerified=_interopRequireDefault(require("../../../badge/BadgeVerified"));var _PromoteGroupMemberToModIconButton=_interopRequireDefault(require("../../../button/action-icon-button/action-icon-button-group/PromoteGroupMemberToModIconButton"));var _PromoteGroupMemberToAdminIconButton=_interopRequireDefault(require("../../../button/action-icon-button/action-icon-button-group/PromoteGroupMemberToAdminIconButton"));var _DemoteGroupMemberToMemberIconButton=_interopRequireDefault(require("../../../button/action-icon-button/action-icon-button-group/DemoteGroupMemberToMemberIconButton"));var _DemoteGroupMemberToModIconButton=_interopRequireDefault(require("../../../button/action-icon-button/action-icon-button-group/DemoteGroupMemberToModIconButton"));var _BanGroupMemberIconButton=_interopRequireDefault(require("../../../button/action-icon-button/action-icon-button-group/BanGroupMemberIconButton"));var _UnbanGroupMemberIconButton=_interopRequireDefault(require("../../../button/action-icon-button/action-icon-button-group/UnbanGroupMemberIconButton"));var _RemoveGroupMemberIconButton=_interopRequireDefault(require("../../../button/action-icon-button/action-icon-button-group/RemoveGroupMemberIconButton"));var _group=_interopRequireDefault(require("../../../utils/group"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupMemberStatus(props){var groupable=(0,_group.default)(props.loggedUser,props.group,props.data);var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&props.data.verified;return/*#__PURE__*/_react.default.createElement("div",{className:"user-status ".concat(props.modifiers||'')},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:props.data,noBorder:true}),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-title"},/*#__PURE__*/_react.default.createElement("a",{className:"bold",href:props.data.link},props.data.name),displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text small"},"@",props.data.mention_name,displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),/*#__PURE__*/_react.default.createElement("div",{className:"action-request-list"},props.loggedUser&&props.loggedUser.id!==props.data.id&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!groupable.groupMemberIsBanned()&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,!groupable.groupMemberIsAdmin()&&groupable.canPromoteMemberToAdmin()&&/*#__PURE__*/_react.default.createElement(_PromoteGroupMemberToAdminIconButton.default,{member:props.data,group:props.group,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete}),!groupable.groupMemberIsAdmin()&&!groupable.groupMemberIsMod()&&groupable.canPromoteMemberToMod()&&/*#__PURE__*/_react.default.createElement(_PromoteGroupMemberToModIconButton.default,{member:props.data,group:props.group,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete}),groupable.groupMemberIsAdmin()&&groupable.canDemoteMemberToMod()&&/*#__PURE__*/_react.default.createElement(_DemoteGroupMemberToModIconButton.default,{member:props.data,group:props.group,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete}),(groupable.groupMemberIsAdmin()||groupable.groupMemberIsMod())&&groupable.canDemoteMemberToMember()&&/*#__PURE__*/_react.default.createElement(_DemoteGroupMemberToMemberIconButton.default,{member:props.data,group:props.group,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete}),groupable.canRemoveGroupMember()&&/*#__PURE__*/_react.default.createElement(_RemoveGroupMemberIconButton.default,{member:props.data,group:props.group,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete}),!groupable.groupMemberIsAdmin()&&groupable.canBanMember()&&/*#__PURE__*/_react.default.createElement(_BanGroupMemberIconButton.default,{member:props.data,group:props.group,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete})),groupable.groupMemberIsBanned()&&groupable.canUnbanMember()&&/*#__PURE__*/_react.default.createElement(_UnbanGroupMemberIconButton.default,{member:props.data,group:props.group,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete}))));}

},{"../../../avatar/Avatar":55,"../../../badge/BadgeVerified":82,"../../../button/action-icon-button/action-icon-button-group/BanGroupMemberIconButton":107,"../../../button/action-icon-button/action-icon-button-group/DemoteGroupMemberToMemberIconButton":108,"../../../button/action-icon-button/action-icon-button-group/DemoteGroupMemberToModIconButton":109,"../../../button/action-icon-button/action-icon-button-group/PromoteGroupMemberToAdminIconButton":110,"../../../button/action-icon-button/action-icon-button-group/PromoteGroupMemberToModIconButton":111,"../../../button/action-icon-button/action-icon-button-group/RemoveGroupMemberIconButton":113,"../../../button/action-icon-button/action-icon-button-group/UnbanGroupMemberIconButton":114,"../../../utils/group":311,"react":380}],291:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=GroupMemberStatusList;var _react=_interopRequireDefault(require("react"));var _GroupMemberStatus=_interopRequireDefault(require("./GroupMemberStatus"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function GroupMemberStatusList(props){var renderedGroupMemberStatusList=props.data.map(function(user){return/*#__PURE__*/_react.default.createElement(_GroupMemberStatus.default,{key:user.id,data:user,group:props.group,modifiers:props.modifiers,loggedUser:props.loggedUser,onActionComplete:props.onActionComplete});});return/*#__PURE__*/_react.default.createElement("div",{className:"user-status-list"},renderedGroupMemberStatusList);}

},{"./GroupMemberStatus":290,"react":380}],292:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UserStatusLevel;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UserStatusLevel(props){var modifierClasses=false;if(props.size==='small'){modifierClasses='vikinger-pmpro-level-tag_small';}return/*#__PURE__*/_react.default.createElement("div",{className:"vikinger-pmpro-level-tag ".concat(modifierClasses||'')},/*#__PURE__*/_react.default.createElement("p",{className:"vikinger-pmpro-level-tag-text"},props.name));}

},{"react":380}],293:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=MessageStatus;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../avatar/Avatar"));var _IconSVG=_interopRequireDefault(require("../../icon/IconSVG"));var _BadgeVerified=_interopRequireDefault(require("../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../user-status-level/UserStatusLevel"));var _core=require("../../../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function MessageStatus(props){var messageContent=props.ownLastMessage?"".concat(vikinger_translation.you,": ").concat(props.data.content):props.data.content;var recipientUser=props.data.recipients.length&&props.data.recipients[0].user?props.data.recipients[0].user:{};var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&recipientUser.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&recipientUser.membership;return/*#__PURE__*/_react.default.createElement("div",{className:"user-status"},/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:recipientUser,noBorder:true,noLink:true}),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title"},props.favorite&&/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"starred",modifiers:"user-status-favorite-icon"}),/*#__PURE__*/_react.default.createElement("span",{className:"bold"},recipientUser.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:recipientUser.membership.name,size:"small"})),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text"},(0,_core.truncateText)(messageContent,40)),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-timestamp floaty"},props.data.timestamp));}

},{"../../../utils/core":355,"../../avatar/Avatar":55,"../../badge/BadgeVerified":82,"../../icon/IconSVG":201,"../user-status-level/UserStatusLevel":292,"react":380}],294:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=NotificationStatus;var _react=_interopRequireDefault(require("react"));var _Avatar=_interopRequireDefault(require("../../avatar/Avatar"));var _Checkbox=_interopRequireDefault(require("../../form/Checkbox"));var _IconSVG=_interopRequireDefault(require("../../icon/IconSVG"));var _BadgeVerified=_interopRequireDefault(require("../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../user-status-level/UserStatusLevel"));var _UserStatusType=_interopRequireDefault(require("../user-status-type/UserStatusType"));var _notification=require("../../utils/notification");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function NotificationStatus(props){var statusIcon=(0,_notification.getNotificationComponentIcon)(props.data.component);var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&props.data.user&&props.data.user.verified;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.user&&props.data.user.membership;return/*#__PURE__*/_react.default.createElement("div",{className:"user-status notification ".concat(!props.data.user&&!props.data.group?'no-padding-left':'')},props.data.user&&/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:props.data.user,noBorder:true}),!props.data.user&&props.data.group&&/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:props.data.group,noBorder:true}),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title"},props.data.user&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,/*#__PURE__*/_react.default.createElement("a",{className:"bold",href:props.data.user.link},props.data.user.name),displayVerifiedMemberBadge&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.user.membership.name,size:"small"}),props.data.user&&props.data.user.member_types.length>0&&props.data.user.member_types.map(function(memberType){if(vikinger_constants.settings.member_types[memberType].show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}})),/*#__PURE__*/_react.default.createElement("span",{dangerouslySetInnerHTML:{__html:" ".concat(props.data.description)}})),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-timestamp"},props.data.timestamp),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:statusIcon,modifiers:"user-status-icon"}),props.selectable&&/*#__PURE__*/_react.default.createElement(_Checkbox.default,{active:props.selected,modifiers:"small",toggleActive:props.toggleSelectableActive}));}

},{"../../avatar/Avatar":55,"../../badge/BadgeVerified":82,"../../form/Checkbox":142,"../../icon/IconSVG":201,"../../utils/notification":313,"../user-status-level/UserStatusLevel":292,"../user-status-type/UserStatusType":296,"react":380}],295:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=SearchStatus;var _react=_interopRequireWildcard(require("react"));var _Avatar=_interopRequireDefault(require("../../avatar/Avatar"));var _IconSVG=_interopRequireDefault(require("../../icon/IconSVG"));var _BadgeVerified=_interopRequireDefault(require("../../badge/BadgeVerified"));var _UserStatusLevel=_interopRequireDefault(require("../user-status-level/UserStatusLevel"));var _UserStatusType=_interopRequireDefault(require("../user-status-type/UserStatusType"));var _search=require("../../utils/search");var _post=_interopRequireDefault(require("../../utils/post"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function SearchStatus(props){var _getSearchStatusTypeD=(0,_search.getSearchStatusTypeData)(props.type,props.data),_getSearchStatusTypeD2=_slicedToArray(_getSearchStatusTypeD,3),statusTitle=_getSearchStatusTypeD2[0],statusText=_getSearchStatusTypeD2[1],statusIcon=_getSearchStatusTypeD2[2];var postCoverStyle=(0,_react.useRef)(props.data.cover_url_thumb?{background:"url(".concat(props.data.cover_url_thumb,") center center / cover no-repeat")}:{});var postFormatIcon=_post.default.getPostFormatIcon(props.data.format);var displayVerifiedMemberBadge=vikinger_constants.plugin_active['bp-verified-member']&&props.type==='user'&&props.data.verified;var displayVerifiedMemberBadgeInUsername=displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_username;var displayVerifiedMemberBadgeInFullname=displayVerifiedMemberBadge&&vikinger_constants.settings.bp_verified_member_display_badge_in_profile_fullname;var displayMembershipTag=vikinger_constants.plugin_active['pmpro-buddypress']&&vikinger_constants.settings.pmpro_bp_membership_level_tag_display_on_profile_is_enabled&&props.data.membership;return/*#__PURE__*/_react.default.createElement("div",{className:"user-status notification"},(props.type==='user'||props.type==='group')&&/*#__PURE__*/_react.default.createElement(_Avatar.default,{size:"small",modifiers:"user-status-avatar",data:props.data,noBorder:true,noLink:true}),props.type==='post'&&/*#__PURE__*/_react.default.createElement(_react.default.Fragment,null,props.data.cover_url&&/*#__PURE__*/_react.default.createElement("div",{className:"user-status-avatar picture small round",style:postCoverStyle.current}),!props.data.cover_url&&/*#__PURE__*/_react.default.createElement("div",{className:"post-format-tag"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:postFormatIcon,modifiers:"post-format-tag-icon"}))),/*#__PURE__*/_react.default.createElement("div",{className:"user-status-title"},/*#__PURE__*/_react.default.createElement("span",{className:"bold"},statusTitle),displayVerifiedMemberBadgeInFullname&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null),displayMembershipTag&&/*#__PURE__*/_react.default.createElement(_UserStatusLevel.default,{name:props.data.membership.name,size:"small"}),props.type==='user'&&props.data.member_types.length>0&&props.data.member_types.map(function(memberType){var memberTypeSettings=vikinger_constants.settings.member_types[memberType];if(memberTypeSettings&&memberTypeSettings.show_in_list==='1'){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:memberType,name:memberType});}})),/*#__PURE__*/_react.default.createElement("p",{className:"user-status-text"},statusText,displayVerifiedMemberBadgeInUsername&&/*#__PURE__*/_react.default.createElement(_BadgeVerified.default,null)),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:statusIcon,modifiers:"user-status-icon"}));}

},{"../../avatar/Avatar":55,"../../badge/BadgeVerified":82,"../../icon/IconSVG":201,"../../utils/post":314,"../../utils/search":316,"../user-status-level/UserStatusLevel":292,"../user-status-type/UserStatusType":296,"react":380}],296:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UserStatusType;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UserStatusType(props){var modifierClasses=false;if(props.size==='small'){modifierClasses='vikinger-user-tag_small';}return/*#__PURE__*/_react.default.createElement("div",{className:"vikinger-user-tag ".concat(modifierClasses||'')},/*#__PURE__*/_react.default.createElement("p",{className:"vikinger-user-tag-text"},props.name));}

},{"react":380}],297:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=UserStatusTypeList;var _react=_interopRequireDefault(require("react"));var _UserStatusType=_interopRequireDefault(require("./UserStatusType"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function UserStatusTypeList(props){return/*#__PURE__*/_react.default.createElement("div",{className:"vikinger-user-tag-list"},props.tags.map(function(tag){return/*#__PURE__*/_react.default.createElement(_UserStatusType.default,{key:tag,name:tag,size:props.size});}));}

},{"./UserStatusType":296,"react":380}],298:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _core=require("../../utils/core");function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var Paginator={getNextPageToFetch:function getNextPageToFetch(options){var config={createCount:0,deleteCount:0};(0,_core.deepExtend)(config,options);// console.log('PAGINATOR - CREATE COUNT: ', config.createCount);
// console.log('PAGINATOR - DELETE COUNT: ', config.deleteCount);
var pageOffset=0,countDiff=config.createCount-config.deleteCount;if(countDiff===0){return config.page;}if(countDiff>0){pageOffset=Math.floor(Math.abs(countDiff)/config.per_page);}else{pageOffset=-Math.ceil(Math.abs(countDiff)/config.per_page);}// console.log('PAGINATOR - PAGE OFFSET: ', pageOffset);
// console.log('PAGINATOR - PAGE: ', config.page);
// console.log('PAGINATOR - PAGE WITH OFFSET: ', config.page + pageOffset);
return config.page+pageOffset;},removeDuplicates:function removeDuplicates(items,newItems,compareKey){var duplicateItemKeys=[];var _iterator=_createForOfIteratorHelper(items),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var item=_step.value;var _iterator2=_createForOfIteratorHelper(newItems),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var newItem=_step2.value;// if duplicate found
if(item[compareKey]===newItem[compareKey]){duplicateItemKeys.push(item[compareKey]);// console.log('PAGINATOR - DUPLICATE FOUND: ', newItem);
break;}}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}}// if any duplicates were found
}catch(err){_iterator.e(err);}finally{_iterator.f();}if(duplicateItemKeys.length>0){// console.log('PAGINATOR - DUPLICATE ITEM KEYS: ', duplicateItemKeys);
var itemsWithoutDuplicates=newItems.filter(function(item){return!duplicateItemKeys.includes(item[compareKey]);});// console.log('PAGINATOR - ITEMS WITHOUT DUPLICATES: ', itemsWithoutDuplicates);
return itemsWithoutDuplicates;}// console.log('PAGINATOR - NO DUPLICATES FOUND: ', newItems);
return newItems;}};exports.default=Paginator;

},{"../../utils/core":355}],299:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.updateActivities=exports.updateActivityReactions=void 0;var _core=require("../../../utils/core");var updateActivityReactions=function updateActivityReactions(activity,newReactions){var newActivity=(0,_core.deepMerge)(activity);newActivity.reactions=newReactions;return newActivity;};exports.updateActivityReactions=updateActivityReactions;var updateActivities=function updateActivities(activities,newActivityData){// activity data could be from a top level activity
// or from an activity that is inside a top level activity
var newActivities=activities.map(function(activity){// found activity to update data of
if(activity.id===newActivityData.id){return newActivityData;// there is media in the current top level activity
}else if(activity.uploaded_media&&activity.uploaded_media.data.length>0){var newActivityUploadedMedia=activity.uploaded_media.data.map(function(uploadedMediaActivity){// found media activity to update data of
if(uploadedMediaActivity.id===newActivityData.id){return newActivityData;}return uploadedMediaActivity;});activity.uploaded_media.data=newActivityUploadedMedia;}return activity;});return newActivities;};exports.updateActivities=updateActivities;

},{"../../../utils/core":355}],300:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.filterActivityContentForDisplay=exports.filterActivityContentForSave=void 0;var _core=require("../../../utils/core");var lineBreakLimit=vikinger_constants.settings.activity_line_break_limit;var filterActivityContentForSave=function filterActivityContentForSave(string){return(0,_core.filterString)(string.trim(),[{filterFN:_core.limitLineBreaks,filterArgs:[lineBreakLimit]}]);};exports.filterActivityContentForSave=filterActivityContentForSave;var filterActivityContentForDisplay=function filterActivityContentForDisplay(string){return(0,_core.filterString)(string.trim(),[_core.wrapLinks,{filterFN:_core.limitLineBreaks,filterArgs:[lineBreakLimit]},_core.replaceEnterWithBr]);};exports.filterActivityContentForDisplay=filterActivityContentForDisplay;

},{"../../../utils/core":355}],301:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getUserActivityPermissions=void 0;var _group=_interopRequireDefault(require("../group"));var _core=require("../../../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var getUserActivityPermissions=function getUserActivityPermissions(user,activityData,currentProfileUserID){var permissions={settings:false,pin:false,edit:false,delete:false};if(!user){return permissions;}var loggedUserIsSiteAdmin=vikinger_constants.settings.current_user_is_admin;if(loggedUserIsSiteAdmin){permissions.settings=true;permissions.edit=activityComponentIsAllowedForEdit(activityData.component)&&activityTypeIsAllowedForEdit(activityData.type);permissions.delete=true;}else{permissions.settings=userCanUseActivitySettings(activityData,user);permissions.edit=userCanEditActivity(activityData,user);permissions.delete=userCanDeleteActivity(activityData,user);}permissions.pin=userCanPinActivity(activityData,user,currentProfileUserID);return permissions;};exports.getUserActivityPermissions=getUserActivityPermissions;var userCanUseActivitySettings=function userCanUseActivitySettings(activityData,user){var isGroupActivity=activityData.component==='groups';if(isGroupActivity){var groupable=(0,_group.default)(user,activityData.group);if(groupable.isBannedFromGroup()){return false;}}return true;};var userCanPinActivity=function userCanPinActivity(activityData,user,currentProfileUserID){var isActivityAuthor=userIsActivityAuthor(activityData,user);if(!isActivityAuthor){return false;}if(!user.id===currentProfileUserID){return false;}return true;};var userCanEditActivity=function userCanEditActivity(activityData,user){if(!activityComponentIsAllowedForEdit(activityData.component)){return false;}if(!activityTypeIsAllowedForEdit(activityData.type)){return false;}var isActivityAuthor=userIsActivityAuthor(activityData,user);var isGroupActivity=activityData.component==='groups';if(isGroupActivity){var groupable=(0,_group.default)(user,activityData.group);if(groupable.isGroupAdmin()||groupable.isGroupMod()){return true;}if(!(groupable.isGroupMember()&&isActivityAuthor)){return false;}}else{if(!isActivityAuthor){return false;}}if(activityEditableTimeHasElapsed(activityData)){return false;}return true;};var userCanDeleteActivity=function userCanDeleteActivity(activityData,user){var isActivityAuthor=userIsActivityAuthor(activityData,user);var isGroupActivity=activityData.component==='groups';if(isGroupActivity){var groupable=(0,_group.default)(user,activityData.group);if(groupable.isGroupAdmin()||groupable.isGroupMod()){return true;}if(!(groupable.isGroupMember()&&isActivityAuthor)){return false;}}else{if(!isActivityAuthor){return false;}}return true;};var userIsActivityAuthor=function userIsActivityAuthor(activityData,user){return activityData.author.id===user.id;};var activityComponentIsAllowedForEdit=function activityComponentIsAllowedForEdit(activityComponent){var editableComponents=['activity','groups'];return editableComponents.includes(activityComponent);};var activityTypeIsAllowedForEdit=function activityTypeIsAllowedForEdit(activityType){var editableTypes=['activity_update','activity_share','activity_media_update','activity_media_upload','activity_video_update','activity_video_upload'];return editableTypes.includes(activityType);};var editableTimeLimit=vikinger_constants.settings.activity_edit_time_limit;var activityEditableTimeHasElapsed=function activityEditableTimeHasElapsed(activityData){if(editableTimeLimit>0){var currentDate=new Date();var currentDateUTC=new Date(currentDate.getUTCFullYear(),currentDate.getUTCMonth(),currentDate.getUTCDate(),currentDate.getUTCHours(),currentDate.getUTCMinutes(),currentDate.getUTCSeconds());var activityDate=new Date(activityData.date);var minutesSinceActivityWasCreated=(0,_core.dateMinutesDiff)(activityDate,currentDateUTC);// console.log('ACTIVITY - EDITABLE TIME ELAPSED: ', minutesSinceActivityWasCreated);
if(minutesSinceActivityWasCreated>=editableTimeLimit){return true;}}return false;};

},{"../../../utils/core":355,"../group":311}],302:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getActivityTemplate=void 0;var _react=_interopRequireDefault(require("react"));var _ActivityContent=_interopRequireDefault(require("../../activity/activity-template/ActivityContent"));var _ActivityStatusHeader=_interopRequireDefault(require("../../activity/activity-template/activity-status/ActivityStatusHeader"));var _ActivityStatusBody=_interopRequireDefault(require("../../activity/activity-template/activity-status/ActivityStatusBody"));var _ActivityShareHeader=_interopRequireDefault(require("../../activity/activity-template/activity-share/ActivityShareHeader"));var _ActivityShareBody=_interopRequireDefault(require("../../activity/activity-template/activity-share/ActivityShareBody"));var _ActivityFriendHeader=_interopRequireDefault(require("../../activity/activity-template/activity-friend/ActivityFriendHeader"));var _ActivityFriendBody=_interopRequireDefault(require("../../activity/activity-template/activity-friend/ActivityFriendBody"));var _ActivityGroupHeader=_interopRequireDefault(require("../../activity/activity-template/activity-group/ActivityGroupHeader"));var _ActivityGroupBody=_interopRequireDefault(require("../../activity/activity-template/activity-group/ActivityGroupBody"));var _PostPreview=_interopRequireDefault(require("../../post/post-preview/PostPreview"));var _PostPreviewIframe=_interopRequireDefault(require("../../post/post-preview/post-preview-iframe/PostPreviewIframe"));var _PostPreviewGallery=_interopRequireDefault(require("../../post/post-preview/post-preview-gallery/PostPreviewGallery"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}var getActivityContent=function getActivityContent(activityHeader,activityBody){return function(props){return/*#__PURE__*/_react.default.createElement(_ActivityContent.default,_extends({activityHeader:activityHeader,activityBody:activityBody},props));};};var getActivityTemplate=function getActivityTemplate(type){var format=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;if(type==='created_group'||type==='joined_group'){return getActivityContent(_ActivityGroupHeader.default,_ActivityGroupBody.default);}if(type==='friendship_created'){return getActivityContent(_ActivityFriendHeader.default,_ActivityFriendBody.default);}if(type==='activity_share'||type==='post_share'){return getActivityContent(_ActivityShareHeader.default,_ActivityShareBody.default);}if(type==='post'){if(format==='video'||format==='audio'){return function(props){return/*#__PURE__*/_react.default.createElement(_PostPreviewIframe.default,props);};}if(format==='gallery'){return function(props){return/*#__PURE__*/_react.default.createElement(_PostPreviewGallery.default,props);};}return function(props){return/*#__PURE__*/_react.default.createElement(_PostPreview.default,props);};}return getActivityContent(_ActivityStatusHeader.default,_ActivityStatusBody.default);};exports.getActivityTemplate=getActivityTemplate;

},{"../../activity/activity-template/ActivityContent":45,"../../activity/activity-template/activity-friend/ActivityFriendBody":46,"../../activity/activity-template/activity-friend/ActivityFriendHeader":47,"../../activity/activity-template/activity-group/ActivityGroupBody":48,"../../activity/activity-template/activity-group/ActivityGroupHeader":49,"../../activity/activity-template/activity-share/ActivityShareBody":50,"../../activity/activity-template/activity-share/ActivityShareHeader":51,"../../activity/activity-template/activity-status/ActivityStatusBody":52,"../../activity/activity-template/activity-status/ActivityStatusHeader":53,"../../post/post-preview/PostPreview":234,"../../post/post-preview/post-preview-gallery/PostPreviewGallery":237,"../../post/post-preview/post-preview-iframe/PostPreviewIframe":240,"react":380}],303:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getAdsForPlacementIndex=void 0;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var getAdsForPlacementIndex=function getAdsForPlacementIndex(ads,placement,index){if(ads&&ads[placement]&&ads[placement].length>0){var adsForPlacement=ads[placement].map(function(ad){if(ad.index===index+1||ad.repeat&&(index+1)%ad.index===0){return/*#__PURE__*/_react.default.createElement("div",{className:"animate-slide-down",key:ad.name,dangerouslySetInnerHTML:{__html:ad.html}});}});if(adsForPlacement.length>0){return adsForPlacement;}}return false;};exports.getAdsForPlacementIndex=getAdsForPlacementIndex;

},{"react":380}],304:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getAvatarOverlayTemplate=exports.getAvatarTemplate=void 0;var _AvatarHexagon=_interopRequireDefault(require("../avatar/avatar-hexagon/AvatarHexagon"));var _AvatarHexagonMedium=_interopRequireDefault(require("../avatar/avatar-hexagon/AvatarHexagonMedium"));var _AvatarHexagonSmall=_interopRequireDefault(require("../avatar/avatar-hexagon/AvatarHexagonSmall"));var _AvatarHexagonSmaller=_interopRequireDefault(require("../avatar/avatar-hexagon/AvatarHexagonSmaller"));var _AvatarHexagonTiny=_interopRequireDefault(require("../avatar/avatar-hexagon/AvatarHexagonTiny"));var _AvatarHexagonMicro=_interopRequireDefault(require("../avatar/avatar-hexagon/AvatarHexagonMicro"));var _AvatarCircle=_interopRequireDefault(require("../avatar/avatar-circle/AvatarCircle"));var _AvatarCircleMedium=_interopRequireDefault(require("../avatar/avatar-circle/AvatarCircleMedium"));var _AvatarCircleSmall=_interopRequireDefault(require("../avatar/avatar-circle/AvatarCircleSmall"));var _AvatarCircleSmaller=_interopRequireDefault(require("../avatar/avatar-circle/AvatarCircleSmaller"));var _AvatarCircleTiny=_interopRequireDefault(require("../avatar/avatar-circle/AvatarCircleTiny"));var _AvatarCircleMicro=_interopRequireDefault(require("../avatar/avatar-circle/AvatarCircleMicro"));var _AvatarSquare=_interopRequireDefault(require("../avatar/avatar-square/AvatarSquare"));var _AvatarSquareMedium=_interopRequireDefault(require("../avatar/avatar-square/AvatarSquareMedium"));var _AvatarSquareSmall=_interopRequireDefault(require("../avatar/avatar-square/AvatarSquareSmall"));var _AvatarSquareSmaller=_interopRequireDefault(require("../avatar/avatar-square/AvatarSquareSmaller"));var _AvatarSquareTiny=_interopRequireDefault(require("../avatar/avatar-square/AvatarSquareTiny"));var _AvatarSquareMicro=_interopRequireDefault(require("../avatar/avatar-square/AvatarSquareMicro"));var _AvatarHexagonOverlaySmaller=_interopRequireDefault(require("../avatar/avatar-hexagon/avatar-hexagon-overlay/AvatarHexagonOverlaySmaller"));var _AvatarCircleOverlaySmaller=_interopRequireDefault(require("../avatar/avatar-circle/avatar-circle-overlay/AvatarCircleOverlaySmaller"));var _AvatarSquareOverlaySmaller=_interopRequireDefault(require("../avatar/avatar-square/avatar-square-overlay/AvatarSquareOverlaySmaller"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var avatarTemplate={hexagon:{regular:_AvatarHexagon.default,medium:_AvatarHexagonMedium.default,small:_AvatarHexagonSmall.default,smaller:_AvatarHexagonSmaller.default,tiny:_AvatarHexagonTiny.default,micro:_AvatarHexagonMicro.default},circle:{regular:_AvatarCircle.default,medium:_AvatarCircleMedium.default,small:_AvatarCircleSmall.default,smaller:_AvatarCircleSmaller.default,tiny:_AvatarCircleTiny.default,micro:_AvatarCircleMicro.default},square:{regular:_AvatarSquare.default,medium:_AvatarSquareMedium.default,small:_AvatarSquareSmall.default,smaller:_AvatarSquareSmaller.default,tiny:_AvatarSquareTiny.default,micro:_AvatarSquareMicro.default}};var getAvatarTemplate=function getAvatarTemplate(type,size){return avatarTemplate[type][size];};exports.getAvatarTemplate=getAvatarTemplate;var avatarOverlayTemplate={hexagon:{smaller:_AvatarHexagonOverlaySmaller.default},circle:{smaller:_AvatarCircleOverlaySmaller.default},square:{smaller:_AvatarSquareOverlaySmaller.default}};var getAvatarOverlayTemplate=function getAvatarOverlayTemplate(type,size){return avatarOverlayTemplate[type][size];};exports.getAvatarOverlayTemplate=getAvatarOverlayTemplate;

},{"../avatar/avatar-circle/AvatarCircle":57,"../avatar/avatar-circle/AvatarCircleMedium":58,"../avatar/avatar-circle/AvatarCircleMicro":59,"../avatar/avatar-circle/AvatarCircleSmall":60,"../avatar/avatar-circle/AvatarCircleSmaller":61,"../avatar/avatar-circle/AvatarCircleTiny":62,"../avatar/avatar-circle/avatar-circle-overlay/AvatarCircleOverlaySmaller":63,"../avatar/avatar-hexagon/AvatarHexagon":64,"../avatar/avatar-hexagon/AvatarHexagonMedium":65,"../avatar/avatar-hexagon/AvatarHexagonMicro":66,"../avatar/avatar-hexagon/AvatarHexagonSmall":67,"../avatar/avatar-hexagon/AvatarHexagonSmaller":68,"../avatar/avatar-hexagon/AvatarHexagonTiny":69,"../avatar/avatar-hexagon/avatar-hexagon-overlay/AvatarHexagonOverlaySmaller":70,"../avatar/avatar-square/AvatarSquare":72,"../avatar/avatar-square/AvatarSquareMedium":73,"../avatar/avatar-square/AvatarSquareMicro":74,"../avatar/avatar-square/AvatarSquareSmall":75,"../avatar/avatar-square/AvatarSquareSmaller":76,"../avatar/avatar-square/AvatarSquareTiny":77,"../avatar/avatar-square/avatar-square-overlay/AvatarSquareOverlaySmaller":78}],305:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.updateComments=exports.updateCommentReactions=exports.reorderComments=void 0;var _core=require("../../../utils/core");function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var reorderComments=function reorderComments(comments,order){var sortFunction;// select sorting function according to selected sort order
if(order==='DESC'){sortFunction=function sortFunction(firstEl,secondEl){if(firstEl.date>secondEl.date){return-1;}if(firstEl.date<secondEl.date){return 1;}return 0;};}else if(order==='ASC'){sortFunction=function sortFunction(firstEl,secondEl){if(firstEl.date<secondEl.date){return-1;}if(firstEl.date>secondEl.date){return 1;}return 0;};}return sortComments(comments,sortFunction);};exports.reorderComments=reorderComments;var sortComments=function sortComments(comments,sortFunction){comments.sort(sortFunction);var _iterator=_createForOfIteratorHelper(comments),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var comment=_step.value;if(comment.children instanceof Array&&comment.children.length>0){comment.children=sortComments(comment.children,sortFunction);}}}catch(err){_iterator.e(err);}finally{_iterator.f();}return comments;};var updateCommentReactions=function updateCommentReactions(comment,newReactions){var newComment=(0,_core.deepMerge)(comment);newComment.reactions=newReactions;return newComment;};exports.updateCommentReactions=updateCommentReactions;var updateComments=function updateComments(comments,newCommentData){var newComments=comments.map(function(comment){// found comment to update
if(comment.id===newCommentData.id){return newCommentData;// there is children in the current comment
}else if(comment.children&&comment.children.length>0){comment.children=updateComments(comment.children,newCommentData);}return comment;});return newComments;};exports.updateComments=updateComments;

},{"../../../utils/core":355}],306:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.filterCommentContentForDisplay=exports.filterCommentContentForSave=void 0;var _core=require("../../../utils/core");var lineBreakLimit=vikinger_constants.settings.activity_line_break_limit;var filterCommentContentForSave=function filterCommentContentForSave(string){return(0,_core.filterString)(string.trim(),[{filterFN:_core.limitLineBreaks,filterArgs:[lineBreakLimit]}]);};exports.filterCommentContentForSave=filterCommentContentForSave;var filterCommentContentForDisplay=function filterCommentContentForDisplay(string){return(0,_core.filterString)(string.trim(),[_core.wrapLinks,{filterFN:_core.limitLineBreaks,filterArgs:[lineBreakLimit]},_core.replaceEnterWithBr]);};exports.filterCommentContentForDisplay=filterCommentContentForDisplay;

},{"../../../utils/core":355}],307:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getUserCommentPermissions=void 0;var _group=_interopRequireDefault(require("../group"));var _core=require("../../../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var getUserCommentPermissions=function getUserCommentPermissions(user,commentData,group){var permissions={settings:false,edit:false,delete:false};if(!user){return permissions;}var loggedUserIsSiteAdmin=vikinger_constants.settings.current_user_is_admin;if(loggedUserIsSiteAdmin){permissions.settings=true;permissions.edit=true;permissions.delete=true;}else{permissions.settings=userCanUseCommentSettings(commentData,user,group);permissions.edit=userCanEditComment(commentData,user,group);permissions.delete=userCanDeleteComment(commentData,user,group);}return permissions;};exports.getUserCommentPermissions=getUserCommentPermissions;var userCanUseCommentSettings=function userCanUseCommentSettings(commentData,user,group){var isCommentAuthor=userIsCommentAuthor(commentData,user);if(group){var groupable=(0,_group.default)(user,group);if(groupable.isGroupAdmin()||groupable.isGroupMod()){return true;}if(!(groupable.isGroupMember()&&isCommentAuthor)){return false;}if(groupable.isBannedFromGroup()){return false;}}else{if(!isCommentAuthor){return false;}}return true;};var userCanEditComment=function userCanEditComment(commentData,user,group){var isCommentAuthor=userIsCommentAuthor(commentData,user);if(group){var groupable=(0,_group.default)(user,group);if(groupable.isGroupAdmin()||groupable.isGroupMod()){return true;}if(!(groupable.isGroupMember()&&isCommentAuthor)){return false;}}else{if(!isCommentAuthor){return false;}}if(commentEditableTimeHasElapsed(commentData)){return false;}return true;};var userCanDeleteComment=function userCanDeleteComment(commentData,user,group){var isCommentAuthor=userIsCommentAuthor(commentData,user);if(group){var groupable=(0,_group.default)(user,group);if(groupable.isGroupAdmin()||groupable.isGroupMod()){return true;}if(!(groupable.isGroupMember()&&isCommentAuthor)){return false;}}else{if(!isCommentAuthor){return false;}}return true;};var userIsCommentAuthor=function userIsCommentAuthor(commentData,user){return commentData.author.id===user.id;};var editableTimeLimit=vikinger_constants.settings.activity_edit_time_limit;var commentEditableTimeHasElapsed=function commentEditableTimeHasElapsed(commentData){if(editableTimeLimit>0){var currentDate=new Date();var currentDateUTC=new Date(currentDate.getUTCFullYear(),currentDate.getUTCMonth(),currentDate.getUTCDate(),currentDate.getUTCHours(),currentDate.getUTCMinutes(),currentDate.getUTCSeconds());var commentDate=new Date(commentData.date);var minutesSinceCommentWasCreated=(0,_core.dateMinutesDiff)(commentDate,currentDateUTC);// console.log('COMMENT - EDITABLE TIME ELAPSED: ', minutesSinceCommentWasCreated);
if(minutesSinceCommentWasCreated>=editableTimeLimit){return true;}}return false;};

},{"../../../utils/core":355,"../group":311}],308:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var pad=function pad(number){return number<10?"0".concat(number):number;};var getMaxDaysInMonthYear=function getMaxDaysInMonthYear(month,year){return new Date(year,month,0).getDate();};var dater={getMaxDaysInMonthYear:getMaxDaysInMonthYear,getDaysInMonthYear:function getDaysInMonthYear(month,year){var maxDay=getMaxDaysInMonthYear(month,year),days=[];for(var i=1;i<=maxDay;i++){days.push(i);}return days;},validDay:function validDay(day,month,year){var maxDay=getMaxDaysInMonthYear(month,year);return day<=maxDay;},getMonths:function getMonths(){var months=[];for(var i=1;i<=12;i++){months.push(i);}return months;},getYears:function getYears(start,end){var years=[];for(var i=end;i>=start;i--){years.push(i);}return years;},getDay:function getDay(date){return new Date(date).getDate();},getMonth:function getMonth(date){return new Date(date).getMonth()+1;},getYear:function getYear(date){return new Date(date).getFullYear();},getDateString:function getDateString(day,month,year){var dateSeparator=arguments.length>3&&arguments[3]!==undefined?arguments[3]:'-';var hourSeparator=arguments.length>4&&arguments[4]!==undefined?arguments[4]:':';var date=new Date(year,month-1,day),displayYear=date.getFullYear(),displayMonth=pad(date.getMonth()+1),displayDay=pad(date.getDate()),displayHours=pad(date.getHours()),displayMinutes=pad(date.getMinutes()),displaySeconds=pad(date.getSeconds());return"".concat(displayYear).concat(dateSeparator).concat(displayMonth).concat(dateSeparator).concat(displayDay," ").concat(displayHours).concat(hourSeparator).concat(displayMinutes).concat(hourSeparator).concat(displaySeconds);}};exports.default=dater;

},{}],309:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var friendRouter=_interopRequireWildcard(require("../../router/friend/friend-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var friendUtils=function friendUtils(loggedUser,userID){var me={};me.isFriend=function(){var _iterator=_createForOfIteratorHelper(loggedUser.friends),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var friend=_step.value;// if logged user has that friend in their friends list
if(userID===friend.id){return true;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}return false;};me.friendRequestSent=function(){var _iterator2=_createForOfIteratorHelper(loggedUser.friend_requests_sent),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var request=_step2.value;// if logged user sent a request to that user
if(userID===request.user.id){return true;}}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}return false;};me.friendRequestReceived=function(){var _iterator3=_createForOfIteratorHelper(loggedUser.friend_requests_received),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var request=_step3.value;// if logged user received a request from that user
if(userID===request.user.id){return true;}}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}return false;};me.getReceivedRequestFriendshipID=function(){var _iterator4=_createForOfIteratorHelper(loggedUser.friend_requests_received),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var request=_step4.value;// if logged user sent a request to that user
if(userID===request.user.id){return request.id;}}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}};me.getFriendFriendshipID=function(){var _iterator5=_createForOfIteratorHelper(loggedUser.friends),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var friend=_step5.value;// if logged user has that user as a friend
if(userID===friend.id){return friend.friendship_id;}}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}};me.addFriend=function(){return friendRouter.addFriend({initiator_userid:loggedUser.id,friend_userid:userID});};me.withdrawFriendRequest=function(){return friendRouter.withdrawFriendRequest({initiator_userid:loggedUser.id,friend_userid:userID});};me.rejectFriendRequest=function(){return friendRouter.rejectFriendRequest({friendship_id:me.getReceivedRequestFriendshipID()});};me.acceptFriendRequest=function(){return friendRouter.acceptFriendRequest({friendship_id:me.getReceivedRequestFriendshipID()});};me.removeFriend=function(){return friendRouter.removeFriend({friendship_id:me.getFriendFriendshipID()});};return me;};exports.default=friendUtils;

},{"../../router/friend/friend-router":345}],310:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _MemberPreview=_interopRequireDefault(require("../member/MemberPreview"));var _MemberPreviewBig=_interopRequireDefault(require("../member/MemberPreviewBig"));var _MemberPreviewSmall=_interopRequireDefault(require("../member/MemberPreviewSmall"));var _GroupPreview=_interopRequireDefault(require("../group/GroupPreview"));var _GroupPreviewBig=_interopRequireDefault(require("../group/GroupPreviewBig"));var _GroupPreviewSmall=_interopRequireDefault(require("../group/GroupPreviewSmall"));var _PostPreview=_interopRequireDefault(require("../post/post-preview/PostPreview"));var _PostPreviewBig=_interopRequireDefault(require("../post/post-preview/PostPreviewBig"));var _PostPreviewSmall=_interopRequireDefault(require("../post/post-preview/PostPreviewSmall"));var _PostPreviewIframe=_interopRequireDefault(require("../post/post-preview/post-preview-iframe/PostPreviewIframe"));var _PostPreviewIframeBig=_interopRequireDefault(require("../post/post-preview/post-preview-iframe/PostPreviewIframeBig"));var _PostPreviewIframeSmall=_interopRequireDefault(require("../post/post-preview/post-preview-iframe/PostPreviewIframeSmall"));var _PostPreviewGallery=_interopRequireDefault(require("../post/post-preview/post-preview-gallery/PostPreviewGallery"));var _PostPreviewGalleryBig=_interopRequireDefault(require("../post/post-preview/post-preview-gallery/PostPreviewGalleryBig"));var _PostPreviewGallerySmall=_interopRequireDefault(require("../post/post-preview/post-preview-gallery/PostPreviewGallerySmall"));var _Grid=_interopRequireDefault(require("../grid/Grid"));var _Grid_=_interopRequireDefault(require("../grid/Grid_3"));var _Grid_2=_interopRequireDefault(require("../grid/Grid_4"));var _Grid_3=_interopRequireDefault(require("../grid/Grid_6"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var itemPreviewTemplate={member:{big:_MemberPreviewBig.default,small:_MemberPreview.default,list:_MemberPreviewSmall.default},group:{big:_GroupPreviewBig.default,small:_GroupPreview.default,list:_GroupPreviewSmall.default},post:{big:_PostPreviewBig.default,small:_PostPreview.default,list:_PostPreviewSmall.default},postIframe:{big:_PostPreviewIframeBig.default,small:_PostPreviewIframe.default,list:_PostPreviewIframeSmall.default},postGallery:{big:_PostPreviewGalleryBig.default,small:_PostPreviewGallery.default,list:_PostPreviewGallerySmall.default}};var gridTemplate={member:{big:_Grid_2.default,small:_Grid_.default,list:_Grid.default},group:{big:_Grid_2.default,small:_Grid_.default,list:_Grid.default},post:{big:_Grid_3.default,small:_Grid_2.default,list:_Grid_3.default}};var gridUtils={getItemPreviewTemplate:function getItemPreviewTemplate(entity,gridType,entityData){var entityType=entity;if(entityType==='post'){if(entityData.format==='video'&&entityData.video_url!==''||entityData.format==='audio'&&entityData.audio_url!==''){entityType='postIframe';}else if(entityData.format==='gallery'&&entityData.gallery){entityType='postGallery';}}return itemPreviewTemplate[entityType][gridType];},getGridTemplate:function getGridTemplate(entity,gridType){return gridTemplate[entity][gridType];}};exports.default=gridUtils;

},{"../grid/Grid":158,"../grid/Grid_3":161,"../grid/Grid_4":162,"../grid/Grid_6":163,"../group/GroupPreview":166,"../group/GroupPreviewBig":167,"../group/GroupPreviewSmall":168,"../member/MemberPreview":210,"../member/MemberPreviewBig":211,"../member/MemberPreviewSmall":212,"../post/post-preview/PostPreview":234,"../post/post-preview/PostPreviewBig":235,"../post/post-preview/PostPreviewSmall":236,"../post/post-preview/post-preview-gallery/PostPreviewGallery":237,"../post/post-preview/post-preview-gallery/PostPreviewGalleryBig":238,"../post/post-preview/post-preview-gallery/PostPreviewGallerySmall":239,"../post/post-preview/post-preview-iframe/PostPreviewIframe":240,"../post/post-preview/post-preview-iframe/PostPreviewIframeBig":241,"../post/post-preview/post-preview-iframe/PostPreviewIframeSmall":242}],311:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var groupMemberRouter=_interopRequireWildcard(require("../../router/group-member/group-member-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var groupUtils=function groupUtils(loggedUser,group){var member=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var me={};me.isGroupPublic=function(){return group.status==='public';};me.isGroupPrivate=function(){return group.status==='private';};me.isGroupCreator=function(){return group.creator_id===loggedUser.id;};me.isGroupAdmin=function(){var _iterator=_createForOfIteratorHelper(loggedUser.groups),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var loggedUserGroup=_step.value;if(loggedUserGroup.id===group.id){return loggedUserGroup.is_admin;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}return false;};me.isGroupMod=function(){var _iterator2=_createForOfIteratorHelper(loggedUser.groups),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var loggedUserGroup=_step2.value;if(loggedUserGroup.id===group.id){return loggedUserGroup.is_mod;}}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}return false;};me.isBannedFromGroup=function(){var _iterator3=_createForOfIteratorHelper(loggedUser.groups),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var loggedUserGroup=_step3.value;if(loggedUserGroup.id===group.id){return loggedUserGroup.is_banned;}}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}return false;};me.isGroupMember=function(){var _iterator4=_createForOfIteratorHelper(loggedUser.groups),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var loggedUserGroup=_step4.value;if(loggedUserGroup.id===group.id){return true;}}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}return false;};me.groupMembershipRequestSent=function(){var _iterator5=_createForOfIteratorHelper(loggedUser.group_membership_requests_sent),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var membershipRequest=_step5.value;if(membershipRequest.group.id===group.id){return true;}}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}return false;};me.isLastGroupMember=function(){return group.total_member_count===1;};me.requestGroupMembership=function(){return groupMemberRouter.requestGroupMembership({group_id:group.id,user_id:loggedUser.id});};me.removeGroupMembership=function(){var requestID=0;var _iterator6=_createForOfIteratorHelper(loggedUser.group_membership_requests_sent),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var membershipRequest=_step6.value;if(membershipRequest.group.id===group.id){requestID=membershipRequest.id;break;}}}catch(err){_iterator6.e(err);}finally{_iterator6.f();}return groupMemberRouter.removeGroupMembership(requestID);};me.joinGroup=function(){return groupMemberRouter.joinGroup({group_id:group.id,user_id:loggedUser.id});};me.leaveGroup=function(){return groupMemberRouter.leaveGroup({group_id:group.id,user_id:loggedUser.id});};me.groupMemberIsCreator=function(){return group.creator_id===member.id;};me.groupMemberIsAdmin=function(){return group.admins.some(function(admin){return admin.id===member.id;});};me.groupMemberIsMod=function(){return group.mods.some(function(mod){return mod.id===member.id;});};me.groupMemberIsBanned=function(){return group.banned.some(function(bannedMember){return bannedMember.id===member.id;});};me.canPromoteMemberToAdmin=function(){return me.isGroupAdmin();};me.canPromoteMemberToMod=function(){return me.isGroupAdmin();};me.canDemoteMemberToMod=function(){return me.isGroupAdmin();};me.canDemoteMemberToMember=function(){return me.isGroupAdmin()&&!me.groupMemberIsCreator()&&!me.groupMemberIsAdmin();};me.canRemoveGroupMember=function(){return me.isGroupAdmin()&&!me.groupMemberIsCreator()&&!me.groupMemberIsAdmin();};me.canBanMember=function(){return me.isGroupAdmin()&&!me.groupMemberIsCreator()&&!me.groupMemberIsAdmin();};me.canUnbanMember=function(){return me.isGroupAdmin();};me.promoteGroupMemberToAdmin=function(){return groupMemberRouter.promoteGroupMemberToAdmin({group_id:group.id,member_id:member.id});};me.promoteGroupMemberToMod=function(){return groupMemberRouter.promoteGroupMemberToMod({group_id:group.id,member_id:member.id});};me.demoteGroupMemberToMod=function(){return groupMemberRouter.demoteGroupMemberToMod({group_id:group.id,member_id:member.id});};me.demoteGroupMemberToMember=function(){return groupMemberRouter.demoteGroupMemberToMember({group_id:group.id,member_id:member.id});};me.removeGroupMember=function(){return groupMemberRouter.removeGroupMember({group_id:group.id,member_id:member.id});};me.banGroupMember=function(){return groupMemberRouter.banGroupMember({group_id:group.id,member_id:member.id});};me.unbanGroupMember=function(){return groupMemberRouter.unbanGroupMember({group_id:group.id,member_id:member.id});};return me;};exports.default=groupUtils;

},{"../../router/group-member/group-member-router":346}],312:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.messagePermissions=exports.activityPermissions=exports.groupPermissions=exports.friendshipPermissions=exports.default=void 0;var _core=require("../../utils/core");var pmproBuddyPressIsActive=vikinger_constants.plugin_active['pmpro-buddypress'];var pmproOptions=pmproBuddyPressIsActive?vikinger_constants.settings.pmpro_bp_options:{};var pmproGiveAllAccess=pmproOptions.pmpro_bp_restrictions===1;var pmproSpecificFeaturesAreEnabled=pmproOptions.pmpro_bp_restrictions!==-1;var canDoAction=function canDoAction(action){var actionIsEnabled=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(optionValue){return optionValue===1;};// ignore membership restrictions for site admins
if(vikinger_constants.settings.current_user_is_admin){return true;}return pmproBuddyPressIsActive?pmproGiveAllAccess||pmproSpecificFeaturesAreEnabled&&actionIsEnabled(pmproOptions[action]):true;};var friendshipPermissions={sendFriendRequest:canDoAction('pmpro_bp_send_friend_request')};exports.friendshipPermissions=friendshipPermissions;var groupPermissions={createGroup:canDoAction('pmpro_bp_group_creation'),joinGroup:canDoAction('pmpro_bp_groups_join')};exports.groupPermissions=groupPermissions;var activityPermissions={createActivity:canDoAction('pmpro_bp_public_messaging')};exports.activityPermissions=activityPermissions;var messagePermissions={createMessage:canDoAction('pmpro_bp_private_messaging')};exports.messagePermissions=messagePermissions;var membershipPermissions=(0,_core.deepMerge)(friendshipPermissions,groupPermissions,activityPermissions,messagePermissions);exports.default=membershipPermissions;

},{"../../utils/core":355}],313:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getEmailSettings=exports.getNotificationComponentIcon=void 0;var notificationComponent={friends:{icon:'friend'},groups:{icon:'group'},messages:{icon:'messages'},forums:{icon:'forums'},default:{icon:'comment'}};var getNotificationComponentIcon=function getNotificationComponentIcon(component){return notificationComponent[component]?notificationComponent[component].icon:notificationComponent.default.icon;};exports.getNotificationComponentIcon=getNotificationComponentIcon;var getEmailSettings=function getEmailSettings(){var emailSettings=[];if(vikinger_constants.plugin_active.buddypress_activity){emailSettings.push({name:vikinger_translation.activity,options:[{id:'notification_activity_new_mention',name:vikinger_translation.mentions,description:vikinger_translation.email_settings_mentions_description},{id:'notification_activity_new_reply',name:vikinger_translation.replies,description:vikinger_translation.email_settings_replies_description}]});}if(vikinger_constants.plugin_active.buddypress_messages){emailSettings.push({name:vikinger_translation.messages,options:[{id:'notification_messages_new_message',name:vikinger_translation.new_message,description:vikinger_translation.email_settings_newmessage_description}]});}if(vikinger_constants.plugin_active.buddypress_friends){emailSettings.push({name:vikinger_translation.friends,options:[{id:'notification_friends_friendship_request',name:vikinger_translation.new_friend_request,description:vikinger_translation.email_settings_newfriendrequest_description},{id:'notification_friends_friendship_accepted',name:vikinger_translation.friend_request_accepted,description:vikinger_translation.email_settings_friendrequestaccepted_description}]});}if(vikinger_constants.plugin_active.buddypress_groups){emailSettings.push({name:vikinger_translation.groups,options:[{id:'notification_groups_invite',name:vikinger_translation.group_invite,description:vikinger_translation.email_settings_groupinvite_description},{id:'notification_groups_group_updated',name:vikinger_translation.group_update,description:vikinger_translation.email_settings_groupupdate_description},{id:'notification_groups_admin_promotion',name:vikinger_translation.group_promotion,description:vikinger_translation.email_settings_grouppromotion_description},{id:'notification_groups_membership_request',name:vikinger_translation.private_group_membership_request,description:vikinger_translation.email_settings_privategroupmembershiprequest_description},{id:'notification_membership_request_completed',name:vikinger_translation.group_join_request_status,description:vikinger_translation.email_settings_groupjoinrequeststatus_description}]});}return emailSettings;};exports.getEmailSettings=getEmailSettings;

},{}],314:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var supportedFormat={standard:{icon:'blog-posts'},video:{icon:'videos'},audio:{icon:'headphones'},gallery:{icon:'gallery'}};var postUtils={getPostFormatIcon:function getPostFormatIcon(format){return supportedFormat[format]?supportedFormat[format].icon:supportedFormat.standard.icon;}};exports.default=postUtils;

},{}],315:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.getAllUsersByReaction=exports.getAllReactionUsers=exports.PostCommentReactionable=exports.updatePosts=exports.updatePostReactions=exports.PostReactionable=exports.ActivityReactionable=void 0;var _core=require("../../utils/core");var reactionRouter=_interopRequireWildcard(require("../../router/reaction/reaction-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(Object(source),true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var Reactionable=function Reactionable(props){var sortUserReactions=function sortUserReactions(reactionData){var order=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'DESC';var reactions=[];(0,_core.deepExtend)(reactions,reactionData);var sortedReactionData=reactions.sort(function(firstEl,secondEl){if(firstEl.reaction_count<secondEl.reaction_count){// console.log(firstEl.reaction_count + '<' + secondEl.reaction_count);
return-1;}if(firstEl.reaction_count>secondEl.reaction_count){// console.log(firstEl.reaction_count + '>' + secondEl.reaction_count);
return 1;}return 0;});// console.log('REACTIONABLE - SORTED REACTION DATA: ', sortedReactionData);
return sortedReactionData;};var createUserReactionStatic=function createUserReactionStatic(reactionData,reactionID){var reactions=[];(0,_core.deepExtend)(reactions,reactionData);for(var i=0;i<reactionData.length;i++){var reaction=reactionData[i];// found reaction
if(reaction.id===reactionID){// increase reaction count
reactions[i].reaction_count=Number.parseInt(reactions[i].reaction_count,10)+1+'';// add user
reactions[i].users.push(props.user);// console.log('CREATE MODIFIED REACTION DATA: ', reactions);
return reactions;}}// reaction not found, create it
var _iterator=_createForOfIteratorHelper(props.reactions),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _reaction=_step.value;// reaction found
if(_reaction.id==reactionID){var newReaction={};(0,_core.deepExtend)(newReaction,_reaction);newReaction.reaction_count='1';newReaction.users=[];newReaction.users.push(props.user);reactions.unshift(newReaction);// console.log('CREATE MODIFIED REACTION DATA: ', reactions);
return reactions;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}return reactions;};var deleteUserReactionStatic=function deleteUserReactionStatic(reactionData){var reactions=[];(0,_core.deepExtend)(reactions,reactionData);for(var i=0;i<reactionData.length;i++){var reaction=reactionData[i];for(var j=0;j<reaction.users.length;j++){var user=reaction.users[j];// found user
if(user.id===props.user.id){// console.log('FOUND USER: ', user);
// decrease reaction count
var newReactionCount=Number.parseInt(reaction.reaction_count,10)-1;// if last reaction of this type
if(newReactionCount===0){// remove reaction
reactions.splice(i,1);}else{// remove user
reactions[i].users.splice(j,1);// decrease reaction count
reactions[i].reaction_count=newReactionCount+'';}// console.log('DELETE MODIFIED REACTION DATA: ', reactions);
break;}}}return reactions;};var getUserReaction=function getUserReaction(){if(!props.user){return false;}var _iterator2=_createForOfIteratorHelper(props.reactionData),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var reaction=_step2.value;var _iterator3=_createForOfIteratorHelper(reaction.users),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var user=_step3.value;// user found
if(user.id===props.user.id){return{id:reaction.id,image_url:reaction.image_url,name:reaction.name};}}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}return false;};var createUserReaction=function createUserReaction(reactionID){// console.log('REACTIONABLE - CREATE USER REACTION: ', reactionID);
var userReaction=getUserReaction();if(userReaction&&userReaction.id==reactionID){// reaction already selected
return;}// console.log('REACTIONABLE - CREATE WITH: ', props.entityData);
var config={user_id:props.user.id,reaction_id:reactionID};(0,_core.deepExtend)(config,props.entityData);// create user reaction
props.createUserReaction(config,function(response){// console.log('REACTIONABLE - CREATE USER REACTION: ', response);
// check if created correctly
});// remove other reaction from this user on this activity if exists
// and reduce reaction count
var newReactionData=deleteUserReactionStatic(props.reactionData);// add reaction from this user to this activity
// and increse reaction count
newReactionData=createUserReactionStatic(newReactionData,reactionID);newReactionData=sortUserReactions(newReactionData);props.onUserReactionUpdate(newReactionData);};var deleteUserReaction=function deleteUserReaction(){// const userReaction = getUserReaction();
// console.log('REACTIONABLE - DELETE USER REACTION: ', userReaction);
var config={user_id:props.user.id};(0,_core.deepExtend)(config,props.entityData);// delete user reaction
props.deleteUserReaction(config,function(response){// console.log('REACTIONABLE - DELETE USER REACTION: ', response);
// check if deleted correctly
});// remove other reaction from this user on this activity if exists
// and reduce reaction count
var newReactionData=deleteUserReactionStatic(props.reactionData);newReactionData=sortUserReactions(newReactionData);props.onUserReactionUpdate(newReactionData);};return{getUserReaction:getUserReaction,createUserReaction:createUserReaction,deleteUserReaction:deleteUserReaction};};var ActivityReactionable=function ActivityReactionable(props){return Reactionable(_objectSpread(_objectSpread({},props),{},{createUserReaction:reactionRouter.createActivityUserReaction,deleteUserReaction:reactionRouter.deleteActivityUserReaction}));};exports.ActivityReactionable=ActivityReactionable;var PostReactionable=function PostReactionable(props){return Reactionable(_objectSpread(_objectSpread({},props),{},{createUserReaction:reactionRouter.createPostUserReaction,deleteUserReaction:reactionRouter.deletePostUserReaction}));};exports.PostReactionable=PostReactionable;var PostCommentReactionable=function PostCommentReactionable(props){return Reactionable(_objectSpread(_objectSpread({},props),{},{createUserReaction:reactionRouter.createPostCommentUserReaction,deleteUserReaction:reactionRouter.deletePostCommentUserReaction}));};exports.PostCommentReactionable=PostCommentReactionable;var updatePostReactions=function updatePostReactions(post,newReactions){var newPost=(0,_core.deepMerge)(post);newPost.reactions=newReactions;return newPost;};exports.updatePostReactions=updatePostReactions;var updatePosts=function updatePosts(posts,newPostData){var newPosts=posts.map(function(post){if(post.id===newPostData.id){return newPostData;}return post;});return newPosts;};exports.updatePosts=updatePosts;var getAllReactionUsers=function getAllReactionUsers(reactionData){var allReactionUsers=[];var _iterator4=_createForOfIteratorHelper(reactionData),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var reaction=_step4.value;var users=[];var _iterator5=_createForOfIteratorHelper(reaction.users),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var user=_step5.value;var userReaction=(0,_core.deepMerge)(user);userReaction.reaction={};userReaction.reaction.id=reaction.id;userReaction.reaction.name=reaction.name;userReaction.reaction.image_url=reaction.image_url;users.push(userReaction);}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}allReactionUsers=allReactionUsers.concat(users);}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}return allReactionUsers;};exports.getAllReactionUsers=getAllReactionUsers;var getAllUsersByReaction=function getAllUsersByReaction(reactionData){var reactions=[];var _iterator6=_createForOfIteratorHelper(reactionData),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var reaction=_step6.value;var users=[];var _iterator7=_createForOfIteratorHelper(reaction.users),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var user=_step7.value;var userReaction=(0,_core.deepMerge)(user);userReaction.reaction={};userReaction.reaction.id=reaction.id;userReaction.reaction.name=reaction.name;userReaction.reaction.image_url=reaction.image_url;users.push(userReaction);}}catch(err){_iterator7.e(err);}finally{_iterator7.f();}reaction.users=users;reactions.push(reaction);}}catch(err){_iterator6.e(err);}finally{_iterator6.f();}return reactions;};exports.getAllUsersByReaction=getAllUsersByReaction;

},{"../../router/reaction/reaction-router":352,"../../utils/core":355}],316:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getSearchStatusTypeData=void 0;var _core=require("../../utils/core");var _post=_interopRequireDefault(require("./post"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}var searchStatusTypeData={user:function user(data){return[data.name,"@".concat(data.mention_name),'friend'];},group:function group(data){var membersText=data.total_member_count===1?vikinger_translation.member:vikinger_translation.members;return[data.name,"".concat(data.total_member_count," ").concat(membersText.toLowerCase()),data.status];},post:function post(data){return[(0,_core.truncateText)(data.title,60),"".concat(vikinger_translation.by," ").concat(data.author.name),_post.default.getPostFormatIcon(data.format)];},default:function _default(){return['','',''];}};var getSearchStatusTypeData=function getSearchStatusTypeData(type,data){return searchStatusTypeData[type]?searchStatusTypeData[type](data):searchStatusTypeData.default();};exports.getSearchStatusTypeData=getSearchStatusTypeData;

},{"../../utils/core":355,"./post":314}],317:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getURLIcon=exports.getGroups=void 0;var getGroups=function getGroups(profileData,prefix){var groupRegex=new RegExp("".concat(prefix,"_"),'igm'),profileDataGroup=profileData.group,groups=[];for(var group in profileDataGroup){// ignore group if prefix doesn't match
if(!groupRegex.test(group)){continue;}var groupName=group.replace(groupRegex,''),fields=profileDataGroup[group];// if group has at least one field, add it
if(fields.length>0){groups.push({id:fields[0].group_id,name:groupName,fullname:group,fields:fields});}}return groups;};exports.getGroups=getGroups;var getURLIcon=function getURLIcon(fieldName){var defaultIcon=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'link';var validIcons=['facebook','twitter','instagram','twitch','discord','youtube','patreon','artstation','behance','deviantart','dribbble','spotify','snapchat','reddit','pinterest','linkedin','github','vk','tumblr','tiktok','unsplash','flickr'],iconName=fieldName.toLowerCase();if(validIcons.some(function(el){return el===iconName;})){return iconName;}return defaultIcon;};exports.getURLIcon=getURLIcon;

},{}],318:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=UploadVideoButton;var _react=_interopRequireWildcard(require("react"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _plugins=require("../../utils/plugins");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function UploadVideoButton(props){var fileID=(0,_react.useRef)(1);var allowedExtensions=(0,_react.useRef)(".".concat(vikinger_constants.settings.media_video_allowed_extensions.join(',.')));var fileInputRef=(0,_react.useRef)(null);var videoTooltipRef=(0,_react.useRef)(null);(0,_react.useEffect)(function(){(0,_plugins.createTooltip)({containerElement:videoTooltipRef.current,offset:8,direction:'top',animation:{type:'translate-out-fade'}});},[]);var uploadFiles=function uploadFiles(){var files=fileInputRef.current.files;// console.log('UPLOAD VIDEO BUTTON - UPLOAD FILES: ', files);
var fileData=[];var _iterator=_createForOfIteratorHelper(files),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var file=_step.value;var fileExtension=file.name.substring(file.name.lastIndexOf('.')+1);fileData.push({id:fileID.current,file:new File([file],file.name),url:URL.createObjectURL(file),extension:fileExtension});fileID.current+=1;}// console.log('UPLOAD VIDEO BUTTON - FILE DATA: ', fileData);
}catch(err){_iterator.e(err);}finally{_iterator.f();}if(props.onSelect){props.onSelect(fileData);}};return/*#__PURE__*/_react.default.createElement("div",{className:"quick-post-footer-action",ref:videoTooltipRef,"data-title":vikinger_translation.add_video,onClick:function onClick(){fileInputRef.current.click();}},/*#__PURE__*/_react.default.createElement("input",{ref:fileInputRef,className:"uploadable-item-selector-input",type:"file",accept:allowedExtensions.current,onChange:uploadFiles}),/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"videos",modifiers:"quick-post-footer-action-icon"}));}

},{"../../utils/plugins":356,"../icon/IconSVG":201,"react":380}],319:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=VideoItem;var _react=_interopRequireWildcard(require("react"));var _Checkbox=_interopRequireDefault(require("../form/Checkbox"));var _IconSVG=_interopRequireDefault(require("../icon/IconSVG"));var _ActivityMediaPopup=_interopRequireDefault(require("../activity/activity-popup/ActivityMediaPopup"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function VideoItem(props){var activityMediaPopupTriggerRef=(0,_react.useRef)(null);return/*#__PURE__*/_react.default.createElement("div",{className:"video-box-wrap"},/*#__PURE__*/_react.default.createElement("div",{className:"video-box ".concat(props.modifiers||'')},props.selectable&&/*#__PURE__*/_react.default.createElement(_Checkbox.default,{active:props.selected,toggleActive:props.toggleSelectableActive}),/*#__PURE__*/_react.default.createElement("div",{ref:activityMediaPopupTriggerRef,className:"video-box-cover"},/*#__PURE__*/_react.default.createElement("div",{className:"video-wrap"},/*#__PURE__*/_react.default.createElement("video",{src:props.data.media.link})),/*#__PURE__*/_react.default.createElement("div",{className:"play-button"},/*#__PURE__*/_react.default.createElement(_IconSVG.default,{icon:"play",modifiers:"play-button-icon"})))),!props.noPopup&&/*#__PURE__*/_react.default.createElement("div",null,/*#__PURE__*/_react.default.createElement(_ActivityMediaPopup.default,{data:props.data,user:props.user,reactions:props.reactions,activityMediaPopupTriggerRef:activityMediaPopupTriggerRef,onActivityUpdate:props.onActivityUpdate})));}

},{"../activity/activity-popup/ActivityMediaPopup":44,"../form/Checkbox":142,"../icon/IconSVG":201,"react":380}],320:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=VideoItemList;var _react=_interopRequireDefault(require("react"));var _VideoItem=_interopRequireDefault(require("./VideoItem"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function VideoItemList(props){var renderedVideoList=props.data.map(function(item,i){return/*#__PURE__*/_react.default.createElement(_VideoItem.default,{key:item.id,data:item,user:props.user,reactions:props.reactions,modifiers:props.modifiers,selectable:props.selectable,selected:props.selectedItems[i],toggleSelectableActive:function toggleSelectableActive(){props.toggleSelectableActive(i);},onActivityUpdate:props.onActivityUpdate});});return renderedVideoList;}

},{"./VideoItem":319,"react":380}],321:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=VideoPreview;var _react=_interopRequireDefault(require("react"));function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function VideoPreview(props){return/*#__PURE__*/_react.default.createElement("div",{className:"video-wrap"},/*#__PURE__*/_react.default.createElement("video",{src:props.src,controls:true,disablePictureInPicture:true,controlsList:"nodownload"}));}

},{"react":380}],322:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}Object.defineProperty(exports,"__esModule",{value:true});exports.default=WidgetPhotos;var _react=_interopRequireWildcard(require("react"));var _PictureItemList=_interopRequireDefault(require("../picture/PictureItemList"));var _LoaderSpinner=_interopRequireDefault(require("../loader/LoaderSpinner"));var userRouter=_interopRequireWildcard(require("../../router/user/user-router"));var memberRouter=_interopRequireWildcard(require("../../router/member/member-router"));var groupRouter=_interopRequireWildcard(require("../../router/group/group-router"));var activityRouter=_interopRequireWildcard(require("../../router/activity/activity-router"));var reactionRouter=_interopRequireWildcard(require("../../router/reaction/reaction-router"));var _activityData=require("../utils/activity/activity-data");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _iterableToArrayLimit(arr,i){if(typeof Symbol==="undefined"||!(Symbol.iterator in Object(arr)))return;var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break;}}catch(err){_d=true;_e=err;}finally{try{if(!_n&&_i["return"]!=null)_i["return"]();}finally{if(_d)throw _e;}}return _arr;}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr;}function WidgetPhotos(props){var _useState=(0,_react.useState)([]),_useState2=_slicedToArray(_useState,2),photos=_useState2[0],setPhotos=_useState2[1];var _useState3=(0,_react.useState)(false),_useState4=_slicedToArray(_useState3,2),photosUser=_useState4[0],setPhotosUser=_useState4[1];var _useState5=(0,_react.useState)(false),_useState6=_slicedToArray(_useState5,2),photosGroup=_useState6[0],setPhotosGroup=_useState6[1];var _useState7=(0,_react.useState)(false),_useState8=_slicedToArray(_useState7,2),loggedUser=_useState8[0],setLoggedUser=_useState8[1];var _useState9=(0,_react.useState)([]),_useState10=_slicedToArray(_useState9,2),reactions=_useState10[0],setReactions=_useState10[1];var _useState11=(0,_react.useState)(true),_useState12=_slicedToArray(_useState11,2),loading=_useState12[0],setLoading=_useState12[1];(0,_react.useEffect)(function(){getLoggedInMember();getReactions();if(props.userID){getPhotosUser();}if(props.groupID){getPhotosGroup();}getPhotos();},[]);var getLoggedInMember=function getLoggedInMember(){var userScope=props.groupID?'user-status-groups':'user-status';userRouter.getLoggedInMember(userScope).done(function(loggedUser){// console.log('WIDGET PHOTOS - LOGGED USER: ', loggedUser);
setLoggedUser(loggedUser);});};var getPhotosUser=function getPhotosUser(){memberRouter.getMembers({include:[props.userID]}).done(function(response){// console.log('WIDGET PHOTOS - PHOTOS USER: ', response[0]);
setPhotosUser(response[0]);});};var getPhotosGroup=function getPhotosGroup(){groupRouter.getGroups({include:[props.groupID]}).done(function(response){// console.log('WIDGET PHOTOS - PHOTOS GROUP: ', response[0]);
setPhotosGroup(response[0]);});};var getPhotos=function getPhotos(){var filters={per_page:12,filter:{object:props.userID?'activity':'groups',action:'activity_media'}};if(props.userID){filters.filter.primary_id=props.userID;}if(props.groupID){filters.filter.primary_id=props.groupID;}activityRouter.getActivities(filters,function(response){// console.log('WIDGET PHOTOS - ACTIVITY DATA: ', response);
setPhotos(response.activities);setLoading(false);});};var getReactions=function getReactions(){reactionRouter.getReactions().done(function(response){// console.log('WIDGET PHOTOS - REACTIONS: ', response);
setReactions(response);});};var onActivityUpdate=function onActivityUpdate(newActivityData){// console.log('WIDGET PHOTOS - ON ACTIVITY UPDATE - NEW ACTIVITY DATA: ', newActivityData);
setPhotos(function(previousActivities){return(0,_activityData.updateActivities)(previousActivities,newActivityData);});};return/*#__PURE__*/_react.default.createElement("div",{className:"widget-box"},/*#__PURE__*/_react.default.createElement("p",{className:"widget-box-title"},vikinger_translation.photos),/*#__PURE__*/_react.default.createElement("div",{className:"widget-box-content"},loading&&/*#__PURE__*/_react.default.createElement(_LoaderSpinner.default,null),!loading&&photos.length>0&&/*#__PURE__*/_react.default.createElement(_PictureItemList.default,{data:photos,loggedUser:loggedUser,user:props.userID?photosUser:photosGroup,reactions:reactions,modifiers:"small",displayMax:12,onActivityUpdate:onActivityUpdate}),!loading&&photos.length===0&&/*#__PURE__*/_react.default.createElement("p",{className:"no-results-text"},vikinger_translation.no_photos_found)));}

},{"../../router/activity/activity-router":341,"../../router/group/group-router":347,"../../router/member/member-router":348,"../../router/reaction/reaction-router":352,"../../router/user/user-router":353,"../loader/LoaderSpinner":204,"../picture/PictureItemList":230,"../utils/activity/activity-data":299,"react":380}],323:[function(require,module,exports){
"use strict";var _core=require("../utils/core");var _plugins=require("../utils/plugins");(0,_core.querySelector)('.form-input',_plugins.createFormInput);

},{"../utils/core":355,"../utils/plugins":356}],324:[function(require,module,exports){
"use strict";var _plugins=require("../utils/plugins");(0,_plugins.createAccordion)({triggerSelector:'.accordion-trigger-linked',contentSelector:'.accordion-content-linked',startOpenClass:'accordion-open',selectedClass:'selected',linkTriggers:true});

},{"../utils/plugins":356}],325:[function(require,module,exports){
"use strict";var _progressbar=_interopRequireDefault(require("progressbar.js"));var _core=require("../utils/core");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var avatarGradientDef="\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"0\" height=\"0\" style=\"display: block;\">\n  <defs>\n    <linearGradient id=\"vk-avatar-gradient\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n      <stop offset=\"0%\" stop-color=\"".concat(vikinger_constants.colors['--color-progressbar-line-gradient-end'],"\"/>\n      <stop offset=\"100%\" stop-color=\"").concat(vikinger_constants.colors['--color-progressbar-line-gradient-start'],"\"/>\n    </linearGradient>\n  </defs>\n</svg>");var avatarGradientDefContainer=document.createElement('div');avatarGradientDefContainer.innerHTML=avatarGradientDef;document.body.appendChild(avatarGradientDefContainer);var createSquareProgressSVG=function createSquareProgressSVG(){var size=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'big';var svg=document.createElementNS('http://www.w3.org/2000/svg','svg'),underlinePath=document.createElementNS('http://www.w3.org/2000/svg','path'),linePath=document.createElementNS('http://www.w3.org/2000/svg','path'),lineD='M 0,2 L 98,2 L 98,98 L 2,98 L 2,4';svg.setAttribute('viewBox','0 0 100 100');underlinePath.setAttribute('d',lineD);underlinePath.setAttribute('fill-opacity',0);underlinePath.setAttribute('stroke',vikinger_constants.colors['--color-progressbar-underline']);linePath.setAttribute('d',lineD);linePath.setAttribute('fill-opacity',0);linePath.setAttribute('stroke','url(#vk-avatar-gradient)');switch(size){case'big':svg.setAttribute('width',134);underlinePath.setAttribute('stroke-width',6);linePath.setAttribute('stroke-width',6);break;case'medium':svg.setAttribute('width',108);underlinePath.setAttribute('stroke-width',5);linePath.setAttribute('stroke-width',5);break;case'small':svg.setAttribute('width',40);underlinePath.setAttribute('stroke-width',8);linePath.setAttribute('stroke-width',8);break;case'regular':default:svg.setAttribute('width',90);underlinePath.setAttribute('stroke-width',5);linePath.setAttribute('stroke-width',5);}svg.append(underlinePath,linePath);return{svg:svg,underlinePath:underlinePath,linePath:linePath};};var avatarProgressItems=[{type:'path',size:'small',selector:'.user-avatar-circle-progress-flat-small',config:{}},{type:'path',size:'regular',selector:'.user-avatar-circle-progress-flat-regular',config:{}},{type:'path',size:'medium',selector:'.user-avatar-circle-progress-flat-medium',config:{}},{type:'path',size:'big',selector:'.user-avatar-circle-progress-flat-big',config:{}},{type:'circle',selector:'.user-avatar-circle-progress-small',config:{color:'url(#vk-avatar-gradient)',trailColor:vikinger_constants.colors['--color-progressbar-underline'],strokeWidth:8,trailWidth:8,svgStyle:{width:'40px',height:'40px'}}},{type:'circle',selector:'.user-avatar-circle-progress-regular',config:{color:'url(#vk-avatar-gradient)',trailColor:vikinger_constants.colors['--color-progressbar-underline'],strokeWidth:5,trailWidth:5,svgStyle:{width:'90px',height:'90px'}}},{type:'circle',selector:'.user-avatar-circle-progress-medium',config:{color:'url(#vk-avatar-gradient)',trailColor:vikinger_constants.colors['--color-progressbar-underline'],strokeWidth:5,trailWidth:5,svgStyle:{width:'108px',height:'108px'}}},{type:'circle',selector:'.user-avatar-circle-progress-big',config:{color:'url(#vk-avatar-gradient)',trailColor:vikinger_constants.colors['--color-progressbar-underline'],strokeWidth:6,trailWidth:6,svgStyle:{width:'134px',height:'134px'}}}];var _loop=function _loop(){var avatarProgressItem=_avatarProgressItems[_i];(0,_core.querySelector)(avatarProgressItem.selector,function(els){var _iterator=_createForOfIteratorHelper(els),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var avatarProgressElement=_step.value;var avatarProgress=void 0;if(avatarProgressItem.type==='circle'){avatarProgress=new _progressbar.default.Circle(avatarProgressElement,avatarProgressItem.config);}else if(avatarProgressItem.type==='path'){var svgElement=createSquareProgressSVG(avatarProgressItem.size);avatarProgressElement.append(svgElement.svg);avatarProgress=new _progressbar.default.Path(svgElement.linePath,avatarProgressItem.config);}var stopValue=Number.parseFloat(avatarProgressElement.getAttribute('data-scalestop'));avatarProgress.set(stopValue);}}catch(err){_iterator.e(err);}finally{_iterator.f();}});};for(var _i=0,_avatarProgressItems=avatarProgressItems;_i<_avatarProgressItems.length;_i++){_loop();}

},{"../utils/core":355,"progressbar.js":361}],326:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}var _core=require("../utils/core");var userRouter=_interopRequireWildcard(require("../router/user/user-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}(0,_core.querySelector)('.vk-theme-toggle',function(el){var changingColorTheme=false;var toggleLoggedUserColorTheme=function toggleLoggedUserColorTheme(e){// if already changing color theme, return
if(changingColorTheme){return;}changingColorTheme=true;var toggleLoggedUserColorThemePromise=userRouter.toggleLoggedUserColorTheme();toggleLoggedUserColorThemePromise.done(function(response){// console.log('TOGGLE LOGGED USER COLOR THEME - RESPONSE', response);
}).fail(function(error){// console.log('TOGGLE LOGGED USER COLOR THEME - ERROR', error);
}).always(function(){window.location.reload();});};// add listeners
var _iterator=_createForOfIteratorHelper(el),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var toggleThemeElement=_step.value;toggleThemeElement.addEventListener('mousedown',toggleLoggedUserColorTheme);}}catch(err){_iterator.e(err);}finally{_iterator.f();}});

},{"../router/user/user-router":353,"../utils/core":355}],327:[function(require,module,exports){
"use strict";var _plugins=require("../utils/plugins");/**
 * HEADER SETTINGS
 */(0,_plugins.createDropdown)({trigger:'.header-settings-dropdown-trigger',container:'.header-settings-dropdown',offset:{top:64,right:6},animation:{type:'translate-top'}});

},{"../utils/plugins":356}],328:[function(require,module,exports){
"use strict";var _core=require("../utils/core");function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}(0,_core.querySelector)('#bbpress-forums .hentry .bbp-reply-content > p',function(elements){var _iterator=_createForOfIteratorHelper(elements),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var p=_step.value;var hasIframe=p.querySelector('iframe');// p element has an iframe
if(hasIframe!==null){// add iframe wrapper class
p.classList.add('vikinger-forum-media-wrap');}}}catch(err){_iterator.e(err);}finally{_iterator.f();}});

},{"../utils/core":355}],329:[function(require,module,exports){
"use strict";var _plugins=require("../utils/plugins");/**
 * USER AVATAR BIG
 */(0,_plugins.createHexagon)({container:'.hexagon-148-164',width:148,height:164,roundedCorners:true,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});(0,_plugins.createHexagon)({container:'.hexagon-image-100-110',width:100,height:110,roundedCorners:true,clip:true});(0,_plugins.createHexagon)({container:'.hexagon-progress-124-136',width:124,height:136,lineWidth:8,roundedCorners:true,gradient:{colors:[vikinger_constants.colors['--color-progressbar-line-gradient-end'],vikinger_constants.colors['--color-progressbar-line-gradient-start']]}});(0,_plugins.createHexagon)({container:'.hexagon-border-124-136',width:124,height:136,lineWidth:8,roundedCorners:true,lineColor:vikinger_constants.colors['--color-progressbar-underline']});(0,_plugins.createHexagon)({container:'.hexagon-40-44',width:40,height:44,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});(0,_plugins.createHexagon)({container:'.hexagon-dark-32-34',width:32,height:34,roundedCorners:true,roundedCornerRadius:1,lineColor:vikinger_constants.colors['--color-avatar-rank-hexagon'],fill:true});/**
 * USER AVATAR MEDIUM
 */(0,_plugins.createHexagon)({container:'.hexagon-120-132',width:120,height:132,roundedCorners:true,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});(0,_plugins.createHexagon)({container:'.hexagon-image-82-90',width:82,height:90,roundedCorners:true,roundedCornerRadius:3,clip:true});(0,_plugins.createHexagon)({container:'.hexagon-progress-100-110',width:100,height:110,lineWidth:6,roundedCorners:true,gradient:{colors:[vikinger_constants.colors['--color-progressbar-line-gradient-end'],vikinger_constants.colors['--color-progressbar-line-gradient-start']]}});(0,_plugins.createHexagon)({container:'.hexagon-border-100-110',width:100,height:110,lineWidth:6,roundedCorners:true,lineColor:vikinger_constants.colors['--color-progressbar-underline']});(0,_plugins.createHexagon)({container:'.hexagon-32-36',width:32,height:36,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});(0,_plugins.createHexagon)({container:'.hexagon-dark-26-28',width:26,height:28,roundedCorners:true,roundedCornerRadius:1,lineColor:vikinger_constants.colors['--color-avatar-rank-hexagon'],fill:true});/**
 * USER AVATAR
 */(0,_plugins.createHexagon)({container:'.hexagon-100-110',width:100,height:110,roundedCorners:true,fill:true});(0,_plugins.createHexagon)({container:'.hexagon-image-68-74',width:68,height:74,roundedCorners:true,roundedCornerRadius:3,clip:true});(0,_plugins.createHexagon)({container:'.hexagon-progress-84-92',width:84,height:92,lineWidth:5,roundedCorners:true,roundedCornerRadius:3,gradient:{colors:[vikinger_constants.colors['--color-progressbar-line-gradient-end'],vikinger_constants.colors['--color-progressbar-line-gradient-start']]}});(0,_plugins.createHexagon)({container:'.hexagon-border-84-92',width:84,height:92,lineWidth:5,roundedCorners:true,roundedCornerRadius:3,lineColor:vikinger_constants.colors['--color-progressbar-underline']});(0,_plugins.createHexagon)({container:'.hexagon-28-32',width:28,height:32,roundedCorners:true,roundedCornerRadius:1,lineColor:vikinger_constants.colors['--color-box-background'],fill:true});(0,_plugins.createHexagon)({container:'.hexagon-dark-22-24',width:22,height:24,roundedCorners:true,roundedCornerRadius:1,lineColor:vikinger_constants.colors['--color-avatar-rank-hexagon'],fill:true});/**
 * USER AVATAR FORUM
 */(0,_plugins.createHexagon)({container:'.hexagon-76-84',width:76,height:84,roundedCorners:true,fill:true});(0,_plugins.createHexagon)({container:'.hexagon-image-58-64',width:58,height:64,roundedCorners:true,roundedCornerRadius:2,clip:true});/**
 * USER AVATAR SMALL
 */(0,_plugins.createHexagon)({container:'.hexagon-50-56',width:50,height:56,roundedCorners:true,roundedCornerRadius:2,fill:true});(0,_plugins.createHexagon)({container:'.hexagon-image-30-32',width:30,height:32,roundedCorners:true,roundedCornerRadius:1,clip:true});(0,_plugins.createHexagon)({container:'.hexagon-progress-40-44',width:40,height:44,lineWidth:3,roundedCorners:true,roundedCornerRadius:1,gradient:{colors:[vikinger_constants.colors['--color-progressbar-line-gradient-end'],vikinger_constants.colors['--color-progressbar-line-gradient-start']]}});(0,_plugins.createHexagon)({container:'.hexagon-border-40-44',width:40,height:44,lineWidth:3,roundedCorners:true,roundedCornerRadius:1,lineColor:vikinger_constants.colors['--color-progressbar-underline']});(0,_plugins.createHexagon)({container:'.hexagon-22-24',width:22,height:24,roundedCorners:true,roundedCornerRadius:1,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});(0,_plugins.createHexagon)({container:'.hexagon-dark-16-18',width:16,height:18,roundedCorners:true,roundedCornerRadius:1,lineColor:vikinger_constants.colors['--color-avatar-rank-hexagon'],fill:true});(0,_plugins.createHexagon)({container:'.hexagon-120-130',width:120,height:130,roundedCorners:true,fill:true,lineColor:vikinger_constants.colors['--color-box-background']});(0,_plugins.createHexagon)({container:'.hexagon-100-108',width:100,height:108,roundedCorners:true,fill:true});(0,_plugins.createHexagon)({container:'.hexagon-image-124-136',width:124,height:136,roundedCorners:true,clip:true});(0,_plugins.createHexagon)({container:'.hexagon-image-84-92',width:84,height:92,roundedCorners:true,clip:true});(0,_plugins.createHexagon)({container:'.hexagon-34-36',width:34,height:36,roundedCorners:true,roundedCornerRadius:1,fill:true});(0,_plugins.createHexagon)({container:'.hexagon-image-40-44',width:40,height:44,roundedCorners:true,roundedCornerRadius:1,clip:true});(0,_plugins.createHexagon)({container:'.hexagon-image-24-26',width:24,height:26,roundedCorners:true,roundedCornerRadius:1,clip:true});(0,_plugins.createHexagon)({container:'.hexagon-image-18-20',width:18,height:20,roundedCorners:true,roundedCornerRadius:1,clip:true});(0,_plugins.createHexagon)({container:'.hexagon-overlay-30-32',width:30,height:32,roundedCorners:true,roundedCornerRadius:1,lineColor:vikinger_constants.colors['--color-avatar-overlay-background'],fill:true});

},{"../utils/plugins":356}],330:[function(require,module,exports){
"use strict";var _core=require("../utils/core");(0,_core.querySelector)('.page-loader',function(el){var pageLoader=el[0];var hidePageLoader=function hidePageLoader(){pageLoader.classList.add('hidden');};window.addEventListener('load',hidePageLoader);});

},{"../utils/core":355}],331:[function(require,module,exports){
"use strict";var _plugins=require("../utils/plugins");(0,_plugins.createPopup)({trigger:'#post-open-gallery-popup-trigger',type:'gallery'});

},{"../utils/plugins":356}],332:[function(require,module,exports){
"use strict";var _plugins=require("../utils/plugins");/**
 * ACHIEVEMENT PROGRESS
 */(0,_plugins.createProgressBar)({container:'.achievement-progress',height:4,lineColor:vikinger_constants.colors['--color-progressbar-underline']});(0,_plugins.createProgressBar)({container:'.achievement-progress',height:4,gradient:{colors:[vikinger_constants.colors['--color-progressbar-line-gradient-start'],vikinger_constants.colors['--color-progressbar-line-gradient-end']]},scale:{start:0,end:1,stop:1},linkText:true,linkUnits:'/',emptyText:vikinger_translation.locked,completeText:vikinger_translation['unlocked!']});/**
 * ACHIEVEMENT SIMPLE PROGRESS
 */(0,_plugins.createProgressBar)({container:'.achievement-simple-progress',height:4,lineColor:vikinger_constants.colors['--color-progressbar-underline']});(0,_plugins.createProgressBar)({container:'.achievement-simple-progress',height:4,gradient:{colors:[vikinger_constants.colors['--color-progressbar-line-gradient-start'],vikinger_constants.colors['--color-progressbar-line-gradient-end']]},scale:{start:0,end:1,stop:1}});/**
 * RANK PROGRESS
 */(0,_plugins.createProgressBar)({container:'.user-rank-pgb',height:4,lineColor:vikinger_constants.colors['--color-header-progressbar-underline']});(0,_plugins.createProgressBar)({container:'.user-rank-pgb',height:4,gradient:{colors:[vikinger_constants.colors['--color-header-progressbar-line-gradient-start'],vikinger_constants.colors['--color-header-progressbar-line-gradient-end']]},scale:{start:0,end:1,stop:1},linkText:true,linkUnits:'/'});

},{"../utils/plugins":356}],333:[function(require,module,exports){
"use strict";var _core=require("../utils/core");(0,_core.querySelector)('.header-actions.search-bar',function(searchBarElements){var searchBarElement=searchBarElements[0];(0,_core.querySelector)('.header-search-push-open',function(els){var searchBarOpenTrigger=els[0];(0,_core.querySelector)('.header-search-push-close',function(els){var searchBarCloseTrigger=els[0];var openSearchBar=function openSearchBar(){searchBarElement.classList.add('search-bar-active');searchBarOpenTrigger.classList.add('action-list-item-hidden');searchBarCloseTrigger.classList.remove('action-list-item-hidden');};var closeSearchBar=function closeSearchBar(){searchBarElement.classList.remove('search-bar-active');searchBarOpenTrigger.classList.remove('action-list-item-hidden');searchBarCloseTrigger.classList.add('action-list-item-hidden');};searchBarOpenTrigger.addEventListener('mousedown',openSearchBar);searchBarCloseTrigger.addEventListener('mousedown',closeSearchBar);});});});

},{"../utils/core":355}],334:[function(require,module,exports){
"use strict";var _plugins=require("../utils/plugins");(0,_plugins.createSlider)('.member-preview-big-social-links-slides',{navigation:{prevEl:'.slider-control.left',nextEl:'.slider-control.right'},slidesPerView:5,spaceBetween:8});(0,_plugins.createSlider)('.member-preview-big-slides',{pagination:{el:'.slider-roster',type:'bullets',clickable:true,bulletClass:'slider-roster-item',bulletActiveClass:'active',renderBullet:function renderBullet(index,className){return"<div class=\"".concat(className,"\"></div>");}}});(0,_plugins.createSlider)('#post-open-gallery-slider',{navigation:{prevEl:'#post-open-gallery-control-prev',nextEl:'#post-open-gallery-control-next'},loop:true,speed:600,autoplay:{delay:5000}});(0,_plugins.createSlider)('#profile-header-social-links-slider',{navigation:{prevEl:'#profile-header-social-links-control-prev',nextEl:'#profile-header-social-links-control-next'},slidesPerView:7,spaceBetween:12});(0,_plugins.createSlider)('#profile-header-social-links-mobile-slider',{navigation:{prevEl:'#profile-header-social-links-mobile-control-prev',nextEl:'#profile-header-social-links-mobile-control-next'},slidesPerView:4,spaceBetween:8});(0,_plugins.createSlider)('#section-navigation-slider',{navigation:{prevEl:'#section-navigation-control-prev',nextEl:'#section-navigation-control-next'},slidesPerView:'auto'});

},{"../utils/plugins":356}],335:[function(require,module,exports){
"use strict";jQuery(document).ready(function(){var exceptions=['#tab-description','#tab-additional_information','#tab-reviews'];// Add smooth scrolling to all links
jQuery('a').on('click',function(event){// Make sure this.hash has a value before overriding default behavior
// and that this.hash exists in the current page (else the link refers to other page)
var hash=this.hash;if(hash!==''&&jQuery(hash).length>0&&!exceptions.includes(hash)){var hashElementTopOffset=jQuery(hash).offset().top;// if hash element doesn't have an offset top, preserve normal behaviour
if(hashElementTopOffset===0){return;}// Prevent default anchor click behavior
event.preventDefault();// Using jQuery's animate() method to add smooth page scroll
jQuery('html, body').animate({scrollTop:jQuery(hash).offset().top-jQuery('.header').outerHeight()*1.5},600,function(){// Add hash (#) to URL when done scrolling (default click behavior)
// use history.replaceState on supported browsers to prevent page jump
// caused by modifying the offset because of the floating header
if(typeof history.replaceState!=='undefined'){history.replaceState(null,null,hash);}else{window.location.hash=hash;}});}});// if there is a hash on page load
// navigate to it taking the floating header height into account
if(window.location.hash!==''){window.scrollTo(0,jQuery(window.location.hash).offset().top-jQuery('.header').outerHeight()*1.5);}});

},{}],336:[function(require,module,exports){
"use strict";var _plugins=require("../utils/plugins");/**
 * TAB
 * 
 * Used: Open Post Widgets
 */(0,_plugins.createTab)({container:'.tab-container',triggers:'.tab-option',elements:'.tab-item'});

},{"../utils/plugins":356}],337:[function(require,module,exports){
"use strict";var _plugins=require("../utils/plugins");(0,_plugins.createTooltip)({container:'.text-tooltip-tfr',offset:4,direction:'right',animation:{type:'translate-in-fade'}});(0,_plugins.createTooltip)({container:'.text-tooltip-tft',offset:4,direction:'top',animation:{type:'translate-out-fade'}});

},{"../utils/plugins":356}],338:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}var _core=require("../utils/core");var memberRouter=_interopRequireWildcard(require("../router/member/member-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}(0,_core.querySelector)('#vk-user-account-delete',function(els){var userDeleteButton=els[0],errorMessage=createErrorMessage('An error has ocurred. Please try again later.');var loading=false;function createErrorMessage(text){var errorElement=document.createElement('p');errorElement.classList.add('error-field-message','medium');errorElement.innerText=text;return errorElement;};function hideErrorMessage(){errorMessage.remove();};function showErrorMessage(){userDeleteButton.parentNode.appendChild(errorMessage);};function deleteUser(){// don't do anything if loading previous action
if(loading){return;}hideErrorMessage();loading=true;userDeleteButton.classList.add('button-loader-loading');var deleteLoggedUserPromise=memberRouter.deleteLoggedUser();deleteLoggedUserPromise.done(function(response){// console.log('USER DELETE - RESPONSE: ', response);
// user successfully deleted, reload
if(response){window.location=vikinger_constants.home_url;// user failed to delete, show error message
}else{loading=false;userDeleteButton.classList.remove('button-loader-loading');showErrorMessage();}}).fail(function(error){// console.log('USER DELETE - ERROR: ', error);
// user failed to delete, show error message
loading=false;userDeleteButton.classList.remove('button-loader-loading');showErrorMessage();});};userDeleteButton.addEventListener('mousedown',deleteUser);});

},{"../router/member/member-router":348,"../utils/core":355}],339:[function(require,module,exports){
"use strict";var _core=require("../utils/core");function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}(0,_core.querySelector)('.vk-el-navigation-mobile-trigger-open',function(triggers){var navigationActiveSelector='vk-el-navigation-mobile-active',overlaySelector='vk-el-navigation-mobile-overlay',overlayActiveSelector='vk-el-navigation-mobile-overlay-active';var createOverlay=function createOverlay(){var overlay=document.createElement('div');overlay.classList.add(overlaySelector);return overlay;};var showOverlay=function showOverlay(overlay){overlay.classList.add(overlayActiveSelector);};var hideOverlay=function hideOverlay(overlay,navigations){overlay.classList.remove(overlayActiveSelector);var _iterator=_createForOfIteratorHelper(navigations),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var navigation=_step.value;hideNavigation(navigation);}}catch(err){_iterator.e(err);}finally{_iterator.f();};};var overlay=createOverlay();document.body.append(overlay);var showNavigation=function showNavigation(navigation){navigation.classList.add(navigationActiveSelector);};var hideNavigation=function hideNavigation(navigation){navigation.classList.remove(navigationActiveSelector);};var toggleNavigation=function toggleNavigation(navigation,overlay){if(navigation.classList.contains(navigationActiveSelector)){hideOverlay(overlay,[navigation]);}else{showNavigation(navigation);showOverlay(overlay);}};var navigations=[];var _iterator2=_createForOfIteratorHelper(triggers),_step2;try{var _loop=function _loop(){var trigger=_step2.value;var navigation=trigger.parentElement.querySelector('.vk-el-navigation-mobile');if(navigation){navigations.push(navigation);trigger.addEventListener('mousedown',function(){toggleNavigation(navigation,overlay);});}};for(_iterator2.s();!(_step2=_iterator2.n()).done;){_loop();}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}(0,_core.querySelector)('.vk-el-navigation-mobile-trigger-close',function(closeTriggers){var _iterator3=_createForOfIteratorHelper(closeTriggers),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _closeTriggers=_step3.value;_closeTriggers.addEventListener('mousedown',function(){hideOverlay(overlay,navigations);});}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}});overlay.addEventListener('mousedown',function(){hideOverlay(overlay,navigations);});});

},{"../utils/core":355}],340:[function(require,module,exports){
"use strict";(function(){'use strict';/**
   * Loads SVG data (wrapped in a div) at the end of the document body.
   * 
   * @since 1.0.0
   */var loadSVGData=function loadSVGData(){var svgWrap=document.createElement('div');var svgData="\n    <!-- SVG FACEBOOK -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-facebook\" viewBox=\"0 0 18 18\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16.313,18h-4.504v-6.192h3.087V8.671h-3.087V7.135V6.831V6.814l0,0c0.01-0.328,0.277-0.591,0.607-0.591h0.067h1.113h1.62V3.086h-2.733l0,0l-0.009,0.018h-0.092c-2.051,0-3.712,1.661-3.712,3.711v0.911v0.945H6.191v3.137h2.479V18H1.687C0.755,18,0,17.242,0,16.313V1.686C0,0.754,0.755,0,1.687,0h14.626C17.244,0,18,0.754,18,1.686v14.627C18,17.242,17.244,18,16.313,18z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG FACEBOOK -->\n\n    <!-- SVG TWITTER -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-twitter\" viewBox=\"0 0 18 18\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M18,3.617c-0.675,0.322-1.351,0.43-2.139,0.537c0.788-0.43,1.351-1.076,1.576-1.937c-0.675,0.43-1.463,0.646-2.362,0.861C14.399,2.431,13.388,2,12.375,2c-1.912,0-3.601,1.617-3.601,3.554c0,0.323,0,0.538,0.113,0.754C5.851,6.2,3.038,4.8,1.238,2.646C0.9,3.185,0.788,3.724,0.788,4.478c0,1.184,0.675,2.261,1.688,2.907c-0.563,0-1.125-0.216-1.688-0.431l0,0c0,1.723,1.237,3.122,2.925,3.446c-0.338,0.107-0.675,0.107-1.013,0.107c-0.225,0-0.45,0-0.675-0.107c0.45,1.399,1.8,2.476,3.487,2.476C4.274,13.846,2.7,14.384,0.9,14.384c-0.338,0-0.563,0-0.9,0C1.688,15.354,3.601,16,5.625,16c6.75,0,10.462-5.385,10.462-10.015c0-0.108,0-0.323,0-0.431C16.875,5.016,17.549,4.371,18,3.617z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG TWITTER -->\n\n    <!-- SVG TWITCH -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-twitch\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M6.179,0L0,17.964V87.81h24.714V100h15.789L52.86,87.81h18.993L100,60.527V0H6.179z M90.39,57.645L74.828,72.504H49.885L37.299,84.703V72.504H15.561V9.094H90.39V57.645z M49.885,27.051h-9.382v27.27h9.382V27.051z M74.828,27.051h-9.382v27.27h9.382V27.051z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG TWITCH -->\n\n    <!-- SVG YOUTUBE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-youtube\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M97.911,24.557c-1.149-4.549-4.538-8.13-8.842-9.347C81.271,13,49.999,13,49.999,13s-31.271,0-39.07,2.21c-4.302,1.216-7.69,4.798-8.84,9.347C0,32.8,0,50.001,0,50.001s0,17.2,2.089,25.443c1.15,4.549,4.538,8.132,8.84,9.348C18.729,87,49.999,87,49.999,87s31.271,0,39.07-2.208c4.304-1.216,7.692-4.799,8.842-9.348C100,67.201,100,50.001,100,50.001S100,32.8,97.911,24.557z M39.999,65.858V34.144L65.98,50.001L39.999,65.858z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG YOUTUBE -->\n\n    <!-- SVG INSTAGRAM -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-instagram\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M72.402,0H27.595C12.379,0,0,12.381,0,27.597v44.809C0,87.619,12.379,100,27.595,100h44.807C87.621,100,100,87.619,100,72.406V27.597C100,12.381,87.621,0,72.402,0z M88.691,71.078c0,9.711-7.902,17.613-17.615,17.613H28.923c-9.712,0-17.613-7.902-17.613-17.613V28.926c0-9.715,7.901-17.618,17.613-17.618h42.153c9.713,0,17.615,7.903,17.615,17.618V71.078z M50.001,26.779c-12.804,0-23.22,10.426-23.22,23.22c0,12.804,10.416,23.22,23.22,23.22c12.801,0,23.217-10.416,23.217-23.22C73.219,37.205,62.803,26.779,50.001,26.779z M50.001,63.689c-7.548,0-13.688-6.139-13.688-13.691c0-7.545,6.14-13.684,13.688-13.684c7.545,0,13.686,6.139,13.686,13.684C63.688,57.551,57.547,63.689,50.001,63.689z M75.658,17.864c-1.711,0-4.383,0.724-5.711,2.056c-1.332,1.328-2.098,3.178-2.098,5.065c0,1.882,0.766,3.727,2.098,5.063c1.326,1.325,3.172,2.098,5.051,2.098c1.885,0,3.723-0.772,5.055-2.098c1.332-1.336,2.094-3.184,2.094-5.063c0-1.888-0.762-3.737-2.094-5.065C78.729,18.587,77.373,17.864,75.658,17.864z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG INSTAGRAM -->\n\n    <!-- SVG DISCORD -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-discord\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M87.671,23.75C75.993,15.223,64.855,15,63.707,15c-0.061,0-0.093,0-0.093,0l-1.2,1.332c14.556,4.332,21.32,10.582,21.32,10.582c-8.906-4.749-17.639-7.083-25.771-8c-2.7-0.291-5.353-0.422-7.926-0.422c-3.287,0-6.437,0.216-9.371,0.591c-0.512,0-0.941,0.084-1.456,0.165c-2.994,0.252-10.273,1.334-19.434,5.249c-3.167,1.417-5.052,2.417-5.052,2.417s7.107-6.583,22.518-10.915L36.387,15c0,0-0.032,0-0.098,0c-1.144,0-12.283,0.223-23.96,8.75C12.329,23.75,0,45.498,0,72.333c0,0,7.19,12.081,26.114,12.667c0,0,3.166-3.752,5.734-6.919c-10.873-3.168-14.981-9.831-14.981-9.831s0.854,0.582,2.397,1.414l0.343,0.25l0.769,0.419c2.14,1.163,4.282,2.084,6.251,2.833c3.511,1.334,7.706,2.663,12.584,3.585c3.51,0.633,7.349,1.047,11.451,1.047c3.408,0,6.999-0.284,10.728-0.964c4.021-0.67,8.129-1.836,12.415-3.585c2.991-1.083,6.333-2.665,9.845-4.916c0,0-4.287,6.831-15.5,9.915C70.717,81.414,73.805,85,73.805,85C92.722,84.414,100,72.333,100,72.333C100,45.498,87.671,23.75,87.671,23.75z M34.869,66.745c-5.046,0-9.136-4.056-9.136-9.059c0-5.002,4.09-9.059,9.136-9.059c5.045,0,9.137,4.057,9.137,9.059C44.006,62.689,39.914,66.745,34.869,66.745z M67.758,66.745c-5.045,0-9.135-4.056-9.135-9.059c0-5.002,4.09-9.059,9.135-9.059c5.046,0,9.137,4.057,9.137,9.059C76.895,62.689,72.804,66.745,67.758,66.745z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG DISCORD -->\n\n    <!-- SVG PATREON -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-patreon\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M0,100h16.667V0H0V100z M62.5,0C41.79,0,25,16.788,25,37.5c0,20.71,16.789,37.503,37.5,37.503c20.711,0,37.5-16.793,37.5-37.503C100,16.788,83.211,0,62.5,0z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PATREON -->\n\n    <!-- SVG BEHANCE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-behance\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M99.827,61.223H68.064c0,3.648,0.755,10.949,10.776,10.949s9.643-6.916,9.643-6.916H99.26c0,18.249-20.986,16.713-20.986,16.713c-24.012,0-23.822-20.746-23.822-20.746c0-5.668-0.095-27.087,24.39-27.087S99.827,61.223,99.827,61.223z M78.273,43.356c-9.714,0-10.209,9.221-10.209,9.221h19.852C87.916,52.577,87.987,43.356,78.273,43.356z M64.661,21.458h26.091v8.067H64.661V21.458z M35.166,80.799v0.016H0V18h34.032c0,0,0.024,0,0.062,0h1.072v0.054c3.628,0.299,14.748,2.292,14.748,15.506c0,0,1.144,10.259-7.661,12.951c4.671,0.871,9.93,4.394,9.93,15.863C52.183,62.373,53.762,80.43,35.166,80.799z M33.465,29.525H14.748V42.78h18.15c0,0,3.97-1.057,3.97-6.915C36.868,30.006,33.465,29.525,33.465,29.525z M34.032,53.154H14.748V69.29h18.717c0,0,5.672-1.249,5.672-8.067C39.137,54.402,34.032,53.154,34.032,53.154z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG BEHANCE -->\n\n    <!-- SVG DEVIANTART -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-deviantart\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M83,80.77H48.107L37.204,100H17V82.052l21.362-37.18H17V20.513h35.356L64.143,0H83v19.231L61.918,56.41H83V80.77z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG DEVIANTART -->\n\n    <!-- SVG ARTSTATION -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-artstation\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M0,77.114l8.412,16.545c1.7,3.754,5.102,6.341,8.981,6.341h56.038l-11.62-22.886H0z M98.391,71.002L65.502,6.122C63.797,2.47,60.491,0,56.617,0H39.224l50.755,99.889l8.035-15.79c1.515-3.001,1.986-4.29,1.986-6.877C100,74.967,99.432,72.819,98.391,71.002z M31,16.217L8.315,60.799h45.276L31,16.217z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG ARTSTATION -->\n\n    <!-- SVG SPOTIFY -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-spotify\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M50,0C22.431,0,0,22.431,0,50c0,27.568,22.431,50,50,50c27.568,0,50-22.432,50-50C100,22.431,77.568,0,50,0z M72.938,72.175\n        c-0.612,0.869-1.575,1.331-2.557,1.331c-0.625,0-1.25-0.181-1.793-0.568c-11.719-8.237-31.213-8.693-44.375-5.625\n        c-1.668,0.394-3.362-0.656-3.75-2.338c-0.387-1.681,0.65-3.362,2.337-3.756c14.469-3.35,36.094-2.737,49.375,6.606\n        C73.588,68.818,73.925,70.763,72.938,72.175z M79.037,59.981c-0.612,0.85-1.568,1.3-2.537,1.3c-0.638,0-1.269-0.188-1.825-0.588\n        c-13.594-9.756-30.293-12.181-52.581-7.631c-1.681,0.331-3.344-0.744-3.688-2.438c-0.35-1.688,0.744-3.344,2.431-3.688\n        c24.106-4.919,42.369-2.169,57.481,8.675C79.719,56.625,80.044,58.575,79.037,59.981z M85.2,43.606\n        c-0.606,0.894-1.594,1.369-2.588,1.369c-0.606,0-1.219-0.175-1.756-0.538c-17.231-11.694-43.425-11.75-60.381-5.75\n        c-1.625,0.563-3.413-0.281-3.988-1.913c-0.575-1.625,0.275-3.413,1.906-3.987c18.444-6.519,47.025-6.381,65.981,6.475\n        C85.8,40.231,86.162,42.175,85.2,43.606z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SPOTIFY -->\n\n    <!-- SVG SNAPCHAT -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-snapchat\" viewBox=\"0 0 512 512\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M501.952,374.442v-0.021c-68.438-11.265-99.285-81.365-100.544-84.353c-18.966-34.005,32.512-28.288,52.757-49.024\n        c19.755-20.331-11.925-42.347-31.744-33.003c-8.128,3.819-20.309,8.256-28.416,4.544c1.921-32.192,7.232-85.568-5.802-114.709\n        C344.362-0.32,215.083-3.861,155.008,53.141c-47.338,44.886-41.536,91.03-37.099,159.445c-14.72,6.421-29.269-6.336-39.872-6.336\n        c-11.136,0-24.085,7.232-26.176,18.133c-2.646,14.315,12.907,23.531,26.368,28.843c22.933,9.003,44.736,11.67,32.64,36.246\n        c-0.106,0.191-0.192,0.383-0.256,0.575c-17.131,39.126-54.528,76.736-100.565,84.331c-7.424,1.216-12.501,9.045-8.789,17.686v0.042\n        c7.616,17.75,48.256,24.854,67.435,27.84c5.931,11.094,1.387,33.003,19.754,33.003c7.147,0,20.971-4.672,38.614-4.672\n        c25.707,0,34.475,5.61,55.083,20.16c21.163,14.954,44.416,29.568,73.323,27.456c30.102,1.877,52.459-11.968,74.389-27.413\n        l0.021-0.043c21.376-15.04,36.651-26.154,81.92-17.259c33.494,6.485,23.723-16.192,31.488-31.232\n        c19.456-3.05,59.712-10.09,67.413-27.818C514.581,382.997,509.035,375.573,501.952,374.442z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SNAPCHAT -->\n\n    <!-- SVG REDDIT -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-reddit\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <polygon points=\"34.225,56.217 34.225,56.223 37.336,56.223\"/>\n        <polygon points=\"65.34,56.223 68.451,56.223 65.34,56.217\"/>\n        <path d=\"M100,46.889c0-6.864-5.582-12.445-12.445-12.445c-2.744,0-5.352,0.896-7.48,2.52c-6.944-4.823-16.042-7.697-25.719-8.425\n        l5.221-12.247l15.19,3.547c0.485,4.698,4.418,8.382,9.241,8.382c5.146,0,9.334-4.188,9.334-9.334c0-5.146-4.188-9.334-9.334-9.334\n        c-3.262,0-6.13,1.686-7.797,4.231L58.457,9.633c-1.506-0.342-2.98,0.423-3.578,1.811L47.66,28.37\n        c-10.448,0.361-20.404,3.305-27.921,8.432c-2.047-1.519-4.586-2.358-7.293-2.358C5.582,34.443,0,40.025,0,46.889\n        c0,4.549,2.483,8.662,6.291,10.771c-0.05,0.548-0.068,1.107-0.068,1.674c0,17.156,19.54,31.114,43.56,31.114\n        c24.014,0,43.56-13.958,43.56-31.114c0-0.484-0.02-0.965-0.05-1.443C97.35,55.824,100,51.611,100,46.889z M84.008,15.775\n        c1.711,0,3.111,1.394,3.111,3.111c0,1.718-1.4,3.111-3.111,3.111s-3.111-1.394-3.111-3.111\n        C80.896,17.169,82.297,15.775,84.008,15.775z M28.002,56.223c0-3.428,2.794-6.223,6.223-6.223s6.223,2.795,6.223,6.223\n        c0,3.436-2.794,6.223-6.223,6.223S28.002,59.658,28.002,56.223z M64.15,76.863c-4.293,3.105-9.334,4.662-14.368,4.662\n        s-10.075-1.557-14.368-4.662c-1.394-1.008-1.705-2.955-0.697-4.343c1.008-1.388,2.956-1.698,4.344-0.697\n        c6.416,4.636,15.027,4.648,21.443,0c1.388-1.001,3.329-0.703,4.344,0.697C65.855,73.914,65.538,75.855,64.15,76.863z M65.34,62.445\n        c-3.436,0-6.224-2.787-6.224-6.223c0-3.428,2.788-6.223,6.224-6.223c3.434,0,6.223,2.795,6.223,6.223\n        C71.563,59.658,68.773,62.445,65.34,62.445z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG REDDIT -->\n\n    <!-- SVG PINTEREST -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-pinterest\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M51.359,0C23.952,0,9.376,17.563,9.376,36.714c0,8.881,4.963,19.958,12.907,23.469c1.206,0.544,1.862,0.313,2.131-0.807\n        c0.237-0.85,1.281-4.943,1.788-6.875c0.156-0.618,0.075-1.156-0.425-1.737c-2.638-3.05-4.731-8.606-4.731-13.819\n        c0-13.357,10.619-26.326,28.689-26.326c15.625,0,26.557,10.15,26.557,24.67c0,16.407-8.682,27.758-19.963,27.758\n        c-6.244,0-10.894-4.9-9.419-10.963c1.781-7.22,5.275-14.982,5.275-20.189c0-4.669-2.638-8.531-8.025-8.531\n        c-6.356,0-11.513,6.294-11.513,14.744c0,5.369,1.9,8.994,1.9,8.994s-6.288,25.402-7.457,30.145\n        c-1.975,8.032,0.269,21.038,0.463,22.157c0.119,0.619,0.813,0.813,1.2,0.307c0.619-0.813,8.219-11.657,10.351-19.494\n        c0.775-2.857,3.957-14.439,3.957-14.439c2.094,3.782,8.138,6.951,14.576,6.951c19.15,0,32.988-16.832,32.988-37.721\n        C90.555,14.982,73.416,0,51.359,0z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PINTEREST -->\n\n    <!-- SVG MESSENGER -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-messenger\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M50,0C22.388,0,0,20.725,0,46.294c0,14.568,7.269,27.563,18.631,36.05V100l17.025-9.344\n        C40.2,91.912,45.013,92.594,50,92.594c27.612,0,50-20.725,50-46.294C100,20.731,77.612,0,50,0z M54.969,62.344L42.237,48.763\n        L17.394,62.344l27.332-29.013l13.043,13.582L82.3,33.331L54.969,62.344z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG MESSENGER -->\n\n    <!-- SVG LINKEDIN -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-linkedin\" viewBox=\"0 0 512 512\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M384.832,161.579c-51.627,0-86.271,28.331-100.416,55.189h-1.493v-46.613H181.099v341.824h106.026V342.721c0-44.566,8.448-87.659,63.638-87.659c54.379,0,55.189,50.858,55.189,90.517V512h105.92v-0.021H512V324.203C512,232.341,492.224,161.579,384.832,161.579z\"/>\n        <rect x=\"8.448\" y=\"170.176\" width=\"106.154\" height=\"341.824\"/>\n        <path d=\"M61.482,0C27.542,0,0,27.542,0,61.482c0,33.941,27.542,62.059,61.482,62.059c33.941,0,61.483-28.118,61.483-62.059C122.944,27.542,95.403,0,61.482,0z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG LINKEDIN -->\n\n    <!-- SVG GITHUB -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-github\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M49.994,1.041C22.388,1.041,0,23.516,0,51.24c0,22.176,14.325,40.988,34.2,47.632c2.5,0.462,3.412-1.087,3.412-2.419\n        c0-1.193-0.043-4.35-0.068-8.537C23.638,90.947,20.7,81.185,20.7,81.185c-2.269-5.8-5.55-7.344-5.55-7.344\n        c-4.543-3.112,0.337-3.05,0.337-3.05c5.019,0.355,7.656,5.175,7.656,5.175c4.463,7.669,11.707,5.456,14.557,4.169\n        c0.45-3.244,1.744-5.457,3.175-6.713C29.775,72.153,18.1,67.848,18.1,48.616c0-5.481,1.95-9.962,5.15-13.475\n        c-0.519-1.269-2.231-6.375,0.487-13.281c0,0,4.2-1.35,13.75,5.144c3.988-1.113,8.263-1.669,12.519-1.688\n        c4.244,0.025,8.525,0.575,12.519,1.694c9.543-6.494,13.737-5.144,13.737-5.144c2.725,6.913,1.013,12.013,0.5,13.281\n        c3.206,3.513,5.138,7.994,5.138,13.475c0,19.281-11.688,23.524-22.825,24.769c1.794,1.551,3.394,4.613,3.394,9.294\n        c0,6.712-0.063,12.125-0.063,13.769c0,1.344,0.9,2.906,3.438,2.412C85.688,92.216,100,73.41,100,51.24\n        C100,23.516,77.612,1.041,49.994,1.041z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG GITHUB -->\n\n    <!-- SVG WHATSAPP -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-whatsapp\" viewBox=\"0 0 512 512\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M373.482,305.216l-0.191,1.601c-46.912-23.382-51.819-26.496-57.878-17.408c-4.202,6.293-16.448,20.564-20.139,24.789\n        c-3.733,4.16-7.445,4.48-13.781,1.6c-6.399-3.199-26.944-9.92-51.264-31.68c-18.944-16.96-31.659-37.76-35.414-44.16\n        c-6.25-10.795,6.827-12.331,18.731-34.859c2.133-4.48,1.045-8-0.534-11.179c-1.6-3.2-14.336-34.56-19.669-47.061\n        c-5.12-12.459-10.389-10.88-14.336-10.88c-12.288-1.066-21.269-0.896-29.184,7.339c-34.432,37.845-25.75,76.885,3.712,118.399\n        c57.898,75.776,88.747,89.729,145.151,109.1c15.232,4.842,29.12,4.16,40.107,2.581c12.245-1.941,37.695-15.382,43.008-30.421\n        c5.439-15.041,5.439-27.521,3.84-30.4C384.064,309.695,379.883,308.096,373.482,305.216z\"/>\n        <path d=\"M437.44,74.411l0.319-0.832C273.729-84.992,2.261,30.016,2.155,253.717c0,44.714,11.712,88.32,34.026,126.827L0,512\n        l135.146-35.242C303.787,567.851,511.915,446.891,512,253.845C512,186.091,485.547,122.325,437.44,74.411z M149.12,434.56\n        l-7.68-4.565l-80,20.801l21.44-77.76l-5.099-8C-10.197,224.981,90.88,41.941,257.536,41.941c56.618,0,109.76,22.08,149.781,62.08\n        c40,39.659,62.059,92.8,62.059,149.12C469.248,415.979,290.496,517.675,149.12,434.56z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG WHATSAPP -->\n\n    <!-- SVG VK -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-vk\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M99.109,72.363c-0.27-0.45-1.932-4.063-9.933-11.488c-8.376-7.775-7.251-6.514,2.838-19.958\n        c6.144-8.188,8.601-13.188,7.831-15.326c-0.73-2.038-5.25-1.5-5.25-1.5L79.57,24.178c0,0-1.113-0.15-1.944,0.344\n        c-0.807,0.487-1.325,1.613-1.325,1.613s-2.381,6.338-5.557,11.726c-6.694,11.37-9.375,11.97-10.47,11.264\n        c-2.544-1.644-1.906-6.613-1.906-10.139c0-11.02,1.669-15.613-3.257-16.801c-1.637-0.394-2.838-0.656-7.019-0.7\n        c-5.363-0.057-9.907,0.019-12.476,1.275c-1.713,0.837-3.032,2.707-2.226,2.813c0.994,0.131,3.244,0.606,4.438,2.231\n        c1.544,2.094,1.488,6.807,1.488,6.807s0.887,12.97-2.069,14.582c-2.032,1.106-4.813-1.15-10.782-11.469\n        c-3.057-5.282-5.369-11.126-5.369-11.126s-0.444-1.087-1.238-1.669c-0.962-0.707-2.313-0.931-2.313-0.931L3.258,24.084\n        c0,0-2.144,0.063-2.932,0.994c-0.7,0.832-0.056,2.544-0.056,2.544s11.188,26.171,23.852,39.366\n        C35.742,79.082,48.93,78.289,48.93,78.289h5.975c0,0,1.807-0.201,2.726-1.194c0.85-0.913,0.818-2.626,0.818-2.626\n        s-0.119-8.019,3.607-9.2c3.668-1.163,8.381,7.751,13.375,11.183c3.775,2.594,6.645,2.025,6.645,2.025l13.357-0.188\n        C95.434,78.289,102.422,77.857,99.109,72.363z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG VK -->\n\n    <!-- SVG TUMBLR -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-tumblr\" viewBox=\"0 0 512 512\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M380.267,408.938c-9.771,4.565-28.31,8.513-41.984,8.938h-1.94c-39.744,0-47.531-29.227-47.873-50.581v-159.36h104.556\n        v-77.504H288.854V0h-76.267c-1.259,0-3.456,1.088-3.755,3.819c-4.31,39.957-23.424,109.995-102.166,138.005v66.112h52.395v167.296\n        c0,56.64,42.026,136.768,152.49,136.768l-0.234-0.043h3.861c38.102-0.64,80.704-16.384,90.154-29.952L380.267,408.938z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG TUMBLR -->\n\n    <!-- SVG TIKTOK -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-tiktok\" viewBox=\"0 0 512 512\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M432.734,112.465c-53.742,0-97.465-43.723-97.465-97.465c0-8.285-6.715-15-15-15h-80.336c-8.281,0-15,6.715-15,15v329.367\n        c0,31.594-25.707,57.297-57.301,57.297s-57.297-25.703-57.297-57.297c0-31.598,25.703-57.301,57.297-57.301c8.285,0,15-6.715,15-15\n        V191.73c0-8.281-6.715-15-15-15C75.199,176.73,0,251.934,0,344.367S75.199,512,167.633,512S335.27,436.801,335.27,344.367V198.574\n        c29.852,15.918,63.074,24.227,97.465,24.227c8.285,0,15-6.715,15-15v-80.336C447.734,119.184,441.02,112.465,432.734,112.465z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG TIKTOK -->\n\n    <!-- SVG UNSPLASH -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-unsplash\" viewBox=\"0 0 500 500\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M156.25,140.625V0h187.5v140.625H156.25zM343.75,218.75H500V500H0V218.75h156.25v140.625h187.5V218.75z\" />\n      </symbol>\n    </svg>\n    <!-- /SVG UNSPLASH -->\n\n    <!-- SVG FLICKR -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-flickr\" viewBox=\"0 0 500 500\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M406.25,0H93.75C67.925,0,45.84,9.18,27.51,27.501C9.165,45.847,0,67.923,0,93.748v312.5c0,25.823,9.165,47.911,27.51,66.235C45.84,490.817,67.925,500,93.75,500h312.5c25.82,0,47.9-9.178,66.24-27.518C490.83,454.158,500,432.07,500,406.249V93.753c0-25.824-9.17-47.899-27.51-66.245C454.15,9.18,432.07,0,406.25,0z\n        M207.026,298.827c-13.462,13.452-29.736,20.178-48.828,20.178c-19.102,0-35.376-6.726-48.833-20.178c-13.457-13.455-20.181-29.729-20.181-48.829s6.724-35.374,20.181-48.829s29.731-20.179,48.833-20.179c19.092,0,35.366,6.724,48.828,20.179c13.457,13.454,20.186,29.729,20.186,48.829S220.483,285.372,207.026,298.827z\n        M390.625,298.827c-13.457,13.452-29.736,20.178-48.828,20.178c-19.102,0-35.371-6.726-48.828-20.178c-13.467-13.455-20.186-29.729-20.186-48.829s6.719-35.374,20.186-48.829c13.457-13.455,29.727-20.179,48.828-20.179c19.092,0,35.371,6.724,48.828,20.179c13.457,13.454,20.186,29.729,20.186,48.829S404.082,285.372,390.625,298.827z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG FLICKR -->\n\n    <!-- SVG CROSS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-cross\" viewBox=\"0 0 12 12\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M12,9.6L9.6,12L6,8.399L2.4,12L0,9.6L3.6,6L0,2.4L2.4,0L6,3.6L9.6,0L12,2.4L8.399,6L12,9.6z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG CROSS -->\n\n    <!-- SVG LOGO VIKINGER -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-logo-vikinger\" viewBox=\"0 0 28 40\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M27.18,24.038c-0.141-0.095-0.244-0.146-0.244-0.146l-0.005-0.049C25.489,22.783,23.103,22,23.103,22c1.542,0,2.582-0.563,3.501-1.334c-0.049-0.055,0.7-0.666,0.7-0.666c0.146-8.251-4.477-12.745-7.001-14.667C18.15,9.564,16.802,14,16.802,14c-0.219-4.426,0.243-8.072,0.7-10.667c-0.85-0.452-1.956-0.698-2.296-1.537C14.865,0.957,14.015,0,14.015,0L14,0.014L13.985,0c0,0-0.85,0.957-1.19,1.796c-0.34,0.839-1.445,1.085-2.295,1.537C10.957,5.928,11.418,9.574,11.2,14c0,0-1.349-4.436-3.501-8.667C5.174,7.255,0.551,11.749,0.697,20c0,0,0.75,0.611,0.701,0.666C2.316,21.437,3.357,22,4.898,22c0,0-2.387,0.783-3.829,1.844l-0.005,0.049c0,0-0.104,0.051-0.244,0.146c-0.48,0.397-0.806,0.828-0.819,1.269c-0.023,0.521,0.263,1.181,1.233,1.973c0,0,0.136,9.259,9.69,11.29c0,0,0.212,0.815,0.975,1.431L14,38l2.102,2c0.763-0.615,0.975-1.431,0.975-1.431c9.555-2.031,9.689-11.29,9.689-11.29\n        c0.971-0.792,1.256-1.451,1.233-1.973C27.986,24.866,27.659,24.436,27.18,24.038z M4.198,26c2.362,0.121,3.517,1.473,5.602,4c0.799,0.969,2.059,0.83,2.059,0.83L11.899,34C5.249,34,4.198,26,4.198,26z M14,28.162l-2.97-2.828l2.101-2.001l-2.101-2l2.101-2l-2.101-2L14,14.505l2.972,2.828l-2.102,2l2.102,2l-2.102,2l2.102,2.001L14,28.162z M16.102,34l0.041-3.17\n        c0,0,1.26,0.139,2.059-0.83c2.085-2.527,3.239-3.879,5.602-4C23.803,26,22.752,34,16.102,34z M13.3,26h1.4v-1.333h-1.4V26z M13.3,22h1.4v-1.334h-1.4V22z M13.3,18h1.4v-1.333h-1.4V18z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG LOGO VIKINGER -->\n\n    <!-- SVG GRID -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-grid\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M7,0H2C0.896,0,0,0.895,0,2v5c0,1.104,0.896,2,2,2h5c1.104,0,2-0.896,2-2V2C9,0.895,8.104,0,7,0z M7,7H2V2h5V7z M7,11H2c-1.104,0-2,0.896-2,1.999v5C0,19.104,0.896,20,2,20h5c1.104,0,2-0.896,2-2.001v-5C9,11.896,8.104,11,7,11z M7,17.999H2v-5h5V17.999z M18,0h-5c-1.104,0-2,0.895-2,2v5c0,1.104,0.896,2,2,2h5c1.104,0,2-0.896,2-2V2C20,0.895,19.104,0,18,0z M18,7h-5V2h5V7z M18,11h-5c-1.104,0-2,0.896-2,1.999v5C11,19.104,11.896,20,13,20h5c1.104,0,2-0.896,2-2.001v-5C20,11.896,19.104,11,18,11z M18,17.999h-5v-5h5V17.999z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG GRID -->\n\n    <!-- SVG DOTS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-dots\" viewBox=\"0 0 10 2\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M0,2h2V0H0V2z M4,2h2V0H4V2z M8,0v2h2V0H8z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG DOTS -->\n\n    <!-- SVG MAGNIFYING GLASS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-magnifying-glass\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M8,2c3.309,0,6,2.691,6,6s-2.691,6-6,6s-6-2.691-6-6S4.691,2,8,2 M8,0C3.582,0,0,3.582,0,8c0,4.418,3.582,8,8,8c4.418,0,8-3.582,8-8C16,3.582,12.418,0,8,0L8,0z\"/>\n        <path d=\"M19.171,15.168l-3.134-3.134c-0.309,0.613-0.679,1.19-1.113,1.714l2.833,2.834c0.323,0.324,0.323,0.851,0,1.175C17.545,17.969,17.298,18,17.17,18c-0.129,0-0.376-0.031-0.588-0.243l-2.834-2.833c-0.523,0.435-1.101,0.805-1.714,1.113l3.134,3.134C15.721,19.724,16.445,20,17.169,20c0.725,0,1.449-0.276,2.002-0.829C20.276,18.065,20.276,16.273,19.171,15.168z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG MAGNIFYING GLASS -->\n\n    <!-- SVG COMMENT -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-comment\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M15,2c1.654,0,3,1.257,3,2.803v6.404c0,1.546-1.346,2.803-3,2.803H7.98H7.508l-0.422,0.211L2,16.764v-5.557V10V4.803C2,3.257,3.346,2,5,2H15 M15,0H5C2.238,0,0,2.15,0,4.803V10v1.207V20l7.98-3.99H15c2.762,0,5-2.15,5-4.803V4.803C20,2.15,17.762,0,15,0L15,0z\"/>\n        <g>\n          <path d=\"M14,5H6C5.447,5,5,5.448,5,6c0,0.553,0.447,1,1,1h8c0.553,0,1-0.447,1-1C15,5.448,14.553,5,14,5z M10,9H6c-0.553,0-1,0.447-1,1s0.447,1,1,1h4c0.553,0,1-0.447,1-1S10.553,9,10,9z\"/>\n        </g>\n      </symbol>\n    </svg>\n    <!-- /SVG COMMENT -->\n\n    <!-- SVG THUMBS UP -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-thumbs-up\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M15.896,19.999c-0.01,0-0.021,0-0.03,0H2.826C1.268,19.999,0,18.743,0,17.201v-6.302c0-1.543,1.269-2.797,2.826-2.797h2.096l3.391-7.515C8.473,0.229,8.83,0,9.223,0c2.063,0,3.742,1.659,3.742,3.698l0.026,2.3h4.996c0.152-0.003-0.149-0.023,0,0c0.753,0.111,1.962,0.245,1.999,1c0.037,0.757-0.011,2.143,0,3.003l-1.295,7.624C18.483,18.982,17.284,19.999,15.896,19.999z M6.995,18.005h8.881c0.003,0,0.007,0,0.01,0c0.418,0,0.77-0.292,0.83-0.684l1.262-8.106c0.031-0.205-0.02-0.412-0.145-0.583c-0.132-0.178-0.621-0.601-0.845-0.634c-0.045-0.008,0.045-0.006,0,0h-4.996c-0.553,0-1-1.451-1-2.001l-0.026-2.3c0-0.733-0.477-1.36-1.144-1.6l-2.828,6.9V18.005z M2.997,10c-0.456,0-0.999,0.457-0.999,0.899v6.302c0,0.442,0.371,0.804,0.827,0.804h2.17V10H2.997z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG THUMBS UP -->\n\n    <!-- SVG FRIEND -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-friend\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,0C4.477,0,0,4.478,0,10c0,5.523,4.477,10,10,10c5.522,0,10-4.477,10-10C20,4.478,15.522,0,10,0z M10,18c-4.418,0-8-3.582-8-8c0-4.418,3.582-8,8-8s8,3.582,8,8\n          C18,14.418,14.418,18,10,18z M10,13c-1.305,0-2.403-0.838-2.816-2H5.101c0.464,2.282,2.48,4,4.899,4s4.436-1.718,4.899-4h-2.083C12.403,12.162,11.305,13,10,13z M7,7H5v2h2V7z M13,9h2V7h-2V9z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG FRIEND -->\n\n    <!-- SVG GROUP -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-group\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,2c1.654,0,3,1.346,3,3s-1.346,3-3,3S7,6.654,7,5S8.346,2,10,2 M10,0C7.238,0,5,2.238,5,5s2.238,5,5,5s5-2.238,5-5S12.762,0,10,0L10,0z\"/>\n        <path d=\"M3,20v-2c0-2.205,1.794-4,4-4h6c2.206,0,4,1.795,4,4v2h2v-2c0-3.313-2.687-6-6-6H7c-3.313,0-6,2.687-6,6v2H3z\"/>\n        <path d=\"M20,8.05c-1.13,0-2.05-0.919-2.05-2.05S18.87,3.95,20,3.95v-2c-2.236,0-4.05,1.813-4.05,4.05s1.813,4.05,4.05,4.05V8.05z\"/>\n        <path d=\"M0,8.05C1,8.05,2.05,7.13,2.05,6S1,3.95,0,3.95v-2c2,0,4.05,1.813,4.05,4.05S2,10.05,0,10.05V8.05z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG GROUP -->\n\n    <!-- SVG MARKETPLACE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-marketplace\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M18,6h-0.5L16,0h-4v2h2.438l1,4H4.562l1-4H8V0H4L2.5,6H2C0.896,6,0,6.896,0,8v2c0,0.738,0.405,1.376,1,1.723v0.276C1,12,1,12,1,12l1,6c0,1.104,0.896,2,2,2h12c1.104,0,2-0.896,2-2l1-6v-0.277c0.596-0.347,1-0.984,1-1.723V8C20,6.896,19.104,6,18,6z M2,8h16v2h-0.999H17H3H2.999H2V8z M16.027,17.671L16,17.834V18H4v-0.165l-0.027-0.164L3.028,12h13.945L16.027,17.671z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG MARKETPLACE -->\n\n    <!-- SVG ADD FRIEND -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-add-friend\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,13c-1.305,0-2.403-0.838-2.816-2H5.101c0.464,2.282,2.48,4,4.899,4s4.436-1.718,4.899-4h-2.083C12.403,12.162,11.305,13,10,13z M7,7H5v2h2V7z M13,7v2h2V7H13z\"/>\n        <polygon points=\"20,2 18,2 18,0 16,0 16,2 14,2 14,4 16,4 16,6 18,6 18,4 20,4\"/>\n        <path d=\"M17.738,8C17.903,8.64,18,9.308,18,10c0,4.418-3.582,8-8,8s-8-3.582-8-8c0-4.418,3.582-8,8-8c0.692,0,1.359,0.097,2,0.262V0.201C11.354,0.07,10.685,0,10,0C4.477,0,0,4.478,0,10\n        c0,5.523,4.477,10,10,10c5.522,0,10-4.477,10-10c0-0.685-0.069-1.354-0.201-2H17.738z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG ADD FRIEND -->\n\n    <!-- SVG REMOVE FRIEND -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-remove-friend\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,13c-1.305,0-2.403-0.838-2.816-2H5.101c0.464,2.282,2.48,4,4.899,4s4.436-1.718,4.899-4h-2.083C12.403,12.162,11.305,13,10,13z M7,7H5v2h2V7z M13,7v2h2V7H13z\"/>\n        <path d=\"M17.738,8C17.903,8.64,18,9.308,18,10c0,4.418-3.582,8-8,8s-8-3.582-8-8c0-4.418,3.582-8,8-8c0.692,0,1.359,0.097,2,0.262V0.201C11.354,0.07,10.685,0,10,0C4.477,0,0,4.478,0,10\n        c0,5.523,4.477,10,10,10c5.522,0,10-4.477,10-10c0-0.685-0.069-1.354-0.201-2H17.738z\"/>\n        <rect x=\"14\" y=\"2\" width=\"6\" height=\"2\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG REMOVE FRIEND -->\n\n    <!-- SVG DELETE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-delete\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,20C4.477,20,0,15.523,0,10C0,4.478,4.477,0,10,0C15.522,0,20,4.478,20,10C20,15.523,15.522,20,10,20z M10,2c-4.418,0-8,3.582-8,8c0,4.418,3.582,8,8,8s8-3.582,8-8\n        C18,5.582,14.418,2,10,2z M12.662,13.994L10,11.332l-2.662,2.662l-1.331-1.33l2.662-2.663L6.007,7.339l1.331-1.331L10,8.67l2.662-2.662l1.331,1.331l-2.662,2.662l2.662,2.663L12.662,13.994z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG DELETE -->\n\n    <!-- SVG MESSAGES -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-messages\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M12,2c1.103,0,2,0.897,2,2v5c0,1.103-0.897,2-2,2H8H7.754l-0.239,0.06L2,12.438V9V4c0-1.103,0.897-2,2-2H12M12,0H4C1.791,0,0,1.791,0,4v5v6l8-2h4c2.209,0,4-1.791,4-4V4C16,1.791,14.209,0,12,0L12,0z\"/>\n        <path d=\"M12,5.012C12,5.558,11.558,6,11.013,6H4.987C4.442,6,4,5.558,4,5.012V4.988C4,4.442,4.442,4,4.987,4h6.025C11.558,4,12,4.442,12,4.988V5.012z\"/>\n        <path d=\"M10,8.047C10,8.574,9.573,9,9.047,9H4.953C4.427,9,4,8.574,4,8.047V7.953C4,7.426,4.427,7,4.953,7h4.094C9.573,7,10,7.426,10,7.953V8.047z\"/>\n        <path d=\"M17,5.142v2.136C17.595,7.625,18,8.263,18,9v5v3.438l-5.516-1.379L12.246,16H12H8c-0.737,0-1.375-0.405-1.722-1H4.142C4.588,16.722,6.139,18,8,18h4l8,2v-6V9C20,7.139,18.722,5.588,17,5.142z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG MESSAGES -->\n\n    <!-- SVG SEND MESSAGE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-send-message\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M19.993,0.94c-0.005-0.091-0.022-0.179-0.052-0.265c-0.011-0.031-0.021-0.062-0.035-0.093  c-0.049-0.107-0.109-0.208-0.195-0.294s-0.188-0.147-0.294-0.195c-0.031-0.014-0.062-0.024-0.093-0.035c-0.086-0.03-0.173-0.046-0.263-0.052C19.034,0.005,19.009,0,18.981,0c-0.104,0.002-0.207,0.017-0.308,0.052L0.67,6.353C0.283,6.488,0.018,6.846,0.001,7.256C-0.016,7.666,0.22,8.044,0.594,8.21l7.75,3.446l3.444,7.75C11.948,19.769,12.308,20,12.702,20\n        c0.014,0,0.027,0,0.041-0.002c0.409-0.016,0.768-0.28,0.903-0.668l6.302-18.003c0.035-0.101,0.05-0.206,0.052-0.309C20,0.991,19.994,0.967,19.993,0.94z M15.197,3.388L8.88,9.706L3.711,7.408L15.197,3.388z M12.592,16.288l-2.298-5.169l6.317-6.316L12.592,16.288z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SEND MESSAGE -->\n\n    <!-- SVG BACK ARROW -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-back-arrow\" viewBox=\"0 0 14 10\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M14,6H3.364l2.644,2.75L4.806,10L1.202,6.25l0,0L0,5L4.806,0l1.201,1.25L3.364,4H14V6z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG BACK ARROW -->\n\n    <!-- SVG SHOPPING BAG -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-shopping-bag\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M15.904,6c0.148,0.117,0.347,0.386,0.406,0.557l0.001,0.017l0.676,11.421c-0.005,0.003-0.01,0.005-0.013,0.006H3.029c-0.004-0.001-0.01-0.003-0.016-0.006L3.689,6.573L3.69,6.556C3.749,6.386,3.947,6.117,4.095,6H15.904 M16.075,4H3.924C2.806,4,1.692,5.563,1.692,6.455L1,18.154C1,19.048,1.906,20,3.024,20h13.95C18.093,20,19,19.048,19,18.154L18.308,6.455C18.308,5.563,17.193,4,16.075,4L16.075,4z\"/>\n        <path d=\"M8,8V3.893C8,2.849,8.849,2,9.893,2H10h0.054C11.098,2,12,2.849,12,3.893V8h2V3.893C14,1.743,12.257,0,10.107,0H9.893C7.743,0,6,1.743,6,3.893V8H8z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SHOPPING BAG -->\n\n    <!-- SVG NOTIFICATION -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-notification\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M18.583,14.127c-0.023-0.018-2.241-1.758-2.241-7.52C16.342,2.964,13.497,0,10.004,0C6.511,0,3.668,2.964,3.668,6.607c0,5.762-2.22,7.502-2.228,7.508c-0.365,0.254-0.525,0.725-0.397,1.158c0.129,0.434,0.517,0.73,0.957,0.73h16.007c0.433,0,0.81-0.293,0.943-0.719C19.086,14.861,18.932,14.389,18.583,14.127zM4.086,13.939C4.873,12.527,5.67,10.21,5.67,6.607c0-2.505,1.945-4.542,4.334-4.542c2.391,0,4.335,2.038,4.335,4.542c0,3.603,0.796,5.92,1.583,7.333H4.086z M12.418,17.146c-0.57-0.283-1.293-0.115-1.619,0.381c-0.126,0.191-0.327,0.326-0.567,0.383c-0.234,0.051-0.478,0.023-0.688-0.084c-0.138-0.07-0.255-0.174-0.336-0.297c-0.325-0.496-1.05-0.668-1.618-0.385c-0.568,0.283-0.766,0.914-0.44,1.408c0.286,0.438,0.7,0.803,1.194,1.055C8.854,19.867,9.421,20,9.997,20c0.281,0,0.564-0.031,0.843-0.096c0.856-0.197,1.573-0.676,2.016-1.348C13.182,18.061,12.984,17.432,12.418,17.146z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG NOTIFICATION -->\n\n    <!-- SVG SETTINGS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-settings\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,7c-1.657,0-3,1.343-3,3c0,1.655,1.343,2.999,3,2.999c1.656,0,3-1.344,3-2.999C13,8.343,11.656,7,10,7zM10,11c-0.552,0-1-0.449-1-1c0-0.552,0.448-1,1-1s1,0.448,1,1C11,10.551,10.552,11,10,11z M17.363,12.638C18.817,12.638,20,11.453,20,10s-1.183-2.637-2.637-2.637h-0.135c-0.106,0-0.205-0.049-0.27-0.129 c-0.014-0.054-0.032-0.106-0.055-0.158c-0.059-0.132-0.031-0.283,0.111-0.429c0.498-0.499,0.772-1.161,0.772-1.865c0-0.704-0.274-1.367-0.773-1.865c-0.997-0.997-2.693-1.035-3.769,0.042c-0.102,0.1-0.24,0.135-0.397,0.066c-0.129-0.055-0.212-0.18-0.212-0.391C12.637,1.182,11.454,0,10,0S7.363,1.182,7.363,2.636v0.135c0,0.106-0.049,0.206-0.129,0.271C7.181,3.056,7.128,3.073,7.077,3.096c-0.128,0.058-0.264,0.052-0.43-0.113c-0.996-0.994-2.731-0.995-3.73,0.003c-1.026,1.028-1.025,2.701,0.044,3.77C3.062,6.858,3.089,7.01,3.007,7.2c-0.05,0.136-0.176,0.227-0.371,0.229C1.183,7.429,0,8.612,0,10.065c0,1.454,1.183,2.637,2.636,2.637h0.138c0.138,0,0.263,0.083,0.322,0.222c0.058,0.132,0.03,0.284-0.113,0.429c-0.497,0.498-0.771,1.161-0.771,1.865c0.001,0.705,0.276,1.367,0.773,1.863c0.996,0.996,2.689,1.038,3.771-0.042c0.101-0.099,0.142-0.173,0.443-0.046c0.136,0.049,0.226,0.176,0.229,0.37\n        c0,1.454,1.183,2.637,2.637,2.637s2.637-1.183,2.637-2.637v-0.137c0-0.139,0.083-0.263,0.222-0.322c0.129-0.058,0.263-0.051,0.428,0.112c0.999,0.995,2.735,0.996,3.73-0.002c0.498-0.499,0.771-1.162,0.771-1.866c-0.001-0.704-0.275-1.366-0.813-1.903c-0.101-0.104-0.129-0.256-0.064-0.398C17.029,12.72,17.154,12.638,17.363,12.638zM15.666,14.7c0.121,0.12,0.188,0.279,0.188,0.449s-0.067,0.33-0.188,0.453c-0.239,0.241-0.605,0.295-0.956-0.058c-0.677-0.662-1.742-0.845-2.582-0.475c-0.864,0.369-1.423,1.214-1.425,2.153v0.14c0,0.352-0.286,0.636-0.637,0.636s-0.637-0.284-0.637-0.733c-0.023-0.97-0.627-1.815-1.479-2.125C7.649,15.007,7.329,14.939,7,14.939c-0.618,0-1.202,0.238-1.7,0.728c-0.24,0.24-0.66,0.241-0.901-0.002c-0.248-0.246-0.248-0.65,0.058-0.957c0.675-0.69,0.859-1.709,0.474-2.58c-0.368-0.864-1.214-1.424-2.154-1.426h-0.14C2.285,10.702,2,10.416,2,10.065\n        s0.285-0.637,0.733-0.637c0.971-0.023,1.815-0.626,2.127-1.48c0.39-0.884,0.205-1.9-0.527-2.648C4.085,5.052,4.085,4.647,4.334,4.398c0.24-0.24,0.603-0.298,0.957,0.058C5.92,5.07,6.871,5.282,7.694,5c0.084-0.013,0.167-0.036,0.245-0.07c0.861-0.37,1.42-1.214,1.424-2.155v-0.14C9.363,2.285,9.649,2,10,2s0.637,0.285,0.637,0.712c0.002,0.937,0.561,1.782,1.414,2.148c0.865,0.38,1.884,0.222,2.649-0.527c0.241-0.24,0.656-0.243,0.901,0.001c0.12,0.12,0.187,0.279,0.187,0.449c0,0.169-0.066,0.331-0.242,0.507c-0.629,0.642-0.834,1.566-0.545,2.405\n        c0.013,0.083,0.035,0.165,0.069,0.244c0.369,0.862,1.213,1.421,2.154,1.425h0.139C17.715,9.364,18,9.649,18,10c0,0.351-0.285,0.637-0.712,0.637c-0.938,0.002-1.783,0.561-2.146,1.411C14.749,12.933,14.933,13.951,15.666,14.7z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SETTINGS -->\n\n    <!-- SVG CROSS THIN -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-cross-thin\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M18,16.547L16.545,18L10,11.455L3.455,18L2,16.547L8.545,10L2,3.455L3.455,2L10,8.546L16.545,2L18,3.455L11.455,10L18,16.547z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG CROSS THIN -->\n\n    <!-- SVG NEWSFEED -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-newsfeed\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,0H4C1.791,0,0,1.791,0,4v8c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4V4C20,1.791,18.209,0,16,0zM18,12c0,1.103-0.897,2-2,2H4c-1.103,0-2-0.897-2-2V4c0-1.103,0.897-2,2-2h12c1.103,0,2,0.897,2,2V12z\"/>\n        <path d=\"M0,10v2h20v-2H0z M5,20h10v-2H5V20z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG NEWSFEED -->\n\n    <!-- SVG OVERVIEW -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-overview\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M18,8v10h-2V8H18 M18,6h-2c-1.104,0-2,0.896-2,2v10c0,1.104,0.896,2,2,2h2c1.104,0,2-0.896,2-2V8C20,6.896,19.104,6,18,6L18,6z\"/>\n        <path d=\"M11,2v16H9V2H11 M11,0H9C7.896,0,7,0.896,7,2v16c0,1.104,0.896,2,2,2h2c1.104,0,2-0.896,2-2V2C13,0.896,12.104,0,11,0L11,0z\"/>\n        <path d=\"M4,14v4H2v-4H4 M4,12H2c-1.104,0-2,0.896-2,2v4c0,1.104,0.896,2,2,2h2c1.104,0,2-0.896,2-2v-4C6,12.896,5.104,12,4,12L4,12z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG OVERVIEW -->\n\n    <!-- SVG MEMBERS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-members\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,10c2.762,0,5-2.238,5-5c0-2.762-2.238-5-5-5S5,2.238,5,5C5,7.761,7.238,10,10,10z M10,2c1.654,0,3,1.346,3,3s-1.346,3-3,3S7,6.654,7,5S8.346,2,10,2z M13,12H7c-3.313,0-6,2.686-6,6v2h2v-2c0-2.205,1.794-4,4-4h6c2.206,0,4,1.795,4,4v2h2v-2C19,14.686,16.313,12,13,12z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG MEMBERS -->\n\n    <!-- SVG BADGES -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-badges\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,8c2.757,0,5,2.243,5,5s-2.243,5-5,5s-5-2.243-5-5S7.243,8,10,8 M10,6c-3.866,0-7,3.134-7,7s3.134,7,7,7c3.865,0,7-3.134,7-7S13.865,6,10,6L10,6z\"/>\n        <path d=\"M3.906,6.391L2.651,2h3.84l0.701,2.453c0.627-0.206,1.283-0.347,1.963-0.41L8,0H0l2.36,8.26C2.79,7.568,3.31,6.941,3.906,6.391z\"/>\n        <path d=\"M12.808,4.453L13.509,2h3.84l-1.255,4.391C16.689,6.94,17.21,7.568,17.64,8.26L20,0h-8l-1.155,4.043C11.524,4.106,12.181,4.247,12.808,4.453z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG BADGES -->\n\n    <!-- SVG QUESTS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-quests\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,2.708l1.774,3.813l0.452,0.97l1.058,0.163l4.138,0.637l-3.07,3.175l-0.697,0.721l0.16,0.989l0.7,4.326l-3.494-1.947l-0.965-0.538L10,15.048l-0.055-0.03L8.98,15.556l-3.494,1.947l0.7-4.326l0.16-0.989l-0.697-0.721L2.578,8.292l4.138-0.637l1.058-0.163l0.451-0.97L10,2.708 M10.029-0.004C10.019-0.004,10.01-0.002,10,0C9.99-0.002,9.981-0.004,9.971-0.004\n        c-0.558,0-1.066,0.326-1.303,0.834L6.412,5.678L1.223,6.477c-0.534,0.082-0.977,0.46-1.148,0.976c-0.172,0.517-0.042,1.086,0.334,1.474l3.802,3.932l-0.882,5.453c-0.089,0.548,0.141,1.1,0.591,1.42c0.248,0.176,0.539,0.266,0.83,0.266c0.24,0,0.479-0.061,0.697-0.182l4.507-2.512L10,17.328l0.046-0.025l4.506,2.512c0.219,0.121,0.457,0.182,0.697,0.182c0.291,0,0.582-0.09,0.83-0.266c0.45-0.32,0.68-0.872,0.591-1.42l-0.882-5.453l3.802-3.932c0.376-0.387,0.507-0.957,0.335-1.474c-0.172-0.515-0.614-0.894-1.148-0.976l-5.189-0.798l-2.256-4.848C11.095,0.322,10.586-0.004,10.029-0.004L10.029-0.004z\"/>\n        <rect x=\"7\" y=\"9\" width=\"2\" height=\"2\"/>\n        <rect x=\"11\" y=\"9\" width=\"2\" height=\"2\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG QUESTS -->\n\n    <!-- SVG STREAMS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-streams\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,3c1.103,0,2,0.897,2,2v10c0,1.103-0.897,2-2,2H4c-1.103,0-2-0.897-2-2V5c0-1.103,0.897-2,2-2H16 M16,1H4C1.791,1,0,2.791,0,5v10c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4V5C20,2.791,18.209,1,16,1L16,1z\"/>\n        <path d=\"M8.405,7c0.102,0,0.219,0.037,0.347,0.115l3.908,2.4c0.439,0.267,0.462,0.704,0.021,0.971l-3.928,2.4C8.624,12.964,8.507,13,8.405,13C8.157,13,8,12.782,8,12.408V7.593C8,7.217,8.157,7,8.405,7 M8.405,5C7.034,5,6,6.115,6,7.593v4.815C6,13.886,7.034,15,8.405,15c0.477,0,0.943-0.137,1.386-0.405l3.932-2.402c0.796-0.481,1.276-1.297,1.277-2.177c0.001-0.888-0.486-1.715-1.304-2.21L9.798,5.411C9.348,5.137,8.881,5,8.405,5L8.405,5z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG STREAMS -->\n\n    <!-- SVG EVENTS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-events\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,2H4C1.791,2,0,3.791,0,6v10c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4V6C20,3.791,18.209,2,16,2zM18,16c0,1.103-0.897,2-2,2H4c-1.103,0-2-0.897-2-2V6c0-1.103,0.897-2,2-2h12c1.103,0,2,0.897,2,2V16z\"/>\n        <path d=\"M0,8v2h20V8H0z M7,0H5v6h2V0z M15,0h-2v6h2V0z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG EVENTS -->\n\n    <!-- SVG FORUMS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-forums\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,0H4C1.791,0,0,1.592,0,3.556V6v2v4.444C0,14.408,1.791,16,4,16h2l4,4l4-4h2c2.209,0,4-1.592,4-3.556V8V6V3.556C20,1.592,18.209,0,16,0z M18,12.444C18,13.287,17.084,14,16,14h-2h-0.828l-0.586,0.586L10,17.172l-2.586-2.586L6.829,14H6H4c-1.084,0-2-0.713-2-1.556V8h16V12.444z M2,6V3.556C2,2.712,2.916,2,4,2h12c1.084,0,2,0.712,2,1.556V6H2z\"/>\n        <rect x=\"4\" y=\"3\" width=\"2\" height=\"2\"/>\n        <rect x=\"10\" y=\"3\" width=\"2\" height=\"2\"/>\n        <rect x=\"7\" y=\"3\" width=\"2\" height=\"2\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG FORUMS -->\n\n    <!-- SVG SMALL ARROW -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-small-arrow\" viewBox=\"0 0 6 8\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M6,4L1.5,8L0,6.665L3,4L0,1.333L1.5,0l3,2.666l0,0L6,4z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SMALL ARROW -->\n\n    <!-- SVG BIG ARROW -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-big-arrow\" viewBox=\"0 0 8 12\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M6.399,7.5L6.399,7.5L1.6,12L0,10.5L4.8,6L0,1.5L1.6,0L8,6L6.399,7.5z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG BIG ARROW -->\n\n    <!-- SVG PUBLIC -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-public\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M20,10c0-5.522-4.478-10-10-10C4.477,0,0,4.478,0,10c0,5.523,4.477,10,10,10\n        c1.566,0,3.043-0.37,4.362-1.013l0.01,0.018c0.051-0.028,0.086-0.059,0.135-0.087C17.763,17.27,20,13.9,20,10z M16.155,15.108c-0.648-1.745-2.802-3.14-4.653-3.408c-0.751-0.109-0.829-0.433-0.858-0.555C10.497,10.532,11,9.499,11.679,9.021c1.482-1.044,4.529-0.504,6.252-0.025C17.972,9.325,18,9.659,18,10C18,11.942,17.307,13.723,16.155,15.108z M14.715,3.547c-0.012,0-0.022,0.003-0.034,0.003c-1.374,0-2.609-0.561-3.518-1.456C12.479,2.286,13.688,2.796,14.715,3.547z M2,10\n        c0-2.277,0.956-4.328,2.483-5.785c1.26,0.272,2.644,0.845,2.87,1.36C7.373,5.62,7.425,5.74,7.222,6.051c-0.295,0.451-0.603,0.88-0.896,1.29c-1.389,1.937-2.963,4.131-0.647,6.169c0.537,0.472,0.805,1.243,0.624,1.793c-0.184,0.557-0.815,0.773-1.402,0.86C3.128,14.695,2,12.479,2,10z M7.065,17.437c0.671-0.479,0.993-1.077,1.135-1.507c0.432-1.308-0.063-2.92-1.201-3.922c-0.814-0.716-0.672-1.24,0.951-3.502c0.31-0.432,0.633-0.883,0.944-1.359c0.66-1.009,0.521-1.85,0.289-2.377c-0.428-0.972-1.522-1.606-2.57-2.01C7.251,2.46,7.934,2.244,8.65,2.122c1.236,2.047,3.469,3.428,6.03,3.428c0.618,0,1.206-0.106,1.776-0.259c0.339,0.463,0.631,0.961,0.865,1.492c-1.979-0.428-4.906-0.729-6.795,0.603c-1.195,0.84-2.204,2.651-1.828,4.224c0.268,1.122,1.185,1.876,2.516,2.068c1.409,0.205,2.963,1.352,3.137,2.314c0.028,0.156,0.1,0.618-0.781,1.158C12.495,17.689,11.285,18,10,18C8.963,18,7.975,17.796,7.065,17.437z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PUBLIC -->\n\n    <!-- SVG PRIVATE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-private\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M11,11H9c-0.553,0-1,0.447-1,1s0.447,1,1,1v1c0,0.553,0.447,1,1,1s1-0.447,1-1v-1c0.553,0,1-0.447,1-1S11.553,11,11,11z\"/>\n        <path d=\"M16,6.142V6c0-3.313-2.687-6-6-6S4,2.687,4,6v0.142C2.278,6.588,1,8.139,1,10v6c0,2.209,1.791,4,4,4h10c2.209,0,4-1.791,4-4v-6C19,8.139,17.722,6.588,16,6.142z M10,2c2.206,0,4,1.794,4,4H6C6,3.794,7.794,2,10,2z M17,16c0,1.103-0.897,2-2,2H5c-1.103,0-2-0.897-2-2v-6c0-1.103,0.897-2,2-2h10c1.103,0,2,0.897,2,2V16z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PRIVATE -->\n\n    <!-- SVG JOIN GROUP -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-join-group\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,9.999c2.762,0,5-2.238,5-5s-2.238-5-5-5s-5,2.238-5,5S7.238,9.999,10,9.999z M10,1.999c1.654,0,3,1.346,3,3s-1.346,3-3,3s-3-1.346-3-3S8.346,1.999,10,1.999z M20,3.949v-2c-2.236,0-4.05,1.813-4.05,4.05c0,2.236,1.813,4.05,4.05,4.05v-2c-1.13,0-2.05-0.92-2.05-2.05C17.95,4.869,18.87,3.949,20,3.949z M4.05,5.999C4.05,3.762,2,1.949,0,1.949v2c1,0,2.05,0.919,2.05,2.05c0,1.13-1.05,2.05-2.05,2.05v2C2,10.049,4.05,8.235,4.05,5.999zM11,13.999H9v2H7v2h2v2h2v-2h2v-2h-2V13.999z M7,11.999c-3.313,0-6,2.687-6,6v2h2v-2c0-2.205,1.794-4,4-4V11.999z M13,11.999v2c2.206,0,4,1.795,4,4v2h2v-2C19,14.686,16.313,11.999,13,11.999z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG JOIN GROUP -->\n\n    <!-- SVG LEAVE GROUP -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-leave-group\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,9.999c2.762,0,5-2.238,5-5s-2.238-5-5-5s-5,2.238-5,5S7.238,9.999,10,9.999z M10,1.999c1.654,0,3,1.346,3,3s-1.346,3-3,3s-3-1.346-3-3S8.346,1.999,10,1.999z M20,3.949v-2c-2.236,0-4.05,1.813-4.05,4.05c0,2.236,1.813,4.05,4.05,4.05v-2c-1.13,0-2.05-0.92-2.05-2.05C17.95,4.869,18.87,3.949,20,3.949z M4.05,5.999C4.05,3.762,2,1.949,0,1.949v2c1,0,2.05,0.919,2.05,2.05c0,1.13-1.05,2.05-2.05,2.05v2C2,10.049,4.05,8.235,4.05,5.999z M7,17.999h6v-2H7V17.999z M7,11.999c-3.313,0-6,2.687-6,6v2h2v-2c0-2.205,1.794-4,4-4V11.999z M13,11.999v2c2.206,0,4,1.795,4,4v2h2v-2C19,14.686,16.313,11.999,13,11.999z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG LEAVE GROUP -->\n\n    <!-- SVG MORE DOTS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-more-dots\" viewBox=\"0 0 22 6\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M19,6c-1.657,0-3-1.344-3-3c0-1.656,1.343-3,3-3s3,1.344,3,3C22,4.656,20.657,6,19,6z M19,2c-0.553,0-1,0.447-1,1c0,0.552,0.447,1,1,1c0.552,0,1-0.449,1-1C20,2.447,19.552,2,19,2z M11,6C9.343,6,8,4.656,8,3c0-1.656,1.343-3,3-3s3,1.344,3,3C14,4.656,12.657,6,11,6z M11,2c-0.553,0-1,0.447-1,1c0,0.552,0.447,1,1,1c0.552,0,1-0.449,1-1C12,2.447,11.552,2,11,2z M3,6C1.343,6,0,4.656,0,3c0-1.656,1.343-3,3-3c1.656,0,3,1.344,3,3C6,4.656,4.656,6,3,6z M3,2C2.447,2,2,2.447,2,3c0,0.552,0.447,1,1,1c0.552,0,1-0.449,1-1C4,2.447,3.552,2,3,2z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG MORE DOTS -->\n\n    <!-- SVG PROFILE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-profile\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,2c4.418,0,8,3.582,8,8c0,4.418-3.582,8-8,8c-4.418,0-8-3.582-8-8C2,5.582,5.582,2,10,2 M10,0C4.486,0,0,4.486,0,10c0,5.514,4.486,10,10,10c5.514,0,10-4.486,10-10C20,4.486,15.514,0,10,0L10,0z\"/>\n        <path d=\"M10,7c0.551,0,1,0.449,1,1s-0.449,1-1,1S9,8.551,9,8S9.449,7,10,7 M10,5C8.343,5,7,6.343,7,8c0,1.656,1.343,3,3,3c1.656,0,3-1.344,3-3C13,6.343,11.656,5,10,5L10,5z\"/>\n        <path d=\"M14.866,15.025C14.43,13.29,12.871,12,11,12H9c-1.871,0-3.43,1.29-3.866,3.025C5.678,15.553,6.308,15.988,7,16.317V16c0-1.104,0.897-2,2-2h2c1.103,0,2,0.896,2,2v0.317C13.692,15.988,14.322,15.553,14.866,15.025z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PROFILE -->\n\n    <!-- SVG TIMELINE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-timeline\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,0H4C1.791,0,0,1.791,0,4v12c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4V4C20,1.791,18.209,0,16,0zM18,16c0,1.103-0.897,2-2,2H4c-1.103,0-2-0.897-2-2V4c0-1.103,0.897-2,2-2h12c1.103,0,2,0.897,2,2V16z\"/>\n        <polygon points=\"18,5 2,5 2,7 5,7 5,20 7,20 7,7 13,7 13,20 15,20 15,7 18,7\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG TIMELINE -->\n\n    <!-- SVG PHOTOS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-photos\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,0H4C1.791,0,0,1.791,0,4v12c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4V4C20,1.791,18.209,0,16,0zM4,2h12c1.103,0,2,0.897,2,2v6.407L16.703,9.11c-0.75-0.751-1.734-1.126-2.718-1.126c-0.984,0-1.968,0.375-2.719,1.126l-2.98,2.98l-0.259-0.259c-0.563-0.563-1.301-0.844-2.039-0.844s-1.476,0.282-2.04,0.844L2,13.782V4C2,2.897,2.897,2,4,2z M16,18H4c-0.918,0-1.686-0.625-1.919-1.47l3.282-3.283c0.226-0.226,0.489-0.259,0.626-0.259c0.137,0,0.399,0.033,0.625,0.258l0.259,0.259l1.414,1.414L9.7,13.505l2.981-2.981c0.348-0.348,0.811-0.54,1.304-0.54c0.492,0,0.955,0.192,1.304,0.541L18,13.234V16C18,17.103,17.103,18,16,18z\"/>\n        <path d=\"M6,9c1.657,0,3-1.344,3-3c0-1.657-1.343-3-3-3S3,4.343,3,6C3,7.656,4.343,9,6,9z M6,5c0.551,0,1,0.449,1,1c0,0.552-0.449,1-1,1S5,6.552,5,6C5,5.449,5.449,5,6,5z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PHOTOS -->\n\n    <!-- SVG HEADPHONES -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-headphones\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M17,20h-1.001c-1.652,0-2.997-1.344-2.997-2.998v-2.999c0-1.653,1.345-2.999,2.997-2.999H18V10c0-4.415-3.589-8.006-8-8.006S2,5.585,2,10v1.004h1.999C5.653,11.004,7,12.35,7,14.003v2.999C7,18.656,5.653,20,3.999,20H3c-1.654,0-3-1.344-3-2.998v-1V12v-2C0,4.486,4.485,0,10,0c5.514,0,10,4.486,10,10v2v4.002v1C20,18.656,18.654,20,17,20z M2,17.002c0,0.554,0.448,1.004,1,1.004h0.999c0.552,0,1.001-0.45,1.001-1.004v-2.999c0-0.555-0.449-1.005-1.001-1.005H2v3.004V17.002z M15.999,12.998c-0.55,0-0.997,0.45-0.997,1.005v2.999c0,0.554,0.447,1.004,0.997,1.004H17c0.552,0,1-0.45,1-1.004v-1v-3.004H15.999z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG HEADPHONES -->\n\n    <!-- SVG VIDEOS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-videos\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,0H4C1.791,0,0,1.791,0,4v12c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4V4C20,1.791,18.209,0,16,0zM18,4v1h-2V2C17.103,2,18,2.897,18,4z M4,13H2V7h2V13z M16,7h2v6h-2V7z M14,2v16H6V2H14z M4,2v3H2V4C2,2.897,2.897,2,4,2z M2,16v-1h2v3C2.897,18,2,17.103,2,16z M16,18v-3h2v1C18,17.103,17.103,18,16,18z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG VIDEOS -->\n\n    <!-- SVG BLOG POSTS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-blog-posts\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M15,0H5C2.791,0,1,1.791,1,4v3v2v7c0,2.209,1.791,4,4,4h10c2.209,0,4-1.791,4-4V9V7V4C19,1.791,17.209,0,15,0z M17,16c0,1.103-0.897,2-2,2H5c-1.103,0-2-0.897-2-2V9h14V16z M3,7V4c0-1.103,0.897-2,2-2h10c1.103,0,2,0.897,2,2v3H3z\"/>\n        <rect x=\"5\" y=\"11\" width=\"10\" height=\"2\"/>\n        <rect x=\"13\" y=\"14\" width=\"2\" height=\"2\"/>\n        <rect x=\"5\" y=\"14\" width=\"6\" height=\"2\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG BLOG POSTS -->\n\n    <!-- SVG FORUM -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-forum\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10.969,0H5C2.791,0,1,1.791,1,4v12c0,2.209,1.791,4,4,4h10c2.209,0,4-1.791,4-4V8.125L10.969,0z M11,2.877L16.064,8H13c-1.104,0-2-0.897-2-2V2.877z M15,18H5c-1.103,0-2-0.897-2-2V4c0-1.103,0.897-2,2-2h4v4c0,2.209,1.791,4,4,4h4v6C17,17.103,16.103,18,15,18z\"/>\n        <path d=\"M13,14H7c-0.553,0-1,0.447-1,1s0.447,1,1,1h6c0.552,0,1-0.447,1-1S13.552,14,13,14z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG FORUM -->\n\n    <!-- SVG STORE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-store\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M19.411,4.288l-1.894-3.301C17.174,0.378,16.537,0,15.855,0H4.047C3.37,0,2.734,0.376,2.39,0.981L0.492,4.288C-0.18,5.459-0.227,6.949,0.37,8.177C0.737,8.933,1.314,9.494,2,9.826V16c0,2.209,1.791,4,4,4h8c2.209,0,4-1.791,4-4V9.766c0.642-0.338,1.184-0.871,1.532-1.586C20.13,6.953,20.084,5.462,19.411,4.288z M2.227,5.289L4.047,2h11.732l1.896,3.289c0.343,0.598,0.365,1.388,0.059,2.018c-0.136,0.277-0.452,0.755-1.073,0.845c-0.567,0.088-1.203-0.159-1.624-0.674l-0.772-0.943L13.49,7.477c-0.725,0.883-2.046,0.883-2.767,0.001L9.95,6.532L9.176,7.477C8.452,8.361,7.13,8.359,6.41,7.478L5.636,6.531L4.862,7.478c-0.421,0.515-0.973,0.773-1.639,0.67C2.62,8.06,2.303,7.583,2.168,7.306C1.862,6.675,1.885,5.885,2.227,5.289zM4,10.11c0.582-0.086,1.148-0.295,1.636-0.641c1.263,0.9,3.046,0.9,4.313,0c1.265,0.9,3.046,0.901,4.315,0c0.518,0.368,1.113,0.592,1.736,0.665V14H4V10.11z M14,18H6c-1.103,0-2-0.897-2-2h12C16,17.103,15.103,18,14,18z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG STORE -->\n\n    <!-- SVG STAR -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-star\" viewBox=\"0 0 9 8\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M4.5,0l1.482,2.515L9,3.056L6.899,5.151L7.28,8L4.5,6.78L1.719,8L2.1,5.151L0,3.056l3.017-0.541L4.5,0\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG STAR -->\n\n    <!-- SVG STARRED -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-starred\" viewBox=\"0 0 11 10\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M5.5,0l1.813,3.143L11,3.82l-2.566,2.62L8.898,10L5.5,8.477L2.101,10l0.466-3.561L0,3.82l3.688-0.677L5.5,0\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG STARRED -->\n\n    <!-- SVG PLAY -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-play\" viewBox=\"0 0 12 14\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M11.182,5.868l-9.378-5.6C0.751-0.355,0,0.147,0,1.383v11.236c0,1.234,0.751,1.737,1.803,1.112l9.431-5.599C12.291,7.51,12.236,6.491,11.182,5.868z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PLAY -->\n\n    <!-- SVG SHARE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-share\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M15.336,12.6c-0.984,0-1.876,0.399-2.536,1.04l-4.602-2.714c0.077-0.297,0.13-0.604,0.13-0.925s-0.054-0.628-0.13-0.925l4.598-2.717C13.457,7,14.35,7.4,15.336,7.4C17.356,7.4,19,5.741,19,3.7S17.356,0,15.336,0s-3.665,1.66-3.665,3.7c0,0.321,0.054,0.628,0.13,0.925L7.203,7.342C6.543,6.7,5.651,6.3,4.665,6.3C2.644,6.3,1,7.959,1,10c0,2.04,1.645,3.699,3.665,3.699c0.986,0,1.878-0.399,2.538-1.041l4.601,2.713c-0.078,0.299-0.132,0.606-0.132,0.93c0,2.04,1.645,3.699,3.665,3.699S19,18.341,19,16.301C19,14.26,17.356,12.6,15.336,12.6z M15.336,2c0.921,0,1.67,0.763,1.67,1.7s-0.749,1.7-1.67,1.7c-0.922,0-1.672-0.763-1.672-1.7S14.414,2,15.336,2z M4.665,11.699c-0.921,0-1.671-0.763-1.671-1.699c0-0.938,0.75-1.7,1.671-1.7s1.67,0.763,1.67,1.7C6.335,10.937,5.586,11.699,4.665,11.699z M15.336,18c-0.922,0-1.672-0.763-1.672-1.699c0-0.308,0.087-0.592,0.228-0.841c0.003-0.005,0.006-0.008,0.009-0.012c0.003-0.005,0.002-0.01,0.005-0.015c0.292-0.497,0.821-0.834,1.431-0.834c0.921,0,1.67,0.763,1.67,1.701C17.006,17.237,16.257,18,15.336,18z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SHARE -->\n\n    <!-- SVG PINNED -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-pinned\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M17,20c-0.205,0-0.408-0.063-0.581-0.188L10,15.229l-6.419,4.584c-0.305,0.218-0.706,0.249-1.039,0.077C2.209,19.717,2,19.375,2,19V3c0-1.654,1.346-3,3-3h10c1.654,0,3,1.346,3,3v16c0,0.375-0.209,0.717-0.542,0.89C17.313,19.963,17.156,20,17,20z M10,13c0.203,0,0.407,0.063,0.581,0.186L16,17.057V3c0-0.551-0.448-1-1-1H5C4.448,2,4,2.448,4,3v14.057l5.419-3.871C9.593,13.063,9.796,13,10,13z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PINNED -->\n\n    <!-- SVG STATUS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-status\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,1H4C1.791,1,0,2.791,0,5v4v2v4c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4v-4V9V5C20,2.791,18.209,1,16,1z M18,15c0,1.103-0.897,2-2,2H4c-1.103,0-2-0.897-2-2v-4h16V15z M18,9H2V5c0-1.103,0.897-2,2-2h12c1.103,0,2,0.897,2,2V9z\"/>\n        <rect x=\"13\" y=\"13\" width=\"2\" height=\"2\"/>\n        <rect x=\"9\" y=\"13\" width=\"2\" height=\"2\"/>\n        <rect x=\"5\" y=\"5\" width=\"10\" height=\"2\"/>\n        <rect x=\"5\" y=\"13\" width=\"2\" height=\"2\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG STATUS -->\n\n    <!-- SVG BIG GRID VIEW -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-big-grid-view\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,20H4c-2.209,0-4-1.791-4-4V4c0-2.209,1.791-4,4-4h12c2.209,0,4,1.791,4,4v12C20,18.209,18.209,20,16,20z M2,16c0,1.102,0.896,2,2,2h5v-7H2V16z M4,2C2.896,2,2,2.896,2,4v5h7V2H4z M18,4c0-1.104-0.897-2-2-2h-5v7h7V4z M18,11h-7v7h5c1.103,0,2-0.898,2-2V11z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG BIG GRID VIEW -->\n\n    <!-- SVG SMALL GRID VIEW -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-small-grid-view\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,20H4c-2.209,0-4-1.791-4-4V4c0-2.209,1.791-4,4-4h12c2.209,0,4,1.791,4,4v12C20,18.209,18.209,20,16,20z M12,18v-4H8v4H12z M2,16c0,1.102,0.896,2,2,2h2v-4H2V16z M6,2H4C2.896,2,2,2.896,2,4v2h4V2z M2,8v4h4V8H2z M12,2H8v4h4V2z M8,8v4h4V8H8z M18,4c0-1.103-0.897-2-2-2h-2v4h4V4z M18,8h-4v4h4V8zM18,14h-4v4h2c1.103,0,2-0.898,2-2V14z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SMALL GRID VIEW -->\n\n    <!-- SVG LIST GRID VIEW -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-list-grid-view\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,20H4c-2.209,0-4-1.791-4-4V4c0-2.209,1.791-4,4-4h12c2.209,0,4,1.791,4,4v12C20,18.209,18.209,20,16,20z M2,16c0,1.102,0.896,2,2,2h2v-4H2V16z M6,2H4C2.896,2,2,2.896,2,4v2h4V2z M2,8v4h4V8H2z M18,4c0-1.103-0.897-2-2-2H8v4h10V4z M18,8H8v4h10V8z M18,14H8v4h8c1.103,0,2-0.898,2-2V14z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG LIST GRID VIEW -->\n\n    <!-- SVG PLUS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-plus\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M20,11h-9v9H9v-9H0V9h9V0h2v9h9V11z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PLUS -->\n\n    <!-- SVG PLUS SMALL -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-plus-small\" viewBox=\"0 0 8 8\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M8,5H5v3H3V5H0V3h3V0h2v3h3V5z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PLUS SMALL -->\n\n    <!-- SVG MINUS SMALL -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-minus-small\" viewBox=\"0 0 8 8\" preserveAspectRatio=\"xMinYMin meet\">\n        <rect y=\"3\" width=\"8\" height=\"2\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG MINUS SMALL -->\n\n    <!-- SVG POLL -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-poll\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M12,14H2C0.896,14,0,14.896,0,16v2C0,19.104,0.896,20,2,20h10c1.105,0,2-0.896,2-2v-2C14,14.896,13.105,14,12,14z M12,18H2v-2h10V18z M18,7H2C0.896,7,0,7.896,0,9v2C0,12.104,0.896,13,2,13h16c1.104,0,2-0.896,2-2V9C20,7.896,19.104,7,18,7z M18,11H2V9h16V11z M2,6h4C7.105,6,8,5.104,8,4V2C8,0.896,7.105,0,6,0H2C0.896,0,0,0.896,0,2v2C0,5.104,0.896,6,2,6z M2,2h4v2H2V2z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG POLL -->\n\n    <!-- SVG CAMERA -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-camera\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M13.018,2C13.505,2,13.81,2.018,14,2.041v1.964h2c1.103,0,2,0.896,2,1.999v9.998C18,17.104,17.103,18,16,18H4c-1.103,0-2-0.896-2-1.999V6.003c0-1.102,0.897-1.999,2-1.999h2V2.041C6.19,2.018,6.496,2,6.983,2l0.473,0.002L8,2.005h4l0.544-0.003L13.018,2 M13.018,0C12.692,0,12.352,0.005,12,0.005H8C7.648,0.005,7.308,0,6.983,0C5.267,0,4,0.148,4,2.005c-2.209,0-4,1.791-4,3.999v9.998C0,18.21,1.791,20,4,20h12c2.209,0,4-1.79,4-3.999V6.003c0-2.208-1.791-3.999-4-3.999C16,0.148,14.733,0,13.018,0L13.018,0z\"/>\n        <path d=\"M10,10c1.103,0,2,0.896,2,2c0,1.103-0.897,2-2,2c-1.103,0-2-0.897-2-2C8,10.896,8.897,10,10,10 M10,8c-2.209,0-4,1.791-4,4s1.791,4,4,4s4-1.791,4-4S12.209,8,10,8L10,8z\"/>\n        <path d=\"M15,6c0.553,0,1,0.448,1,1c0,0.553-0.447,1-1,1s-1-0.447-1-1C14,6.448,14.447,6,15,6z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG CAMERA -->\n\n    <!-- SVG GIF -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-gif\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M3.676,5.098L2.243,3.665C1.025,5.153,0.201,6.975,0,8.995h2.053C2.237,7.534,2.822,6.206,3.676,5.098z M8.995,2.028V0C6.974,0.201,5.152,1.025,3.664,2.243l1.429,1.428\n          C6.199,2.807,7.527,2.212,8.995,2.028z M16.336,2.243C14.847,1.025,13.025,0.201,11.006,0v2.028c1.468,0.184,2.795,0.778,3.902,1.643L16.336,2.243z M17.947,8.995H20c-0.201-2.021-1.025-3.842-2.242-5.33l-1.435,1.433C17.179,6.206,17.764,7.534,17.947,8.995z M2.053,11.005H0c0.201,2.021,1.025,3.842,2.243,5.33l1.433-1.434\n          C2.822,13.793,2.237,12.466,2.053,11.005z M11.006,17.971V20c2.02-0.2,3.841-1.025,5.33-2.243l-1.428-1.428C13.801,17.193,12.474,17.787,11.006,17.971z M3.664,17.757C5.152,18.975,6.974,19.8,8.995,20v-2.029c-1.468-0.184-2.796-0.777-3.902-1.642L3.664,17.757z M16.323,14.901l1.435,1.434c1.217-1.488,2.041-3.31,2.242-5.33h-2.053C17.764,12.466,17.179,13.793,16.323,14.901z M15.025,11.005v-2.01H10v2.01h2.831c-0.416,1.168-1.521,2.01-2.831,2.01c-1.666,0-3.016-1.35-3.016-3.016c0-1.665,1.35-3.015,3.016-3.015h3.998C13.08,5.771,11.64,4.974,10,4.974c-2.776,0-5.026,2.25-5.026,5.025c0,2.774,2.25,5.025,5.026,5.025C12.432,15.024,14.56,13.298,15.025,11.005z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG GIF -->\n\n    <!-- SVG TAGS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-tags\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M20,13.001v2h-6L13,20h-2l1-4.999H6L5,20H3l1-4.999H0v-2h4.4L5.6,7H0V5h6l1-5h2L8,5h6l1-5h2l-1,5h4v2h-4.4L14.4,13.001H20z M13.6,7h-6l-1.2,6.001h6L13.6,7z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG TAGS -->\n\n    <!-- SVG QUOTE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-quote\" viewBox=\"0 0 32 22\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M12.998,5l-1-5C3.897,0.622,0,4.275,0,12.904V22h10.998V11H6.997C6.597,7.035,8.106,5.854,12.998,5z M32,5l-1.001-5c-8.1,0.622-11.998,4.275-11.998,12.904V22h10.998V11h-4C25.599,7.035,27.107,5.854,32,5z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG QUOTE -->\n\n    <!-- SVG PIN -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-pin\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,2c3.309,0,6,2.773,6,6.182c0,4.78-4.517,9.104-5.994,9.768C8.557,17.272,4,12.836,4,8.182C4,4.773,6.691,2,10,2 M10,0C5.581,0,2,3.663,2,8.182C2,14.291,8.192,20,10,20c1.807,0,8-5.596,8-11.818C18,3.663,14.418,0,10,0L10,0z\"/>\n        <path d=\"M10,6c1.103,0,2,0.897,2,2c0,1.103-0.897,2-2,2c-1.103,0-2-0.897-2-2C8,6.897,8.897,6,10,6 M10,4C7.791,4,6,5.791,6,8s1.791,4,4,4s4-1.791,4-4S12.209,4,10,4L10,4z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG PIN -->\n\n    <!-- SVG TICKET -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-ticket\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M15,2v16h-1.537c-0.692-1.194-1.985-2-3.463-2s-2.771,0.806-3.463,2H5V2h1.537C7.229,3.195,8.522,4,10,4s2.771-0.805,3.463-2H15 M17,0h-5c0,1.104-0.896,2-2,2S8,1.104,8,0H3v20h5c0-1.104,0.896-2,2-2s2,0.896,2,2h5V0L17,0z\"/>\n        <rect x=\"7\" y=\"7\" width=\"6\" height=\"2\"/>\n        <rect x=\"7\" y=\"11\" width=\"4\" height=\"2\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG TICKET -->\n\n    <!-- SVG EVENTS MONTHLY -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-events-monthly\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,20H4c-2.209,0-4-1.791-4-4.001V6c0-2.209,1.791-4,4-4h1V0h2v2h6V0h2v2h1c2.209,0,4,1.791,4,4v9.999C20,18.209,18.209,20,16,20z M18,6c0-1.103-0.897-2-2-2h-1v2h-2V4H7v2H5V4H4C2.896,4,2,4.897,2,6v9.999C2,17.103,2.896,18,4,18h12c1.103,0,2-0.897,2-2.001V6z M13,13.001h2v2h-2V13.001z M13,9.001h2v2h-2V9.001z M9,13.001h2v2H9V13.001z M9,9.001h2v2H9V9.001z M5,13.001h2v2H5V13.001z M5,9.001h2v2H5V9.001z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG EVENTS MONTHLY -->\n\n    <!-- SVG EVENTS WEEKLY -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-events-weekly\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,20H4c-2.209,0-4-1.791-4-4.001V6c0-2.209,1.791-4,4-4h1V0h2v2h6V0h2v2h1c2.209,0,4,1.791,4,4v9.999C20,18.209,18.209,20,16,20z M18,6c0-1.103-0.897-2-2-2h-1v2h-2V4H7v2H5V4H4C2.896,4,2,4.897,2,6v9.999C2,17.103,2.896,18,4,18h12c1.103,0,2-0.897,2-2.001V6z M5,13.001h10v2H5V13.001z M5,9.001h10v2H5V9.001z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG EVENTS WEEKLY -->\n\n    <!-- SVG EVENTS DAILY -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-events-daily\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,20H4c-2.209,0-4-1.791-4-4.001V6c0-2.209,1.791-4,4-4h1V0h2v2h6V0h2v2h1c2.209,0,4,1.791,4,4v9.999C20,18.209,18.209,20,16,20z M18,6c0-1.103-0.897-2-2-2h-1v2h-2V4H7v2H5V4H4C2.896,4,2,4.897,2,6v9.999C2,17.103,2.896,18,4,18h12c1.103,0,2-0.897,2-2.001V6z M7,15.001H5v-2v-2v-2h2h6h2v2v2v2h-2H7zM13,11.001H7v2h6V11.001z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG EVENTS DAILY -->\n\n    <!-- SVG INFO -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-info\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M9,15h2V9H9V15z M9,7h2V5H9V7z M16-0.001H4c-2.209,0-4,1.791-4,4v12c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4v-12C20,1.79,18.209-0.001,16-0.001z M18,15.999C18,17.102,17.103,18,16,18H4c-1.103,0-2-0.898-2-2.001v-12c0-1.103,0.897-2,2-2h12c1.103,0,2,0.897,2,2V15.999z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG INFO -->\n\n    <!-- SVG SUCCESS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-success\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,20H4c-2.209,0-4-1.791-4-4V4c0-2.208,1.791-4,4-4h12c2.209,0,4,1.791,4,4v12C20,18.209,18.209,20,16,20z M18,4c0-1.103-0.897-2-2-2H4C2.897,2,2,2.897,2,4v12\n        c0,1.103,0.897,2.001,2,2.001h12c1.103,0,2-0.898,2-2.001V4z M4.995,10.973l1.088-1.746l3.771,2.016l3.265-5.237l1.886,1.008l-4.354,6.982L4.995,10.973z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SUCCESS -->\n\n    <!-- SVG ERROR -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-error\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n      <path d=\"M16,20H4c-2.209,0-4-1.791-4-4V4c0-2.208,1.791-4,4-4h12c2.209,0,4,1.791,4,4v12C20,18.209,18.209,20,16,20z M18,4c0-1.103-0.897-2-2-2H4C2.897,2,2,2.897,2,4v12\n      c0,1.103,0.897,2.001,2,2.001h12c1.103,0,2-0.898,2-2.001V4z M12.402,14.006L10,11.603l-2.403,2.403l-1.602-1.603l2.403-2.402L5.995,7.598l1.602-1.602L10,8.399l2.402-2.403l1.603,1.602l-2.403,2.403l2.403,2.402L12.402,14.006z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG ERROR -->\n\n    <!-- SVG CHECK -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-check\" viewBox=\"0 0 12 9\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M12,1.5L4.5,9L3,7.499l0,0L0,4.5L1.5,3l3,3l6-6L12,1.5z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG CHECK -->\n\n    <!-- SVG CHECK SMALL -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-check-small\" viewBox=\"0 0 6 6\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M6.012,0.966L3.217,6.004l-3.229-1.939l0.932-1.68l1.614,0.97l1.864-3.359L6.012,0.966z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG CHECK SMALL -->\n\n    <!-- SVG TROPHY -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-trophy\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M19.968,4.031C19.941,5.666,19.579,11,15.99,11h-0.125c-0.426,2.357-2.111,2.999-5.858,2.999c-3.748,0-5.434-0.642-5.859-2.999H4.009c-3.588,0-3.951-5.333-3.977-6.969L0,2h2.028h1.98h0.015V0H15.99v2l0,0h1.981H20L19.968,4.031z M4.009,3.999L1.994,4c0,0,0.112,4.999,2.015,4.999V3.999z M13.993,2H6.02v7.6c0,2.385,0.741,2.399,3.987,2.399c3.245,0,3.986-0.014,3.986-2.399V2z M17.972,3.999H15.99v5C17.893,8.999,18.006,4,18.006,4L17.972,3.999z M11.005,15.999H13c2.206,0,3.993,1.789,3.993,4h-1.989h-0.006c0-1.104-0.896-2.001-1.998-2.001h-1.995H9.009H7.013c-1.102,0-1.996,0.896-1.996,2.001H4.996H3.02c0-2.211,1.788-4,3.993-4h1.996v-2.001h0.998h0.998V15.999z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG TROPHY -->\n\n    <!-- SVG CLOCK -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-clock\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,0C4.486,0,0,4.485,0,9.999c0,5.515,4.486,10,10,10c5.514,0,10-4.485,10-10C20,4.485,15.514,0,10,0zM10,17.999c-4.414,0-8.005-3.589-8.005-8S5.586,2,10,2c4.414,0,8.005,3.588,8.005,7.999S14.414,17.999,10,17.999z M14.437,12.105l-3.44-1.724V4.999C10.997,4.447,10.551,4,10,4S9.002,4.447,9.002,4.999V11c0,0.379,0.213,0.725,0.551,0.894l3.99,2C13.687,13.966,13.838,14,13.988,14c0.367,0,0.719-0.203,0.894-0.554C15.128,12.953,14.929,12.352,14.437,12.105z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG CLOCK -->\n\n    <!-- SVG RETURN -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-return\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M19.12,13.852c-1.047,2.187-2.896,3.834-5.203,4.638C12.922,18.835,11.905,19,10.906,19c-3.751,0-7.273-2.313-8.59-6.006c-0.186-0.52,0.086-1.092,0.606-1.277c0.52-0.189,1.092,0.085,1.277,0.605c1.301,3.646,5.367,5.563,9.06,4.278c1.801-0.627,3.241-1.909,4.057-3.614c0.802-1.675,0.9-3.56,0.277-5.308c-1.3-3.644-5.363-5.562-9.06-4.278C7.541,3.746,6.623,4.316,5.877,5.052l-2.33,2.163h2.852c0.553,0,1,0.448,1,1c0,0.552-0.447,1-1,1H1c-0.007,0-0.013-0.004-0.019-0.004C0.901,9.21,0.826,9.185,0.749,9.164C0.699,9.151,0.646,9.149,0.601,9.13C0.555,9.109,0.518,9.071,0.474,9.044c-0.066-0.043-0.137-0.08-0.191-0.138C0.277,8.901,0.271,8.9,0.267,8.896C0.231,8.857,0.218,8.811,0.189,8.769C0.147,8.707,0.101,8.649,0.073,8.579C0.045,8.507,0.039,8.432,0.028,8.355C0.021,8.307,0,8.264,0,8.214V2.882c0-0.552,0.447-1,1-1c0.552,0,1,0.448,1,1v3.041l2.495-2.315c0.935-0.922,2.111-1.653,3.382-2.096c4.728-1.646,9.933,0.819,11.6,5.495C20.281,9.261,20.154,11.69,19.12,13.852z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG RETURN -->\n\n    <!-- SVG DRIBBBLE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-dribbble\" viewBox=\"0 0 12 12\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M6,11.999c-3.313,0-6-2.687-6-6c0-3.313,2.687-6,6-6s6,2.686,6,6C12,9.313,9.313,11.999,6,11.999z M7.434,4.992C7.585,5.295,7.728,5.599,7.86,5.896c0.814-0.135,1.696-0.139,2.634,0.046c-0.01-0.874-0.272-1.686-0.713-2.373C9.062,4.167,8.257,4.632,7.434,4.992z M9.104,9.244c0.599-0.573,1.036-1.31,1.247-2.138c-0.484-0.085-1.184-0.15-2.008-0.054C8.681,7.915,8.935,8.684,9.104,9.244z M5.994,10.495c0.708,0,1.375-0.167,1.972-0.459C7.812,9.095,7.532,8.167,7.188,7.285C6.014,7.624,4.701,8.333,3.44,9.7C4.166,10.2,5.045,10.495,5.994,10.495z M2.556,8.897c0.8-0.837,2.245-2.097,4.159-2.722C6.593,5.913,6.466,5.659,6.337,5.409C4.395,6.05,2.505,6.189,1.501,6.212C1.551,7.233,1.938,8.165,2.556,8.897z M1.593,5.048c1.733-0.13,3.096-0.387,4.16-0.7c-0.613-1.05-1.216-1.906-1.624-2.45C2.851,2.481,1.894,3.642,1.593,5.048z M5.994,1.49c-0.258,0-0.509,0.027-0.754,0.068C5.864,2.29,6.409,3.113,6.885,3.955c1.091-0.447,1.737-0.937,2.108-1.311C8.197,1.929,7.148,1.49,5.994,1.49z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG DRIBBBLE -->\n\n    <!-- SVG ITEM -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-item\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M19,5h-1.952C17.209,4,17.3,3.943,17.3,3.5c0-1.792-1.458-3.375-3.25-3.375c-2.035,0-3.296,1.306-4.049,2.653C9.248,1.431,7.985,0.031,5.95,0.031c-1.792,0-3.25,1.692-3.25,3.484C2.7,3.958,2.791,4,2.952,5H1C0.448,5,0,4.948,0,5.5V10c0,0.552,0.448,1,1,1h1v5c0,2.209,1.791,4,4,4h3h2h3c2.209,0,4-1.791,4-4v-5h1c0.553,0,1-0.448,1-1V5.5C20,4.948,19.553,5,19,5z M14.05,2.25c0.689,0,1.25,0.686,1.25,1.375S14.739,5,14.05,5h-2.693C11.788,3,12.626,2.25,14.05,2.25zM5.95,2.375C7.375,2.375,8.212,3,8.644,5H5.95C5.261,5,4.7,4.189,4.7,3.5S5.261,2.375,5.95,2.375z M9,18H6c-1.103,0-2-0.897-2-2v-5h5V18z M16,16c0,1.103-0.897,2-2,2h-3v-7h5V16z M18,9h-4h-3H9H5H2V7h3h0.95H9h2h3h0.05H18V9z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG ITEM -->\n\n    <!-- SVG WALLET -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-wallet\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M20,9h-2V8c0-1.999-1.471-3.641-3.387-3.938l-0.395-1.548C13.832,0.999,12.527,0,11.104,0c-0.276,0-0.557,0.038-0.836,0.116l-7.79,2.194C1.155,2.684,0.2,3.72,0.033,5H0v3v1v7c0,2.209,1.791,4,4,4h10c2.209,0,4-1.791,4-4v-1h2V9z M10.81,2.042C10.908,2.014,11.006,2,11.104,2c0.543,0,1.025,0.415,1.178,1.008L12.534,4H4C3.924,4,3.853,4.018,3.778,4.022L10.81,2.042z M16,16c0,1.103-0.897,2-2,2H4c-1.103,0-2-0.897-2-2V9V8c0-1.103,0.897-2,2-2h10c1.103,0,2,0.897,2,2v1h-1c-1.657,0-3,1.344-3,3s1.343,3,3,3h1V16z M18,13h-3c-0.552,0-1-0.448-1-1s0.448-1,1-1h3V13z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG WALLET -->\n\n    <!-- SVG EARNINGS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-earnings\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,20h-1v-2h1c1.103,0,2-0.897,2-2v-1h2v1C20,18.209,18.209,20,16,20z M18,11h2v2h-2V11z M18,7h2v2h-2V7z M18,4c0-1.103-0.897-2-2-2h-1V0h1c2.209,0,4,1.791,4,4v1h-2V4zM8.75,9h2.5C12.767,9,14,10.346,14,12s-1.233,3-2.75,3H11v1H9v-1H7c-0.553,0-1-0.447-1-1s0.447-1,1-1h2h2h0.25c0.406,0,0.75-0.458,0.75-1s-0.344-1-0.75-1h-2.5C7.233,11,6,9.654,6,8s1.233-3,2.75-3H9V4h2v1h1.5c0.553,0,1,0.448,1,1s-0.447,1-1,1H11H9H8.75C8.344,7,8,7.458,8,8S8.344,9,8.75,9z M11,0h2v2h-2V0z M7,0h2v2H7V0z M0,16v-1h2v1c0,1.103,0.896,2,2,2h1v2H4C1.791,20,0,18.209,0,16z M2,4v1H0V4c0-2.209,1.791-4,4-4h1v2H4C2.896,2,2,2.897,2,4z M2,7v2H0V7H2z M2,13H0v-2h2V13z M9,20H7v-2h2V20z M13,20h-2v-2h2V20z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG EARNINGS -->\n\n    <!-- SVG REVENUE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-revenue\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,0H4C1.791,0,0,1.791,0,4v12c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4V4C20,1.791,18.209,0,16,0zM18,16c0,1.103-0.897,2-2,2H4c-1.103,0-2-0.897-2-2V4c0-1.103,0.897-2,2-2h12c1.103,0,2,0.897,2,2V16z\"/>\n        <path d=\"M11.25,9h-2.5C8.344,9,8,8.542,8,8s0.344-1,0.75-1h3.75c0.553,0,1-0.448,1-1s-0.447-1-1-1H11V4H9v1H8.75C7.233,5,6,6.346,6,8s1.233,3,2.75,3h2.5c0.406,0,0.75,0.458,0.75,1s-0.344,1-0.75,1H7c-0.553,0-1,0.447-1,1s0.447,1,1,1h2v1h2v-1h0.25c1.517,0,2.75-1.346,2.75-3S12.767,9,11.25,9z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG REVENUE -->\n\n    <!-- SVG LOGIN -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-login\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M13,2.523v2.176c2.358,1.126,4,3.513,4,6.301c0,3.866-3.134,7-7,7s-7-3.134-7-7c0-2.788,1.642-5.175,4-6.301V2.523C3.507,3.76,1,7.083,1,11c0,4.971,4.029,9,9,9s9-4.029,9-9\n        C19,7.083,16.493,3.76,13,2.523z M11,0H9v10h2V0z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG LOGIN -->\n\n    <!-- SVG GALLERY -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-gallery\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M18,3h-2c0-1.104-0.896-2-2-2H6C4.896,1,4,1.896,4,3H2C0.896,3,0,3.896,0,5v10c0,1.104,0.896,2,2,2h2c0,1.104,0.896,2,2,2h8c1.104,0,2-0.896,2-2h2c1.104,0,2-0.896,2-2V5C20,3.896,19.104,3,18,3z M4,15H2V5h2V15z M14,17H6V3h8V17z M18,15h-2V5h2V15z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG GALLERY -->\n\n    <!-- SVG SPEAKER -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-speaker\" viewBox=\"0 0 26 22\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M11,0.973L7,4.981H2c-0.718,0-2,1.118-2,1.879v8.268c0,0.761,1.282,1.878,2,1.878h5l4,4.009c0.908,1.396,3,1.23,3,0V0.973C14-0.259,11.719-0.389,11,0.973z M26,10.994c0-3.647-1.736-7-4.646-8.969c-0.605-0.41-1.41-0.22-1.793,0.428c-0.385,0.647-0.205,1.504,0.4,1.915c2.154,1.458,3.439,3.935,3.439,6.626c0,2.693-1.285,5.169-3.439,6.626c-0.605,0.41-0.785,1.267-0.4,1.915c0.352,0.595,1.144,0.87,1.793,0.429C24.264,17.995,26,14.643,26,10.994z M18.32,6.581c-0.627-0.363-1.418-0.124-1.766,0.542c-0.346,0.667-0.117,1.504,0.512,1.873c0.699,0.406,1.134,1.173,1.134,1.998c0,0.825-0.435,1.591-1.134,1.999c-0.629,0.368-0.857,1.206-0.512,1.873c0.348,0.668,1.141,0.906,1.767,0.542c1.528-0.893,2.479-2.583,2.479-4.415C20.801,9.163,19.85,7.473,18.32,6.581z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG SPEAKER -->\n\n    <!-- SVG NO RESULTS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-no-results\" viewBox=\"0 0 172 156\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M101.018,138.001h-56.01c-4.972,0-9.001,4.029-9.001,9c0,4.97,4.03,8.999,9.001,8.999h56.01c4.973,0,9.002-4.029,9.002-8.999C110.02,142.03,105.99,138.001,101.018,138.001z\n        M101.018,150h-56.01c-1.654,0-3-1.345-3-2.999s1.346-3,3-3h56.01c1.654,0,3,1.346,3,3S102.672,150,101.018,150z M140.025,108.001H6.001v-66c0-5.514,4.487-10,10.002-10h90.017v-6H16.003C7.165,26.001,0,33.165,0,42.001v74c0,8.837,7.165,16,16.003,16h114.021c8.838,0,16.002-7.163,16.002-16v-50h-6V108.001z M140.025,116.001c0,5.514-4.488,10-10.002,10H16.003c-5.515,0-10.002-4.486-10.002-10v-2h134.024V116.001z M163.217,8.782c-11.711-11.709-30.701-11.709-42.412,0c-11.711,11.71-11.711,30.695,0,42.404s30.701,11.709,42.412,0S174.928,20.492,163.217,8.782z M158.975,46.946c-9.354,9.353-24.574,9.353-33.93,0c-9.354-9.353-9.354-24.57,0-33.923c9.355-9.353,24.576-9.353,33.93,0C168.33,22.375,168.33,37.593,158.975,46.946z M114.209,52.154c-1.293-1.616-2.424-3.318-3.4-5.085L98.49,59.386c-3.906,3.905-3.906,10.237,0,14.142c3.906,3.906,10.238,3.906,14.145,0l12.318-12.316c-1.766-0.975-3.471-2.106-5.086-3.4l-11.477,11.474c-1.559,1.56-4.098,1.56-5.656,0c-1.561-1.56-1.561-4.097,0-5.657L114.209,52.154z M149.785,18.012l-7.76,7.758\n        l-7.76-7.758l-4.232,4.231l7.76,7.758l-7.76,7.758l4.232,4.231l7.76-7.758l7.76,7.758l4.23-4.231l-7.759-7.758l7.759-7.758L149.785,18.012z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG NO RESULTS -->\n\n    <!-- SVG EMOJI -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-emoji\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M12,2c3.309,0,6,2.691,6,6v4c0,3.309-2.691,6-6,6H8c-3.309,0-6-2.691-6-6V8c0-3.309,2.691-6,6-6H12 M12,0H8C3.582,0,0,3.582,0,8v4c0,4.418,3.582,8,8,8h4c4.418,0,8-3.582,8-8V8C20,3.582,16.418,0,12,0L12,0z\"/>\n        <path d=\"M12.829,12c-0.413,1.164-1.525,2-2.829,2s-2.416-0.836-2.829-2H12.829 M15,10H5v1c0,2.762,2.239,5,5,5c2.762,0,5-2.238,5-5V10L15,10z\"/>\n        <path d=\"M5,8h2V6H5V8z M13,6v2h2V6H13z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG EMOJI -->\n\n    <!-- SVG FAVORITE -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-favorite\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M10,19c-0.269,0-0.526-0.108-0.714-0.3L1.67,10.942c-2.227-2.269-2.227-5.96,0-8.229C2.754,1.608,4.198,1,5.735,1C7.272,1,8.716,1.608,9.8,2.714L10,2.917l0.199-0.203l0,0c0.005-0.005,0.01-0.01,0.015-0.015C11.297,1.604,12.735,1,14.265,1c1.531,0,2.971,0.604,4.055,1.703c0.004,0.004,0.009,0.009,0.013,0.014V2.716c2.225,2.269,2.224,5.959-0.002,8.227L10.714,18.7C10.525,18.892,10.268,19,10,19z M5.735,3C4.74,3,3.804,3.396,3.098,4.115c-1.468,1.496-1.468,3.93,0,5.427L10,16.572l6.902-7.03c1.464-1.491,1.47-3.913,0.017-5.41c-0.006-0.006-0.011-0.012-0.017-0.017c-1.409-1.437-3.859-1.439-5.271-0.002c-0.007,0.007-0.013,0.013-0.02,0.02l-0.896,0.912c-0.189,0.191-0.446,0.3-0.714,0.3l0,0c-0.269,0-0.526-0.108-0.714-0.3l-0.913-0.93C7.667,3.396,6.73,3,5.735,3z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG FAVORITE -->\n\n    <!-- SVG CREDITS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-credits\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n      <path d=\"M15.614,2l2.104,5.613L10,16.876L2.281,7.613L4.386,2H15.614 M17,0H3L0,8l10,12L20,8L17,0L17,0z\"/>\n      <path d=\"M14,8l-2.728,10h-0.545H9.272H8.728L6,8H1V6h5l1-4h2L8,6h4l-1-4h2l1,4h5v2H14z M8,8l2,7.333L12,8H8z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG CREDITS -->\n\n    <!-- SVG RANKS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-ranks\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M1,0v8v2v2v4l9,4l9-4v-4v-2V8V0H1z M3,2h14v4.7l-7,3.111L3,6.7V2z M17,14.7l-7,3.111L3,14.7v-1.622l6.188,2.749L10,16.188l0.813-0.361L17,13.078V14.7z M17,10.889L10,14l-7-3.111v-2L10,12l7-3.111V10.889z\"/>\n        <rect x=\"7\" y=\"4\" width=\"6\" height=\"2\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG RANKS -->\n\n    <!-- SVG LINK -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-link\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M8.889,13.94c0.19,0.696,0.022,1.471-0.522,2.017l-1.432,1.439C6.547,17.785,6.032,18,5.485,18s-1.061-0.215-1.448-0.604l-1.433-1.439c-0.806-0.809-0.806-2.125,0-2.935l1.433-1.438c0.388-0.39,0.901-0.604,1.448-0.604c0.209,0,0.41,0.041,0.604,0.102l1.498-1.499C6.943,9.188,6.216,8.98,5.485,8.98c-1.037,0-2.074,0.397-2.865,1.192l-1.433,1.439c-1.583,1.59-1.583,4.168,0,5.757l1.433,1.439C3.411,19.603,4.448,20,5.485,20s2.074-0.397,2.866-1.192l1.433-1.439c1.336-1.34,1.531-3.377,0.614-4.938L8.889,13.94z\"/>\n        <path d=\"M18.813,2.631L17.38,1.192C16.588,0.397,15.551,0,14.514,0s-2.074,0.397-2.865,1.192l-1.433,1.439c-1.334,1.341-1.53,3.378-0.614,4.938l1.51-1.51c-0.19-0.696-0.022-1.472,0.521-2.018l1.434-1.439C13.453,2.214,13.967,2,14.514,2s1.062,0.214,1.449,0.603l1.433,1.439c0.806,0.81,0.807,2.125-0.001,2.935l-1.432,1.439c-0.388,0.39-0.902,0.604-1.449,0.604c-0.209,0-0.41-0.041-0.604-0.101l-1.498,1.498c0.645,0.395,1.371,0.603,2.102,0.603c1.037,0,2.074-0.397,2.866-1.192l1.433-1.439C20.396,6.799,20.396,4.221,18.813,2.631z\"/>\n        <path d=\"M7.171,14.242c-0.391,0.392-1.023,0.391-1.414,0l0,0c-0.391-0.391-0.391-1.023,0-1.414l7.071-7.071c0.391-0.391,1.023-0.391,1.414,0l0,0c0.391,0.391,0.391,1.024,0,1.414L7.171,14.242z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG LINK -->\n\n    <!-- SVG ADMIN CROWN -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-admin-crown\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M18.028,13.003c0.123-0.714,0.458-2.58,0.919-4.547l0.879-3.751l-3.574,1.44c-0.169,0.068-1.112,0.452-2.161,0.96c-0.579-1.403-1.45-3.149-2.598-4.436L10,0.994L8.507,2.669C7.359,3.957,6.488,5.703,5.909,7.105C4.86,6.597,3.917,6.213,3.748,6.145l-3.574-1.44l0.879,3.751c0.461,1.967,0.796,3.833,0.919,4.547C0.881,13.019,0,13.905,0,15v2c0,1.104,0.896,2,2,2h16c1.104,0,2-0.896,2-2v-2C20,13.905,19.119,13.019,18.028,13.003z M7,10c0,0,1.118-3.889,3-6c1.882,2.111,3,6,3,6c1.322-0.921,4-2,4-2c-0.606,2.588-1,5-1,5h-6H4c0,0-0.394-2.412-1-5C3,8,5.678,9.079,7,10z M18,17H2v-2h0.3H4h6h6h1.7H18V17z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG ADMIN CROWN -->\n\n    <!-- SVG MOD SHIELD -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-mod-shield\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M17.26,3.217c-0.013-0.002-2.704-0.418-6.096-2.844L10.642,0H9.358L8.836,0.373C5.431,2.809,2.766,3.214,2.74,3.217L1,3.445V5.2V11.6v0.184l0.033,0.18c1.12,6.057,8.178,7.901,8.478,7.977L9.752,20h0.496l0.241-0.061c0.3-0.075,7.358-1.92,8.478-7.977L19,11.783V11.6V5.2V3.445L17.26,3.217z M17,11.6c-0.899,4.863-7,6.4-7,6.4s-6.101-1.537-7-6.4V5.2c0,0,3.092-0.405,7-3.2c3.907,2.795,7,3.2,7,3.2V11.6z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG MOD SHIELD -->\n\n    <!-- SVG BAN -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-ban\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M17.071,2.929C15.118,0.976,12.559,0,10,0C7.44,0,4.881,0.977,2.929,2.929c-3.905,3.906-3.905,10.236,0,14.143C4.881,19.023,7.44,20,10,20c2.559,0,5.118-0.977,7.071-2.929C20.976,13.166,20.976,6.834,17.071,2.929z M4.343,4.343C5.854,2.832,7.863,2,10,2c1.799,0,3.504,0.596,4.901,1.685L3.685,14.9C1.249,11.765,1.464,7.222,4.343,4.343z M15.657,15.657C14.146,17.168,12.137,18,10,18c-1.799,0-3.504-0.597-4.901-1.685L16.315,5.099C18.75,8.235,18.535,12.778,15.657,15.657z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG BAN -->\n\n    <!-- SVG REMOVE USER -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-remove-user\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M16,2c1.103,0,2,0.897,2,2v12c0,1.103-0.897,2-2,2H4c-1.103,0-2-0.897-2-2V4c0-1.103,0.897-2,2-2H16 M16,0H4C1.791,0,0,1.791,0,4v12c0,2.209,1.791,4,4,4h12c2.209,0,4-1.791,4-4V4C20,1.791,18.209,0,16,0L16,0z\"/>\n        <path d=\"M16.364,14.949l-1.415,1.414L10,11.414l-4.95,4.949l-1.414-1.414L8.586,10l-4.95-4.95L5.05,3.636L10,8.586l4.949-4.95l1.415,1.415L11.414,10L16.364,14.949z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG REMOVE USER -->\n\n    <!-- SVG LIGHT THEME -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-light-theme\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n      <path d=\"M10,4c-3.313,0-6,2.687-6,6s2.687,6,6,6s6-2.687,6-6S13.313,4,10,4z M10,14c-2.209,0-4-1.791-4-4s1.791-4,4-4s4,1.791,4,4S12.209,14,10,14z M10,17c-0.553,0-1,0.447-1,1v1\n      c0,0.553,0.447,1,1,1s1-0.447,1-1v-1C11,17.447,10.553,17,10,17z M10,3c0.553,0,1-0.448,1-1V1c0-0.552-0.447-1-1-1S9,0.448,9,1v1C9,2.552,9.447,3,10,3z M3,10c0-0.552-0.447-1-1-1H1c-0.553,0-1,0.448-1,1s0.447,1,1,1h1C2.553,11,3,10.552,3,10z M19,9h-1c-0.553,0-1,0.448-1,1s0.447,1,1,1h1c0.553,0,1-0.448,1-1S19.553,9,19,9z M16.364,14.949c-0.391-0.391-1.024-0.391-1.415,0c-0.39,0.391-0.39,1.024,0,1.415l0.707,0.707c0.391,0.39,1.024,0.39,1.415,0c0.391-0.391,0.391-1.024,0-1.415L16.364,14.949zM3.636,5.05c0.391,0.391,1.023,0.391,1.415,0c0.39-0.391,0.39-1.024,0-1.414L4.343,2.929c-0.391-0.39-1.023-0.39-1.414,0c-0.391,0.391-0.391,1.024,0,1.415L3.636,5.05z M3.636,14.949l-0.707,0.707c-0.391,0.391-0.391,1.024,0,1.415\n      c0.391,0.39,1.023,0.39,1.414,0l0.708-0.707c0.39-0.391,0.39-1.024,0-1.415C4.659,14.559,4.026,14.559,3.636,14.949z M16.364,5.05l0.707-0.707c0.391-0.391,0.391-1.024,0-1.415c-0.391-0.39-1.024-0.39-1.415,0l-0.707,0.708c-0.39,0.39-0.39,1.023,0,1.414C15.34,5.441,15.974,5.441,16.364,5.05z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG LIGHT THEME -->\n\n    <!-- SVG DARK THEME -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-dark-theme\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M7.12,2.536C7.041,3.017,7,3.506,7,4c0,4.962,4.037,9,9,9c0.494,0,0.983-0.04,1.464-0.12C16.306,15.873,13.396,18,10,18c-4.411,0-8-3.589-8-8C2,6.604,4.127,3.695,7.12,2.536 M10,0C4.478,0,0,4.477,0,10c0,5.523,4.478,10,10,10s10-4.477,10-10c0-0.086-0.011-0.17-0.013-0.256C18.854,10.532,17.484,11,16,11c-3.866,0-7-3.134-7-7c0-1.484,0.469-2.854,1.256-3.987C10.17,0.011,10.086,0,10,0L10,0z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG DARK THEME -->\n\n    <!-- SVG MEMBERSHIPS -->\n    <svg style=\"display: none;\">\n      <symbol id=\"svg-memberships\" viewBox=\"0 0 20 20\" preserveAspectRatio=\"xMinYMin meet\">\n        <path d=\"M8,4C5.791,4,4,5.791,4,8s1.791,4,4,4s4-1.791,4-4S10.209,4,8,4z M8,10c-1.103,0-2-0.897-2-2s0.897-2,2-2s2,0.897,2,2S9.103,10,8,10z\"/>\n        <path d=\"M17.113,1.715l-2.256-0.509C14.131,0.464,13.121,0,12,0H4C1.791,0,0,1.791,0,4v12c0,2.209,1.791,4,4,4h6h2h2v-0.01c1.65-0.047,3.121-1.205,3.497-2.907L19.91,6.167C20.354,4.157,19.102,2.164,17.113,1.715z M10,18H4c-1.103,0-2-0.897-2-2V4c0-1.103,0.897-2,2-2h8c1.103,0,2,0.897,2,2v12c0,1.103-0.897,2-2,2H10z M17.957,5.735L16,14.588V4c0-0.17-0.029-0.332-0.05-0.497l0.723,0.163C17.588,3.873,18.164,4.801,17.957,5.735z\"/>\n      </symbol>\n    </svg>\n    <!-- /SVG MEMBERSHIPS -->\n    ";svgWrap.innerHTML=svgData;document.body.appendChild(svgWrap);};window.addEventListener('DOMContentLoaded',loadSVGData);})();

},{}],341:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.unpinActivity=exports.pinActivity=exports.removeActivityFavorite=exports.addActivityFavorite=exports.deleteActivityMedia=exports.deleteActivityComment=exports.createActivityComment=exports.deleteActivity=exports.updateActivity=exports.createActivity=exports.getActivities=void 0;function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}/**
 * General
 */var getActivities=function getActivities(config,callback){var data={action:'vikinger_get_activities_ajax',filters:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.getActivities=getActivities;var createActivity=function createActivity(activityData,callback){var formData=new FormData();// send creation config
for(var key in activityData.creation_config){formData.set("creation_config[".concat(key,"]"),activityData.creation_config[key]);}// send share config if any
if(activityData.share_config){for(var _key in activityData.share_config){formData.set("share_config[".concat(_key,"]"),activityData.share_config[_key]);}}// send attached media if any
if(activityData.attached_media){for(var _key2 in activityData.attached_media){formData.set("attached_media[".concat(_key2,"]"),activityData.attached_media[_key2]);}}// send uploadable media if any
if(activityData.uploadable_media){// send files
var _iterator=_createForOfIteratorHelper(activityData.uploadable_media.files),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var file=_step.value;formData.append("uploadable_media[]",file);}// send component
}catch(err){_iterator.e(err);}finally{_iterator.f();}for(var _key3 in activityData.uploadable_media.component){formData.set("uploadable_media[component][".concat(_key3,"]"),activityData.uploadable_media.component[_key3]);}}// send uploadable media type if any
if(activityData.uploadable_media_type){formData.set('uploadable_media_type',activityData.uploadable_media_type);}formData.set('action','vikinger_create_activity_ajax');formData.set('_ajax_nonce',vikinger_constants.vikinger_ajax_nonce);jQuery.ajax({url:vikinger_constants.ajax_url,method:'POST',data:formData,processData:false,contentType:false,success:callback});};exports.createActivity=createActivity;var updateActivity=function updateActivity(args){var data={action:'vikinger_activity_update_ajax',args:args,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.updateActivity=updateActivity;var deleteActivity=function deleteActivity(activityID,callback){var data={action:'vikinger_delete_activity_ajax',activity_id:activityID,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};/**
 * Activity Comment
 */exports.deleteActivity=deleteActivity;var createActivityComment=function createActivityComment(commentData,callback){var data={action:'vikinger_create_activity_comment',args:{},_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};// args parameters
if(typeof commentData.activityID!=='undefined'){data.args.activity_id=commentData.activityID;}if(typeof commentData.parentID!=='undefined'){data.args.parent_id=commentData.parentID;}if(typeof commentData.content!=='undefined'){data.args.content=commentData.content;}jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.createActivityComment=createActivityComment;var deleteActivityComment=function deleteActivityComment(config){var data={action:'vikinger_activity_comment_delete_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Activity Media
 */exports.deleteActivityComment=deleteActivityComment;var deleteActivityMedia=function deleteActivityMedia(config,callback){var data={action:'vikinger_delete_activity_media_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};/**
 * Favorite
 */exports.deleteActivityMedia=deleteActivityMedia;var addActivityFavorite=function addActivityFavorite(config,callback){var data={action:'vikinger_add_favorite_activity_ajax',userID:config.userID,activityID:config.activityID,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.addActivityFavorite=addActivityFavorite;var removeActivityFavorite=function removeActivityFavorite(config,callback){var data={action:'vikinger_remove_favorite_activity_ajax',userID:config.userID,activityID:config.activityID,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};/**
 * Pin
 */exports.removeActivityFavorite=removeActivityFavorite;var pinActivity=function pinActivity(config,callback){var data={action:'vikinger_pin_activity_ajax',userID:config.userID,activityID:config.activityID,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.pinActivity=pinActivity;var unpinActivity=function unpinActivity(config,callback){var data={action:'vikinger_unpin_activity_ajax',userID:config.userID,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.unpinActivity=unpinActivity;

},{}],342:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getAdsByPostPlacement=exports.getAdsByGroupPlacement=exports.getAdsByMemberPlacement=exports.getAdsByActivityPlacement=void 0;/**
 * General
 */var getAdsByActivityPlacement=function getAdsByActivityPlacement(){var data={action:'vikinger_advads_pro_ads_by_activity_placement_get_ajax',_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getAdsByActivityPlacement=getAdsByActivityPlacement;var getAdsByMemberPlacement=function getAdsByMemberPlacement(){var data={action:'vikinger_advads_pro_ads_by_member_placement_get_ajax',_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getAdsByMemberPlacement=getAdsByMemberPlacement;var getAdsByGroupPlacement=function getAdsByGroupPlacement(){var data={action:'vikinger_advads_pro_ads_by_group_placement_get_ajax',_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getAdsByGroupPlacement=getAdsByGroupPlacement;var getAdsByPostPlacement=function getAdsByPostPlacement(){var data={action:'vikinger_advads_pro_ads_by_post_placement_get_ajax',_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getAdsByPostPlacement=getAdsByPostPlacement;

},{}],343:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deletePostComment=exports.updateComment=exports.createComment=exports.getPostTopLevelCommentCount=exports.getComments=void 0;/**
 * General
 */var getComments=function getComments(filters,callback){var data={action:'vikinger_get_comments_ajax',args:filters,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.getComments=getComments;var getPostTopLevelCommentCount=function getPostTopLevelCommentCount(postID,callback){var data={action:'vikinger_get_post_top_level_comment_count_ajax',postID:postID,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.getPostTopLevelCommentCount=getPostTopLevelCommentCount;var createComment=function createComment(commentData,callback){var data={action:'vikinger_create_comment_ajax',comment_data:{comment_post_ID:commentData.postID,comment_parent:commentData.parentID,comment_author:commentData.author,comment_content:commentData.content},_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};// optional parameters
if(typeof commentData.userID!=='undefined'){data.comment_data.user_id=commentData.userID;}if(typeof commentData.email!=='undefined'){data.comment_data.comment_author_email=commentData.email;}jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.createComment=createComment;var updateComment=function updateComment(args){var data={action:'vikinger_comment_update_ajax',args:args,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.updateComment=updateComment;var deletePostComment=function deletePostComment(config){var data={action:'vikinger_post_comment_delete_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.deletePostComment=deletePostComment;

},{}],344:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deleteGroupForum=exports.createGroupForum=exports.getGroupAssociatedForum=void 0;/**
 * Group Forum
 */var getGroupAssociatedForum=function getGroupAssociatedForum(config){var data={action:'vikinger_bbpress_group_forum_associate_get_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getGroupAssociatedForum=getGroupAssociatedForum;var createGroupForum=function createGroupForum(config,group_id){var data={action:'vikinger_bbpress_group_forum_create_ajax',args:config,group_id:group_id,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.createGroupForum=createGroupForum;var deleteGroupForum=function deleteGroupForum(config){var data={action:'vikinger_bbpress_group_forum_delete_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.deleteGroupForum=deleteGroupForum;

},{}],345:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.rejectFriendRequest=exports.acceptFriendRequest=exports.withdrawFriendRequest=exports.removeFriend=exports.addFriend=void 0;/**
 * General
 */var addFriend=function addFriend(config){var data={action:'vikinger_friend_add_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.addFriend=addFriend;var removeFriend=function removeFriend(config){var data={action:'vikinger_friend_remove_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.removeFriend=removeFriend;var withdrawFriendRequest=function withdrawFriendRequest(config){var data={action:'vikinger_friend_withdraw_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.withdrawFriendRequest=withdrawFriendRequest;var acceptFriendRequest=function acceptFriendRequest(config){var data={action:'vikinger_friend_accept_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.acceptFriendRequest=acceptFriendRequest;var rejectFriendRequest=function rejectFriendRequest(config){var data={action:'vikinger_friend_reject_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.rejectFriendRequest=rejectFriendRequest;

},{}],346:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.unbanGroupMember=exports.banGroupMember=exports.demoteGroupMemberToMember=exports.demoteGroupMemberToMod=exports.promoteGroupMemberToMod=exports.promoteGroupMemberToAdmin=exports.removeGroupMembership=exports.acceptGroupMembership=exports.requestGroupMembership=exports.leaveGroup=exports.joinGroup=exports.removeGroupInvitation=exports.acceptGroupInvitation=exports.sendGroupInvitation=exports.removeGroupMember=exports.getGroupMembersCount=exports.getGroupMembers=void 0;/**
 * General
 */var getGroupMembers=function getGroupMembers(config){var data={action:'vikinger_groups_get_members_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getGroupMembers=getGroupMembers;var getGroupMembersCount=function getGroupMembersCount(config,callback){var data={action:'vikinger_groups_get_members_count_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.getGroupMembersCount=getGroupMembersCount;var removeGroupMember=function removeGroupMember(config){var data={action:'vikinger_group_member_remove_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.removeGroupMember=removeGroupMember;var sendGroupInvitation=function sendGroupInvitation(config){var data={action:'vikinger_group_send_invite_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.sendGroupInvitation=sendGroupInvitation;var acceptGroupInvitation=function acceptGroupInvitation(config){var data={action:'vikinger_group_accept_invite_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.acceptGroupInvitation=acceptGroupInvitation;var removeGroupInvitation=function removeGroupInvitation(config){var data={action:'vikinger_group_remove_invite_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Public Membership
 */exports.removeGroupInvitation=removeGroupInvitation;var joinGroup=function joinGroup(config){var data={action:'vikinger_group_join_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.joinGroup=joinGroup;var leaveGroup=function leaveGroup(config){var data={action:'vikinger_group_leave_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Private Membership
 */exports.leaveGroup=leaveGroup;var requestGroupMembership=function requestGroupMembership(config){var data={action:'vikinger_group_membership_requests_send_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.requestGroupMembership=requestGroupMembership;var acceptGroupMembership=function acceptGroupMembership(config){var data={action:'vikinger_group_membership_requests_accept_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.acceptGroupMembership=acceptGroupMembership;var removeGroupMembership=function removeGroupMembership(config){var data={action:'vikinger_group_membership_requests_remove_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Group Member Promotion
 */exports.removeGroupMembership=removeGroupMembership;var promoteGroupMemberToAdmin=function promoteGroupMemberToAdmin(config){var data={action:'vikinger_group_member_promote_to_admin_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.promoteGroupMemberToAdmin=promoteGroupMemberToAdmin;var promoteGroupMemberToMod=function promoteGroupMemberToMod(config){var data={action:'vikinger_group_member_promote_to_mod_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Group Member Demotion
 */exports.promoteGroupMemberToMod=promoteGroupMemberToMod;var demoteGroupMemberToMod=function demoteGroupMemberToMod(config){var data={action:'vikinger_group_member_demote_to_mod_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.demoteGroupMemberToMod=demoteGroupMemberToMod;var demoteGroupMemberToMember=function demoteGroupMemberToMember(config){var data={action:'vikinger_group_member_demote_to_member_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Group Member Ban
 */exports.demoteGroupMemberToMember=demoteGroupMemberToMember;var banGroupMember=function banGroupMember(config){var data={action:'vikinger_group_member_ban_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.banGroupMember=banGroupMember;var unbanGroupMember=function unbanGroupMember(config){var data={action:'vikinger_group_member_unban_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.unbanGroupMember=unbanGroupMember;

},{}],347:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.uploadGroupCover=exports.uploadGroupAvatar=exports.deleteGroupMetaFields=exports.updateGroupMetaFields=exports.deleteGroup=exports.updateGroup=exports.createGroup=exports.getGroupsCount=exports.getGroups=void 0;/**
 * General
 */var getGroups=function getGroups(config){var data={action:'vikinger_groups_get_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getGroups=getGroups;var getGroupsCount=function getGroupsCount(config,callback){var data={action:'vikinger_groups_get_count_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.getGroupsCount=getGroupsCount;var createGroup=function createGroup(config){var data={action:'vikinger_group_create_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.createGroup=createGroup;var updateGroup=function updateGroup(config){var data={action:'vikinger_group_update_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.updateGroup=updateGroup;var deleteGroup=function deleteGroup(config){var data={action:'vikinger_group_delete_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Metadata
 */exports.deleteGroup=deleteGroup;var updateGroupMetaFields=function updateGroupMetaFields(config){var data={action:'vikinger_group_update_meta_fields_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.updateGroupMetaFields=updateGroupMetaFields;var deleteGroupMetaFields=function deleteGroupMetaFields(config){var data={action:'vikinger_group_delete_meta_fields_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Avatar
 */exports.deleteGroupMetaFields=deleteGroupMetaFields;var uploadGroupAvatar=function uploadGroupAvatar(config){var formData=new FormData();formData.set('context','edit');formData.set('action','bp_avatar_upload');formData.set('file',config.file);return jQuery.ajax({url:"".concat(vikinger_constants.rest_root,"buddypress/v1/groups/").concat(config.group_id,"/avatar"),method:'POST',beforeSend:function beforeSend(xhr){xhr.setRequestHeader('X-WP-Nonce',vikinger_constants.wp_rest_nonce);},data:formData,contentType:false,processData:false});};/**
 * Cover
 */exports.uploadGroupAvatar=uploadGroupAvatar;var uploadGroupCover=function uploadGroupCover(config){var formData=new FormData();formData.set('context','edit');formData.set('action','bp_cover_image_upload');formData.set('file',config.file);return jQuery.ajax({url:"".concat(vikinger_constants.rest_root,"buddypress/v1/groups/").concat(config.group_id,"/cover"),method:'POST',beforeSend:function beforeSend(xhr){xhr.setRequestHeader('X-WP-Nonce',vikinger_constants.wp_rest_nonce);},data:formData,contentType:false,processData:false});};exports.uploadGroupCover=uploadGroupCover;

},{}],348:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deleteMemberCover=exports.uploadMemberCover=exports.deleteMemberAvatar=exports.uploadMemberAvatar=exports.updateMemberXProfileData=exports.updateUserMetadata=exports.updatePassword=exports.checkPassword=exports.deleteLoggedUser=exports.getMembersCount=exports.getMembers=void 0;/**
 * General
 */var getMembers=function getMembers(config){var data={action:'vikinger_members_get_ajax',filters:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getMembers=getMembers;var getMembersCount=function getMembersCount(config,callback){var data={action:'vikinger_members_get_count_ajax',filters:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.getMembersCount=getMembersCount;var deleteLoggedUser=function deleteLoggedUser(){var data={action:'vikinger_logged_user_delete_account_ajax',_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Login
 */exports.deleteLoggedUser=deleteLoggedUser;var checkPassword=function checkPassword(config){var data={action:'vikinger_check_password_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.checkPassword=checkPassword;var updatePassword=function updatePassword(config){var data={action:'vikinger_update_password_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Metadata
 */exports.updatePassword=updatePassword;var updateUserMetadata=function updateUserMetadata(config){var data={action:'vikinger_user_meta_update_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * XProfile
 */exports.updateUserMetadata=updateUserMetadata;var updateMemberXProfileData=function updateMemberXProfileData(config){var data={action:'vikinger_member_update_xprofile_data_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Avatar
 */exports.updateMemberXProfileData=updateMemberXProfileData;var uploadMemberAvatar=function uploadMemberAvatar(config){var formData=new FormData();formData.set('context','edit');formData.set('action','bp_avatar_upload');formData.set('file',config.file);var uploadMemberAvatarPromise=jQuery.ajax({url:"".concat(vikinger_constants.rest_root,"buddypress/v1/members/").concat(config.user_id,"/avatar"),method:'POST',beforeSend:function beforeSend(xhr){xhr.setRequestHeader('X-WP-Nonce',vikinger_constants.wp_rest_nonce);},data:formData,contentType:false,processData:false});uploadMemberAvatarPromise.done(function(response){var data={action:'vikinger_member_avatar_upload_triggers_call_ajax',user_id:config.user_id,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data);});return uploadMemberAvatarPromise;};exports.uploadMemberAvatar=uploadMemberAvatar;var deleteMemberAvatar=function deleteMemberAvatar(config){var data={action:'vikinger_member_avatar_delete_ajax',user_id:config.user_id,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Cover
 */exports.deleteMemberAvatar=deleteMemberAvatar;var uploadMemberCover=function uploadMemberCover(config){var formData=new FormData();formData.set('context','edit');formData.set('action','bp_cover_image_upload');formData.set('file',config.file);var uploadMemberCoverPromise=jQuery.ajax({url:"".concat(vikinger_constants.rest_root,"buddypress/v1/members/").concat(config.user_id,"/cover"),method:'POST',beforeSend:function beforeSend(xhr){xhr.setRequestHeader('X-WP-Nonce',vikinger_constants.wp_rest_nonce);},data:formData,contentType:false,processData:false});uploadMemberCoverPromise.done(function(response){var data={action:'vikinger_member_cover_upload_triggers_call_ajax',user_id:config.user_id,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data);});return uploadMemberCoverPromise;};exports.uploadMemberCover=uploadMemberCover;var deleteMemberCover=function deleteMemberCover(config){var data={action:'vikinger_member_cover_delete_ajax',user_id:config.user_id,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.deleteMemberCover=deleteMemberCover;

},{}],349:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.markMessageThreadAsRead=exports.unstarMessage=exports.starMessage=exports.deleteMessageThread=exports.sendMessage=exports.getMessage=exports.getMessages=void 0;/**
 * General
 */var getMessages=function getMessages(config){var data={action:'vikinger_get_messages_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getMessages=getMessages;var getMessage=function getMessage(config){var data={action:'vikinger_get_message_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getMessage=getMessage;var sendMessage=function sendMessage(config){var data={action:'vikinger_send_message_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.sendMessage=sendMessage;var deleteMessageThread=function deleteMessageThread(config){var data={action:'vikinger_delete_message_thread_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.deleteMessageThread=deleteMessageThread;var starMessage=function starMessage(config){var data={action:'vikinger_star_message_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.starMessage=starMessage;var unstarMessage=function unstarMessage(config){var data={action:'vikinger_unstar_message_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.unstarMessage=unstarMessage;var markMessageThreadAsRead=function markMessageThreadAsRead(config){var data={action:'vikinger_message_mark_thread_as_read_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.markMessageThreadAsRead=markMessageThreadAsRead;

},{}],350:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deleteNotifications=exports.markNotificationsAsRead=exports.markNotificationAsRead=exports.getUnreadNotificationsCount=exports.getNotifications=void 0;/**
 * General
 */var getNotifications=function getNotifications(){var config=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var data={action:'vikinger_get_notifications_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getNotifications=getNotifications;var getUnreadNotificationsCount=function getUnreadNotificationsCount(){var config=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var data={action:'vikinger_get_unread_notifications_count_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getUnreadNotificationsCount=getUnreadNotificationsCount;var markNotificationAsRead=function markNotificationAsRead(config){var data={action:'vikinger_mark_notification_as_read_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.markNotificationAsRead=markNotificationAsRead;var markNotificationsAsRead=function markNotificationsAsRead(config){var data={action:'vikinger_mark_notifications_as_read_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.markNotificationsAsRead=markNotificationsAsRead;var deleteNotifications=function deleteNotifications(config){var data={action:'vikinger_delete_notifications_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.deleteNotifications=deleteNotifications;

},{}],351:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getCategories=exports.getPages=exports.getPostCount=exports.getPosts=void 0;/**
 * General
 */var getPosts=function getPosts(postData){var data={action:'vikinger_get_posts_ajax',post_data:postData,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getPosts=getPosts;var getPostCount=function getPostCount(postData,callback){var data={action:'vikinger_get_post_count_ajax',post_data:postData,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.getPostCount=getPostCount;var getPages=function getPages(args){var data={action:'vikinger_get_pages_ajax',args:args,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Taxonomies
 */exports.getPages=getPages;var getCategories=function getCategories(callback){var data={action:'vikinger_get_categories_ajax',_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.getCategories=getCategories;

},{}],352:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.deleteActivityUserReaction=exports.createActivityUserReaction=exports.deletePostCommentUserReaction=exports.createPostCommentUserReaction=exports.deletePostUserReaction=exports.createPostUserReaction=exports.getReactions=void 0;/**
 * General
 */var getReactions=function getReactions(){var data={action:'vkreact_get_reactions_ajax',_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Post Reaction
 */exports.getReactions=getReactions;var createPostUserReaction=function createPostUserReaction(config,callback){var data={action:'vkreact_create_post_user_reaction_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.createPostUserReaction=createPostUserReaction;var deletePostUserReaction=function deletePostUserReaction(config,callback){var data={action:'vkreact_delete_post_user_reaction_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};/**
 * Post Comment Reaction
 */exports.deletePostUserReaction=deletePostUserReaction;var createPostCommentUserReaction=function createPostCommentUserReaction(config,callback){var data={action:'vkreact_create_postcomment_user_reaction_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.createPostCommentUserReaction=createPostCommentUserReaction;var deletePostCommentUserReaction=function deletePostCommentUserReaction(config,callback){var data={action:'vkreact_delete_postcomment_user_reaction_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};/**
 * Activity Reaction
 */exports.deletePostCommentUserReaction=deletePostCommentUserReaction;var createActivityUserReaction=function createActivityUserReaction(config,callback){var data={action:'vkreact_bp_create_activity_user_reaction_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.createActivityUserReaction=createActivityUserReaction;var deleteActivityUserReaction=function deleteActivityUserReaction(config,callback){var data={action:'vkreact_bp_delete_activity_user_reaction_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};jQuery.post(vikinger_constants.ajax_url,data,callback);};exports.deleteActivityUserReaction=deleteActivityUserReaction;

},{}],353:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.updateLoggedUserStreamUsername=exports.getLoggedUserStreamUsername=exports.toggleLoggedUserColorTheme=exports.updateLoggedUserSidemenuStatus=exports.updateLoggedUserGridType=exports.getLoggedInMember=void 0;/**
 * General
 */var getLoggedInMember=function getLoggedInMember(config){var data={action:'vikinger_get_logged_user_member_data_ajax',data_scope:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};/**
 * Metadata
 */exports.getLoggedInMember=getLoggedInMember;var updateLoggedUserGridType=function updateLoggedUserGridType(config){var data={action:'vikinger_logged_user_grid_type_update_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.updateLoggedUserGridType=updateLoggedUserGridType;var updateLoggedUserSidemenuStatus=function updateLoggedUserSidemenuStatus(config){var data={action:'vikinger_logged_user_sidemenu_status_update_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.updateLoggedUserSidemenuStatus=updateLoggedUserSidemenuStatus;var toggleLoggedUserColorTheme=function toggleLoggedUserColorTheme(){var data={action:'vikinger_logged_user_color_theme_toggle_ajax',_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.toggleLoggedUserColorTheme=toggleLoggedUserColorTheme;var getLoggedUserStreamUsername=function getLoggedUserStreamUsername(){var data={action:'vikinger_logged_user_stream_username_get_ajax',_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.getLoggedUserStreamUsername=getLoggedUserStreamUsername;var updateLoggedUserStreamUsername=function updateLoggedUserStreamUsername(config){var data={action:'vikinger_logged_user_stream_username_update_ajax',args:config,_ajax_nonce:vikinger_constants.vikinger_ajax_nonce};return jQuery.post(vikinger_constants.ajax_url,data);};exports.updateLoggedUserStreamUsername=updateLoggedUserStreamUsername;

},{}],354:[function(require,module,exports){
"use strict";function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}var _core=require("../utils/core");var userRouter=_interopRequireWildcard(require("../router/user/user-router"));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var cache=new WeakMap();_getRequireWildcardCache=function _getRequireWildcardCache(){return cache;};return cache;}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}if(obj===null||_typeof(obj)!=="object"&&typeof obj!=="function"){return{default:obj};}var cache=_getRequireWildcardCache();if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj.default=obj;if(cache){cache.set(obj,newObj);}return newObj;}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}// if side menu is showing, center content grid based on its size
if(vikinger_constants.settings.sidemenu_status==='display'){var gridElements=[];var sidebar={navigation:{active:vikinger_constants.settings.sidemenu_active,minWidth:80,maxWidth:300}};var breakpointWidth=1365;var updateGridPosition=function updateGridPosition(contentGrid){if(window.innerWidth>breakpointWidth){var navigationWidth=sidebar.navigation.active?sidebar.navigation.maxWidth:sidebar.navigation.minWidth,availableWidth=document.body.clientWidth-contentGrid.offsetWidth-navigationWidth,offsetX=availableWidth/2+navigationWidth;contentGrid.style.transform="translate(".concat(offsetX,"px, 0)");contentGrid.style.margin=0;}else{contentGrid.style.transform="translate(0, 0)";contentGrid.style.margin='0 auto';}};var updateGridPositions=function updateGridPositions(){var _iterator=_createForOfIteratorHelper(gridElements),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var grid=_step.value;updateGridPosition(grid);}}catch(err){_iterator.e(err);}finally{_iterator.f();}};var setGridTransition=function setGridTransition(grid){grid.style.transition="transform .4s ease-in-out";};var setGridTransitions=function setGridTransitions(){var _iterator2=_createForOfIteratorHelper(gridElements),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var grid=_step2.value;setGridTransition(grid);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}};/*-------------------
      CONTENT GRID 
  -------------------*/(0,_core.querySelector)('.content-grid',function(el){gridElements=el;updateGridPositions();window.addEventListener('resize',updateGridPositions);// delay transition setup to avoid loading animation
window.setTimeout(setGridTransitions,300);});/*------------------------
      NAVIGATION WIDGET 
  ------------------------*/(0,_core.querySelector)('.navigation-widget-trigger',function(el){var navigationTrigger=el[0],topOffset=80,navigationWidget=document.querySelector('#navigation-widget'),navigationWidgetSmall=document.querySelector('#navigation-widget-small'),activeClass='active',hiddenClass='navigation-widget-hidden',delayedClass='navigation-widget-delayed';var setNavigationWidgetDimensions=function setNavigationWidgetDimensions(){navigationWidget.style.height="".concat(window.innerHeight-topOffset,"px");};var toggleNavigationWidget=function toggleNavigationWidget(){navigationTrigger.classList.toggle(activeClass);navigationWidget.classList.toggle(delayedClass);navigationWidget.classList.toggle(hiddenClass);navigationWidgetSmall.classList.toggle(delayedClass);navigationWidgetSmall.classList.toggle(hiddenClass);sidebar.navigation.active=!navigationWidget.classList.contains(hiddenClass);var sidemenuStatus=sidebar.navigation.active?'open':'closed',updateLoggedUserSidemenuStatusPromise=userRouter.updateLoggedUserSidemenuStatus({sidemenu_status:sidemenuStatus});updateGridPositions();};navigationTrigger.addEventListener('click',toggleNavigationWidget);setNavigationWidgetDimensions();window.addEventListener('resize',setNavigationWidgetDimensions);});}/*-------------------------------
    NAVIGATION WIDGET MOBILE
-------------------------------*/(0,_core.querySelector)('.navigation-widget-mobile-trigger',function(el){var navigationMobileTrigger=el[0],navigationWidgetMobile=document.querySelector('#navigation-widget-mobile'),navigationWidgetMobileCloseButton=navigationWidgetMobile.querySelector('.navigation-widget-close-button'),hiddenClass='navigation-widget-hidden';var cssVariables=window.getComputedStyle(document.documentElement);var overlay=document.createElement('div');overlay.style.width='100%';overlay.style.height='100%';overlay.style.position='fixed';overlay.style.top='0';overlay.style.left='0';overlay.style.zIndex=99998;overlay.style.backgroundColor=cssVariables.getPropertyValue('--color-overlay');overlay.style.opacity=0;overlay.style.visibility='hidden';overlay.style.transition='opacity .3s ease-in-out, visibility .3s ease-in-out';document.body.appendChild(overlay);var showOverlay=function showOverlay(){overlay.style.opacity=1;overlay.style.visibility='visible';};var hideOverlay=function hideOverlay(){overlay.style.opacity=0;overlay.style.visibility='hidden';};var setNavigationWidgetMobileDimensions=function setNavigationWidgetMobileDimensions(){navigationWidgetMobile.style.height="".concat(window.innerHeight,"px");};var toggleNavigationWidgetMobile=function toggleNavigationWidgetMobile(){navigationWidgetMobile.classList.toggle(hiddenClass);var toggleOverlay=navigationWidgetMobile.classList.contains(hiddenClass)?hideOverlay:showOverlay;toggleOverlay();};navigationMobileTrigger.addEventListener('click',toggleNavigationWidgetMobile);navigationWidgetMobileCloseButton.addEventListener('click',toggleNavigationWidgetMobile);overlay.addEventListener('click',toggleNavigationWidgetMobile);setNavigationWidgetMobileDimensions();window.addEventListener('resize',setNavigationWidgetMobileDimensions);});

},{"../router/user/user-router":353,"../utils/core":355}],355:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.filterString=exports.limitLineBreaks=exports.dateMinutesDiff=exports.stripHTML=exports.hexaToRGB=exports.ucfirst=exports.replaceEnterWithBr=exports.insertWordInText=exports.updateShadowInput=exports.getPositionInInput=exports.getWordInPosition=exports.wrapLinks=exports.extractAttachedMedia=exports.getMediaLink=exports.joinText=exports.truncateText=exports.querySelector=exports.deepMerge=exports.deepExtend=void 0;function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&Symbol.iterator in Object(iter))return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}var deepExtend=function deepExtend(a,b){for(var prop in b){if(_typeof(b[prop])==='object'){a[prop]=b[prop]instanceof Array?[]:{};deepExtend(a[prop],b[prop]);}else{a[prop]=b[prop];}}};exports.deepExtend=deepExtend;var deepMerge=function deepMerge(){var c={};for(var _len=arguments.length,objects=new Array(_len),_key=0;_key<_len;_key++){objects[_key]=arguments[_key];}objects.forEach(function(obj){deepExtend(c,obj);});return c;};exports.deepMerge=deepMerge;var query=function query(options){var config={method:'GET',async:true,header:{type:'Content-type',value:'application/json'},data:''};deepExtend(config,options);return new Promise(function(resolve,reject){var xhttp=new XMLHttpRequest();xhttp.onreadystatechange=function(){if(xhttp.readyState!==4)return;if(xhttp.status===200){resolve(xhttp.responseText);}else{reject({status:xhttp.status,statusText:xhttp.statusText});}};xhttp.open(config.method,config.url,config.async);xhttp.setRequestHeader(config.header.type,config.header.value);if(config.method==='GET'){xhttp.send();}else if(config.method==='POST'){xhttp.send(config.data);}});};var querySelector=function querySelector(selector,callback){var el=document.querySelectorAll(selector);if(el.length){callback(el);}};exports.querySelector=querySelector;var dateDiff=function dateDiff(date1){var date2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:new Date();var timeDiff=Math.abs(date1.getTime()-date2.getTime()),secondsDiff=Math.ceil(timeDiff/1000),minutesDiff=Math.floor(timeDiff/(1000*60)),hoursDiff=Math.floor(timeDiff/(1000*60*60)),daysDiff=Math.floor(timeDiff/(1000*60*60*24)),weeksDiff=Math.floor(timeDiff/(1000*60*60*24*7)),monthsDiff=Math.floor(timeDiff/(1000*60*60*24*7*4)),yearsDiff=Math.floor(timeDiff/(1000*60*60*24*7*4*12));var unit;if(secondsDiff<60){unit=secondsDiff===1?'second':'seconds';return{unit:unit,value:secondsDiff};}else if(minutesDiff<60){unit=minutesDiff===1?'minute':'minutes';return{unit:unit,value:minutesDiff};}else if(hoursDiff<24){unit=hoursDiff===1?'hour':'hours';return{unit:unit,value:hoursDiff};}else if(daysDiff<7){unit=daysDiff===1?'day':'days';return{unit:unit,value:daysDiff};}else if(weeksDiff<4){unit=weeksDiff===1?'week':'weeks';return{unit:unit,value:weeksDiff};}else if(monthsDiff<12){unit=monthsDiff===1?'month':'months';return{unit:unit,value:monthsDiff};}else{unit=yearsDiff===1?'year':'years';return{unit:unit,value:yearsDiff};}};var dateMinutesDiff=function dateMinutesDiff(date1){var date2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:new Date();var timeDiff=Math.abs(date1.getTime()-date2.getTime()),minutesDiff=Math.floor(timeDiff/(1000*60));return minutesDiff;};exports.dateMinutesDiff=dateMinutesDiff;var truncateText=function truncateText(text,limit){var moreText=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'...';if(text.length<=limit){return text;}var truncatedText=text.substring(0,limit);return truncatedText.trim()+moreText;};exports.truncateText=truncateText;var joinText=function joinText(text){var separator=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'-';var joinedText=text.replace(/\s+/igm,separator);return joinedText;};exports.joinText=joinText;var getMediaLink=function getMediaLink(type,id){if(type==='youtube'){return"https://www.youtube.com/embed/".concat(id);}if(type==='twitch'){return"//player.twitch.tv/?autoplay=false&video=v".concat(id,"&parent=").concat(vikinger_constants.settings.stream_twitch_embeds_parent);}if(type==='twitch_channel'){return"//player.twitch.tv/?channel=".concat(id,"&parent=").concat(vikinger_constants.settings.stream_twitch_embeds_parent);}};exports.getMediaLink=getMediaLink;var extractAttachedMedia=function extractAttachedMedia(string){var attached_media=false,minMatchIndex=Number.MAX_SAFE_INTEGER;// test for youtube link match
var youtubeLinkRegex=/youtube\.com\/watch\?v=(.*?)(&|\s|$)/igm,youtubeLinkShortRegex=/youtu\.be\/(.*?)(&|\s|$)/igm,youtubeLinkMatches=youtubeLinkRegex.exec(string)||youtubeLinkShortRegex.exec(string);if(youtubeLinkMatches&&youtubeLinkMatches.index<minMatchIndex){var type='youtube',id=youtubeLinkMatches[1];attached_media={type:type,id:id,link:getMediaLink(type,id)};minMatchIndex=youtubeLinkMatches.index;}// test for twitch link match
var twitchVideoLinkRegex=/twitch\.tv\/videos\/(.*?)(\?|&|\s|$)/igm,twitchChannelLinkRegex=/twitch\.tv\/(.*?)(&|\s|$)/igm,twitchVideoLinkMatches=twitchVideoLinkRegex.exec(string),twitchChannelLinkMatches=twitchChannelLinkRegex.exec(string);if(twitchVideoLinkMatches&&twitchVideoLinkMatches.index<minMatchIndex){var _type='twitch',_id=twitchVideoLinkMatches[1];attached_media={type:_type,id:_id,link:getMediaLink(_type,_id)};minMatchIndex=twitchVideoLinkMatches.index;}if(twitchChannelLinkMatches&&twitchChannelLinkMatches.index<minMatchIndex){var _type2='twitch_channel',_id2=twitchChannelLinkMatches[1];attached_media={type:_type2,id:_id2,link:getMediaLink(_type2,_id2)};minMatchIndex=twitchChannelLinkMatches.index;}return attached_media;};exports.extractAttachedMedia=extractAttachedMedia;var wrapLinks=function wrapLinks(string){var linkRegex=/((^|[^"'])https?:\/\/[^\s]*)/igm;return string.replace(linkRegex,'<a href="$1" target="_blank">$1</a>');};exports.wrapLinks=wrapLinks;var getWordInPosition=function getWordInPosition(text,position){var wordStartIndex=0,wordEndIndex=text.length;var isSeparator=function isSeparator(character){return character===' '||character==='\n';};// search word ending after cursor position
for(var i=position-1;i<text.length;i++){// if word ends
if(isSeparator(text[i])){wordEndIndex=i;break;}}// search word ending before cursor position
for(var _i=position-1;_i>=0;_i--){// if word ends
if(isSeparator(text[_i])){wordStartIndex=_i+1;break;}}// console.log('GET WORD INDEX - START: ', wordStartIndex);
// console.log('GET WORD INDEX - END: ', wordEndIndex);
return{word:text.substring(wordStartIndex,wordEndIndex),startIndex:wordStartIndex,endIndex:wordEndIndex};};exports.getWordInPosition=getWordInPosition;var getPositionInInput=function getPositionInInput(input,shadowInput,index){if(shadowInput.children&&index>0){var inputDimensions=input.getBoundingClientRect(),shadowInputDimensions=shadowInput.children[index-1].getBoundingClientRect();// console.log('INPUT CLIENT RECT: ', inputDimensions);
// console.log('SHADOW INPUT CLIENT RECT: ', shadowInput.getBoundingClientRect());
// console.log('SHADOW INPUT CURRENT SPAN: ', shadowInput.children[index - 1]);
// console.log('SHADOW INPUT CURRENT SPAN CLIENT RECT: ', shadowInputDimensions);
return{width:shadowInputDimensions.width,height:shadowInputDimensions.height,top:shadowInputDimensions.top,left:shadowInputDimensions.left,relTop:shadowInputDimensions.top-inputDimensions.top,relLeft:shadowInputDimensions.left-inputDimensions.left};}return{width:0,height:0,top:0,left:0,relTop:0,relLeft:0};};exports.getPositionInInput=getPositionInInput;var updateShadowInput=function updateShadowInput(shadowInput,text){shadowInput.innerHTML='';var textCharacters=text.split('');// console.log('TEXT CHARACTERS: ', textCharacters);
var _iterator=_createForOfIteratorHelper(textCharacters),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var character=_step.value;var span=document.createElement('span');if(character===' '){span.innerHTML='&nbsp;';}else if(character==='\n'){span.innerHTML='<br>';}else{span.innerHTML=character;}shadowInput.appendChild(span);}// console.log('UPDATE SHADOW INPUT: ', shadowInput);
}catch(err){_iterator.e(err);}finally{_iterator.f();}};exports.updateShadowInput=updateShadowInput;var insertWordInText=function insertWordInText(text,word,index){var offset=arguments.length>3&&arguments[3]!==undefined?arguments[3]:0;var textBeforeWord=text.substring(0,index),textAfterWord=text.substring(index+offset);// console.log('TEXT BEFORE WORD: ', textBeforeWord);
// console.log('TEXT AFTER WORD: ', textAfterWord);
return textBeforeWord+word+textAfterWord;};exports.insertWordInText=insertWordInText;var replaceEnterWithBr=function replaceEnterWithBr(text){var enterRegex=/\r\n/gim,newText=text.replace(enterRegex,'<br>');return newText;};exports.replaceEnterWithBr=replaceEnterWithBr;var ucfirst=function ucfirst(string){return string[0].toUpperCase()+string.substring(1);};exports.ucfirst=ucfirst;var hexaToRGB=function hexaToRGB(hexa){var opacity=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var hex=hexa.substring(1);return"rgba(".concat(Number.parseInt(hex.substring(0,2),16),", ").concat(Number.parseInt(hex.substring(2,4),16),", ").concat(Number.parseInt(hex.substring(4,6),16),", ").concat(opacity,")");};exports.hexaToRGB=hexaToRGB;var stripHTML=function stripHTML(string){var DP=new DOMParser();var parsedString=DP.parseFromString(string,'text/html');return parsedString.body.textContent;};exports.stripHTML=stripHTML;var limitLineBreaks=function limitLineBreaks(string){var maxLineBreakCount=arguments.length>1&&arguments[1]!==undefined?arguments[1]:2;var limitLineBreakRegex=new RegExp("(s*\ns*){".concat(maxLineBreakCount+1,",}"),'igm');return string.replace(limitLineBreakRegex,'\n'.repeat(maxLineBreakCount));};exports.limitLineBreaks=limitLineBreaks;var filterString=function filterString(string,filters){return filters.reduce(function(filteredString,filter){if(typeof filter==='function'){return filter(filteredString);}else if(_typeof(filter)==='object'){if(typeof filter.filterFN==='function'){if(filter.filterArgs instanceof Array&&filter.filterArgs.length>0){return filter.filterFN.apply(filter,[filteredString].concat(_toConsumableArray(filter.filterArgs)));}return filter.filterFN(filteredString);}}return filteredString;},string);};exports.filterString=filterString;

},{}],356:[function(require,module,exports){
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.createFormInput=exports.createAccordion=exports.createPopup=exports.createSlider=exports.createTooltip=exports.createDropdown=exports.createProgressBar=exports.createHexagon=exports.createTab=void 0;function _createForOfIteratorHelper(o,allowArrayLike){var it;if(typeof Symbol==="undefined"||o[Symbol.iterator]==null){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]};},e:function e(_e){throw _e;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var normalCompletion=true,didErr=false,err;return{s:function s(){it=o[Symbol.iterator]();},n:function n(){var step=it.next();normalCompletion=step.done;return step;},e:function e(_e2){didErr=true;err=_e2;},f:function f(){try{if(!normalCompletion&&it.return!=null)it.return();}finally{if(didErr)throw err;}}};}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i];}return arr2;}var existsInDOM=function existsInDOM(selector){return document.querySelectorAll(selector).length;};var createTab=function createTab(options){if(existsInDOM(options.triggers)&&existsInDOM(options.elements)){return new XM_Tab(options);}};exports.createTab=createTab;var createHexagon=function createHexagon(options){if(existsInDOM(options.container)||typeof options.containerElement!=='undefined'){return new XM_Hexagon(options);}};exports.createHexagon=createHexagon;var createProgressBar=function createProgressBar(options){if(existsInDOM(options.container)){return new XM_ProgressBar(options);}};exports.createProgressBar=createProgressBar;var createDropdown=function createDropdown(options){if((existsInDOM(options.container)||typeof options.containerElement!=='undefined')&&options.controlToggle||(existsInDOM(options.trigger)||typeof options.triggerElement!=='undefined')&&(existsInDOM(options.container)||typeof options.containerElement!=='undefined')){return new XM_Dropdown(options);}};exports.createDropdown=createDropdown;var createTooltip=function createTooltip(options){if(existsInDOM(options.container)||typeof options.containerElement!=='undefined'){return new XM_Tooltip(options);}};exports.createTooltip=createTooltip;var createSlider=function createSlider(container,options){if(container instanceof HTMLElement||existsInDOM(container)){return new Swiper(container,options);}};exports.createSlider=createSlider;var createPopup=function createPopup(options){if(existsInDOM(options.trigger)||typeof options.triggerElement!=='undefined'||typeof options.premadeContentElement!=='undefined'){return new XM_Popup(options);}};exports.createPopup=createPopup;var createAccordion=function createAccordion(options){if(existsInDOM(options.triggerSelector)&&existsInDOM(options.contentSelector)){return new XM_Accordion(options);}};exports.createAccordion=createAccordion;var createFormInput=function createFormInput(elements){var _iterator=_createForOfIteratorHelper(elements),_step;try{var _loop=function _loop(){var el=_step.value;if(el.classList.contains('always-active'))return"continue";var input=el.querySelector('input'),textarea=el.querySelector('textarea'),activeClass='active';var inputItem=undefined;if(input)inputItem=input;if(textarea)inputItem=textarea;if(inputItem){// if input item has value or is already focused, activate it
if(inputItem.value!==''||inputItem.getAttribute('data-pwd')!==null&&inputItem.getAttribute('data-pwd')!==''||inputItem===document.activeElement){el.classList.add(activeClass);}inputItem.addEventListener('focus',function(){el.classList.add(activeClass);});inputItem.addEventListener('blur',function(){if(inputItem.value===''){el.classList.remove(activeClass);}});}};for(_iterator.s();!(_step=_iterator.n()).done;){var _ret=_loop();if(_ret==="continue")continue;}}catch(err){_iterator.e(err);}finally{_iterator.f();}};exports.createFormInput=createFormInput;

},{}],357:[function(require,module,exports){
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

'use strict';
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;

function toObject(val) {
	if (val === null || val === undefined) {
		throw new TypeError('Object.assign cannot be called with null or undefined');
	}

	return Object(val);
}

function shouldUseNative() {
	try {
		if (!Object.assign) {
			return false;
		}

		// Detect buggy property enumeration order in older V8 versions.

		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
		test1[5] = 'de';
		if (Object.getOwnPropertyNames(test1)[0] === '5') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test2 = {};
		for (var i = 0; i < 10; i++) {
			test2['_' + String.fromCharCode(i)] = i;
		}
		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
			return test2[n];
		});
		if (order2.join('') !== '0123456789') {
			return false;
		}

		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
		var test3 = {};
		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
			test3[letter] = letter;
		});
		if (Object.keys(Object.assign({}, test3)).join('') !==
				'abcdefghijklmnopqrst') {
			return false;
		}

		return true;
	} catch (err) {
		// We don't expect any of the above to throw, but better to be safe.
		return false;
	}
}

module.exports = shouldUseNative() ? Object.assign : function (target, source) {
	var from;
	var to = toObject(target);
	var symbols;

	for (var s = 1; s < arguments.length; s++) {
		from = Object(arguments[s]);

		for (var key in from) {
			if (hasOwnProperty.call(from, key)) {
				to[key] = from[key];
			}
		}

		if (getOwnPropertySymbols) {
			symbols = getOwnPropertySymbols(from);
			for (var i = 0; i < symbols.length; i++) {
				if (propIsEnumerable.call(from, symbols[i])) {
					to[symbols[i]] = from[symbols[i]];
				}
			}
		}
	}

	return to;
};

},{}],358:[function(require,module,exports){
// shim for using process in browser
var process = module.exports = {};

// cached from whatever global is present so that test runners that stub it
// don't break things.  But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals.  It's inside a
// function because try/catches deoptimize in certain engines.

var cachedSetTimeout;
var cachedClearTimeout;

function defaultSetTimout() {
    throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
    throw new Error('clearTimeout has not been defined');
}
(function () {
    try {
        if (typeof setTimeout === 'function') {
            cachedSetTimeout = setTimeout;
        } else {
            cachedSetTimeout = defaultSetTimout;
        }
    } catch (e) {
        cachedSetTimeout = defaultSetTimout;
    }
    try {
        if (typeof clearTimeout === 'function') {
            cachedClearTimeout = clearTimeout;
        } else {
            cachedClearTimeout = defaultClearTimeout;
        }
    } catch (e) {
        cachedClearTimeout = defaultClearTimeout;
    }
} ())
function runTimeout(fun) {
    if (cachedSetTimeout === setTimeout) {
        //normal enviroments in sane situations
        return setTimeout(fun, 0);
    }
    // if setTimeout wasn't available but was latter defined
    if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
        cachedSetTimeout = setTimeout;
        return setTimeout(fun, 0);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedSetTimeout(fun, 0);
    } catch(e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
            return cachedSetTimeout.call(null, fun, 0);
        } catch(e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
            return cachedSetTimeout.call(this, fun, 0);
        }
    }


}
function runClearTimeout(marker) {
    if (cachedClearTimeout === clearTimeout) {
        //normal enviroments in sane situations
        return clearTimeout(marker);
    }
    // if clearTimeout wasn't available but was latter defined
    if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
        cachedClearTimeout = clearTimeout;
        return clearTimeout(marker);
    }
    try {
        // when when somebody has screwed with setTimeout but no I.E. maddness
        return cachedClearTimeout(marker);
    } catch (e){
        try {
            // When we are in I.E. but the script has been evaled so I.E. doesn't  trust the global object when called normally
            return cachedClearTimeout.call(null, marker);
        } catch (e){
            // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
            // Some versions of I.E. have different rules for clearTimeout vs setTimeout
            return cachedClearTimeout.call(this, marker);
        }
    }



}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;

function cleanUpNextTick() {
    if (!draining || !currentQueue) {
        return;
    }
    draining = false;
    if (currentQueue.length) {
        queue = currentQueue.concat(queue);
    } else {
        queueIndex = -1;
    }
    if (queue.length) {
        drainQueue();
    }
}

function drainQueue() {
    if (draining) {
        return;
    }
    var timeout = runTimeout(cleanUpNextTick);
    draining = true;

    var len = queue.length;
    while(len) {
        currentQueue = queue;
        queue = [];
        while (++queueIndex < len) {
            if (currentQueue) {
                currentQueue[queueIndex].run();
            }
        }
        queueIndex = -1;
        len = queue.length;
    }
    currentQueue = null;
    draining = false;
    runClearTimeout(timeout);
}

process.nextTick = function (fun) {
    var args = new Array(arguments.length - 1);
    if (arguments.length > 1) {
        for (var i = 1; i < arguments.length; i++) {
            args[i - 1] = arguments[i];
        }
    }
    queue.push(new Item(fun, args));
    if (queue.length === 1 && !draining) {
        runTimeout(drainQueue);
    }
};

// v8 likes predictible objects
function Item(fun, array) {
    this.fun = fun;
    this.array = array;
}
Item.prototype.run = function () {
    this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};

function noop() {}

process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;

process.listeners = function (name) { return [] }

process.binding = function (name) {
    throw new Error('process.binding is not supported');
};

process.cwd = function () { return '/' };
process.chdir = function (dir) {
    throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };

},{}],359:[function(require,module,exports){
// Circle shaped progress bar

var Shape = require('./shape');
var utils = require('./utils');

var Circle = function Circle(container, options) {
    // Use two arcs to form a circle
    // See this answer http://stackoverflow.com/a/10477334/1446092
    this._pathTemplate =
        'M 50,50 m 0,-{radius}' +
        ' a {radius},{radius} 0 1 1 0,{2radius}' +
        ' a {radius},{radius} 0 1 1 0,-{2radius}';

    this.containerAspectRatio = 1;

    Shape.apply(this, arguments);
};

Circle.prototype = new Shape();
Circle.prototype.constructor = Circle;

Circle.prototype._pathString = function _pathString(opts) {
    var widthOfWider = opts.strokeWidth;
    if (opts.trailWidth && opts.trailWidth > opts.strokeWidth) {
        widthOfWider = opts.trailWidth;
    }

    var r = 50 - widthOfWider / 2;

    return utils.render(this._pathTemplate, {
        radius: r,
        '2radius': r * 2
    });
};

Circle.prototype._trailString = function _trailString(opts) {
    return this._pathString(opts);
};

module.exports = Circle;

},{"./shape":364,"./utils":366}],360:[function(require,module,exports){
// Line shaped progress bar

var Shape = require('./shape');
var utils = require('./utils');

var Line = function Line(container, options) {
    this._pathTemplate = 'M 0,{center} L 100,{center}';
    Shape.apply(this, arguments);
};

Line.prototype = new Shape();
Line.prototype.constructor = Line;

Line.prototype._initializeSvg = function _initializeSvg(svg, opts) {
    svg.setAttribute('viewBox', '0 0 100 ' + opts.strokeWidth);
    svg.setAttribute('preserveAspectRatio', 'none');
};

Line.prototype._pathString = function _pathString(opts) {
    return utils.render(this._pathTemplate, {
        center: opts.strokeWidth / 2
    });
};

Line.prototype._trailString = function _trailString(opts) {
    return this._pathString(opts);
};

module.exports = Line;

},{"./shape":364,"./utils":366}],361:[function(require,module,exports){
module.exports = {
    // Higher level API, different shaped progress bars
    Line: require('./line'),
    Circle: require('./circle'),
    SemiCircle: require('./semicircle'),
    Square: require('./square'),

    // Lower level API to use any SVG path
    Path: require('./path'),

    // Base-class for creating new custom shapes
    // to be in line with the API of built-in shapes
    // Undocumented.
    Shape: require('./shape'),

    // Internal utils, undocumented.
    utils: require('./utils')
};

},{"./circle":359,"./line":360,"./path":362,"./semicircle":363,"./shape":364,"./square":365,"./utils":366}],362:[function(require,module,exports){
// Lower level API to animate any kind of svg path

var shifty = require('shifty');
var utils = require('./utils');

var Tweenable = shifty.Tweenable;

var EASING_ALIASES = {
    easeIn: 'easeInCubic',
    easeOut: 'easeOutCubic',
    easeInOut: 'easeInOutCubic'
};

var Path = function Path(path, opts) {
    // Throw a better error if not initialized with `new` keyword
    if (!(this instanceof Path)) {
        throw new Error('Constructor was called without new keyword');
    }

    // Default parameters for animation
    opts = utils.extend({
        delay: 0,
        duration: 800,
        easing: 'linear',
        from: {},
        to: {},
        step: function() {}
    }, opts);

    var element;
    if (utils.isString(path)) {
        element = document.querySelector(path);
    } else {
        element = path;
    }

    // Reveal .path as public attribute
    this.path = element;
    this._opts = opts;
    this._tweenable = null;

    // Set up the starting positions
    var length = this.path.getTotalLength();
    this.path.style.strokeDasharray = length + ' ' + length;
    this.set(0);
};

Path.prototype.value = function value() {
    var offset = this._getComputedDashOffset();
    var length = this.path.getTotalLength();

    var progress = 1 - offset / length;
    // Round number to prevent returning very small number like 1e-30, which
    // is practically 0
    return parseFloat(progress.toFixed(6), 10);
};

Path.prototype.set = function set(progress) {
    this.stop();

    this.path.style.strokeDashoffset = this._progressToOffset(progress);

    var step = this._opts.step;
    if (utils.isFunction(step)) {
        var easing = this._easing(this._opts.easing);
        var values = this._calculateTo(progress, easing);
        var reference = this._opts.shape || this;
        step(values, reference, this._opts.attachment);
    }
};

Path.prototype.stop = function stop() {
    this._stopTween();
    this.path.style.strokeDashoffset = this._getComputedDashOffset();
};

// Method introduced here:
// http://jakearchibald.com/2013/animated-line-drawing-svg/
Path.prototype.animate = function animate(progress, opts, cb) {
    opts = opts || {};

    if (utils.isFunction(opts)) {
        cb = opts;
        opts = {};
    }

    var passedOpts = utils.extend({}, opts);

    // Copy default opts to new object so defaults are not modified
    var defaultOpts = utils.extend({}, this._opts);
    opts = utils.extend(defaultOpts, opts);

    var shiftyEasing = this._easing(opts.easing);
    var values = this._resolveFromAndTo(progress, shiftyEasing, passedOpts);

    this.stop();

    // Trigger a layout so styles are calculated & the browser
    // picks up the starting position before animating
    this.path.getBoundingClientRect();

    var offset = this._getComputedDashOffset();
    var newOffset = this._progressToOffset(progress);

    var self = this;
    this._tweenable = new Tweenable();
    this._tweenable.tween({
        from: utils.extend({ offset: offset }, values.from),
        to: utils.extend({ offset: newOffset }, values.to),
        duration: opts.duration,
        delay: opts.delay,
        easing: shiftyEasing,
        step: function(state) {
            self.path.style.strokeDashoffset = state.offset;
            var reference = opts.shape || self;
            opts.step(state, reference, opts.attachment);
        }
    }).then(function(state) {
        if (utils.isFunction(cb)) {
            cb();
        }
    });
};

Path.prototype._getComputedDashOffset = function _getComputedDashOffset() {
    var computedStyle = window.getComputedStyle(this.path, null);
    return parseFloat(computedStyle.getPropertyValue('stroke-dashoffset'), 10);
};

Path.prototype._progressToOffset = function _progressToOffset(progress) {
    var length = this.path.getTotalLength();
    return length - progress * length;
};

// Resolves from and to values for animation.
Path.prototype._resolveFromAndTo = function _resolveFromAndTo(progress, easing, opts) {
    if (opts.from && opts.to) {
        return {
            from: opts.from,
            to: opts.to
        };
    }

    return {
        from: this._calculateFrom(easing),
        to: this._calculateTo(progress, easing)
    };
};

// Calculate `from` values from options passed at initialization
Path.prototype._calculateFrom = function _calculateFrom(easing) {
    return shifty.interpolate(this._opts.from, this._opts.to, this.value(), easing);
};

// Calculate `to` values from options passed at initialization
Path.prototype._calculateTo = function _calculateTo(progress, easing) {
    return shifty.interpolate(this._opts.from, this._opts.to, progress, easing);
};

Path.prototype._stopTween = function _stopTween() {
    if (this._tweenable !== null) {
        this._tweenable.stop();
        this._tweenable = null;
    }
};

Path.prototype._easing = function _easing(easing) {
    if (EASING_ALIASES.hasOwnProperty(easing)) {
        return EASING_ALIASES[easing];
    }

    return easing;
};

module.exports = Path;

},{"./utils":366,"shifty":387}],363:[function(require,module,exports){
// Semi-SemiCircle shaped progress bar

var Shape = require('./shape');
var Circle = require('./circle');
var utils = require('./utils');

var SemiCircle = function SemiCircle(container, options) {
    // Use one arc to form a SemiCircle
    // See this answer http://stackoverflow.com/a/10477334/1446092
    this._pathTemplate =
        'M 50,50 m -{radius},0' +
        ' a {radius},{radius} 0 1 1 {2radius},0';

    this.containerAspectRatio = 2;

    Shape.apply(this, arguments);
};

SemiCircle.prototype = new Shape();
SemiCircle.prototype.constructor = SemiCircle;

SemiCircle.prototype._initializeSvg = function _initializeSvg(svg, opts) {
    svg.setAttribute('viewBox', '0 0 100 50');
};

SemiCircle.prototype._initializeTextContainer = function _initializeTextContainer(
    opts,
    container,
    textContainer
) {
    if (opts.text.style) {
        // Reset top style
        textContainer.style.top = 'auto';
        textContainer.style.bottom = '0';

        if (opts.text.alignToBottom) {
            utils.setStyle(textContainer, 'transform', 'translate(-50%, 0)');
        } else {
            utils.setStyle(textContainer, 'transform', 'translate(-50%, 50%)');
        }
    }
};

// Share functionality with Circle, just have different path
SemiCircle.prototype._pathString = Circle.prototype._pathString;
SemiCircle.prototype._trailString = Circle.prototype._trailString;

module.exports = SemiCircle;

},{"./circle":359,"./shape":364,"./utils":366}],364:[function(require,module,exports){
// Base object for different progress bar shapes

var Path = require('./path');
var utils = require('./utils');

var DESTROYED_ERROR = 'Object is destroyed';

var Shape = function Shape(container, opts) {
    // Throw a better error if progress bars are not initialized with `new`
    // keyword
    if (!(this instanceof Shape)) {
        throw new Error('Constructor was called without new keyword');
    }

    // Prevent calling constructor without parameters so inheritance
    // works correctly. To understand, this is how Shape is inherited:
    //
    //   Line.prototype = new Shape();
    //
    // We just want to set the prototype for Line.
    if (arguments.length === 0) {
        return;
    }

    // Default parameters for progress bar creation
    this._opts = utils.extend({
        color: '#555',
        strokeWidth: 1.0,
        trailColor: null,
        trailWidth: null,
        fill: null,
        text: {
            style: {
                color: null,
                position: 'absolute',
                left: '50%',
                top: '50%',
                padding: 0,
                margin: 0,
                transform: {
                    prefix: true,
                    value: 'translate(-50%, -50%)'
                }
            },
            autoStyleContainer: true,
            alignToBottom: true,
            value: null,
            className: 'progressbar-text'
        },
        svgStyle: {
            display: 'block',
            width: '100%'
        },
        warnings: false
    }, opts, true);  // Use recursive extend

    // If user specifies e.g. svgStyle or text style, the whole object
    // should replace the defaults to make working with styles easier
    if (utils.isObject(opts) && opts.svgStyle !== undefined) {
        this._opts.svgStyle = opts.svgStyle;
    }
    if (utils.isObject(opts) && utils.isObject(opts.text) && opts.text.style !== undefined) {
        this._opts.text.style = opts.text.style;
    }

    var svgView = this._createSvgView(this._opts);

    var element;
    if (utils.isString(container)) {
        element = document.querySelector(container);
    } else {
        element = container;
    }

    if (!element) {
        throw new Error('Container does not exist: ' + container);
    }

    this._container = element;
    this._container.appendChild(svgView.svg);
    if (this._opts.warnings) {
        this._warnContainerAspectRatio(this._container);
    }

    if (this._opts.svgStyle) {
        utils.setStyles(svgView.svg, this._opts.svgStyle);
    }

    // Expose public attributes before Path initialization
    this.svg = svgView.svg;
    this.path = svgView.path;
    this.trail = svgView.trail;
    this.text = null;

    var newOpts = utils.extend({
        attachment: undefined,
        shape: this
    }, this._opts);
    this._progressPath = new Path(svgView.path, newOpts);

    if (utils.isObject(this._opts.text) && this._opts.text.value !== null) {
        this.setText(this._opts.text.value);
    }
};

Shape.prototype.animate = function animate(progress, opts, cb) {
    if (this._progressPath === null) {
        throw new Error(DESTROYED_ERROR);
    }

    this._progressPath.animate(progress, opts, cb);
};

Shape.prototype.stop = function stop() {
    if (this._progressPath === null) {
        throw new Error(DESTROYED_ERROR);
    }

    // Don't crash if stop is called inside step function
    if (this._progressPath === undefined) {
        return;
    }

    this._progressPath.stop();
};

Shape.prototype.pause = function pause() {
    if (this._progressPath === null) {
        throw new Error(DESTROYED_ERROR);
    }

    if (this._progressPath === undefined) {
        return;
    }

    if (!this._progressPath._tweenable) {
        // It seems that we can't pause this
        return;
    }

    this._progressPath._tweenable.pause();
};

Shape.prototype.resume = function resume() {
    if (this._progressPath === null) {
        throw new Error(DESTROYED_ERROR);
    }

    if (this._progressPath === undefined) {
        return;
    }

    if (!this._progressPath._tweenable) {
        // It seems that we can't resume this
        return;
    }

    this._progressPath._tweenable.resume();
};

Shape.prototype.destroy = function destroy() {
    if (this._progressPath === null) {
        throw new Error(DESTROYED_ERROR);
    }

    this.stop();
    this.svg.parentNode.removeChild(this.svg);
    this.svg = null;
    this.path = null;
    this.trail = null;
    this._progressPath = null;

    if (this.text !== null) {
        this.text.parentNode.removeChild(this.text);
        this.text = null;
    }
};

Shape.prototype.set = function set(progress) {
    if (this._progressPath === null) {
        throw new Error(DESTROYED_ERROR);
    }

    this._progressPath.set(progress);
};

Shape.prototype.value = function value() {
    if (this._progressPath === null) {
        throw new Error(DESTROYED_ERROR);
    }

    if (this._progressPath === undefined) {
        return 0;
    }

    return this._progressPath.value();
};

Shape.prototype.setText = function setText(newText) {
    if (this._progressPath === null) {
        throw new Error(DESTROYED_ERROR);
    }

    if (this.text === null) {
        // Create new text node
        this.text = this._createTextContainer(this._opts, this._container);
        this._container.appendChild(this.text);
    }

    // Remove previous text and add new
    if (utils.isObject(newText)) {
        utils.removeChildren(this.text);
        this.text.appendChild(newText);
    } else {
        this.text.innerHTML = newText;
    }
};

Shape.prototype._createSvgView = function _createSvgView(opts) {
    var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
    this._initializeSvg(svg, opts);

    var trailPath = null;
    // Each option listed in the if condition are 'triggers' for creating
    // the trail path
    if (opts.trailColor || opts.trailWidth) {
        trailPath = this._createTrail(opts);
        svg.appendChild(trailPath);
    }

    var path = this._createPath(opts);
    svg.appendChild(path);

    return {
        svg: svg,
        path: path,
        trail: trailPath
    };
};

Shape.prototype._initializeSvg = function _initializeSvg(svg, opts) {
    svg.setAttribute('viewBox', '0 0 100 100');
};

Shape.prototype._createPath = function _createPath(opts) {
    var pathString = this._pathString(opts);
    return this._createPathElement(pathString, opts);
};

Shape.prototype._createTrail = function _createTrail(opts) {
    // Create path string with original passed options
    var pathString = this._trailString(opts);

    // Prevent modifying original
    var newOpts = utils.extend({}, opts);

    // Defaults for parameters which modify trail path
    if (!newOpts.trailColor) {
        newOpts.trailColor = '#eee';
    }
    if (!newOpts.trailWidth) {
        newOpts.trailWidth = newOpts.strokeWidth;
    }

    newOpts.color = newOpts.trailColor;
    newOpts.strokeWidth = newOpts.trailWidth;

    // When trail path is set, fill must be set for it instead of the
    // actual path to prevent trail stroke from clipping
    newOpts.fill = null;

    return this._createPathElement(pathString, newOpts);
};

Shape.prototype._createPathElement = function _createPathElement(pathString, opts) {
    var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
    path.setAttribute('d', pathString);
    path.setAttribute('stroke', opts.color);
    path.setAttribute('stroke-width', opts.strokeWidth);

    if (opts.fill) {
        path.setAttribute('fill', opts.fill);
    } else {
        path.setAttribute('fill-opacity', '0');
    }

    return path;
};

Shape.prototype._createTextContainer = function _createTextContainer(opts, container) {
    var textContainer = document.createElement('div');
    textContainer.className = opts.text.className;

    var textStyle = opts.text.style;
    if (textStyle) {
        if (opts.text.autoStyleContainer) {
            container.style.position = 'relative';
        }

        utils.setStyles(textContainer, textStyle);
        // Default text color to progress bar's color
        if (!textStyle.color) {
            textContainer.style.color = opts.color;
        }
    }

    this._initializeTextContainer(opts, container, textContainer);
    return textContainer;
};

// Give custom shapes possibility to modify text element
Shape.prototype._initializeTextContainer = function(opts, container, element) {
    // By default, no-op
    // Custom shapes should respect API options, such as text.style
};

Shape.prototype._pathString = function _pathString(opts) {
    throw new Error('Override this function for each progress bar');
};

Shape.prototype._trailString = function _trailString(opts) {
    throw new Error('Override this function for each progress bar');
};

Shape.prototype._warnContainerAspectRatio = function _warnContainerAspectRatio(container) {
    if (!this.containerAspectRatio) {
        return;
    }

    var computedStyle = window.getComputedStyle(container, null);
    var width = parseFloat(computedStyle.getPropertyValue('width'), 10);
    var height = parseFloat(computedStyle.getPropertyValue('height'), 10);
    if (!utils.floatEquals(this.containerAspectRatio, width / height)) {
        console.warn(
            'Incorrect aspect ratio of container',
            '#' + container.id,
            'detected:',
            computedStyle.getPropertyValue('width') + '(width)',
            '/',
            computedStyle.getPropertyValue('height') + '(height)',
            '=',
            width / height
        );

        console.warn(
            'Aspect ratio of should be',
            this.containerAspectRatio
        );
    }
};

module.exports = Shape;

},{"./path":362,"./utils":366}],365:[function(require,module,exports){
// Square shaped progress bar
// Note: Square is not core part of API anymore. It's left here
//       for reference. square is not included to the progressbar
//       build anymore

var Shape = require('./shape');
var utils = require('./utils');

var Square = function Square(container, options) {
    this._pathTemplate =
        'M 0,{halfOfStrokeWidth}' +
        ' L {width},{halfOfStrokeWidth}' +
        ' L {width},{width}' +
        ' L {halfOfStrokeWidth},{width}' +
        ' L {halfOfStrokeWidth},{strokeWidth}';

    this._trailTemplate =
        'M {startMargin},{halfOfStrokeWidth}' +
        ' L {width},{halfOfStrokeWidth}' +
        ' L {width},{width}' +
        ' L {halfOfStrokeWidth},{width}' +
        ' L {halfOfStrokeWidth},{halfOfStrokeWidth}';

    Shape.apply(this, arguments);
};

Square.prototype = new Shape();
Square.prototype.constructor = Square;

Square.prototype._pathString = function _pathString(opts) {
    var w = 100 - opts.strokeWidth / 2;

    return utils.render(this._pathTemplate, {
        width: w,
        strokeWidth: opts.strokeWidth,
        halfOfStrokeWidth: opts.strokeWidth / 2
    });
};

Square.prototype._trailString = function _trailString(opts) {
    var w = 100 - opts.strokeWidth / 2;

    return utils.render(this._trailTemplate, {
        width: w,
        strokeWidth: opts.strokeWidth,
        halfOfStrokeWidth: opts.strokeWidth / 2,
        startMargin: opts.strokeWidth / 2 - opts.trailWidth / 2
    });
};

module.exports = Square;

},{"./shape":364,"./utils":366}],366:[function(require,module,exports){
// Utility functions

var PREFIXES = 'Webkit Moz O ms'.split(' ');
var FLOAT_COMPARISON_EPSILON = 0.001;

// Copy all attributes from source object to destination object.
// destination object is mutated.
function extend(destination, source, recursive) {
    destination = destination || {};
    source = source || {};
    recursive = recursive || false;

    for (var attrName in source) {
        if (source.hasOwnProperty(attrName)) {
            var destVal = destination[attrName];
            var sourceVal = source[attrName];
            if (recursive && isObject(destVal) && isObject(sourceVal)) {
                destination[attrName] = extend(destVal, sourceVal, recursive);
            } else {
                destination[attrName] = sourceVal;
            }
        }
    }

    return destination;
}

// Renders templates with given variables. Variables must be surrounded with
// braces without any spaces, e.g. {variable}
// All instances of variable placeholders will be replaced with given content
// Example:
// render('Hello, {message}!', {message: 'world'})
function render(template, vars) {
    var rendered = template;

    for (var key in vars) {
        if (vars.hasOwnProperty(key)) {
            var val = vars[key];
            var regExpString = '\\{' + key + '\\}';
            var regExp = new RegExp(regExpString, 'g');

            rendered = rendered.replace(regExp, val);
        }
    }

    return rendered;
}

function setStyle(element, style, value) {
    var elStyle = element.style;  // cache for performance

    for (var i = 0; i < PREFIXES.length; ++i) {
        var prefix = PREFIXES[i];
        elStyle[prefix + capitalize(style)] = value;
    }

    elStyle[style] = value;
}

function setStyles(element, styles) {
    forEachObject(styles, function(styleValue, styleName) {
        // Allow disabling some individual styles by setting them
        // to null or undefined
        if (styleValue === null || styleValue === undefined) {
            return;
        }

        // If style's value is {prefix: true, value: '50%'},
        // Set also browser prefixed styles
        if (isObject(styleValue) && styleValue.prefix === true) {
            setStyle(element, styleName, styleValue.value);
        } else {
            element.style[styleName] = styleValue;
        }
    });
}

function capitalize(text) {
    return text.charAt(0).toUpperCase() + text.slice(1);
}

function isString(obj) {
    return typeof obj === 'string' || obj instanceof String;
}

function isFunction(obj) {
    return typeof obj === 'function';
}

function isArray(obj) {
    return Object.prototype.toString.call(obj) === '[object Array]';
}

// Returns true if `obj` is object as in {a: 1, b: 2}, not if it's function or
// array
function isObject(obj) {
    if (isArray(obj)) {
        return false;
    }

    var type = typeof obj;
    return type === 'object' && !!obj;
}

function forEachObject(object, callback) {
    for (var key in object) {
        if (object.hasOwnProperty(key)) {
            var val = object[key];
            callback(val, key);
        }
    }
}

function floatEquals(a, b) {
    return Math.abs(a - b) < FLOAT_COMPARISON_EPSILON;
}

// https://coderwall.com/p/nygghw/don-t-use-innerhtml-to-empty-dom-elements
function removeChildren(el) {
    while (el.firstChild) {
        el.removeChild(el.firstChild);
    }
}

module.exports = {
    extend: extend,
    render: render,
    setStyle: setStyle,
    setStyles: setStyles,
    capitalize: capitalize,
    isString: isString,
    isFunction: isFunction,
    isObject: isObject,
    forEachObject: forEachObject,
    floatEquals: floatEquals,
    removeChildren: removeChildren
};

},{}],367:[function(require,module,exports){
(function (process){(function (){
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';

var printWarning = function() {};

if (process.env.NODE_ENV !== 'production') {
  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
  var loggedTypeFailures = {};
  var has = Function.call.bind(Object.prototype.hasOwnProperty);

  printWarning = function(text) {
    var message = 'Warning: ' + text;
    if (typeof console !== 'undefined') {
      console.error(message);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      throw new Error(message);
    } catch (x) {}
  };
}

/**
 * Assert that the values match with the type specs.
 * Error messages are memorized and will only be shown once.
 *
 * @param {object} typeSpecs Map of name to a ReactPropType
 * @param {object} values Runtime values that need to be type-checked
 * @param {string} location e.g. "prop", "context", "child context"
 * @param {string} componentName Name of the component for error messages.
 * @param {?Function} getStack Returns the component stack.
 * @private
 */
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  if (process.env.NODE_ENV !== 'production') {
    for (var typeSpecName in typeSpecs) {
      if (has(typeSpecs, typeSpecName)) {
        var error;
        // Prop type validation may throw. In case they do, we don't want to
        // fail the render phase where it didn't fail before. So we log it.
        // After these have been cleaned up, we'll let them throw.
        try {
          // This is intentionally an invariant that gets caught. It's the same
          // behavior as without this statement except with a better message.
          if (typeof typeSpecs[typeSpecName] !== 'function') {
            var err = Error(
              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
            );
            err.name = 'Invariant Violation';
            throw err;
          }
          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
        } catch (ex) {
          error = ex;
        }
        if (error && !(error instanceof Error)) {
          printWarning(
            (componentName || 'React class') + ': type specification of ' +
            location + ' `' + typeSpecName + '` is invalid; the type checker ' +
            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
            'You may have forgotten to pass an argument to the type checker ' +
            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
            'shape all require an argument).'
          );
        }
        if (error instanceof Error && !(error.message in loggedTypeFailures)) {
          // Only monitor this failure once because there tends to be a lot of the
          // same error.
          loggedTypeFailures[error.message] = true;

          var stack = getStack ? getStack() : '';

          printWarning(
            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
          );
        }
      }
    }
  }
}

/**
 * Resets warning cache when testing.
 *
 * @private
 */
checkPropTypes.resetWarningCache = function() {
  if (process.env.NODE_ENV !== 'production') {
    loggedTypeFailures = {};
  }
}

module.exports = checkPropTypes;

}).call(this)}).call(this,require('_process'))
},{"./lib/ReactPropTypesSecret":371,"_process":358}],368:[function(require,module,exports){
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';

var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');

function emptyFunction() {}
function emptyFunctionWithReset() {}
emptyFunctionWithReset.resetWarningCache = emptyFunction;

module.exports = function() {
  function shim(props, propName, componentName, location, propFullName, secret) {
    if (secret === ReactPropTypesSecret) {
      // It is still safe when called from React.
      return;
    }
    var err = new Error(
      'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
      'Use PropTypes.checkPropTypes() to call them. ' +
      'Read more at http://fb.me/use-check-prop-types'
    );
    err.name = 'Invariant Violation';
    throw err;
  };
  shim.isRequired = shim;
  function getShim() {
    return shim;
  };
  // Important!
  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
  var ReactPropTypes = {
    array: shim,
    bool: shim,
    func: shim,
    number: shim,
    object: shim,
    string: shim,
    symbol: shim,

    any: shim,
    arrayOf: getShim,
    element: shim,
    elementType: shim,
    instanceOf: getShim,
    node: shim,
    objectOf: getShim,
    oneOf: getShim,
    oneOfType: getShim,
    shape: getShim,
    exact: getShim,

    checkPropTypes: emptyFunctionWithReset,
    resetWarningCache: emptyFunction
  };

  ReactPropTypes.PropTypes = ReactPropTypes;

  return ReactPropTypes;
};

},{"./lib/ReactPropTypesSecret":371}],369:[function(require,module,exports){
(function (process){(function (){
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';

var ReactIs = require('react-is');
var assign = require('object-assign');

var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
var checkPropTypes = require('./checkPropTypes');

var has = Function.call.bind(Object.prototype.hasOwnProperty);
var printWarning = function() {};

if (process.env.NODE_ENV !== 'production') {
  printWarning = function(text) {
    var message = 'Warning: ' + text;
    if (typeof console !== 'undefined') {
      console.error(message);
    }
    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      throw new Error(message);
    } catch (x) {}
  };
}

function emptyFunctionThatReturnsNull() {
  return null;
}

module.exports = function(isValidElement, throwOnDirectAccess) {
  /* global Symbol */
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.

  /**
   * Returns the iterator method function contained on the iterable object.
   *
   * Be sure to invoke the function with the iterable as context:
   *
   *     var iteratorFn = getIteratorFn(myIterable);
   *     if (iteratorFn) {
   *       var iterator = iteratorFn.call(myIterable);
   *       ...
   *     }
   *
   * @param {?object} maybeIterable
   * @return {?function}
   */
  function getIteratorFn(maybeIterable) {
    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
    if (typeof iteratorFn === 'function') {
      return iteratorFn;
    }
  }

  /**
   * Collection of methods that allow declaration and validation of props that are
   * supplied to React components. Example usage:
   *
   *   var Props = require('ReactPropTypes');
   *   var MyArticle = React.createClass({
   *     propTypes: {
   *       // An optional string prop named "description".
   *       description: Props.string,
   *
   *       // A required enum prop named "category".
   *       category: Props.oneOf(['News','Photos']).isRequired,
   *
   *       // A prop named "dialog" that requires an instance of Dialog.
   *       dialog: Props.instanceOf(Dialog).isRequired
   *     },
   *     render: function() { ... }
   *   });
   *
   * A more formal specification of how these methods are used:
   *
   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
   *   decl := ReactPropTypes.{type}(.isRequired)?
   *
   * Each and every declaration produces a function with the same signature. This
   * allows the creation of custom validation functions. For example:
   *
   *  var MyLink = React.createClass({
   *    propTypes: {
   *      // An optional string or URI prop named "href".
   *      href: function(props, propName, componentName) {
   *        var propValue = props[propName];
   *        if (propValue != null && typeof propValue !== 'string' &&
   *            !(propValue instanceof URI)) {
   *          return new Error(
   *            'Expected a string or an URI for ' + propName + ' in ' +
   *            componentName
   *          );
   *        }
   *      }
   *    },
   *    render: function() {...}
   *  });
   *
   * @internal
   */

  var ANONYMOUS = '<<anonymous>>';

  // Important!
  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
  var ReactPropTypes = {
    array: createPrimitiveTypeChecker('array'),
    bool: createPrimitiveTypeChecker('boolean'),
    func: createPrimitiveTypeChecker('function'),
    number: createPrimitiveTypeChecker('number'),
    object: createPrimitiveTypeChecker('object'),
    string: createPrimitiveTypeChecker('string'),
    symbol: createPrimitiveTypeChecker('symbol'),

    any: createAnyTypeChecker(),
    arrayOf: createArrayOfTypeChecker,
    element: createElementTypeChecker(),
    elementType: createElementTypeTypeChecker(),
    instanceOf: createInstanceTypeChecker,
    node: createNodeChecker(),
    objectOf: createObjectOfTypeChecker,
    oneOf: createEnumTypeChecker,
    oneOfType: createUnionTypeChecker,
    shape: createShapeTypeChecker,
    exact: createStrictShapeTypeChecker,
  };

  /**
   * inlined Object.is polyfill to avoid requiring consumers ship their own
   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
   */
  /*eslint-disable no-self-compare*/
  function is(x, y) {
    // SameValue algorithm
    if (x === y) {
      // Steps 1-5, 7-10
      // Steps 6.b-6.e: +0 != -0
      return x !== 0 || 1 / x === 1 / y;
    } else {
      // Step 6.a: NaN == NaN
      return x !== x && y !== y;
    }
  }
  /*eslint-enable no-self-compare*/

  /**
   * We use an Error-like object for backward compatibility as people may call
   * PropTypes directly and inspect their output. However, we don't use real
   * Errors anymore. We don't inspect their stack anyway, and creating them
   * is prohibitively expensive if they are created too often, such as what
   * happens in oneOfType() for any type before the one that matched.
   */
  function PropTypeError(message) {
    this.message = message;
    this.stack = '';
  }
  // Make `instanceof Error` still work for returned errors.
  PropTypeError.prototype = Error.prototype;

  function createChainableTypeChecker(validate) {
    if (process.env.NODE_ENV !== 'production') {
      var manualPropTypeCallCache = {};
      var manualPropTypeWarningCount = 0;
    }
    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
      componentName = componentName || ANONYMOUS;
      propFullName = propFullName || propName;

      if (secret !== ReactPropTypesSecret) {
        if (throwOnDirectAccess) {
          // New behavior only for users of `prop-types` package
          var err = new Error(
            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
            'Use `PropTypes.checkPropTypes()` to call them. ' +
            'Read more at http://fb.me/use-check-prop-types'
          );
          err.name = 'Invariant Violation';
          throw err;
        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
          // Old behavior for people using React.PropTypes
          var cacheKey = componentName + ':' + propName;
          if (
            !manualPropTypeCallCache[cacheKey] &&
            // Avoid spamming the console because they are often not actionable except for lib authors
            manualPropTypeWarningCount < 3
          ) {
            printWarning(
              'You are manually calling a React.PropTypes validation ' +
              'function for the `' + propFullName + '` prop on `' + componentName  + '`. This is deprecated ' +
              'and will throw in the standalone `prop-types` package. ' +
              'You may be seeing this warning due to a third-party PropTypes ' +
              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
            );
            manualPropTypeCallCache[cacheKey] = true;
            manualPropTypeWarningCount++;
          }
        }
      }
      if (props[propName] == null) {
        if (isRequired) {
          if (props[propName] === null) {
            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
          }
          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
        }
        return null;
      } else {
        return validate(props, propName, componentName, location, propFullName);
      }
    }

    var chainedCheckType = checkType.bind(null, false);
    chainedCheckType.isRequired = checkType.bind(null, true);

    return chainedCheckType;
  }

  function createPrimitiveTypeChecker(expectedType) {
    function validate(props, propName, componentName, location, propFullName, secret) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== expectedType) {
        // `propValue` being instance of, say, date/regexp, pass the 'object'
        // check, but we can offer a more precise error message here rather than
        // 'of type `object`'.
        var preciseType = getPreciseType(propValue);

        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createAnyTypeChecker() {
    return createChainableTypeChecker(emptyFunctionThatReturnsNull);
  }

  function createArrayOfTypeChecker(typeChecker) {
    function validate(props, propName, componentName, location, propFullName) {
      if (typeof typeChecker !== 'function') {
        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
      }
      var propValue = props[propName];
      if (!Array.isArray(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
      }
      for (var i = 0; i < propValue.length; i++) {
        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
        if (error instanceof Error) {
          return error;
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createElementTypeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      if (!isValidElement(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createElementTypeTypeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      if (!ReactIs.isValidElementType(propValue)) {
        var propType = getPropType(propValue);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createInstanceTypeChecker(expectedClass) {
    function validate(props, propName, componentName, location, propFullName) {
      if (!(props[propName] instanceof expectedClass)) {
        var expectedClassName = expectedClass.name || ANONYMOUS;
        var actualClassName = getClassName(props[propName]);
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createEnumTypeChecker(expectedValues) {
    if (!Array.isArray(expectedValues)) {
      if (process.env.NODE_ENV !== 'production') {
        if (arguments.length > 1) {
          printWarning(
            'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
            'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
          );
        } else {
          printWarning('Invalid argument supplied to oneOf, expected an array.');
        }
      }
      return emptyFunctionThatReturnsNull;
    }

    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      for (var i = 0; i < expectedValues.length; i++) {
        if (is(propValue, expectedValues[i])) {
          return null;
        }
      }

      var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
        var type = getPreciseType(value);
        if (type === 'symbol') {
          return String(value);
        }
        return value;
      });
      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
    }
    return createChainableTypeChecker(validate);
  }

  function createObjectOfTypeChecker(typeChecker) {
    function validate(props, propName, componentName, location, propFullName) {
      if (typeof typeChecker !== 'function') {
        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
      }
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
      }
      for (var key in propValue) {
        if (has(propValue, key)) {
          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
          if (error instanceof Error) {
            return error;
          }
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createUnionTypeChecker(arrayOfTypeCheckers) {
    if (!Array.isArray(arrayOfTypeCheckers)) {
      process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
      return emptyFunctionThatReturnsNull;
    }

    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
      var checker = arrayOfTypeCheckers[i];
      if (typeof checker !== 'function') {
        printWarning(
          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
          'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
        );
        return emptyFunctionThatReturnsNull;
      }
    }

    function validate(props, propName, componentName, location, propFullName) {
      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
        var checker = arrayOfTypeCheckers[i];
        if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
          return null;
        }
      }

      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
    }
    return createChainableTypeChecker(validate);
  }

  function createNodeChecker() {
    function validate(props, propName, componentName, location, propFullName) {
      if (!isNode(props[propName])) {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createShapeTypeChecker(shapeTypes) {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
      }
      for (var key in shapeTypes) {
        var checker = shapeTypes[key];
        if (!checker) {
          continue;
        }
        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
        if (error) {
          return error;
        }
      }
      return null;
    }
    return createChainableTypeChecker(validate);
  }

  function createStrictShapeTypeChecker(shapeTypes) {
    function validate(props, propName, componentName, location, propFullName) {
      var propValue = props[propName];
      var propType = getPropType(propValue);
      if (propType !== 'object') {
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
      }
      // We need to check all keys in case some are required but missing from
      // props.
      var allKeys = assign({}, props[propName], shapeTypes);
      for (var key in allKeys) {
        var checker = shapeTypes[key];
        if (!checker) {
          return new PropTypeError(
            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
            '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
            '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
          );
        }
        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
        if (error) {
          return error;
        }
      }
      return null;
    }

    return createChainableTypeChecker(validate);
  }

  function isNode(propValue) {
    switch (typeof propValue) {
      case 'number':
      case 'string':
      case 'undefined':
        return true;
      case 'boolean':
        return !propValue;
      case 'object':
        if (Array.isArray(propValue)) {
          return propValue.every(isNode);
        }
        if (propValue === null || isValidElement(propValue)) {
          return true;
        }

        var iteratorFn = getIteratorFn(propValue);
        if (iteratorFn) {
          var iterator = iteratorFn.call(propValue);
          var step;
          if (iteratorFn !== propValue.entries) {
            while (!(step = iterator.next()).done) {
              if (!isNode(step.value)) {
                return false;
              }
            }
          } else {
            // Iterator will provide entry [k,v] tuples rather than values.
            while (!(step = iterator.next()).done) {
              var entry = step.value;
              if (entry) {
                if (!isNode(entry[1])) {
                  return false;
                }
              }
            }
          }
        } else {
          return false;
        }

        return true;
      default:
        return false;
    }
  }

  function isSymbol(propType, propValue) {
    // Native Symbol.
    if (propType === 'symbol') {
      return true;
    }

    // falsy value can't be a Symbol
    if (!propValue) {
      return false;
    }

    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
    if (propValue['@@toStringTag'] === 'Symbol') {
      return true;
    }

    // Fallback for non-spec compliant Symbols which are polyfilled.
    if (typeof Symbol === 'function' && propValue instanceof Symbol) {
      return true;
    }

    return false;
  }

  // Equivalent of `typeof` but with special handling for array and regexp.
  function getPropType(propValue) {
    var propType = typeof propValue;
    if (Array.isArray(propValue)) {
      return 'array';
    }
    if (propValue instanceof RegExp) {
      // Old webkits (at least until Android 4.0) return 'function' rather than
      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
      // passes PropTypes.object.
      return 'object';
    }
    if (isSymbol(propType, propValue)) {
      return 'symbol';
    }
    return propType;
  }

  // This handles more types than `getPropType`. Only used for error messages.
  // See `createPrimitiveTypeChecker`.
  function getPreciseType(propValue) {
    if (typeof propValue === 'undefined' || propValue === null) {
      return '' + propValue;
    }
    var propType = getPropType(propValue);
    if (propType === 'object') {
      if (propValue instanceof Date) {
        return 'date';
      } else if (propValue instanceof RegExp) {
        return 'regexp';
      }
    }
    return propType;
  }

  // Returns a string that is postfixed to a warning about an invalid type.
  // For example, "undefined" or "of type array"
  function getPostfixForTypeWarning(value) {
    var type = getPreciseType(value);
    switch (type) {
      case 'array':
      case 'object':
        return 'an ' + type;
      case 'boolean':
      case 'date':
      case 'regexp':
        return 'a ' + type;
      default:
        return type;
    }
  }

  // Returns class name of the object, if any.
  function getClassName(propValue) {
    if (!propValue.constructor || !propValue.constructor.name) {
      return ANONYMOUS;
    }
    return propValue.constructor.name;
  }

  ReactPropTypes.checkPropTypes = checkPropTypes;
  ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
  ReactPropTypes.PropTypes = ReactPropTypes;

  return ReactPropTypes;
};

}).call(this)}).call(this,require('_process'))
},{"./checkPropTypes":367,"./lib/ReactPropTypesSecret":371,"_process":358,"object-assign":357,"react-is":377}],370:[function(require,module,exports){
(function (process){(function (){
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

if (process.env.NODE_ENV !== 'production') {
  var ReactIs = require('react-is');

  // By explicitly using `prop-types` you are opting into new development behavior.
  // http://fb.me/prop-types-in-prod
  var throwOnDirectAccess = true;
  module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);
} else {
  // By explicitly using `prop-types` you are opting into new production behavior.
  // http://fb.me/prop-types-in-prod
  module.exports = require('./factoryWithThrowingShims')();
}

}).call(this)}).call(this,require('_process'))
},{"./factoryWithThrowingShims":368,"./factoryWithTypeCheckers":369,"_process":358,"react-is":377}],371:[function(require,module,exports){
/**
 * Copyright (c) 2013-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';

var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';

module.exports = ReactPropTypesSecret;

},{}],372:[function(require,module,exports){
(function (process){(function (){
/** @license React v16.13.1
 * react-dom.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';



if (process.env.NODE_ENV !== "production") {
  (function() {
'use strict';

var React = require('react');
var _assign = require('object-assign');
var Scheduler = require('scheduler');
var checkPropTypes = require('prop-types/checkPropTypes');
var tracing = require('scheduler/tracing');

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.
// Current owner and dispatcher used to share the same ref,
// but PR #14548 split them out to better support the react-debug-tools package.

if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
  ReactSharedInternals.ReactCurrentDispatcher = {
    current: null
  };
}

if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
  ReactSharedInternals.ReactCurrentBatchConfig = {
    suspense: null
  };
}

// by calls to these methods by a Babel plugin.
//
// In PROD (or in packages without access to React internals),
// they are left as they are instead.

function warn(format) {
  {
    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }

    printWarning('warn', format, args);
  }
}
function error(format) {
  {
    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
      args[_key2 - 1] = arguments[_key2];
    }

    printWarning('error', format, args);
  }
}

function printWarning(level, format, args) {
  // When changing this logic, you might want to also
  // update consoleWithStackDev.www.js as well.
  {
    var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n    in') === 0;

    if (!hasExistingStack) {
      var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
      var stack = ReactDebugCurrentFrame.getStackAddendum();

      if (stack !== '') {
        format += '%s';
        args = args.concat([stack]);
      }
    }

    var argsWithFormat = args.map(function (item) {
      return '' + item;
    }); // Careful: RN currently depends on this prefix

    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
    // breaks IE9: https://github.com/facebook/react/issues/13610
    // eslint-disable-next-line react-internal/no-production-logging

    Function.prototype.apply.call(console[level], console, argsWithFormat);

    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      var argIndex = 0;
      var message = 'Warning: ' + format.replace(/%s/g, function () {
        return args[argIndex++];
      });
      throw new Error(message);
    } catch (x) {}
  }
}

if (!React) {
  {
    throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." );
  }
}

var invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {
  var funcArgs = Array.prototype.slice.call(arguments, 3);

  try {
    func.apply(context, funcArgs);
  } catch (error) {
    this.onError(error);
  }
};

{
  // In DEV mode, we swap out invokeGuardedCallback for a special version
  // that plays more nicely with the browser's DevTools. The idea is to preserve
  // "Pause on exceptions" behavior. Because React wraps all user-provided
  // functions in invokeGuardedCallback, and the production version of
  // invokeGuardedCallback uses a try-catch, all user exceptions are treated
  // like caught exceptions, and the DevTools won't pause unless the developer
  // takes the extra step of enabling pause on caught exceptions. This is
  // unintuitive, though, because even though React has caught the error, from
  // the developer's perspective, the error is uncaught.
  //
  // To preserve the expected "Pause on exceptions" behavior, we don't use a
  // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
  // DOM node, and call the user-provided callback from inside an event handler
  // for that fake event. If the callback throws, the error is "captured" using
  // a global event handler. But because the error happens in a different
  // event loop context, it does not interrupt the normal program flow.
  // Effectively, this gives us try-catch behavior without actually using
  // try-catch. Neat!
  // Check that the browser supports the APIs we need to implement our special
  // DEV version of invokeGuardedCallback
  if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
    var fakeNode = document.createElement('react');

    var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {
      // If document doesn't exist we know for sure we will crash in this method
      // when we call document.createEvent(). However this can cause confusing
      // errors: https://github.com/facebookincubator/create-react-app/issues/3482
      // So we preemptively throw with a better message instead.
      if (!(typeof document !== 'undefined')) {
        {
          throw Error( "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 evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We
      // set this to true at the beginning, then set it to false right after
      // calling the function. If the function errors, `didError` will never be
      // set to false. This strategy works even if the browser is flaky and
      // fails to call our global error handler, because it doesn't rely on
      // the error event at all.

      var didError = true; // Keeps track of the value of window.event so that we can reset it
      // during the callback to let user code access window.event in the
      // browsers that support it.

      var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
      // dispatching: https://github.com/facebook/react/issues/13688

      var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously
      // dispatch our fake event using `dispatchEvent`. Inside the handler, we
      // call the user-provided callback.

      var funcArgs = Array.prototype.slice.call(arguments, 3);

      function callCallback() {
        // We immediately remove the callback from event listeners so that
        // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
        // nested call would trigger the fake event handlers of any call higher
        // in the stack.
        fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
        // window.event assignment in both IE <= 10 as they throw an error
        // "Member not found" in strict mode, and in Firefox which does not
        // support window.event.

        if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
          window.event = windowEvent;
        }

        func.apply(context, funcArgs);
        didError = false;
      } // Create a global error event handler. We use this to capture the value
      // that was thrown. It's possible that this error handler will fire more
      // than once; for example, if non-React code also calls `dispatchEvent`
      // and a handler for that event throws. We should be resilient to most of
      // those cases. Even if our error event handler fires more than once, the
      // last error event is always used. If the callback actually does error,
      // we know that the last error event is the correct one, because it's not
      // possible for anything else to have happened in between our callback
      // erroring and the code that follows the `dispatchEvent` call below. If
      // the callback doesn't error, but the error event was fired, we know to
      // ignore it because `didError` will be false, as described above.


      var error; // Use this to track whether the error event is ever called.

      var didSetError = false;
      var isCrossOriginError = false;

      function handleWindowError(event) {
        error = event.error;
        didSetError = true;

        if (error === null && event.colno === 0 && event.lineno === 0) {
          isCrossOriginError = true;
        }

        if (event.defaultPrevented) {
          // Some other error handler has prevented default.
          // Browsers silence the error report if this happens.
          // We'll remember this to later decide whether to log it or not.
          if (error != null && typeof error === 'object') {
            try {
              error._suppressLogging = true;
            } catch (inner) {// Ignore.
            }
          }
        }
      } // Create a fake event type.


      var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers

      window.addEventListener('error', handleWindowError);
      fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
      // errors, it will trigger our global error handler.

      evt.initEvent(evtType, false, false);
      fakeNode.dispatchEvent(evt);

      if (windowEventDescriptor) {
        Object.defineProperty(window, 'event', windowEventDescriptor);
      }

      if (didError) {
        if (!didSetError) {
          // The callback errored, but the error event never fired.
          error = 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.');
        } else if (isCrossOriginError) {
          error = 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.');
        }

        this.onError(error);
      } // Remove our event listeners


      window.removeEventListener('error', handleWindowError);
    };

    invokeGuardedCallbackImpl = invokeGuardedCallbackDev;
  }
}

var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;

var hasError = false;
var caughtError = null; // Used by event system to capture/rethrow the first error.

var hasRethrowError = false;
var rethrowError = null;
var reporter = {
  onError: function (error) {
    hasError = true;
    caughtError = error;
  }
};
/**
 * Call a function while guarding against errors that happens within it.
 * Returns an error if it throws, otherwise null.
 *
 * In production, this is implemented using a try-catch. The reason we don't
 * use a try-catch directly is so that we can swap out a different
 * implementation in DEV mode.
 *
 * @param {String} name of the guard to use for logging or debugging
 * @param {Function} func The function to invoke
 * @param {*} context The context to use when calling the function
 * @param {...*} args Arguments for function
 */

function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
  hasError = false;
  caughtError = null;
  invokeGuardedCallbackImpl$1.apply(reporter, arguments);
}
/**
 * Same as invokeGuardedCallback, but instead of returning an error, it stores
 * it in a global so it can be rethrown by `rethrowCaughtError` later.
 * TODO: See if caughtError and rethrowError can be unified.
 *
 * @param {String} name of the guard to use for logging or debugging
 * @param {Function} func The function to invoke
 * @param {*} context The context to use when calling the function
 * @param {...*} args Arguments for function
 */

function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
  invokeGuardedCallback.apply(this, arguments);

  if (hasError) {
    var error = clearCaughtError();

    if (!hasRethrowError) {
      hasRethrowError = true;
      rethrowError = error;
    }
  }
}
/**
 * During execution of guarded functions we will capture the first error which
 * we will rethrow to be handled by the top level error handler.
 */

function rethrowCaughtError() {
  if (hasRethrowError) {
    var error = rethrowError;
    hasRethrowError = false;
    rethrowError = null;
    throw error;
  }
}
function hasCaughtError() {
  return hasError;
}
function clearCaughtError() {
  if (hasError) {
    var error = caughtError;
    hasError = false;
    caughtError = null;
    return error;
  } else {
    {
      {
        throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
      }
    }
  }
}

var getFiberCurrentPropsFromNode = null;
var getInstanceFromNode = null;
var getNodeFromInstance = null;
function setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {
  getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;
  getInstanceFromNode = getInstanceFromNodeImpl;
  getNodeFromInstance = getNodeFromInstanceImpl;

  {
    if (!getNodeFromInstance || !getInstanceFromNode) {
      error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');
    }
  }
}
var validateEventDispatches;

{
  validateEventDispatches = function (event) {
    var dispatchListeners = event._dispatchListeners;
    var dispatchInstances = event._dispatchInstances;
    var listenersIsArr = Array.isArray(dispatchListeners);
    var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
    var instancesIsArr = Array.isArray(dispatchInstances);
    var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;

    if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {
      error('EventPluginUtils: Invalid `event`.');
    }
  };
}
/**
 * Dispatch the event to the listener.
 * @param {SyntheticEvent} event SyntheticEvent to handle
 * @param {function} listener Application-level callback
 * @param {*} inst Internal component instance
 */


function executeDispatch(event, listener, inst) {
  var type = event.type || 'unknown-event';
  event.currentTarget = getNodeFromInstance(inst);
  invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
  event.currentTarget = null;
}
/**
 * Standard/simple iteration through an event's collected dispatches.
 */

function executeDispatchesInOrder(event) {
  var dispatchListeners = event._dispatchListeners;
  var dispatchInstances = event._dispatchInstances;

  {
    validateEventDispatches(event);
  }

  if (Array.isArray(dispatchListeners)) {
    for (var i = 0; i < dispatchListeners.length; i++) {
      if (event.isPropagationStopped()) {
        break;
      } // Listeners and Instances are two parallel arrays that are always in sync.


      executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
    }
  } else if (dispatchListeners) {
    executeDispatch(event, dispatchListeners, dispatchInstances);
  }

  event._dispatchListeners = null;
  event._dispatchInstances = null;
}

var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2; // Before we know whether it is function or class

var HostRoot = 3; // Root of a host tree. Could be nested inside another node.

var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.

var HostComponent = 5;
var HostText = 6;
var Fragment = 7;
var Mode = 8;
var ContextConsumer = 9;
var ContextProvider = 10;
var ForwardRef = 11;
var Profiler = 12;
var SuspenseComponent = 13;
var MemoComponent = 14;
var SimpleMemoComponent = 15;
var LazyComponent = 16;
var IncompleteClassComponent = 17;
var DehydratedFragment = 18;
var SuspenseListComponent = 19;
var FundamentalComponent = 20;
var ScopeComponent = 21;
var Block = 22;

/**
 * Injectable ordering of event plugins.
 */
var eventPluginOrder = null;
/**
 * Injectable mapping from names to event plugin modules.
 */

var namesToPlugins = {};
/**
 * Recomputes the plugin list using the injected plugins and plugin ordering.
 *
 * @private
 */

function recomputePluginOrdering() {
  if (!eventPluginOrder) {
    // Wait until an `eventPluginOrder` is injected.
    return;
  }

  for (var pluginName in namesToPlugins) {
    var pluginModule = namesToPlugins[pluginName];
    var pluginIndex = eventPluginOrder.indexOf(pluginName);

    if (!(pluginIndex > -1)) {
      {
        throw Error( "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" + pluginName + "`." );
      }
    }

    if (plugins[pluginIndex]) {
      continue;
    }

    if (!pluginModule.extractEvents) {
      {
        throw Error( "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" + pluginName + "` does not." );
      }
    }

    plugins[pluginIndex] = pluginModule;
    var publishedEvents = pluginModule.eventTypes;

    for (var eventName in publishedEvents) {
      if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {
        {
          throw Error( "EventPluginRegistry: Failed to publish event `" + eventName + "` for plugin `" + pluginName + "`." );
        }
      }
    }
  }
}
/**
 * Publishes an event so that it can be dispatched by the supplied plugin.
 *
 * @param {object} dispatchConfig Dispatch configuration for the event.
 * @param {object} PluginModule Plugin publishing the event.
 * @return {boolean} True if the event was successfully published.
 * @private
 */


function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
  if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {
    {
      throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" + eventName + "`." );
    }
  }

  eventNameDispatchConfigs[eventName] = dispatchConfig;
  var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;

  if (phasedRegistrationNames) {
    for (var phaseName in phasedRegistrationNames) {
      if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
        var phasedRegistrationName = phasedRegistrationNames[phaseName];
        publishRegistrationName(phasedRegistrationName, pluginModule, eventName);
      }
    }

    return true;
  } else if (dispatchConfig.registrationName) {
    publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);
    return true;
  }

  return false;
}
/**
 * Publishes a registration name that is used to identify dispatched events.
 *
 * @param {string} registrationName Registration name to add.
 * @param {object} PluginModule Plugin publishing the event.
 * @private
 */


function publishRegistrationName(registrationName, pluginModule, eventName) {
  if (!!registrationNameModules[registrationName]) {
    {
      throw Error( "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" + registrationName + "`." );
    }
  }

  registrationNameModules[registrationName] = pluginModule;
  registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;

  {
    var lowerCasedName = registrationName.toLowerCase();
    possibleRegistrationNames[lowerCasedName] = registrationName;

    if (registrationName === 'onDoubleClick') {
      possibleRegistrationNames.ondblclick = registrationName;
    }
  }
}
/**
 * Registers plugins so that they can extract and dispatch events.
 */

/**
 * Ordered list of injected plugins.
 */


var plugins = [];
/**
 * Mapping from event name to dispatch config
 */

var eventNameDispatchConfigs = {};
/**
 * Mapping from registration name to plugin module
 */

var registrationNameModules = {};
/**
 * Mapping from registration name to event name
 */

var registrationNameDependencies = {};
/**
 * Mapping from lowercase registration names to the properly cased version,
 * used to warn in the case of missing event handlers. Available
 * only in true.
 * @type {Object}
 */

var possibleRegistrationNames =  {} ; // Trust the developer to only use possibleRegistrationNames in true

/**
 * Injects an ordering of plugins (by plugin name). This allows the ordering
 * to be decoupled from injection of the actual plugins so that ordering is
 * always deterministic regardless of packaging, on-the-fly injection, etc.
 *
 * @param {array} InjectedEventPluginOrder
 * @internal
 */

function injectEventPluginOrder(injectedEventPluginOrder) {
  if (!!eventPluginOrder) {
    {
      throw Error( "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React." );
    }
  } // Clone the ordering so it cannot be dynamically mutated.


  eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);
  recomputePluginOrdering();
}
/**
 * Injects plugins to be used by plugin event system. The plugin names must be
 * in the ordering injected by `injectEventPluginOrder`.
 *
 * Plugins can be injected as part of page initialization or on-the-fly.
 *
 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
 * @internal
 */

function injectEventPluginsByName(injectedNamesToPlugins) {
  var isOrderingDirty = false;

  for (var pluginName in injectedNamesToPlugins) {
    if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
      continue;
    }

    var pluginModule = injectedNamesToPlugins[pluginName];

    if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {
      if (!!namesToPlugins[pluginName]) {
        {
          throw Error( "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" + pluginName + "`." );
        }
      }

      namesToPlugins[pluginName] = pluginModule;
      isOrderingDirty = true;
    }
  }

  if (isOrderingDirty) {
    recomputePluginOrdering();
  }
}

var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');

var PLUGIN_EVENT_SYSTEM = 1;
var IS_REPLAYED = 1 << 5;
var IS_FIRST_ANCESTOR = 1 << 6;

var restoreImpl = null;
var restoreTarget = null;
var restoreQueue = null;

function restoreStateOfTarget(target) {
  // We perform this translation at the end of the event loop so that we
  // always receive the correct fiber here
  var internalInstance = getInstanceFromNode(target);

  if (!internalInstance) {
    // Unmounted
    return;
  }

  if (!(typeof restoreImpl === 'function')) {
    {
      throw Error( "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 stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.

  if (stateNode) {
    var _props = getFiberCurrentPropsFromNode(stateNode);

    restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
  }
}

function setRestoreImplementation(impl) {
  restoreImpl = impl;
}
function enqueueStateRestore(target) {
  if (restoreTarget) {
    if (restoreQueue) {
      restoreQueue.push(target);
    } else {
      restoreQueue = [target];
    }
  } else {
    restoreTarget = target;
  }
}
function needsStateRestore() {
  return restoreTarget !== null || restoreQueue !== null;
}
function restoreStateIfNeeded() {
  if (!restoreTarget) {
    return;
  }

  var target = restoreTarget;
  var queuedTargets = restoreQueue;
  restoreTarget = null;
  restoreQueue = null;
  restoreStateOfTarget(target);

  if (queuedTargets) {
    for (var i = 0; i < queuedTargets.length; i++) {
      restoreStateOfTarget(queuedTargets[i]);
    }
  }
}

var enableProfilerTimer = true; // Trace which interactions trigger each commit.

var enableDeprecatedFlareAPI = false; // Experimental Host Component support.

var enableFundamentalAPI = false; // Experimental Scope support.
var warnAboutStringRefs = false;

// the renderer. Such as when we're dispatching events or if third party
// libraries need to call batchedUpdates. Eventually, this API will go away when
// everything is batched by default. We'll then have a similar API to opt-out of
// scheduled work and instead do synchronous work.
// Defaults

var batchedUpdatesImpl = function (fn, bookkeeping) {
  return fn(bookkeeping);
};

var discreteUpdatesImpl = function (fn, a, b, c, d) {
  return fn(a, b, c, d);
};

var flushDiscreteUpdatesImpl = function () {};

var batchedEventUpdatesImpl = batchedUpdatesImpl;
var isInsideEventHandler = false;
var isBatchingEventUpdates = false;

function finishEventHandler() {
  // Here we wait until all updates have propagated, which is important
  // when using controlled components within layers:
  // https://github.com/facebook/react/issues/1698
  // Then we restore state of any controlled component.
  var controlledComponentsHavePendingUpdates = needsStateRestore();

  if (controlledComponentsHavePendingUpdates) {
    // If a controlled event was fired, we may need to restore the state of
    // the DOM node back to the controlled value. This is necessary when React
    // bails out of the update without touching the DOM.
    flushDiscreteUpdatesImpl();
    restoreStateIfNeeded();
  }
}

function batchedUpdates(fn, bookkeeping) {
  if (isInsideEventHandler) {
    // If we are currently inside another batch, we need to wait until it
    // fully completes before restoring state.
    return fn(bookkeeping);
  }

  isInsideEventHandler = true;

  try {
    return batchedUpdatesImpl(fn, bookkeeping);
  } finally {
    isInsideEventHandler = false;
    finishEventHandler();
  }
}
function batchedEventUpdates(fn, a, b) {
  if (isBatchingEventUpdates) {
    // If we are currently inside another batch, we need to wait until it
    // fully completes before restoring state.
    return fn(a, b);
  }

  isBatchingEventUpdates = true;

  try {
    return batchedEventUpdatesImpl(fn, a, b);
  } finally {
    isBatchingEventUpdates = false;
    finishEventHandler();
  }
} // This is for the React Flare event system
function discreteUpdates(fn, a, b, c, d) {
  var prevIsInsideEventHandler = isInsideEventHandler;
  isInsideEventHandler = true;

  try {
    return discreteUpdatesImpl(fn, a, b, c, d);
  } finally {
    isInsideEventHandler = prevIsInsideEventHandler;

    if (!isInsideEventHandler) {
      finishEventHandler();
    }
  }
}
function flushDiscreteUpdatesIfNeeded(timeStamp) {
  // event.timeStamp isn't overly reliable due to inconsistencies in
  // how different browsers have historically provided the time stamp.
  // Some browsers provide high-resolution time stamps for all events,
  // some provide low-resolution time stamps for all events. FF < 52
  // even mixes both time stamps together. Some browsers even report
  // negative time stamps or time stamps that are 0 (iOS9) in some cases.
  // Given we are only comparing two time stamps with equality (!==),
  // we are safe from the resolution differences. If the time stamp is 0
  // we bail-out of preventing the flush, which can affect semantics,
  // such as if an earlier flush removes or adds event listeners that
  // are fired in the subsequent flush. However, this is the same
  // behaviour as we had before this change, so the risks are low.
  if (!isInsideEventHandler && (!enableDeprecatedFlareAPI  )) {
    flushDiscreteUpdatesImpl();
  }
}
function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
  batchedUpdatesImpl = _batchedUpdatesImpl;
  discreteUpdatesImpl = _discreteUpdatesImpl;
  flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
  batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
}

var DiscreteEvent = 0;
var UserBlockingEvent = 1;
var ContinuousEvent = 2;

// A reserved attribute.
// It is handled by React separately and shouldn't be written to the DOM.
var RESERVED = 0; // A simple string attribute.
// Attributes that aren't in the whitelist are presumed to have this type.

var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
// "enumerated" attributes with "true" and "false" as possible values.
// When true, it should be set to a "true" string.
// When false, it should be set to a "false" string.

var BOOLEANISH_STRING = 2; // A real boolean attribute.
// When true, it should be present (set either to an empty string or its name).
// When false, it should be omitted.

var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
// When true, it should be present (set either to an empty string or its name).
// When false, it should be omitted.
// For any other value, should be present with that value.

var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
// When falsy, it should be removed.

var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
// When falsy, it should be removed.

var POSITIVE_NUMERIC = 6;

/* eslint-disable max-len */
var ATTRIBUTE_NAME_START_CHAR = ":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";
/* eslint-enable max-len */

var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
var hasOwnProperty = Object.prototype.hasOwnProperty;
var illegalAttributeNameCache = {};
var validatedAttributeNameCache = {};
function isAttributeNameSafe(attributeName) {
  if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
    return true;
  }

  if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
    return false;
  }

  if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
    validatedAttributeNameCache[attributeName] = true;
    return true;
  }

  illegalAttributeNameCache[attributeName] = true;

  {
    error('Invalid attribute name: `%s`', attributeName);
  }

  return false;
}
function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
  if (propertyInfo !== null) {
    return propertyInfo.type === RESERVED;
  }

  if (isCustomComponentTag) {
    return false;
  }

  if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
    return true;
  }

  return false;
}
function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
  if (propertyInfo !== null && propertyInfo.type === RESERVED) {
    return false;
  }

  switch (typeof value) {
    case 'function': // $FlowIssue symbol is perfectly valid here

    case 'symbol':
      // eslint-disable-line
      return true;

    case 'boolean':
      {
        if (isCustomComponentTag) {
          return false;
        }

        if (propertyInfo !== null) {
          return !propertyInfo.acceptsBooleans;
        } else {
          var prefix = name.toLowerCase().slice(0, 5);
          return prefix !== 'data-' && prefix !== 'aria-';
        }
      }

    default:
      return false;
  }
}
function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
  if (value === null || typeof value === 'undefined') {
    return true;
  }

  if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
    return true;
  }

  if (isCustomComponentTag) {
    return false;
  }

  if (propertyInfo !== null) {
    switch (propertyInfo.type) {
      case BOOLEAN:
        return !value;

      case OVERLOADED_BOOLEAN:
        return value === false;

      case NUMERIC:
        return isNaN(value);

      case POSITIVE_NUMERIC:
        return isNaN(value) || value < 1;
    }
  }

  return false;
}
function getPropertyInfo(name) {
  return properties.hasOwnProperty(name) ? properties[name] : null;
}

function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
  this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
  this.attributeName = attributeName;
  this.attributeNamespace = attributeNamespace;
  this.mustUseProperty = mustUseProperty;
  this.propertyName = name;
  this.type = type;
  this.sanitizeURL = sanitizeURL;
} // When adding attributes to this list, be sure to also add them to
// the `possibleStandardNames` module to ensure casing and incorrect
// name warnings.


var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.

var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];

reservedProps.forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
}); // A few React string attributes have a different name.
// This is a mapping from React prop names to the attribute names.

[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
  var name = _ref[0],
      attributeName = _ref[1];
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  attributeName, // attributeName
  null, // attributeNamespace
  false);
}); // These are "enumerated" HTML attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
// these aren't boolean attributes (they are coerced to strings).

['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
  name.toLowerCase(), // attributeName
  null, // attributeNamespace
  false);
}); // These are "enumerated" SVG attributes that accept "true" and "false".
// In React, we let users pass `true` and `false` even though technically
// these aren't boolean attributes (they are coerced to strings).
// Since these are SVG attributes, their attribute names are case-sensitive.

['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
}); // These are HTML boolean attributes.

['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
'itemScope'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
  name.toLowerCase(), // attributeName
  null, // attributeNamespace
  false);
}); // These are the few React props that we set as DOM properties
// rather than attributes. These are all booleans.

['checked', // Note: `option.selected` is not updated if `select.multiple` is
// disabled with `removeAttribute`. We have special logic for handling this.
'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
}); // These are HTML attributes that are "overloaded booleans": they behave like
// booleans, but can also accept a string value.

['capture', 'download' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
}); // These are HTML attributes that must be positive numbers.

['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
  name, // attributeName
  null, // attributeNamespace
  false);
}); // These are HTML attributes that must be numbers.

['rowSpan', 'start'].forEach(function (name) {
  properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
  name.toLowerCase(), // attributeName
  null, // attributeNamespace
  false);
});
var CAMELIZE = /[\-\:]([a-z])/g;

var capitalize = function (token) {
  return token[1].toUpperCase();
}; // This is a list of all SVG attributes that need special casing, namespacing,
// or boolean value assignment. Regular attributes that just accept strings
// and have the same names are omitted, just like in the HTML whitelist.
// Some of these attributes can be hard to find. This list was created by
// scraping the MDN documentation.


['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' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (attributeName) {
  var name = attributeName.replace(CAMELIZE, capitalize);
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  attributeName, null, // attributeNamespace
  false);
}); // String SVG attributes with the xlink namespace.

['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (attributeName) {
  var name = attributeName.replace(CAMELIZE, capitalize);
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  attributeName, 'http://www.w3.org/1999/xlink', false);
}); // String SVG attributes with the xml namespace.

['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function (attributeName) {
  var name = attributeName.replace(CAMELIZE, capitalize);
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
  attributeName, 'http://www.w3.org/XML/1998/namespace', false);
}); // These attribute exists both in HTML and SVG.
// The attribute name is case-sensitive in SVG so we can't just use
// the React name like we do for attributes that exist only in HTML.

['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
  attributeName.toLowerCase(), // attributeName
  null, // attributeNamespace
  false);
}); // These attributes accept URLs. These must not allow javascript: URLS.
// These will also need to accept Trusted Types object in the future.

var xlinkHref = 'xlinkHref';
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
'xlink:href', 'http://www.w3.org/1999/xlink', true);
['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
  attributeName.toLowerCase(), // attributeName
  null, // attributeNamespace
  true);
});

var ReactDebugCurrentFrame = null;

{
  ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
} // A javascript: URL can contain leading C0 control or \u0020 SPACE,
// and any newline or tab are filtered out as if they're not part of the URL.
// https://url.spec.whatwg.org/#url-parsing
// Tab or newline are defined as \r\n\t:
// https://infra.spec.whatwg.org/#ascii-tab-or-newline
// A C0 control is a code point in the range \u0000 NULL to \u001F
// INFORMATION SEPARATOR ONE, inclusive:
// https://infra.spec.whatwg.org/#c0-control-or-space

/* eslint-disable max-len */


var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
var didWarn = false;

function sanitizeURL(url) {
  {
    if (!didWarn && isJavaScriptProtocol.test(url)) {
      didWarn = true;

      error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
    }
  }
}

/**
 * Get the value for a property on a node. Only used in DEV for SSR validation.
 * The "expected" argument is used as a hint of what the expected value is.
 * Some properties have multiple equivalent values.
 */
function getValueForProperty(node, name, expected, propertyInfo) {
  {
    if (propertyInfo.mustUseProperty) {
      var propertyName = propertyInfo.propertyName;
      return node[propertyName];
    } else {
      if ( propertyInfo.sanitizeURL) {
        // If we haven't fully disabled javascript: URLs, and if
        // the hydration is successful of a javascript: URL, we
        // still want to warn on the client.
        sanitizeURL('' + expected);
      }

      var attributeName = propertyInfo.attributeName;
      var stringValue = null;

      if (propertyInfo.type === OVERLOADED_BOOLEAN) {
        if (node.hasAttribute(attributeName)) {
          var value = node.getAttribute(attributeName);

          if (value === '') {
            return true;
          }

          if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
            return value;
          }

          if (value === '' + expected) {
            return expected;
          }

          return value;
        }
      } else if (node.hasAttribute(attributeName)) {
        if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
          // We had an attribute but shouldn't have had one, so read it
          // for the error message.
          return node.getAttribute(attributeName);
        }

        if (propertyInfo.type === BOOLEAN) {
          // If this was a boolean, it doesn't matter what the value is
          // the fact that we have it is the same as the expected.
          return expected;
        } // Even if this property uses a namespace we use getAttribute
        // because we assume its namespaced name is the same as our config.
        // To use getAttributeNS we need the local name which we don't have
        // in our config atm.


        stringValue = node.getAttribute(attributeName);
      }

      if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
        return stringValue === null ? expected : stringValue;
      } else if (stringValue === '' + expected) {
        return expected;
      } else {
        return stringValue;
      }
    }
  }
}
/**
 * Get the value for a attribute on a node. Only used in DEV for SSR validation.
 * The third argument is used as a hint of what the expected value is. Some
 * attributes have multiple equivalent values.
 */

function getValueForAttribute(node, name, expected) {
  {
    if (!isAttributeNameSafe(name)) {
      return;
    }

    if (!node.hasAttribute(name)) {
      return expected === undefined ? undefined : null;
    }

    var value = node.getAttribute(name);

    if (value === '' + expected) {
      return expected;
    }

    return value;
  }
}
/**
 * Sets the value for a property on a node.
 *
 * @param {DOMElement} node
 * @param {string} name
 * @param {*} value
 */

function setValueForProperty(node, name, value, isCustomComponentTag) {
  var propertyInfo = getPropertyInfo(name);

  if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
    return;
  }

  if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
    value = null;
  } // If the prop isn't in the special list, treat it as a simple attribute.


  if (isCustomComponentTag || propertyInfo === null) {
    if (isAttributeNameSafe(name)) {
      var _attributeName = name;

      if (value === null) {
        node.removeAttribute(_attributeName);
      } else {
        node.setAttribute(_attributeName,  '' + value);
      }
    }

    return;
  }

  var mustUseProperty = propertyInfo.mustUseProperty;

  if (mustUseProperty) {
    var propertyName = propertyInfo.propertyName;

    if (value === null) {
      var type = propertyInfo.type;
      node[propertyName] = type === BOOLEAN ? false : '';
    } else {
      // Contrary to `setAttribute`, object properties are properly
      // `toString`ed by IE8/9.
      node[propertyName] = value;
    }

    return;
  } // The rest are treated as attributes with special cases.


  var attributeName = propertyInfo.attributeName,
      attributeNamespace = propertyInfo.attributeNamespace;

  if (value === null) {
    node.removeAttribute(attributeName);
  } else {
    var _type = propertyInfo.type;
    var attributeValue;

    if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
      // If attribute type is boolean, we know for sure it won't be an execution sink
      // and we won't require Trusted Type here.
      attributeValue = '';
    } else {
      // `setAttribute` with objects becomes only `[object]` in IE8/9,
      // ('' + value) makes it output the correct toString()-value.
      {
        attributeValue = '' + value;
      }

      if (propertyInfo.sanitizeURL) {
        sanitizeURL(attributeValue.toString());
      }
    }

    if (attributeNamespace) {
      node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
    } else {
      node.setAttribute(attributeName, attributeValue);
    }
  }
}

var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
function describeComponentFrame (name, source, ownerName) {
  var sourceInfo = '';

  if (source) {
    var path = source.fileName;
    var fileName = path.replace(BEFORE_SLASH_RE, '');

    {
      // In DEV, include code for a common special case:
      // prefer "folder/index.js" instead of just "index.js".
      if (/^index\./.test(fileName)) {
        var match = path.match(BEFORE_SLASH_RE);

        if (match) {
          var pathBeforeSlash = match[1];

          if (pathBeforeSlash) {
            var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
            fileName = folderName + '/' + fileName;
          }
        }
      }
    }

    sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
  } else if (ownerName) {
    sourceInfo = ' (created by ' + ownerName + ')';
  }

  return '\n    in ' + (name || 'Unknown') + sourceInfo;
}

// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
  if (maybeIterable === null || typeof maybeIterable !== 'object') {
    return null;
  }

  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];

  if (typeof maybeIterator === 'function') {
    return maybeIterator;
  }

  return null;
}

var Uninitialized = -1;
var Pending = 0;
var Resolved = 1;
var Rejected = 2;
function refineResolvedLazyComponent(lazyComponent) {
  return lazyComponent._status === Resolved ? lazyComponent._result : null;
}
function initializeLazyComponentType(lazyComponent) {
  if (lazyComponent._status === Uninitialized) {
    lazyComponent._status = Pending;
    var ctor = lazyComponent._ctor;
    var thenable = ctor();
    lazyComponent._result = thenable;
    thenable.then(function (moduleObject) {
      if (lazyComponent._status === Pending) {
        var defaultExport = moduleObject.default;

        {
          if (defaultExport === undefined) {
            error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n  ' + "const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
          }
        }

        lazyComponent._status = Resolved;
        lazyComponent._result = defaultExport;
      }
    }, function (error) {
      if (lazyComponent._status === Pending) {
        lazyComponent._status = Rejected;
        lazyComponent._result = error;
      }
    });
  }
}

function getWrappedName(outerType, innerType, wrapperName) {
  var functionName = innerType.displayName || innerType.name || '';
  return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
}

function getComponentName(type) {
  if (type == null) {
    // Host root, text node or just invalid type.
    return null;
  }

  {
    if (typeof type.tag === 'number') {
      error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
    }
  }

  if (typeof type === 'function') {
    return type.displayName || type.name || null;
  }

  if (typeof type === 'string') {
    return type;
  }

  switch (type) {
    case REACT_FRAGMENT_TYPE:
      return 'Fragment';

    case REACT_PORTAL_TYPE:
      return 'Portal';

    case REACT_PROFILER_TYPE:
      return "Profiler";

    case REACT_STRICT_MODE_TYPE:
      return 'StrictMode';

    case REACT_SUSPENSE_TYPE:
      return 'Suspense';

    case REACT_SUSPENSE_LIST_TYPE:
      return 'SuspenseList';
  }

  if (typeof type === 'object') {
    switch (type.$$typeof) {
      case REACT_CONTEXT_TYPE:
        return 'Context.Consumer';

      case REACT_PROVIDER_TYPE:
        return 'Context.Provider';

      case REACT_FORWARD_REF_TYPE:
        return getWrappedName(type, type.render, 'ForwardRef');

      case REACT_MEMO_TYPE:
        return getComponentName(type.type);

      case REACT_BLOCK_TYPE:
        return getComponentName(type.render);

      case REACT_LAZY_TYPE:
        {
          var thenable = type;
          var resolvedThenable = refineResolvedLazyComponent(thenable);

          if (resolvedThenable) {
            return getComponentName(resolvedThenable);
          }

          break;
        }
    }
  }

  return null;
}

var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;

function describeFiber(fiber) {
  switch (fiber.tag) {
    case HostRoot:
    case HostPortal:
    case HostText:
    case Fragment:
    case ContextProvider:
    case ContextConsumer:
      return '';

    default:
      var owner = fiber._debugOwner;
      var source = fiber._debugSource;
      var name = getComponentName(fiber.type);
      var ownerName = null;

      if (owner) {
        ownerName = getComponentName(owner.type);
      }

      return describeComponentFrame(name, source, ownerName);
  }
}

function getStackByFiberInDevAndProd(workInProgress) {
  var info = '';
  var node = workInProgress;

  do {
    info += describeFiber(node);
    node = node.return;
  } while (node);

  return info;
}
var current = null;
var isRendering = false;
function getCurrentFiberOwnerNameInDevOrNull() {
  {
    if (current === null) {
      return null;
    }

    var owner = current._debugOwner;

    if (owner !== null && typeof owner !== 'undefined') {
      return getComponentName(owner.type);
    }
  }

  return null;
}
function getCurrentFiberStackInDev() {
  {
    if (current === null) {
      return '';
    } // Safe because if current fiber exists, we are reconciling,
    // and it is guaranteed to be the work-in-progress version.


    return getStackByFiberInDevAndProd(current);
  }
}
function resetCurrentFiber() {
  {
    ReactDebugCurrentFrame$1.getCurrentStack = null;
    current = null;
    isRendering = false;
  }
}
function setCurrentFiber(fiber) {
  {
    ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;
    current = fiber;
    isRendering = false;
  }
}
function setIsRendering(rendering) {
  {
    isRendering = rendering;
  }
}

// Flow does not allow string concatenation of most non-string types. To work
// around this limitation, we use an opaque type that can only be obtained by
// passing the value through getToStringValue first.
function toString(value) {
  return '' + value;
}
function getToStringValue(value) {
  switch (typeof value) {
    case 'boolean':
    case 'number':
    case 'object':
    case 'string':
    case 'undefined':
      return value;

    default:
      // function, symbol are assigned as empty strings
      return '';
  }
}

var ReactDebugCurrentFrame$2 = null;
var ReactControlledValuePropTypes = {
  checkPropTypes: null
};

{
  ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
  var hasReadOnlyValue = {
    button: true,
    checkbox: true,
    image: true,
    hidden: true,
    radio: true,
    reset: true,
    submit: true
  };
  var propTypes = {
    value: function (props, propName, componentName) {
      if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
        return null;
      }

      return 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 (props, propName, componentName) {
      if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {
        return null;
      }

      return 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`.');
    }
  };
  /**
   * Provide a linked `value` attribute for controlled forms. You should not use
   * this outside of the ReactDOM controlled form components.
   */

  ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
    checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
  };
}

function isCheckable(elem) {
  var type = elem.type;
  var nodeName = elem.nodeName;
  return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
}

function getTracker(node) {
  return node._valueTracker;
}

function detachTracker(node) {
  node._valueTracker = null;
}

function getValueFromNode(node) {
  var value = '';

  if (!node) {
    return value;
  }

  if (isCheckable(node)) {
    value = node.checked ? 'true' : 'false';
  } else {
    value = node.value;
  }

  return value;
}

function trackValueOnNode(node) {
  var valueField = isCheckable(node) ? 'checked' : 'value';
  var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
  var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail
  // and don't track value will cause over reporting of changes,
  // but it's better then a hard failure
  // (needed for certain tests that spyOn input values and Safari)

  if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
    return;
  }

  var get = descriptor.get,
      set = descriptor.set;
  Object.defineProperty(node, valueField, {
    configurable: true,
    get: function () {
      return get.call(this);
    },
    set: function (value) {
      currentValue = '' + value;
      set.call(this, value);
    }
  }); // We could've passed this the first time
  // but it triggers a bug in IE11 and Edge 14/15.
  // Calling defineProperty() again should be equivalent.
  // https://github.com/facebook/react/issues/11768

  Object.defineProperty(node, valueField, {
    enumerable: descriptor.enumerable
  });
  var tracker = {
    getValue: function () {
      return currentValue;
    },
    setValue: function (value) {
      currentValue = '' + value;
    },
    stopTracking: function () {
      detachTracker(node);
      delete node[valueField];
    }
  };
  return tracker;
}

function track(node) {
  if (getTracker(node)) {
    return;
  } // TODO: Once it's just Fiber we can move this to node._wrapperState


  node._valueTracker = trackValueOnNode(node);
}
function updateValueIfChanged(node) {
  if (!node) {
    return false;
  }

  var tracker = getTracker(node); // if there is no tracker at this point it's unlikely
  // that trying again will succeed

  if (!tracker) {
    return true;
  }

  var lastValue = tracker.getValue();
  var nextValue = getValueFromNode(node);

  if (nextValue !== lastValue) {
    tracker.setValue(nextValue);
    return true;
  }

  return false;
}

var didWarnValueDefaultValue = false;
var didWarnCheckedDefaultChecked = false;
var didWarnControlledToUncontrolled = false;
var didWarnUncontrolledToControlled = false;

function isControlled(props) {
  var usesChecked = props.type === 'checkbox' || props.type === 'radio';
  return usesChecked ? props.checked != null : props.value != null;
}
/**
 * Implements an <input> host component that allows setting these optional
 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
 *
 * If `checked` or `value` are not supplied (or null/undefined), user actions
 * that affect the checked state or value will trigger updates to the element.
 *
 * If they are supplied (and not null/undefined), the rendered element will not
 * trigger updates to the element. Instead, the props must change in order for
 * the rendered element to be updated.
 *
 * The rendered element will be initialized as unchecked (or `defaultChecked`)
 * with an empty value (or `defaultValue`).
 *
 * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
 */


function getHostProps(element, props) {
  var node = element;
  var checked = props.checked;

  var hostProps = _assign({}, props, {
    defaultChecked: undefined,
    defaultValue: undefined,
    value: undefined,
    checked: checked != null ? checked : node._wrapperState.initialChecked
  });

  return hostProps;
}
function initWrapperState(element, props) {
  {
    ReactControlledValuePropTypes.checkPropTypes('input', props);

    if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
      error('%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', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);

      didWarnCheckedDefaultChecked = true;
    }

    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
      error('%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', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);

      didWarnValueDefaultValue = true;
    }
  }

  var node = element;
  var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
  node._wrapperState = {
    initialChecked: props.checked != null ? props.checked : props.defaultChecked,
    initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
    controlled: isControlled(props)
  };
}
function updateChecked(element, props) {
  var node = element;
  var checked = props.checked;

  if (checked != null) {
    setValueForProperty(node, 'checked', checked, false);
  }
}
function updateWrapper(element, props) {
  var node = element;

  {
    var controlled = isControlled(props);

    if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
      error('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', props.type);

      didWarnUncontrolledToControlled = true;
    }

    if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
      error('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', props.type);

      didWarnControlledToUncontrolled = true;
    }
  }

  updateChecked(element, props);
  var value = getToStringValue(props.value);
  var type = props.type;

  if (value != null) {
    if (type === 'number') {
      if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.
      // eslint-disable-next-line
      node.value != value) {
        node.value = toString(value);
      }
    } else if (node.value !== toString(value)) {
      node.value = toString(value);
    }
  } else if (type === 'submit' || type === 'reset') {
    // Submit/reset inputs need the attribute removed completely to avoid
    // blank-text buttons.
    node.removeAttribute('value');
    return;
  }

  {
    // When syncing the value attribute, the value comes from a cascade of
    // properties:
    //  1. The value React property
    //  2. The defaultValue React property
    //  3. Otherwise there should be no change
    if (props.hasOwnProperty('value')) {
      setDefaultValue(node, props.type, value);
    } else if (props.hasOwnProperty('defaultValue')) {
      setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
    }
  }

  {
    // When syncing the checked attribute, it only changes when it needs
    // to be removed, such as transitioning from a checkbox into a text input
    if (props.checked == null && props.defaultChecked != null) {
      node.defaultChecked = !!props.defaultChecked;
    }
  }
}
function postMountWrapper(element, props, isHydrating) {
  var node = element; // Do not assign value if it is already set. This prevents user text input
  // from being lost during SSR hydration.

  if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
    var type = props.type;
    var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the
    // default value provided by the browser. See: #12872

    if (isButton && (props.value === undefined || props.value === null)) {
      return;
    }

    var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input
    // from being lost during SSR hydration.

    if (!isHydrating) {
      {
        // When syncing the value attribute, the value property should use
        // the wrapperState._initialValue property. This uses:
        //
        //   1. The value React property when present
        //   2. The defaultValue React property when present
        //   3. An empty string
        if (initialValue !== node.value) {
          node.value = initialValue;
        }
      }
    }

    {
      // Otherwise, the value attribute is synchronized to the property,
      // so we assign defaultValue to the same thing as the value property
      // assignment step above.
      node.defaultValue = initialValue;
    }
  } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
  // this is needed to work around a chrome bug where setting defaultChecked
  // will sometimes influence the value of checked (even after detachment).
  // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
  // We need to temporarily unset name to avoid disrupting radio button groups.


  var name = node.name;

  if (name !== '') {
    node.name = '';
  }

  {
    // When syncing the checked attribute, both the checked property and
    // attribute are assigned at the same time using defaultChecked. This uses:
    //
    //   1. The checked React property when present
    //   2. The defaultChecked React property when present
    //   3. Otherwise, false
    node.defaultChecked = !node.defaultChecked;
    node.defaultChecked = !!node._wrapperState.initialChecked;
  }

  if (name !== '') {
    node.name = name;
  }
}
function restoreControlledState(element, props) {
  var node = element;
  updateWrapper(node, props);
  updateNamedCousins(node, props);
}

function updateNamedCousins(rootNode, props) {
  var name = props.name;

  if (props.type === 'radio' && name != null) {
    var queryRoot = rootNode;

    while (queryRoot.parentNode) {
      queryRoot = queryRoot.parentNode;
    } // If `rootNode.form` was non-null, then we could try `form.elements`,
    // but that sometimes behaves strangely in IE8. We could also try using
    // `form.getElementsByName`, but that will only return direct children
    // and won't include inputs that use the HTML5 `form=` attribute. Since
    // the input might not even be in a form. It might not even be in the
    // document. Let's just use the local `querySelectorAll` to ensure we don't
    // miss anything.


    var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');

    for (var i = 0; i < group.length; i++) {
      var otherNode = group[i];

      if (otherNode === rootNode || otherNode.form !== rootNode.form) {
        continue;
      } // This will throw if radio buttons rendered by different copies of React
      // and the same name are rendered into the same form (same as #1939).
      // That's probably okay; we don't support it just as we don't support
      // mixing React radio buttons with non-React ones.


      var otherProps = getFiberCurrentPropsFromNode$1(otherNode);

      if (!otherProps) {
        {
          throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." );
        }
      } // We need update the tracked value on the named cousin since the value
      // was changed but the input saw no event or value set


      updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that
      // was previously checked to update will cause it to be come re-checked
      // as appropriate.

      updateWrapper(otherNode, otherProps);
    }
  }
} // In Chrome, assigning defaultValue to certain input types triggers input validation.
// For number inputs, the display value loses trailing decimal points. For email inputs,
// Chrome raises "The specified value <x> is not a valid email address".
//
// Here we check to see if the defaultValue has actually changed, avoiding these problems
// when the user is inputting text
//
// https://github.com/facebook/react/issues/7253


function setDefaultValue(node, type, value) {
  if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
  type !== 'number' || node.ownerDocument.activeElement !== node) {
    if (value == null) {
      node.defaultValue = toString(node._wrapperState.initialValue);
    } else if (node.defaultValue !== toString(value)) {
      node.defaultValue = toString(value);
    }
  }
}

var didWarnSelectedSetOnOption = false;
var didWarnInvalidChild = false;

function flattenChildren(children) {
  var content = ''; // Flatten children. We'll warn if they are invalid
  // during validateProps() which runs for hydration too.
  // Note that this would throw on non-element objects.
  // Elements are stringified (which is normally irrelevant
  // but matters for <fbt>).

  React.Children.forEach(children, function (child) {
    if (child == null) {
      return;
    }

    content += child; // Note: we don't warn about invalid children here.
    // Instead, this is done separately below so that
    // it happens during the hydration codepath too.
  });
  return content;
}
/**
 * Implements an <option> host component that warns when `selected` is set.
 */


function validateProps(element, props) {
  {
    // This mirrors the codepath above, but runs for hydration too.
    // Warn about invalid children here so that client and hydration are consistent.
    // TODO: this seems like it could cause a DEV-only throw for hydration
    // if children contains a non-element object. We should try to avoid that.
    if (typeof props.children === 'object' && props.children !== null) {
      React.Children.forEach(props.children, function (child) {
        if (child == null) {
          return;
        }

        if (typeof child === 'string' || typeof child === 'number') {
          return;
        }

        if (typeof child.type !== 'string') {
          return;
        }

        if (!didWarnInvalidChild) {
          didWarnInvalidChild = true;

          error('Only strings and numbers are supported as <option> children.');
        }
      });
    } // TODO: Remove support for `selected` in <option>.


    if (props.selected != null && !didWarnSelectedSetOnOption) {
      error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');

      didWarnSelectedSetOnOption = true;
    }
  }
}
function postMountWrapper$1(element, props) {
  // value="" should make a value attribute (#6219)
  if (props.value != null) {
    element.setAttribute('value', toString(getToStringValue(props.value)));
  }
}
function getHostProps$1(element, props) {
  var hostProps = _assign({
    children: undefined
  }, props);

  var content = flattenChildren(props.children);

  if (content) {
    hostProps.children = content;
  }

  return hostProps;
}

var didWarnValueDefaultValue$1;

{
  didWarnValueDefaultValue$1 = false;
}

function getDeclarationErrorAddendum() {
  var ownerName = getCurrentFiberOwnerNameInDevOrNull();

  if (ownerName) {
    return '\n\nCheck the render method of `' + ownerName + '`.';
  }

  return '';
}

var valuePropNames = ['value', 'defaultValue'];
/**
 * Validation function for `value` and `defaultValue`.
 */

function checkSelectPropTypes(props) {
  {
    ReactControlledValuePropTypes.checkPropTypes('select', props);

    for (var i = 0; i < valuePropNames.length; i++) {
      var propName = valuePropNames[i];

      if (props[propName] == null) {
        continue;
      }

      var isArray = Array.isArray(props[propName]);

      if (props.multiple && !isArray) {
        error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
      } else if (!props.multiple && isArray) {
        error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
      }
    }
  }
}

function updateOptions(node, multiple, propValue, setDefaultSelected) {
  var options = node.options;

  if (multiple) {
    var selectedValues = propValue;
    var selectedValue = {};

    for (var i = 0; i < selectedValues.length; i++) {
      // Prefix to avoid chaos with special keys.
      selectedValue['$' + selectedValues[i]] = true;
    }

    for (var _i = 0; _i < options.length; _i++) {
      var selected = selectedValue.hasOwnProperty('$' + options[_i].value);

      if (options[_i].selected !== selected) {
        options[_i].selected = selected;
      }

      if (selected && setDefaultSelected) {
        options[_i].defaultSelected = true;
      }
    }
  } else {
    // Do not set `select.value` as exact behavior isn't consistent across all
    // browsers for all cases.
    var _selectedValue = toString(getToStringValue(propValue));

    var defaultSelected = null;

    for (var _i2 = 0; _i2 < options.length; _i2++) {
      if (options[_i2].value === _selectedValue) {
        options[_i2].selected = true;

        if (setDefaultSelected) {
          options[_i2].defaultSelected = true;
        }

        return;
      }

      if (defaultSelected === null && !options[_i2].disabled) {
        defaultSelected = options[_i2];
      }
    }

    if (defaultSelected !== null) {
      defaultSelected.selected = true;
    }
  }
}
/**
 * Implements a <select> host component that allows optionally setting the
 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
 * stringable. If `multiple` is true, the prop must be an array of stringables.
 *
 * If `value` is not supplied (or null/undefined), user actions that change the
 * selected option will trigger updates to the rendered options.
 *
 * If it is supplied (and not null/undefined), the rendered options will not
 * update in response to user actions. Instead, the `value` prop must change in
 * order for the rendered options to update.
 *
 * If `defaultValue` is provided, any options with the supplied values will be
 * selected.
 */


function getHostProps$2(element, props) {
  return _assign({}, props, {
    value: undefined
  });
}
function initWrapperState$1(element, props) {
  var node = element;

  {
    checkSelectPropTypes(props);
  }

  node._wrapperState = {
    wasMultiple: !!props.multiple
  };

  {
    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
      error('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');

      didWarnValueDefaultValue$1 = true;
    }
  }
}
function postMountWrapper$2(element, props) {
  var node = element;
  node.multiple = !!props.multiple;
  var value = props.value;

  if (value != null) {
    updateOptions(node, !!props.multiple, value, false);
  } else if (props.defaultValue != null) {
    updateOptions(node, !!props.multiple, props.defaultValue, true);
  }
}
function postUpdateWrapper(element, props) {
  var node = element;
  var wasMultiple = node._wrapperState.wasMultiple;
  node._wrapperState.wasMultiple = !!props.multiple;
  var value = props.value;

  if (value != null) {
    updateOptions(node, !!props.multiple, value, false);
  } else if (wasMultiple !== !!props.multiple) {
    // For simplicity, reapply `defaultValue` if `multiple` is toggled.
    if (props.defaultValue != null) {
      updateOptions(node, !!props.multiple, props.defaultValue, true);
    } else {
      // Revert the select back to its default unselected state.
      updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
    }
  }
}
function restoreControlledState$1(element, props) {
  var node = element;
  var value = props.value;

  if (value != null) {
    updateOptions(node, !!props.multiple, value, false);
  }
}

var didWarnValDefaultVal = false;

/**
 * Implements a <textarea> host component that allows setting `value`, and
 * `defaultValue`. This differs from the traditional DOM API because value is
 * usually set as PCDATA children.
 *
 * If `value` is not supplied (or null/undefined), user actions that affect the
 * value will trigger updates to the element.
 *
 * If `value` is supplied (and not null/undefined), the rendered element will
 * not trigger updates to the element. Instead, the `value` prop must change in
 * order for the rendered element to be updated.
 *
 * The rendered element will be initialized with an empty value, the prop
 * `defaultValue` if specified, or the children content (deprecated).
 */
function getHostProps$3(element, props) {
  var node = element;

  if (!(props.dangerouslySetInnerHTML == null)) {
    {
      throw Error( "`dangerouslySetInnerHTML` does not make sense on <textarea>." );
    }
  } // Always set children to the same thing. In IE9, the selection range will
  // get reset if `textContent` is mutated.  We could add a check in setTextContent
  // to only set the value if/when the value differs from the node value (which would
  // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
  // solution. The value can be a boolean or object so that's why it's forced
  // to be a string.


  var hostProps = _assign({}, props, {
    value: undefined,
    defaultValue: undefined,
    children: toString(node._wrapperState.initialValue)
  });

  return hostProps;
}
function initWrapperState$2(element, props) {
  var node = element;

  {
    ReactControlledValuePropTypes.checkPropTypes('textarea', props);

    if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
      error('%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', getCurrentFiberOwnerNameInDevOrNull() || 'A component');

      didWarnValDefaultVal = true;
    }
  }

  var initialValue = props.value; // Only bother fetching default value if we're going to use it

  if (initialValue == null) {
    var children = props.children,
        defaultValue = props.defaultValue;

    if (children != null) {
      {
        error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
      }

      {
        if (!(defaultValue == null)) {
          {
            throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
          }
        }

        if (Array.isArray(children)) {
          if (!(children.length <= 1)) {
            {
              throw Error( "<textarea> can only have at most one child." );
            }
          }

          children = children[0];
        }

        defaultValue = children;
      }
    }

    if (defaultValue == null) {
      defaultValue = '';
    }

    initialValue = defaultValue;
  }

  node._wrapperState = {
    initialValue: getToStringValue(initialValue)
  };
}
function updateWrapper$1(element, props) {
  var node = element;
  var value = getToStringValue(props.value);
  var defaultValue = getToStringValue(props.defaultValue);

  if (value != null) {
    // Cast `value` to a string to ensure the value is set correctly. While
    // browsers typically do this as necessary, jsdom doesn't.
    var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed

    if (newValue !== node.value) {
      node.value = newValue;
    }

    if (props.defaultValue == null && node.defaultValue !== newValue) {
      node.defaultValue = newValue;
    }
  }

  if (defaultValue != null) {
    node.defaultValue = toString(defaultValue);
  }
}
function postMountWrapper$3(element, props) {
  var node = element; // This is in postMount because we need access to the DOM node, which is not
  // available until after the component has mounted.

  var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
  // initial value. In IE10/IE11 there is a bug where the placeholder attribute
  // will populate textContent as well.
  // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/

  if (textContent === node._wrapperState.initialValue) {
    if (textContent !== '' && textContent !== null) {
      node.value = textContent;
    }
  }
}
function restoreControlledState$2(element, props) {
  // DOM component is still mounted; update
  updateWrapper$1(element, props);
}

var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
var Namespaces = {
  html: HTML_NAMESPACE,
  mathml: MATH_NAMESPACE,
  svg: SVG_NAMESPACE
}; // Assumes there is no parent namespace.

function getIntrinsicNamespace(type) {
  switch (type) {
    case 'svg':
      return SVG_NAMESPACE;

    case 'math':
      return MATH_NAMESPACE;

    default:
      return HTML_NAMESPACE;
  }
}
function getChildNamespace(parentNamespace, type) {
  if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
    // No (or default) parent namespace: potential entry point.
    return getIntrinsicNamespace(type);
  }

  if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
    // We're leaving SVG.
    return HTML_NAMESPACE;
  } // By default, pass namespace below.


  return parentNamespace;
}

/* globals MSApp */

/**
 * Create a function which has 'unsafe' privileges (required by windows8 apps)
 */
var createMicrosoftUnsafeLocalFunction = function (func) {
  if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
    return function (arg0, arg1, arg2, arg3) {
      MSApp.execUnsafeLocalFunction(function () {
        return func(arg0, arg1, arg2, arg3);
      });
    };
  } else {
    return func;
  }
};

var reusableSVGContainer;
/**
 * Set the innerHTML property of a node
 *
 * @param {DOMElement} node
 * @param {string} html
 * @internal
 */

var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
  if (node.namespaceURI === Namespaces.svg) {

    if (!('innerHTML' in node)) {
      // IE does not have innerHTML for SVG nodes, so instead we inject the
      // new markup in a temp node and then move the child nodes across into
      // the target node
      reusableSVGContainer = reusableSVGContainer || document.createElement('div');
      reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
      var svgNode = reusableSVGContainer.firstChild;

      while (node.firstChild) {
        node.removeChild(node.firstChild);
      }

      while (svgNode.firstChild) {
        node.appendChild(svgNode.firstChild);
      }

      return;
    }
  }

  node.innerHTML = html;
});

/**
 * HTML nodeType values that represent the type of the node
 */
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var COMMENT_NODE = 8;
var DOCUMENT_NODE = 9;
var DOCUMENT_FRAGMENT_NODE = 11;

/**
 * Set the textContent property of a node. For text updates, it's faster
 * to set the `nodeValue` of the Text node directly instead of using
 * `.textContent` which will remove the existing node and create a new one.
 *
 * @param {DOMElement} node
 * @param {string} text
 * @internal
 */

var setTextContent = function (node, text) {
  if (text) {
    var firstChild = node.firstChild;

    if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
      firstChild.nodeValue = text;
      return;
    }
  }

  node.textContent = text;
};

// Do not use the below two methods directly!
// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.
// (It is the only module that is allowed to access these methods.)
function unsafeCastStringToDOMTopLevelType(topLevelType) {
  return topLevelType;
}
function unsafeCastDOMTopLevelTypeToString(topLevelType) {
  return topLevelType;
}

/**
 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
 *
 * @param {string} styleProp
 * @param {string} eventName
 * @returns {object}
 */

function makePrefixMap(styleProp, eventName) {
  var prefixes = {};
  prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
  prefixes['Webkit' + styleProp] = 'webkit' + eventName;
  prefixes['Moz' + styleProp] = 'moz' + eventName;
  return prefixes;
}
/**
 * A list of event names to a configurable list of vendor prefixes.
 */


var vendorPrefixes = {
  animationend: makePrefixMap('Animation', 'AnimationEnd'),
  animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
  animationstart: makePrefixMap('Animation', 'AnimationStart'),
  transitionend: makePrefixMap('Transition', 'TransitionEnd')
};
/**
 * Event names that have already been detected and prefixed (if applicable).
 */

var prefixedEventNames = {};
/**
 * Element to check for prefixes on.
 */

var style = {};
/**
 * Bootstrap if a DOM exists.
 */

if (canUseDOM) {
  style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
  // the un-prefixed "animation" and "transition" properties are defined on the
  // style object but the events that fire will still be prefixed, so we need
  // to check if the un-prefixed events are usable, and if not remove them from the map.

  if (!('AnimationEvent' in window)) {
    delete vendorPrefixes.animationend.animation;
    delete vendorPrefixes.animationiteration.animation;
    delete vendorPrefixes.animationstart.animation;
  } // Same as above


  if (!('TransitionEvent' in window)) {
    delete vendorPrefixes.transitionend.transition;
  }
}
/**
 * Attempts to determine the correct vendor prefixed event name.
 *
 * @param {string} eventName
 * @returns {string}
 */


function getVendorPrefixedEventName(eventName) {
  if (prefixedEventNames[eventName]) {
    return prefixedEventNames[eventName];
  } else if (!vendorPrefixes[eventName]) {
    return eventName;
  }

  var prefixMap = vendorPrefixes[eventName];

  for (var styleProp in prefixMap) {
    if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
      return prefixedEventNames[eventName] = prefixMap[styleProp];
    }
  }

  return eventName;
}

/**
 * To identify top level events in ReactDOM, we use constants defined by this
 * module. This is the only module that uses the unsafe* methods to express
 * that the constants actually correspond to the browser event names. This lets
 * us save some bundle size by avoiding a top level type -> event name map.
 * The rest of ReactDOM code should import top level types from this file.
 */

var TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');
var TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));
var TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));
var TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));
var TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');
var TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');
var TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');
var TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');
var TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');
var TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');
var TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');
var TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');
var TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');
var TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');
var TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');
var TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');
var TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');
var TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');
var TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');
var TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');
var TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');
var TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');
var TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');
var TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');
var TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');
var TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');
var TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');
var TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');
var TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');
var TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');
var TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');
var TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');
var TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');
var TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');
var TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');
var TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');
var TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');
var TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');
var TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');
var TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');
var TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');
var TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');
var TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');
var TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');
var TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');
var TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');
var TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');
var TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');
var TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');
var TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');
var TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');
var TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');
var TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');
var TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');
var TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');
var TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');
var TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');
var TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');
var TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');
var TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');
var TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');
var TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');
var TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');
var TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');
var TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');
var TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');
var TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');
var TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');
var TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');
var TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');
var TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');
var TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');
var TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');
var TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');
var TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');
var TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');
var TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));
var TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');
var TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');
var TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.
// Note that events in this list will *not* be listened to at the top level
// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.

var mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];
function getRawEventName(topLevelType) {
  return unsafeCastDOMTopLevelTypeToString(topLevelType);
}

var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // prettier-ignore

var elementListenerMap = new PossiblyWeakMap();
function getListenerMapForElement(element) {
  var listenerMap = elementListenerMap.get(element);

  if (listenerMap === undefined) {
    listenerMap = new Map();
    elementListenerMap.set(element, listenerMap);
  }

  return listenerMap;
}

/**
 * `ReactInstanceMap` maintains a mapping from a public facing stateful
 * instance (key) and the internal representation (value). This allows public
 * methods to accept the user facing instance as an argument and map them back
 * to internal methods.
 *
 * Note that this module is currently shared and assumed to be stateless.
 * If this becomes an actual Map, that will break.
 */
function get(key) {
  return key._reactInternalFiber;
}
function has(key) {
  return key._reactInternalFiber !== undefined;
}
function set(key, value) {
  key._reactInternalFiber = value;
}

// Don't change these two values. They're used by React Dev Tools.
var NoEffect =
/*              */
0;
var PerformedWork =
/*         */
1; // You can change the rest (and add more).

var Placement =
/*             */
2;
var Update =
/*                */
4;
var PlacementAndUpdate =
/*    */
6;
var Deletion =
/*              */
8;
var ContentReset =
/*          */
16;
var Callback =
/*              */
32;
var DidCapture =
/*            */
64;
var Ref =
/*                   */
128;
var Snapshot =
/*              */
256;
var Passive =
/*               */
512;
var Hydrating =
/*             */
1024;
var HydratingAndUpdate =
/*    */
1028; // Passive & Update & Callback & Ref & Snapshot

var LifecycleEffectMask =
/*   */
932; // Union of all host effects

var HostEffectMask =
/*        */
2047;
var Incomplete =
/*            */
2048;
var ShouldCapture =
/*         */
4096;

var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
function getNearestMountedFiber(fiber) {
  var node = fiber;
  var nearestMounted = fiber;

  if (!fiber.alternate) {
    // If there is no alternate, this might be a new tree that isn't inserted
    // yet. If it is, then it will have a pending insertion effect on it.
    var nextNode = node;

    do {
      node = nextNode;

      if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {
        // This is an insertion or in-progress hydration. The nearest possible
        // mounted fiber is the parent but we need to continue to figure out
        // if that one is still mounted.
        nearestMounted = node.return;
      }

      nextNode = node.return;
    } while (nextNode);
  } else {
    while (node.return) {
      node = node.return;
    }
  }

  if (node.tag === HostRoot) {
    // TODO: Check if this was a nested HostRoot when used with
    // renderContainerIntoSubtree.
    return nearestMounted;
  } // If we didn't hit the root, that means that we're in an disconnected tree
  // that has been unmounted.


  return null;
}
function getSuspenseInstanceFromFiber(fiber) {
  if (fiber.tag === SuspenseComponent) {
    var suspenseState = fiber.memoizedState;

    if (suspenseState === null) {
      var current = fiber.alternate;

      if (current !== null) {
        suspenseState = current.memoizedState;
      }
    }

    if (suspenseState !== null) {
      return suspenseState.dehydrated;
    }
  }

  return null;
}
function getContainerFromFiber(fiber) {
  return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
}
function isFiberMounted(fiber) {
  return getNearestMountedFiber(fiber) === fiber;
}
function isMounted(component) {
  {
    var owner = ReactCurrentOwner.current;

    if (owner !== null && owner.tag === ClassComponent) {
      var ownerFiber = owner;
      var instance = ownerFiber.stateNode;

      if (!instance._warnedAboutRefsInRender) {
        error('%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.', getComponentName(ownerFiber.type) || 'A component');
      }

      instance._warnedAboutRefsInRender = true;
    }
  }

  var fiber = get(component);

  if (!fiber) {
    return false;
  }

  return getNearestMountedFiber(fiber) === fiber;
}

function assertIsMounted(fiber) {
  if (!(getNearestMountedFiber(fiber) === fiber)) {
    {
      throw Error( "Unable to find node on an unmounted component." );
    }
  }
}

function findCurrentFiberUsingSlowPath(fiber) {
  var alternate = fiber.alternate;

  if (!alternate) {
    // If there is no alternate, then we only need to check if it is mounted.
    var nearestMounted = getNearestMountedFiber(fiber);

    if (!(nearestMounted !== null)) {
      {
        throw Error( "Unable to find node on an unmounted component." );
      }
    }

    if (nearestMounted !== fiber) {
      return null;
    }

    return fiber;
  } // If we have two possible branches, we'll walk backwards up to the root
  // to see what path the root points to. On the way we may hit one of the
  // special cases and we'll deal with them.


  var a = fiber;
  var b = alternate;

  while (true) {
    var parentA = a.return;

    if (parentA === null) {
      // We're at the root.
      break;
    }

    var parentB = parentA.alternate;

    if (parentB === null) {
      // There is no alternate. This is an unusual case. Currently, it only
      // happens when a Suspense component is hidden. An extra fragment fiber
      // is inserted in between the Suspense fiber and its children. Skip
      // over this extra fragment fiber and proceed to the next parent.
      var nextParent = parentA.return;

      if (nextParent !== null) {
        a = b = nextParent;
        continue;
      } // If there's no parent, we're at the root.


      break;
    } // If both copies of the parent fiber point to the same child, we can
    // assume that the child is current. This happens when we bailout on low
    // priority: the bailed out fiber's child reuses the current child.


    if (parentA.child === parentB.child) {
      var child = parentA.child;

      while (child) {
        if (child === a) {
          // We've determined that A is the current branch.
          assertIsMounted(parentA);
          return fiber;
        }

        if (child === b) {
          // We've determined that B is the current branch.
          assertIsMounted(parentA);
          return alternate;
        }

        child = child.sibling;
      } // We should never have an alternate for any mounting node. So the only
      // way this could possibly happen is if this was unmounted, if at all.


      {
        {
          throw Error( "Unable to find node on an unmounted component." );
        }
      }
    }

    if (a.return !== b.return) {
      // The return pointer of A and the return pointer of B point to different
      // fibers. We assume that return pointers never criss-cross, so A must
      // belong to the child set of A.return, and B must belong to the child
      // set of B.return.
      a = parentA;
      b = parentB;
    } else {
      // The return pointers point to the same fiber. We'll have to use the
      // default, slow path: scan the child sets of each parent alternate to see
      // which child belongs to which set.
      //
      // Search parent A's child set
      var didFindChild = false;
      var _child = parentA.child;

      while (_child) {
        if (_child === a) {
          didFindChild = true;
          a = parentA;
          b = parentB;
          break;
        }

        if (_child === b) {
          didFindChild = true;
          b = parentA;
          a = parentB;
          break;
        }

        _child = _child.sibling;
      }

      if (!didFindChild) {
        // Search parent B's child set
        _child = parentB.child;

        while (_child) {
          if (_child === a) {
            didFindChild = true;
            a = parentB;
            b = parentA;
            break;
          }

          if (_child === b) {
            didFindChild = true;
            b = parentB;
            a = parentA;
            break;
          }

          _child = _child.sibling;
        }

        if (!didFindChild) {
          {
            throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
          }
        }
      }
    }

    if (!(a.alternate === b)) {
      {
        throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
      }
    }
  } // If the root is not a host container, we're in a disconnected tree. I.e.
  // unmounted.


  if (!(a.tag === HostRoot)) {
    {
      throw Error( "Unable to find node on an unmounted component." );
    }
  }

  if (a.stateNode.current === a) {
    // We've determined that A is the current branch.
    return fiber;
  } // Otherwise B has to be current branch.


  return alternate;
}
function findCurrentHostFiber(parent) {
  var currentParent = findCurrentFiberUsingSlowPath(parent);

  if (!currentParent) {
    return null;
  } // Next we'll drill down this component to find the first HostComponent/Text.


  var node = currentParent;

  while (true) {
    if (node.tag === HostComponent || node.tag === HostText) {
      return node;
    } else if (node.child) {
      node.child.return = node;
      node = node.child;
      continue;
    }

    if (node === currentParent) {
      return null;
    }

    while (!node.sibling) {
      if (!node.return || node.return === currentParent) {
        return null;
      }

      node = node.return;
    }

    node.sibling.return = node.return;
    node = node.sibling;
  } // Flow needs the return null here, but ESLint complains about it.
  // eslint-disable-next-line no-unreachable


  return null;
}
function findCurrentHostFiberWithNoPortals(parent) {
  var currentParent = findCurrentFiberUsingSlowPath(parent);

  if (!currentParent) {
    return null;
  } // Next we'll drill down this component to find the first HostComponent/Text.


  var node = currentParent;

  while (true) {
    if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
      return node;
    } else if (node.child && node.tag !== HostPortal) {
      node.child.return = node;
      node = node.child;
      continue;
    }

    if (node === currentParent) {
      return null;
    }

    while (!node.sibling) {
      if (!node.return || node.return === currentParent) {
        return null;
      }

      node = node.return;
    }

    node.sibling.return = node.return;
    node = node.sibling;
  } // Flow needs the return null here, but ESLint complains about it.
  // eslint-disable-next-line no-unreachable


  return null;
}

/**
 * Accumulates items that must not be null or undefined into the first one. This
 * is used to conserve memory by avoiding array allocations, and thus sacrifices
 * API cleanness. Since `current` can be null before being passed in and not
 * null after this function, make sure to assign it back to `current`:
 *
 * `a = accumulateInto(a, b);`
 *
 * This API should be sparingly used. Try `accumulate` for something cleaner.
 *
 * @return {*|array<*>} An accumulation of items.
 */

function accumulateInto(current, next) {
  if (!(next != null)) {
    {
      throw Error( "accumulateInto(...): Accumulated items must not be null or undefined." );
    }
  }

  if (current == null) {
    return next;
  } // Both are not empty. Warning: Never call x.concat(y) when you are not
  // certain that x is an Array (x could be a string with concat method).


  if (Array.isArray(current)) {
    if (Array.isArray(next)) {
      current.push.apply(current, next);
      return current;
    }

    current.push(next);
    return current;
  }

  if (Array.isArray(next)) {
    // A bit too dangerous to mutate `next`.
    return [current].concat(next);
  }

  return [current, next];
}

/**
 * @param {array} arr an "accumulation" of items which is either an Array or
 * a single item. Useful when paired with the `accumulate` module. This is a
 * simple utility that allows us to reason about a collection of items, but
 * handling the case when there is exactly one item (and we do not need to
 * allocate an array).
 * @param {function} cb Callback invoked with each element or a collection.
 * @param {?} [scope] Scope used as `this` in a callback.
 */
function forEachAccumulated(arr, cb, scope) {
  if (Array.isArray(arr)) {
    arr.forEach(cb, scope);
  } else if (arr) {
    cb.call(scope, arr);
  }
}

/**
 * Internal queue of events that have accumulated their dispatches and are
 * waiting to have their dispatches executed.
 */

var eventQueue = null;
/**
 * Dispatches an event and releases it back into the pool, unless persistent.
 *
 * @param {?object} event Synthetic event to be dispatched.
 * @private
 */

var executeDispatchesAndRelease = function (event) {
  if (event) {
    executeDispatchesInOrder(event);

    if (!event.isPersistent()) {
      event.constructor.release(event);
    }
  }
};

var executeDispatchesAndReleaseTopLevel = function (e) {
  return executeDispatchesAndRelease(e);
};

function runEventsInBatch(events) {
  if (events !== null) {
    eventQueue = accumulateInto(eventQueue, events);
  } // Set `eventQueue` to null before processing it so that we can tell if more
  // events get enqueued while processing.


  var processingEventQueue = eventQueue;
  eventQueue = null;

  if (!processingEventQueue) {
    return;
  }

  forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);

  if (!!eventQueue) {
    {
      throw Error( "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented." );
    }
  } // This would be a good time to rethrow if any of the event handlers threw.


  rethrowCaughtError();
}

/**
 * Gets the target node from a native browser event by accounting for
 * inconsistencies in browser DOM APIs.
 *
 * @param {object} nativeEvent Native browser event.
 * @return {DOMEventTarget} Target node.
 */

function getEventTarget(nativeEvent) {
  // Fallback to nativeEvent.srcElement for IE9
  // https://github.com/facebook/react/issues/12506
  var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963

  if (target.correspondingUseElement) {
    target = target.correspondingUseElement;
  } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
  // @see http://www.quirksmode.org/js/events_properties.html


  return target.nodeType === TEXT_NODE ? target.parentNode : target;
}

/**
 * Checks if an event is supported in the current execution environment.
 *
 * NOTE: This will not work correctly for non-generic events such as `change`,
 * `reset`, `load`, `error`, and `select`.
 *
 * Borrows from Modernizr.
 *
 * @param {string} eventNameSuffix Event name, e.g. "click".
 * @return {boolean} True if the event is supported.
 * @internal
 * @license Modernizr 3.0.0pre (Custom Build) | MIT
 */

function isEventSupported(eventNameSuffix) {
  if (!canUseDOM) {
    return false;
  }

  var eventName = 'on' + eventNameSuffix;
  var isSupported = eventName in document;

  if (!isSupported) {
    var element = document.createElement('div');
    element.setAttribute(eventName, 'return;');
    isSupported = typeof element[eventName] === 'function';
  }

  return isSupported;
}

/**
 * Summary of `DOMEventPluginSystem` event handling:
 *
 *  - Top-level delegation is used to trap most native browser events. This
 *    may only occur in the main thread and is the responsibility of
 *    ReactDOMEventListener, which is injected and can therefore support
 *    pluggable event sources. This is the only work that occurs in the main
 *    thread.
 *
 *  - We normalize and de-duplicate events to account for browser quirks. This
 *    may be done in the worker thread.
 *
 *  - Forward these native events (with the associated top-level type used to
 *    trap it) to `EventPluginRegistry`, which in turn will ask plugins if they want
 *    to extract any synthetic events.
 *
 *  - The `EventPluginRegistry` will then process each event by annotating them with
 *    "dispatches", a sequence of listeners and IDs that care about that event.
 *
 *  - The `EventPluginRegistry` then dispatches the events.
 *
 * Overview of React and the event system:
 *
 * +------------+    .
 * |    DOM     |    .
 * +------------+    .
 *       |           .
 *       v           .
 * +------------+    .
 * | ReactEvent |    .
 * |  Listener  |    .
 * +------------+    .                         +-----------+
 *       |           .               +--------+|SimpleEvent|
 *       |           .               |         |Plugin     |
 * +-----|------+    .               v         +-----------+
 * |     |      |    .    +--------------+                    +------------+
 * |     +-----------.--->|PluginRegistry|                    |    Event   |
 * |            |    .    |              |     +-----------+  | Propagators|
 * | ReactEvent |    .    |              |     |TapEvent   |  |------------|
 * |  Emitter   |    .    |              |<---+|Plugin     |  |other plugin|
 * |            |    .    |              |     +-----------+  |  utilities |
 * |     +-----------.--->|              |                    +------------+
 * |     |      |    .    +--------------+
 * +-----|------+    .                ^        +-----------+
 *       |           .                |        |Enter/Leave|
 *       +           .                +-------+|Plugin     |
 * +-------------+   .                         +-----------+
 * | application |   .
 * |-------------|   .
 * |             |   .
 * |             |   .
 * +-------------+   .
 *                   .
 *    React Core     .  General Purpose Event Plugin System
 */

var CALLBACK_BOOKKEEPING_POOL_SIZE = 10;
var callbackBookkeepingPool = [];

function releaseTopLevelCallbackBookKeeping(instance) {
  instance.topLevelType = null;
  instance.nativeEvent = null;
  instance.targetInst = null;
  instance.ancestors.length = 0;

  if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {
    callbackBookkeepingPool.push(instance);
  }
} // Used to store ancestor hierarchy in top level callback


function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) {
  if (callbackBookkeepingPool.length) {
    var instance = callbackBookkeepingPool.pop();
    instance.topLevelType = topLevelType;
    instance.eventSystemFlags = eventSystemFlags;
    instance.nativeEvent = nativeEvent;
    instance.targetInst = targetInst;
    return instance;
  }

  return {
    topLevelType: topLevelType,
    eventSystemFlags: eventSystemFlags,
    nativeEvent: nativeEvent,
    targetInst: targetInst,
    ancestors: []
  };
}
/**
 * Find the deepest React component completely containing the root of the
 * passed-in instance (for use when entire React trees are nested within each
 * other). If React trees are not nested, returns null.
 */


function findRootContainerNode(inst) {
  if (inst.tag === HostRoot) {
    return inst.stateNode.containerInfo;
  } // TODO: It may be a good idea to cache this to prevent unnecessary DOM
  // traversal, but caching is difficult to do correctly without using a
  // mutation observer to listen for all DOM changes.


  while (inst.return) {
    inst = inst.return;
  }

  if (inst.tag !== HostRoot) {
    // This can happen if we're in a detached tree.
    return null;
  }

  return inst.stateNode.containerInfo;
}
/**
 * Allows registered plugins an opportunity to extract events from top-level
 * native browser events.
 *
 * @return {*} An accumulation of synthetic events.
 * @internal
 */


function extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
  var events = null;

  for (var i = 0; i < plugins.length; i++) {
    // Not every plugin in the ordering may be loaded at runtime.
    var possiblePlugin = plugins[i];

    if (possiblePlugin) {
      var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);

      if (extractedEvents) {
        events = accumulateInto(events, extractedEvents);
      }
    }
  }

  return events;
}

function runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
  var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
  runEventsInBatch(events);
}

function handleTopLevel(bookKeeping) {
  var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components.
  // It's important that we build the array of ancestors before calling any
  // event handlers, because event handlers can modify the DOM, leading to
  // inconsistencies with ReactMount's node cache. See #1105.

  var ancestor = targetInst;

  do {
    if (!ancestor) {
      var ancestors = bookKeeping.ancestors;
      ancestors.push(ancestor);
      break;
    }

    var root = findRootContainerNode(ancestor);

    if (!root) {
      break;
    }

    var tag = ancestor.tag;

    if (tag === HostComponent || tag === HostText) {
      bookKeeping.ancestors.push(ancestor);
    }

    ancestor = getClosestInstanceFromNode(root);
  } while (ancestor);

  for (var i = 0; i < bookKeeping.ancestors.length; i++) {
    targetInst = bookKeeping.ancestors[i];
    var eventTarget = getEventTarget(bookKeeping.nativeEvent);
    var topLevelType = bookKeeping.topLevelType;
    var nativeEvent = bookKeeping.nativeEvent;
    var eventSystemFlags = bookKeeping.eventSystemFlags; // If this is the first ancestor, we mark it on the system flags

    if (i === 0) {
      eventSystemFlags |= IS_FIRST_ANCESTOR;
    }

    runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, eventTarget, eventSystemFlags);
  }
}

function dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst) {
  var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags);

  try {
    // Event queue being processed in the same cycle allows
    // `preventDefault`.
    batchedEventUpdates(handleTopLevel, bookKeeping);
  } finally {
    releaseTopLevelCallbackBookKeeping(bookKeeping);
  }
}
/**
 * We listen for bubbled touch events on the document object.
 *
 * Firefox v8.01 (and possibly others) exhibited strange behavior when
 * mounting `onmousemove` events at some node that was not the document
 * element. The symptoms were that if your mouse is not moving over something
 * contained within that mount point (for example on the background) the
 * top-level listeners for `onmousemove` won't be called. However, if you
 * register the `mousemove` on the document object, then it will of course
 * catch all `mousemove`s. This along with iOS quirks, justifies restricting
 * top-level listeners to the document object only, at least for these
 * movement types of events and possibly all events.
 *
 * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
 *
 * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
 * they bubble to document.
 *
 * @param {string} registrationName Name of listener (e.g. `onClick`).
 * @param {object} mountAt Container where to mount the listener
 */

function legacyListenToEvent(registrationName, mountAt) {
  var listenerMap = getListenerMapForElement(mountAt);
  var dependencies = registrationNameDependencies[registrationName];

  for (var i = 0; i < dependencies.length; i++) {
    var dependency = dependencies[i];
    legacyListenToTopLevelEvent(dependency, mountAt, listenerMap);
  }
}
function legacyListenToTopLevelEvent(topLevelType, mountAt, listenerMap) {
  if (!listenerMap.has(topLevelType)) {
    switch (topLevelType) {
      case TOP_SCROLL:
        trapCapturedEvent(TOP_SCROLL, mountAt);
        break;

      case TOP_FOCUS:
      case TOP_BLUR:
        trapCapturedEvent(TOP_FOCUS, mountAt);
        trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function,
        // but this ensures we mark both as attached rather than just one.

        listenerMap.set(TOP_BLUR, null);
        listenerMap.set(TOP_FOCUS, null);
        break;

      case TOP_CANCEL:
      case TOP_CLOSE:
        if (isEventSupported(getRawEventName(topLevelType))) {
          trapCapturedEvent(topLevelType, mountAt);
        }

        break;

      case TOP_INVALID:
      case TOP_SUBMIT:
      case TOP_RESET:
        // We listen to them on the target DOM elements.
        // Some of them bubble so we don't want them to fire twice.
        break;

      default:
        // By default, listen on the top level to all non-media events.
        // Media events don't bubble so adding the listener wouldn't do anything.
        var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1;

        if (!isMediaEvent) {
          trapBubbledEvent(topLevelType, mountAt);
        }

        break;
    }

    listenerMap.set(topLevelType, null);
  }
}
function isListeningToAllDependencies(registrationName, mountAt) {
  var listenerMap = getListenerMapForElement(mountAt);
  var dependencies = registrationNameDependencies[registrationName];

  for (var i = 0; i < dependencies.length; i++) {
    var dependency = dependencies[i];

    if (!listenerMap.has(dependency)) {
      return false;
    }
  }

  return true;
}

var attemptUserBlockingHydration;
function setAttemptUserBlockingHydration(fn) {
  attemptUserBlockingHydration = fn;
}
var attemptContinuousHydration;
function setAttemptContinuousHydration(fn) {
  attemptContinuousHydration = fn;
}
var attemptHydrationAtCurrentPriority;
function setAttemptHydrationAtCurrentPriority(fn) {
  attemptHydrationAtCurrentPriority = fn;
} // TODO: Upgrade this definition once we're on a newer version of Flow that
var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.

var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
// if the last target was dehydrated.

var queuedFocus = null;
var queuedDrag = null;
var queuedMouse = null; // For pointer events there can be one latest event per pointerId.

var queuedPointers = new Map();
var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.

var queuedExplicitHydrationTargets = [];
function hasQueuedDiscreteEvents() {
  return queuedDiscreteEvents.length > 0;
}
var discreteReplayableEvents = [TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_TOUCH_START, TOP_AUX_CLICK, TOP_DOUBLE_CLICK, TOP_POINTER_CANCEL, TOP_POINTER_DOWN, TOP_POINTER_UP, TOP_DRAG_END, TOP_DRAG_START, TOP_DROP, TOP_COMPOSITION_END, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_INPUT, TOP_TEXT_INPUT, TOP_CLOSE, TOP_CANCEL, TOP_COPY, TOP_CUT, TOP_PASTE, TOP_CLICK, TOP_CHANGE, TOP_CONTEXT_MENU, TOP_RESET, TOP_SUBMIT];
var continuousReplayableEvents = [TOP_FOCUS, TOP_BLUR, TOP_DRAG_ENTER, TOP_DRAG_LEAVE, TOP_MOUSE_OVER, TOP_MOUSE_OUT, TOP_POINTER_OVER, TOP_POINTER_OUT, TOP_GOT_POINTER_CAPTURE, TOP_LOST_POINTER_CAPTURE];
function isReplayableDiscreteEvent(eventType) {
  return discreteReplayableEvents.indexOf(eventType) > -1;
}

function trapReplayableEventForDocument(topLevelType, document, listenerMap) {
  legacyListenToTopLevelEvent(topLevelType, document, listenerMap);
}

function eagerlyTrapReplayableEvents(container, document) {
  var listenerMapForDoc = getListenerMapForElement(document); // Discrete

  discreteReplayableEvents.forEach(function (topLevelType) {
    trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
  }); // Continuous

  continuousReplayableEvents.forEach(function (topLevelType) {
    trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);
  });
}

function createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
  return {
    blockedOn: blockedOn,
    topLevelType: topLevelType,
    eventSystemFlags: eventSystemFlags | IS_REPLAYED,
    nativeEvent: nativeEvent,
    container: container
  };
}

function queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
  var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
  queuedDiscreteEvents.push(queuedEvent);
} // Resets the replaying for this type of continuous event to no event.

function clearIfContinuousEvent(topLevelType, nativeEvent) {
  switch (topLevelType) {
    case TOP_FOCUS:
    case TOP_BLUR:
      queuedFocus = null;
      break;

    case TOP_DRAG_ENTER:
    case TOP_DRAG_LEAVE:
      queuedDrag = null;
      break;

    case TOP_MOUSE_OVER:
    case TOP_MOUSE_OUT:
      queuedMouse = null;
      break;

    case TOP_POINTER_OVER:
    case TOP_POINTER_OUT:
      {
        var pointerId = nativeEvent.pointerId;
        queuedPointers.delete(pointerId);
        break;
      }

    case TOP_GOT_POINTER_CAPTURE:
    case TOP_LOST_POINTER_CAPTURE:
      {
        var _pointerId = nativeEvent.pointerId;
        queuedPointerCaptures.delete(_pointerId);
        break;
      }
  }
}

function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
  if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
    var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);

    if (blockedOn !== null) {
      var _fiber2 = getInstanceFromNode$1(blockedOn);

      if (_fiber2 !== null) {
        // Attempt to increase the priority of this target.
        attemptContinuousHydration(_fiber2);
      }
    }

    return queuedEvent;
  } // If we have already queued this exact event, then it's because
  // the different event systems have different DOM event listeners.
  // We can accumulate the flags and store a single event to be
  // replayed.


  existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
  return existingQueuedEvent;
}

function queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {
  // These set relatedTarget to null because the replayed event will be treated as if we
  // moved from outside the window (no target) onto the target once it hydrates.
  // Instead of mutating we could clone the event.
  switch (topLevelType) {
    case TOP_FOCUS:
      {
        var focusEvent = nativeEvent;
        queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, topLevelType, eventSystemFlags, container, focusEvent);
        return true;
      }

    case TOP_DRAG_ENTER:
      {
        var dragEvent = nativeEvent;
        queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, topLevelType, eventSystemFlags, container, dragEvent);
        return true;
      }

    case TOP_MOUSE_OVER:
      {
        var mouseEvent = nativeEvent;
        queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, topLevelType, eventSystemFlags, container, mouseEvent);
        return true;
      }

    case TOP_POINTER_OVER:
      {
        var pointerEvent = nativeEvent;
        var pointerId = pointerEvent.pointerId;
        queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, topLevelType, eventSystemFlags, container, pointerEvent));
        return true;
      }

    case TOP_GOT_POINTER_CAPTURE:
      {
        var _pointerEvent = nativeEvent;
        var _pointerId2 = _pointerEvent.pointerId;
        queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, topLevelType, eventSystemFlags, container, _pointerEvent));
        return true;
      }
  }

  return false;
} // Check if this target is unblocked. Returns true if it's unblocked.

function attemptExplicitHydrationTarget(queuedTarget) {
  // TODO: This function shares a lot of logic with attemptToDispatchEvent.
  // Try to unify them. It's a bit tricky since it would require two return
  // values.
  var targetInst = getClosestInstanceFromNode(queuedTarget.target);

  if (targetInst !== null) {
    var nearestMounted = getNearestMountedFiber(targetInst);

    if (nearestMounted !== null) {
      var tag = nearestMounted.tag;

      if (tag === SuspenseComponent) {
        var instance = getSuspenseInstanceFromFiber(nearestMounted);

        if (instance !== null) {
          // We're blocked on hydrating this boundary.
          // Increase its priority.
          queuedTarget.blockedOn = instance;
          Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {
            attemptHydrationAtCurrentPriority(nearestMounted);
          });
          return;
        }
      } else if (tag === HostRoot) {
        var root = nearestMounted.stateNode;

        if (root.hydrate) {
          queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
          // a root other than sync.

          return;
        }
      }
    }
  }

  queuedTarget.blockedOn = null;
}

function attemptReplayContinuousQueuedEvent(queuedEvent) {
  if (queuedEvent.blockedOn !== null) {
    return false;
  }

  var nextBlockedOn = attemptToDispatchEvent(queuedEvent.topLevelType, queuedEvent.eventSystemFlags, queuedEvent.container, queuedEvent.nativeEvent);

  if (nextBlockedOn !== null) {
    // We're still blocked. Try again later.
    var _fiber3 = getInstanceFromNode$1(nextBlockedOn);

    if (_fiber3 !== null) {
      attemptContinuousHydration(_fiber3);
    }

    queuedEvent.blockedOn = nextBlockedOn;
    return false;
  }

  return true;
}

function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
  if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
    map.delete(key);
  }
}

function replayUnblockedEvents() {
  hasScheduledReplayAttempt = false; // First replay discrete events.

  while (queuedDiscreteEvents.length > 0) {
    var nextDiscreteEvent = queuedDiscreteEvents[0];

    if (nextDiscreteEvent.blockedOn !== null) {
      // We're still blocked.
      // Increase the priority of this boundary to unblock
      // the next discrete event.
      var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);

      if (_fiber4 !== null) {
        attemptUserBlockingHydration(_fiber4);
      }

      break;
    }

    var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.topLevelType, nextDiscreteEvent.eventSystemFlags, nextDiscreteEvent.container, nextDiscreteEvent.nativeEvent);

    if (nextBlockedOn !== null) {
      // We're still blocked. Try again later.
      nextDiscreteEvent.blockedOn = nextBlockedOn;
    } else {
      // We've successfully replayed the first event. Let's try the next one.
      queuedDiscreteEvents.shift();
    }
  } // Next replay any continuous events.


  if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
    queuedFocus = null;
  }

  if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
    queuedDrag = null;
  }

  if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
    queuedMouse = null;
  }

  queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
  queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
}

function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
  if (queuedEvent.blockedOn === unblocked) {
    queuedEvent.blockedOn = null;

    if (!hasScheduledReplayAttempt) {
      hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
      // now unblocked. This first might not actually be unblocked yet.
      // We could check it early to avoid scheduling an unnecessary callback.

      Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
    }
  }
}

function retryIfBlockedOn(unblocked) {
  // Mark anything that was blocked on this as no longer blocked
  // and eligible for a replay.
  if (queuedDiscreteEvents.length > 0) {
    scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
    // worth it because we expect very few discrete events to queue up and once
    // we are actually fully unblocked it will be fast to replay them.

    for (var i = 1; i < queuedDiscreteEvents.length; i++) {
      var queuedEvent = queuedDiscreteEvents[i];

      if (queuedEvent.blockedOn === unblocked) {
        queuedEvent.blockedOn = null;
      }
    }
  }

  if (queuedFocus !== null) {
    scheduleCallbackIfUnblocked(queuedFocus, unblocked);
  }

  if (queuedDrag !== null) {
    scheduleCallbackIfUnblocked(queuedDrag, unblocked);
  }

  if (queuedMouse !== null) {
    scheduleCallbackIfUnblocked(queuedMouse, unblocked);
  }

  var unblock = function (queuedEvent) {
    return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
  };

  queuedPointers.forEach(unblock);
  queuedPointerCaptures.forEach(unblock);

  for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
    var queuedTarget = queuedExplicitHydrationTargets[_i];

    if (queuedTarget.blockedOn === unblocked) {
      queuedTarget.blockedOn = null;
    }
  }

  while (queuedExplicitHydrationTargets.length > 0) {
    var nextExplicitTarget = queuedExplicitHydrationTargets[0];

    if (nextExplicitTarget.blockedOn !== null) {
      // We're still blocked.
      break;
    } else {
      attemptExplicitHydrationTarget(nextExplicitTarget);

      if (nextExplicitTarget.blockedOn === null) {
        // We're unblocked.
        queuedExplicitHydrationTargets.shift();
      }
    }
  }
}

function addEventBubbleListener(element, eventType, listener) {
  element.addEventListener(eventType, listener, false);
}
function addEventCaptureListener(element, eventType, listener) {
  element.addEventListener(eventType, listener, true);
}

// do it in two places, which duplicates logic
// and increases the bundle size, we do it all
// here once. If we remove or refactor the
// SimpleEventPlugin, we should also remove or
// update the below line.

var simpleEventPluginEventTypes = {};
var topLevelEventsToDispatchConfig = new Map();
var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
// the code required to apply the same logic for event prioritization and that of the
// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
// duplication (for which there would be quite a bit). For the events that are not needed
// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
// array of top level events.
// Lastly, we ignore prettier so we can keep the formatting sane.
// prettier-ignore

var discreteEventPairsForSimpleEventPlugin = [TOP_BLUR, 'blur', TOP_CANCEL, 'cancel', TOP_CLICK, 'click', TOP_CLOSE, 'close', TOP_CONTEXT_MENU, 'contextMenu', TOP_COPY, 'copy', TOP_CUT, 'cut', TOP_AUX_CLICK, 'auxClick', TOP_DOUBLE_CLICK, 'doubleClick', TOP_DRAG_END, 'dragEnd', TOP_DRAG_START, 'dragStart', TOP_DROP, 'drop', TOP_FOCUS, 'focus', TOP_INPUT, 'input', TOP_INVALID, 'invalid', TOP_KEY_DOWN, 'keyDown', TOP_KEY_PRESS, 'keyPress', TOP_KEY_UP, 'keyUp', TOP_MOUSE_DOWN, 'mouseDown', TOP_MOUSE_UP, 'mouseUp', TOP_PASTE, 'paste', TOP_PAUSE, 'pause', TOP_PLAY, 'play', TOP_POINTER_CANCEL, 'pointerCancel', TOP_POINTER_DOWN, 'pointerDown', TOP_POINTER_UP, 'pointerUp', TOP_RATE_CHANGE, 'rateChange', TOP_RESET, 'reset', TOP_SEEKED, 'seeked', TOP_SUBMIT, 'submit', TOP_TOUCH_CANCEL, 'touchCancel', TOP_TOUCH_END, 'touchEnd', TOP_TOUCH_START, 'touchStart', TOP_VOLUME_CHANGE, 'volumeChange'];
var otherDiscreteEvents = [TOP_CHANGE, TOP_SELECTION_CHANGE, TOP_TEXT_INPUT, TOP_COMPOSITION_START, TOP_COMPOSITION_END, TOP_COMPOSITION_UPDATE]; // prettier-ignore

var userBlockingPairsForSimpleEventPlugin = [TOP_DRAG, 'drag', TOP_DRAG_ENTER, 'dragEnter', TOP_DRAG_EXIT, 'dragExit', TOP_DRAG_LEAVE, 'dragLeave', TOP_DRAG_OVER, 'dragOver', TOP_MOUSE_MOVE, 'mouseMove', TOP_MOUSE_OUT, 'mouseOut', TOP_MOUSE_OVER, 'mouseOver', TOP_POINTER_MOVE, 'pointerMove', TOP_POINTER_OUT, 'pointerOut', TOP_POINTER_OVER, 'pointerOver', TOP_SCROLL, 'scroll', TOP_TOGGLE, 'toggle', TOP_TOUCH_MOVE, 'touchMove', TOP_WHEEL, 'wheel']; // prettier-ignore

var continuousPairsForSimpleEventPlugin = [TOP_ABORT, 'abort', TOP_ANIMATION_END, 'animationEnd', TOP_ANIMATION_ITERATION, 'animationIteration', TOP_ANIMATION_START, 'animationStart', TOP_CAN_PLAY, 'canPlay', TOP_CAN_PLAY_THROUGH, 'canPlayThrough', TOP_DURATION_CHANGE, 'durationChange', TOP_EMPTIED, 'emptied', TOP_ENCRYPTED, 'encrypted', TOP_ENDED, 'ended', TOP_ERROR, 'error', TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', TOP_LOAD, 'load', TOP_LOADED_DATA, 'loadedData', TOP_LOADED_METADATA, 'loadedMetadata', TOP_LOAD_START, 'loadStart', TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', TOP_PLAYING, 'playing', TOP_PROGRESS, 'progress', TOP_SEEKING, 'seeking', TOP_STALLED, 'stalled', TOP_SUSPEND, 'suspend', TOP_TIME_UPDATE, 'timeUpdate', TOP_TRANSITION_END, 'transitionEnd', TOP_WAITING, 'waiting'];
/**
 * Turns
 * ['abort', ...]
 * into
 * eventTypes = {
 *   'abort': {
 *     phasedRegistrationNames: {
 *       bubbled: 'onAbort',
 *       captured: 'onAbortCapture',
 *     },
 *     dependencies: [TOP_ABORT],
 *   },
 *   ...
 * };
 * topLevelEventsToDispatchConfig = new Map([
 *   [TOP_ABORT, { sameConfig }],
 * ]);
 */

function processSimpleEventPluginPairsByPriority(eventTypes, priority) {
  // As the event types are in pairs of two, we need to iterate
  // through in twos. The events are in pairs of two to save code
  // and improve init perf of processing this array, as it will
  // result in far fewer object allocations and property accesses
  // if we only use three arrays to process all the categories of
  // instead of tuples.
  for (var i = 0; i < eventTypes.length; i += 2) {
    var topEvent = eventTypes[i];
    var event = eventTypes[i + 1];
    var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
    var onEvent = 'on' + capitalizedEvent;
    var config = {
      phasedRegistrationNames: {
        bubbled: onEvent,
        captured: onEvent + 'Capture'
      },
      dependencies: [topEvent],
      eventPriority: priority
    };
    eventPriorities.set(topEvent, priority);
    topLevelEventsToDispatchConfig.set(topEvent, config);
    simpleEventPluginEventTypes[event] = config;
  }
}

function processTopEventPairsByPriority(eventTypes, priority) {
  for (var i = 0; i < eventTypes.length; i++) {
    eventPriorities.set(eventTypes[i], priority);
  }
} // SimpleEventPlugin


processSimpleEventPluginPairsByPriority(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
processSimpleEventPluginPairsByPriority(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
processSimpleEventPluginPairsByPriority(continuousPairsForSimpleEventPlugin, ContinuousEvent); // Not used by SimpleEventPlugin

processTopEventPairsByPriority(otherDiscreteEvents, DiscreteEvent);
function getEventPriorityForPluginSystem(topLevelType) {
  var priority = eventPriorities.get(topLevelType); // Default to a ContinuousEvent. Note: we might
  // want to warn if we can't detect the priority
  // for the event.

  return priority === undefined ? ContinuousEvent : priority;
}

// Intentionally not named imports because Rollup would use dynamic dispatch for
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
    runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?

var _enabled = true;
function setEnabled(enabled) {
  _enabled = !!enabled;
}
function isEnabled() {
  return _enabled;
}
function trapBubbledEvent(topLevelType, element) {
  trapEventForPluginEventSystem(element, topLevelType, false);
}
function trapCapturedEvent(topLevelType, element) {
  trapEventForPluginEventSystem(element, topLevelType, true);
}

function trapEventForPluginEventSystem(container, topLevelType, capture) {
  var listener;

  switch (getEventPriorityForPluginSystem(topLevelType)) {
    case DiscreteEvent:
      listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
      break;

    case UserBlockingEvent:
      listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
      break;

    case ContinuousEvent:
    default:
      listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);
      break;
  }

  var rawEventName = getRawEventName(topLevelType);

  if (capture) {
    addEventCaptureListener(container, rawEventName, listener);
  } else {
    addEventBubbleListener(container, rawEventName, listener);
  }
}

function dispatchDiscreteEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
  flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
  discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, container, nativeEvent);
}

function dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, container, nativeEvent) {
  runWithPriority(UserBlockingPriority, dispatchEvent.bind(null, topLevelType, eventSystemFlags, container, nativeEvent));
}

function dispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
  if (!_enabled) {
    return;
  }

  if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) {
    // If we already have a queue of discrete events, and this is another discrete
    // event, then we can't dispatch it regardless of its target, since they
    // need to dispatch in order.
    queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
    topLevelType, eventSystemFlags, container, nativeEvent);
    return;
  }

  var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent);

  if (blockedOn === null) {
    // We successfully dispatched this event.
    clearIfContinuousEvent(topLevelType, nativeEvent);
    return;
  }

  if (isReplayableDiscreteEvent(topLevelType)) {
    // This this to be replayed later once the target is available.
    queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);
    return;
  }

  if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent)) {
    return;
  } // We need to clear only if we didn't queue because
  // queueing is accummulative.


  clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target,
  // in case the event system needs to trace it.

  {
    dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null);
  }
} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.

function attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {
  // TODO: Warn if _enabled is false.
  var nativeEventTarget = getEventTarget(nativeEvent);
  var targetInst = getClosestInstanceFromNode(nativeEventTarget);

  if (targetInst !== null) {
    var nearestMounted = getNearestMountedFiber(targetInst);

    if (nearestMounted === null) {
      // This tree has been unmounted already. Dispatch without a target.
      targetInst = null;
    } else {
      var tag = nearestMounted.tag;

      if (tag === SuspenseComponent) {
        var instance = getSuspenseInstanceFromFiber(nearestMounted);

        if (instance !== null) {
          // Queue the event to be replayed later. Abort dispatching since we
          // don't want this event dispatched twice through the event system.
          // TODO: If this is the first discrete event in the queue. Schedule an increased
          // priority for this boundary.
          return instance;
        } // This shouldn't happen, something went wrong but to avoid blocking
        // the whole system, dispatch the event without a target.
        // TODO: Warn.


        targetInst = null;
      } else if (tag === HostRoot) {
        var root = nearestMounted.stateNode;

        if (root.hydrate) {
          // If this happens during a replay something went wrong and it might block
          // the whole system.
          return getContainerFromFiber(nearestMounted);
        }

        targetInst = null;
      } else if (nearestMounted !== targetInst) {
        // If we get an event (ex: img onload) before committing that
        // component's mount, ignore it for now (that is, treat it as if it was an
        // event on a non-React tree). We might also consider queueing events and
        // dispatching them after the mount.
        targetInst = null;
      }
    }
  }

  {
    dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);
  } // We're not blocked on anything.


  return null;
}

// List derived from Gecko source code:
// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
var shorthandToLonghand = {
  animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
  background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
  backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
  border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
  borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
  borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
  borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
  borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
  borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
  borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
  borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
  borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
  borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
  borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
  borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
  borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
  borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
  columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
  columns: ['columnCount', 'columnWidth'],
  flex: ['flexBasis', 'flexGrow', 'flexShrink'],
  flexFlow: ['flexDirection', 'flexWrap'],
  font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
  fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
  gap: ['columnGap', 'rowGap'],
  grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
  gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
  gridColumn: ['gridColumnEnd', 'gridColumnStart'],
  gridColumnGap: ['columnGap'],
  gridGap: ['columnGap', 'rowGap'],
  gridRow: ['gridRowEnd', 'gridRowStart'],
  gridRowGap: ['rowGap'],
  gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
  listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
  margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
  marker: ['markerEnd', 'markerMid', 'markerStart'],
  mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
  maskPosition: ['maskPositionX', 'maskPositionY'],
  outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
  overflow: ['overflowX', 'overflowY'],
  padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
  placeContent: ['alignContent', 'justifyContent'],
  placeItems: ['alignItems', 'justifyItems'],
  placeSelf: ['alignSelf', 'justifySelf'],
  textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
  textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
  transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
  wordWrap: ['overflowWrap']
};

/**
 * CSS properties which accept numbers but are not in units of "px".
 */
var isUnitlessNumber = {
  animationIterationCount: true,
  borderImageOutset: true,
  borderImageSlice: true,
  borderImageWidth: true,
  boxFlex: true,
  boxFlexGroup: true,
  boxOrdinalGroup: true,
  columnCount: true,
  columns: true,
  flex: true,
  flexGrow: true,
  flexPositive: true,
  flexShrink: true,
  flexNegative: true,
  flexOrder: true,
  gridArea: true,
  gridRow: true,
  gridRowEnd: true,
  gridRowSpan: true,
  gridRowStart: true,
  gridColumn: true,
  gridColumnEnd: true,
  gridColumnSpan: true,
  gridColumnStart: true,
  fontWeight: true,
  lineClamp: true,
  lineHeight: true,
  opacity: true,
  order: true,
  orphans: true,
  tabSize: true,
  widows: true,
  zIndex: true,
  zoom: true,
  // SVG-related properties
  fillOpacity: true,
  floodOpacity: true,
  stopOpacity: true,
  strokeDasharray: true,
  strokeDashoffset: true,
  strokeMiterlimit: true,
  strokeOpacity: true,
  strokeWidth: true
};
/**
 * @param {string} prefix vendor-specific prefix, eg: Webkit
 * @param {string} key style name, eg: transitionDuration
 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
 * WebkitTransitionDuration
 */

function prefixKey(prefix, key) {
  return prefix + key.charAt(0).toUpperCase() + key.substring(1);
}
/**
 * Support style names that may come passed in prefixed by adding permutations
 * of vendor prefixes.
 */


var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
// infinite loop, because it iterates over the newly added props too.

Object.keys(isUnitlessNumber).forEach(function (prop) {
  prefixes.forEach(function (prefix) {
    isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
  });
});

/**
 * Convert a value into the proper css writable value. The style name `name`
 * should be logical (no hyphens), as specified
 * in `CSSProperty.isUnitlessNumber`.
 *
 * @param {string} name CSS property name such as `topMargin`.
 * @param {*} value CSS property value such as `10px`.
 * @return {string} Normalized style value with dimensions applied.
 */

function dangerousStyleValue(name, value, isCustomProperty) {
  // Note that we've removed escapeTextForBrowser() calls here since the
  // whole string will be escaped when the attribute is injected into
  // the markup. If you provide unsafe user data here they can inject
  // arbitrary CSS which may be problematic (I couldn't repro this):
  // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
  // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
  // This is not an XSS hole but instead a potential CSS injection issue
  // which has lead to a greater discussion about how we're going to
  // trust URLs moving forward. See #2115901
  var isEmpty = value == null || typeof value === 'boolean' || value === '';

  if (isEmpty) {
    return '';
  }

  if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
    return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
  }

  return ('' + value).trim();
}

var uppercasePattern = /([A-Z])/g;
var msPattern = /^ms-/;
/**
 * Hyphenates a camelcased CSS property name, for example:
 *
 *   > hyphenateStyleName('backgroundColor')
 *   < "background-color"
 *   > hyphenateStyleName('MozTransition')
 *   < "-moz-transition"
 *   > hyphenateStyleName('msTransition')
 *   < "-ms-transition"
 *
 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
 * is converted to `-ms-`.
 */

function hyphenateStyleName(name) {
  return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
}

var warnValidStyle = function () {};

{
  // 'msTransform' is correct, but the other prefixes should be capitalized
  var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
  var msPattern$1 = /^-ms-/;
  var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon

  var badStyleValueWithSemicolonPattern = /;\s*$/;
  var warnedStyleNames = {};
  var warnedStyleValues = {};
  var warnedForNaNValue = false;
  var warnedForInfinityValue = false;

  var camelize = function (string) {
    return string.replace(hyphenPattern, function (_, character) {
      return character.toUpperCase();
    });
  };

  var warnHyphenatedStyleName = function (name) {
    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
      return;
    }

    warnedStyleNames[name] = true;

    error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
    // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
    // is converted to lowercase `ms`.
    camelize(name.replace(msPattern$1, 'ms-')));
  };

  var warnBadVendoredStyleName = function (name) {
    if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
      return;
    }

    warnedStyleNames[name] = true;

    error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
  };

  var warnStyleValueWithSemicolon = function (name, value) {
    if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
      return;
    }

    warnedStyleValues[value] = true;

    error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
  };

  var warnStyleValueIsNaN = function (name, value) {
    if (warnedForNaNValue) {
      return;
    }

    warnedForNaNValue = true;

    error('`NaN` is an invalid value for the `%s` css style property.', name);
  };

  var warnStyleValueIsInfinity = function (name, value) {
    if (warnedForInfinityValue) {
      return;
    }

    warnedForInfinityValue = true;

    error('`Infinity` is an invalid value for the `%s` css style property.', name);
  };

  warnValidStyle = function (name, value) {
    if (name.indexOf('-') > -1) {
      warnHyphenatedStyleName(name);
    } else if (badVendoredStyleNamePattern.test(name)) {
      warnBadVendoredStyleName(name);
    } else if (badStyleValueWithSemicolonPattern.test(value)) {
      warnStyleValueWithSemicolon(name, value);
    }

    if (typeof value === 'number') {
      if (isNaN(value)) {
        warnStyleValueIsNaN(name, value);
      } else if (!isFinite(value)) {
        warnStyleValueIsInfinity(name, value);
      }
    }
  };
}

var warnValidStyle$1 = warnValidStyle;

/**
 * Operations for dealing with CSS properties.
 */

/**
 * This creates a string that is expected to be equivalent to the style
 * attribute generated by server-side rendering. It by-passes warnings and
 * security checks so it's not safe to use this value for anything other than
 * comparison. It is only used in DEV for SSR validation.
 */

function createDangerousStringForStyles(styles) {
  {
    var serialized = '';
    var delimiter = '';

    for (var styleName in styles) {
      if (!styles.hasOwnProperty(styleName)) {
        continue;
      }

      var styleValue = styles[styleName];

      if (styleValue != null) {
        var isCustomProperty = styleName.indexOf('--') === 0;
        serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
        serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
        delimiter = ';';
      }
    }

    return serialized || null;
  }
}
/**
 * Sets the value for multiple styles on a node.  If a value is specified as
 * '' (empty string), the corresponding style property will be unset.
 *
 * @param {DOMElement} node
 * @param {object} styles
 */

function setValueForStyles(node, styles) {
  var style = node.style;

  for (var styleName in styles) {
    if (!styles.hasOwnProperty(styleName)) {
      continue;
    }

    var isCustomProperty = styleName.indexOf('--') === 0;

    {
      if (!isCustomProperty) {
        warnValidStyle$1(styleName, styles[styleName]);
      }
    }

    var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);

    if (styleName === 'float') {
      styleName = 'cssFloat';
    }

    if (isCustomProperty) {
      style.setProperty(styleName, styleValue);
    } else {
      style[styleName] = styleValue;
    }
  }
}

function isValueEmpty(value) {
  return value == null || typeof value === 'boolean' || value === '';
}
/**
 * Given {color: 'red', overflow: 'hidden'} returns {
 *   color: 'color',
 *   overflowX: 'overflow',
 *   overflowY: 'overflow',
 * }. This can be read as "the overflowY property was set by the overflow
 * shorthand". That is, the values are the property that each was derived from.
 */


function expandShorthandMap(styles) {
  var expanded = {};

  for (var key in styles) {
    var longhands = shorthandToLonghand[key] || [key];

    for (var i = 0; i < longhands.length; i++) {
      expanded[longhands[i]] = key;
    }
  }

  return expanded;
}
/**
 * When mixing shorthand and longhand property names, we warn during updates if
 * we expect an incorrect result to occur. In particular, we warn for:
 *
 * Updating a shorthand property (longhand gets overwritten):
 *   {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
 *   becomes .style.font = 'baz'
 * Removing a shorthand property (longhand gets lost too):
 *   {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
 *   becomes .style.font = ''
 * Removing a longhand property (should revert to shorthand; doesn't):
 *   {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
 *   becomes .style.fontVariant = ''
 */


function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
  {

    if (!nextStyles) {
      return;
    }

    var expandedUpdates = expandShorthandMap(styleUpdates);
    var expandedStyles = expandShorthandMap(nextStyles);
    var warnedAbout = {};

    for (var key in expandedUpdates) {
      var originalKey = expandedUpdates[key];
      var correctOriginalKey = expandedStyles[key];

      if (correctOriginalKey && originalKey !== correctOriginalKey) {
        var warningKey = originalKey + ',' + correctOriginalKey;

        if (warnedAbout[warningKey]) {
          continue;
        }

        warnedAbout[warningKey] = true;

        error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
      }
    }
  }
}

// For HTML, certain tags should omit their close tag. We keep a whitelist for
// those special-case tags.
var omittedCloseTags = {
  area: true,
  base: true,
  br: true,
  col: true,
  embed: true,
  hr: true,
  img: true,
  input: true,
  keygen: true,
  link: true,
  meta: true,
  param: true,
  source: true,
  track: true,
  wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.

};

// `omittedCloseTags` except that `menuitem` should still have its closing tag.

var voidElementTags = _assign({
  menuitem: true
}, omittedCloseTags);

var HTML = '__html';
var ReactDebugCurrentFrame$3 = null;

{
  ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
}

function assertValidProps(tag, props) {
  if (!props) {
    return;
  } // Note the use of `==` which checks for null or undefined.


  if (voidElementTags[tag]) {
    if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
      {
        throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
      }
    }
  }

  if (props.dangerouslySetInnerHTML != null) {
    if (!(props.children == null)) {
      {
        throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
      }
    }

    if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
      {
        throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information." );
      }
    }
  }

  {
    if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
      error('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.');
    }
  }

  if (!(props.style == null || typeof props.style === 'object')) {
    {
      throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );
    }
  }
}

function isCustomComponent(tagName, props) {
  if (tagName.indexOf('-') === -1) {
    return typeof props.is === 'string';
  }

  switch (tagName) {
    // These are reserved SVG and MathML elements.
    // We don't mind this whitelist too much because we expect it to never grow.
    // The alternative is to track the namespace in a few places which is convoluted.
    // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
    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 false;

    default:
      return true;
  }
}

// When adding attributes to the HTML or SVG whitelist, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.
var possibleStandardNames = {
  // HTML
  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',
  disablepictureinpicture: 'disablePictureInPicture',
  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',
  // SVG
  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'
};

var ariaProperties = {
  'aria-current': 0,
  // state
  'aria-details': 0,
  'aria-disabled': 0,
  // state
  'aria-hidden': 0,
  // state
  'aria-invalid': 0,
  // state
  'aria-keyshortcuts': 0,
  'aria-label': 0,
  'aria-roledescription': 0,
  // Widget Attributes
  '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,
  // Live Region Attributes
  'aria-atomic': 0,
  'aria-busy': 0,
  'aria-live': 0,
  'aria-relevant': 0,
  // Drag-and-Drop Attributes
  'aria-dropeffect': 0,
  'aria-grabbed': 0,
  // Relationship Attributes
  '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
};

var warnedProperties = {};
var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;

function validateProperty(tagName, name) {
  {
    if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
      return true;
    }

    if (rARIACamel.test(name)) {
      var ariaName = 'aria-' + name.slice(4).toLowerCase();
      var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
      // DOM properties, then it is an invalid aria-* attribute.

      if (correctName == null) {
        error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);

        warnedProperties[name] = true;
        return true;
      } // aria-* attributes should be lowercase; suggest the lowercase version.


      if (name !== correctName) {
        error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);

        warnedProperties[name] = true;
        return true;
      }
    }

    if (rARIA.test(name)) {
      var lowerCasedName = name.toLowerCase();
      var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
      // DOM properties, then it is an invalid aria-* attribute.

      if (standardName == null) {
        warnedProperties[name] = true;
        return false;
      } // aria-* attributes should be lowercase; suggest the lowercase version.


      if (name !== standardName) {
        error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);

        warnedProperties[name] = true;
        return true;
      }
    }
  }

  return true;
}

function warnInvalidARIAProps(type, props) {
  {
    var invalidProps = [];

    for (var key in props) {
      var isValid = validateProperty(type, key);

      if (!isValid) {
        invalidProps.push(key);
      }
    }

    var unknownPropString = invalidProps.map(function (prop) {
      return '`' + prop + '`';
    }).join(', ');

    if (invalidProps.length === 1) {
      error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
    } else if (invalidProps.length > 1) {
      error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);
    }
  }
}

function validateProperties(type, props) {
  if (isCustomComponent(type, props)) {
    return;
  }

  warnInvalidARIAProps(type, props);
}

var didWarnValueNull = false;
function validateProperties$1(type, props) {
  {
    if (type !== 'input' && type !== 'textarea' && type !== 'select') {
      return;
    }

    if (props != null && props.value === null && !didWarnValueNull) {
      didWarnValueNull = true;

      if (type === 'select' && props.multiple) {
        error('`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.', type);
      } else {
        error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
      }
    }
  }
}

var validateProperty$1 = function () {};

{
  var warnedProperties$1 = {};
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
  var EVENT_NAME_REGEX = /^on./;
  var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
  var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
  var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');

  validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
    if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
      return true;
    }

    var lowerCasedName = name.toLowerCase();

    if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
      error('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.');

      warnedProperties$1[name] = true;
      return true;
    } // We can't rely on the event system being injected on the server.


    if (canUseEventSystem) {
      if (registrationNameModules.hasOwnProperty(name)) {
        return true;
      }

      var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;

      if (registrationName != null) {
        error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);

        warnedProperties$1[name] = true;
        return true;
      }

      if (EVENT_NAME_REGEX.test(name)) {
        error('Unknown event handler property `%s`. It will be ignored.', name);

        warnedProperties$1[name] = true;
        return true;
      }
    } else if (EVENT_NAME_REGEX.test(name)) {
      // If no event plugins have been injected, we are in a server environment.
      // So we can't tell if the event name is correct for sure, but we can filter
      // out known bad ones like `onclick`. We can't suggest a specific replacement though.
      if (INVALID_EVENT_NAME_REGEX.test(name)) {
        error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
      }

      warnedProperties$1[name] = true;
      return true;
    } // Let the ARIA attribute hook validate ARIA attributes


    if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
      return true;
    }

    if (lowerCasedName === 'innerhtml') {
      error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');

      warnedProperties$1[name] = true;
      return true;
    }

    if (lowerCasedName === 'aria') {
      error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');

      warnedProperties$1[name] = true;
      return true;
    }

    if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
      error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);

      warnedProperties$1[name] = true;
      return true;
    }

    if (typeof value === 'number' && isNaN(value)) {
      error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);

      warnedProperties$1[name] = true;
      return true;
    }

    var propertyInfo = getPropertyInfo(name);
    var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.

    if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
      var standardName = possibleStandardNames[lowerCasedName];

      if (standardName !== name) {
        error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);

        warnedProperties$1[name] = true;
        return true;
      }
    } else if (!isReserved && name !== lowerCasedName) {
      // Unknown attributes should have lowercase casing since that's how they
      // will be cased anyway with server rendering.
      error('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.', name, lowerCasedName);

      warnedProperties$1[name] = true;
      return true;
    }

    if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
      if (value) {
        error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
      } else {
        error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
      }

      warnedProperties$1[name] = true;
      return true;
    } // Now that we've validated casing, do not validate
    // data types for reserved props


    if (isReserved) {
      return true;
    } // Warn when a known attribute is a bad type


    if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
      warnedProperties$1[name] = true;
      return false;
    } // Warn when passing the strings 'false' or 'true' into a boolean prop


    if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
      error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);

      warnedProperties$1[name] = true;
      return true;
    }

    return true;
  };
}

var warnUnknownProperties = function (type, props, canUseEventSystem) {
  {
    var unknownProps = [];

    for (var key in props) {
      var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);

      if (!isValid) {
        unknownProps.push(key);
      }
    }

    var unknownPropString = unknownProps.map(function (prop) {
      return '`' + prop + '`';
    }).join(', ');

    if (unknownProps.length === 1) {
      error('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', unknownPropString, type);
    } else if (unknownProps.length > 1) {
      error('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', unknownPropString, type);
    }
  }
};

function validateProperties$2(type, props, canUseEventSystem) {
  if (isCustomComponent(type, props)) {
    return;
  }

  warnUnknownProperties(type, props, canUseEventSystem);
}

var didWarnInvalidHydration = false;
var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
var AUTOFOCUS = 'autoFocus';
var CHILDREN = 'children';
var STYLE = 'style';
var HTML$1 = '__html';
var HTML_NAMESPACE$1 = Namespaces.html;
var warnedUnknownTags;
var suppressHydrationWarning;
var validatePropertiesInDevelopment;
var warnForTextDifference;
var warnForPropDifference;
var warnForExtraAttributes;
var warnForInvalidEventListener;
var canDiffStyleForHydrationWarning;
var normalizeMarkupForTextOrAttribute;
var normalizeHTML;

{
  warnedUnknownTags = {
    // Chrome is the only major browser not shipping <time>. But as of July
    // 2017 it intends to ship it due to widespread usage. We intentionally
    // *don't* warn for <time> even if it's unrecognized by Chrome because
    // it soon will be, and many apps have been using it anyway.
    time: true,
    // There are working polyfills for <dialog>. Let people use it.
    dialog: true,
    // Electron ships a custom <webview> tag to display external web content in
    // an isolated frame and process.
    // This tag is not present in non Electron environments such as JSDom which
    // is often used for testing purposes.
    // @see https://electronjs.org/docs/api/webview-tag
    webview: true
  };

  validatePropertiesInDevelopment = function (type, props) {
    validateProperties(type, props);
    validateProperties$1(type, props);
    validateProperties$2(type, props,
    /* canUseEventSystem */
    true);
  }; // IE 11 parses & normalizes the style attribute as opposed to other
  // browsers. It adds spaces and sorts the properties in some
  // non-alphabetical order. Handling that would require sorting CSS
  // properties in the client & server versions or applying
  // `expectedStyle` to a temporary DOM node to read its `style` attribute
  // normalized. Since it only affects IE, we're skipping style warnings
  // in that browser completely in favor of doing all that work.
  // See https://github.com/facebook/react/issues/11807


  canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.
  // It also can turn \u0000 into \uFFFD inside attributes.
  // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
  // If we have a mismatch, it might be caused by that.
  // We will still patch up in this case but not fire the warning.

  var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
  var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;

  normalizeMarkupForTextOrAttribute = function (markup) {
    var markupString = typeof markup === 'string' ? markup : '' + markup;
    return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
  };

  warnForTextDifference = function (serverText, clientText) {
    if (didWarnInvalidHydration) {
      return;
    }

    var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
    var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);

    if (normalizedServerText === normalizedClientText) {
      return;
    }

    didWarnInvalidHydration = true;

    error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
  };

  warnForPropDifference = function (propName, serverValue, clientValue) {
    if (didWarnInvalidHydration) {
      return;
    }

    var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
    var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);

    if (normalizedServerValue === normalizedClientValue) {
      return;
    }

    didWarnInvalidHydration = true;

    error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
  };

  warnForExtraAttributes = function (attributeNames) {
    if (didWarnInvalidHydration) {
      return;
    }

    didWarnInvalidHydration = true;
    var names = [];
    attributeNames.forEach(function (name) {
      names.push(name);
    });

    error('Extra attributes from the server: %s', names);
  };

  warnForInvalidEventListener = function (registrationName, listener) {
    if (listener === false) {
      error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
    } else {
      error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
    }
  }; // Parse the HTML and read it back to normalize the HTML string so that it
  // can be used for comparison.


  normalizeHTML = function (parent, html) {
    // We could have created a separate document here to avoid
    // re-initializing custom elements if they exist. But this breaks
    // how <noscript> is being handled. So we use the same document.
    // See the discussion in https://github.com/facebook/react/pull/11157.
    var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
    testElement.innerHTML = html;
    return testElement.innerHTML;
  };
}

function ensureListeningTo(rootContainerElement, registrationName) {
  var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;
  var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;
  legacyListenToEvent(registrationName, doc);
}

function getOwnerDocumentFromRootContainer(rootContainerElement) {
  return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
}

function noop() {}

function trapClickOnNonInteractiveElement(node) {
  // Mobile Safari does not fire properly bubble click events on
  // non-interactive elements, which means delegated click listeners do not
  // fire. The workaround for this bug involves attaching an empty click
  // listener on the target node.
  // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
  // Just set it using the onclick property so that we don't have to manage any
  // bookkeeping for it. Not sure if we need to clear it when the listener is
  // removed.
  // TODO: Only do this for the relevant Safaris maybe?
  node.onclick = noop;
}

function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
  for (var propKey in nextProps) {
    if (!nextProps.hasOwnProperty(propKey)) {
      continue;
    }

    var nextProp = nextProps[propKey];

    if (propKey === STYLE) {
      {
        if (nextProp) {
          // Freeze the next style object so that we can assume it won't be
          // mutated. We have already warned for this in the past.
          Object.freeze(nextProp);
        }
      } // Relies on `updateStylesByID` not mutating `styleUpdates`.


      setValueForStyles(domElement, nextProp);
    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
      var nextHtml = nextProp ? nextProp[HTML$1] : undefined;

      if (nextHtml != null) {
        setInnerHTML(domElement, nextHtml);
      }
    } else if (propKey === CHILDREN) {
      if (typeof nextProp === 'string') {
        // Avoid setting initial textContent when the text is empty. In IE11 setting
        // textContent on a <textarea> will cause the placeholder to not
        // show within the <textarea> until it has been focused and blurred again.
        // https://github.com/facebook/react/issues/6731#issuecomment-254874553
        var canSetTextContent = tag !== 'textarea' || nextProp !== '';

        if (canSetTextContent) {
          setTextContent(domElement, nextProp);
        }
      } else if (typeof nextProp === 'number') {
        setTextContent(domElement, '' + nextProp);
      }
    } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
      if (nextProp != null) {
        if ( typeof nextProp !== 'function') {
          warnForInvalidEventListener(propKey, nextProp);
        }

        ensureListeningTo(rootContainerElement, propKey);
      }
    } else if (nextProp != null) {
      setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
    }
  }
}

function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
  // TODO: Handle wasCustomComponentTag
  for (var i = 0; i < updatePayload.length; i += 2) {
    var propKey = updatePayload[i];
    var propValue = updatePayload[i + 1];

    if (propKey === STYLE) {
      setValueForStyles(domElement, propValue);
    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
      setInnerHTML(domElement, propValue);
    } else if (propKey === CHILDREN) {
      setTextContent(domElement, propValue);
    } else {
      setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
    }
  }
}

function createElement(type, props, rootContainerElement, parentNamespace) {
  var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML
  // tags get no namespace.

  var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
  var domElement;
  var namespaceURI = parentNamespace;

  if (namespaceURI === HTML_NAMESPACE$1) {
    namespaceURI = getIntrinsicNamespace(type);
  }

  if (namespaceURI === HTML_NAMESPACE$1) {
    {
      isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
      // allow <SVG> or <mATH>.

      if (!isCustomComponentTag && type !== type.toLowerCase()) {
        error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
      }
    }

    if (type === 'script') {
      // Create the script via .innerHTML so its "parser-inserted" flag is
      // set to true and it does not execute
      var div = ownerDocument.createElement('div');

      div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
      // This is guaranteed to yield a script element.

      var firstChild = div.firstChild;
      domElement = div.removeChild(firstChild);
    } else if (typeof props.is === 'string') {
      // $FlowIssue `createElement` should be updated for Web Components
      domElement = ownerDocument.createElement(type, {
        is: props.is
      });
    } else {
      // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
      // See discussion in https://github.com/facebook/react/pull/6896
      // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
      domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
      // attributes on `select`s needs to be added before `option`s are inserted.
      // This prevents:
      // - a bug where the `select` does not scroll to the correct option because singular
      //  `select` elements automatically pick the first item #13222
      // - a bug where the `select` set the first item as selected despite the `size` attribute #14239
      // See https://github.com/facebook/react/issues/13222
      // and https://github.com/facebook/react/issues/14239

      if (type === 'select') {
        var node = domElement;

        if (props.multiple) {
          node.multiple = true;
        } else if (props.size) {
          // Setting a size greater than 1 causes a select to behave like `multiple=true`, where
          // it is possible that no option is selected.
          //
          // This is only necessary when a select in "single selection mode".
          node.size = props.size;
        }
      }
    }
  } else {
    domElement = ownerDocument.createElementNS(namespaceURI, type);
  }

  {
    if (namespaceURI === HTML_NAMESPACE$1) {
      if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
        warnedUnknownTags[type] = true;

        error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
      }
    }
  }

  return domElement;
}
function createTextNode(text, rootContainerElement) {
  return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
}
function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
  var isCustomComponentTag = isCustomComponent(tag, rawProps);

  {
    validatePropertiesInDevelopment(tag, rawProps);
  } // TODO: Make sure that we check isMounted before firing any of these events.


  var props;

  switch (tag) {
    case 'iframe':
    case 'object':
    case 'embed':
      trapBubbledEvent(TOP_LOAD, domElement);
      props = rawProps;
      break;

    case 'video':
    case 'audio':
      // Create listener for each media event
      for (var i = 0; i < mediaEventTypes.length; i++) {
        trapBubbledEvent(mediaEventTypes[i], domElement);
      }

      props = rawProps;
      break;

    case 'source':
      trapBubbledEvent(TOP_ERROR, domElement);
      props = rawProps;
      break;

    case 'img':
    case 'image':
    case 'link':
      trapBubbledEvent(TOP_ERROR, domElement);
      trapBubbledEvent(TOP_LOAD, domElement);
      props = rawProps;
      break;

    case 'form':
      trapBubbledEvent(TOP_RESET, domElement);
      trapBubbledEvent(TOP_SUBMIT, domElement);
      props = rawProps;
      break;

    case 'details':
      trapBubbledEvent(TOP_TOGGLE, domElement);
      props = rawProps;
      break;

    case 'input':
      initWrapperState(domElement, rawProps);
      props = getHostProps(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.

      ensureListeningTo(rootContainerElement, 'onChange');
      break;

    case 'option':
      validateProps(domElement, rawProps);
      props = getHostProps$1(domElement, rawProps);
      break;

    case 'select':
      initWrapperState$1(domElement, rawProps);
      props = getHostProps$2(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.

      ensureListeningTo(rootContainerElement, 'onChange');
      break;

    case 'textarea':
      initWrapperState$2(domElement, rawProps);
      props = getHostProps$3(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.

      ensureListeningTo(rootContainerElement, 'onChange');
      break;

    default:
      props = rawProps;
  }

  assertValidProps(tag, props);
  setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);

  switch (tag) {
    case 'input':
      // TODO: Make sure we check if this is still unmounted or do any clean
      // up necessary since we never stop tracking anymore.
      track(domElement);
      postMountWrapper(domElement, rawProps, false);
      break;

    case 'textarea':
      // TODO: Make sure we check if this is still unmounted or do any clean
      // up necessary since we never stop tracking anymore.
      track(domElement);
      postMountWrapper$3(domElement);
      break;

    case 'option':
      postMountWrapper$1(domElement, rawProps);
      break;

    case 'select':
      postMountWrapper$2(domElement, rawProps);
      break;

    default:
      if (typeof props.onClick === 'function') {
        // TODO: This cast may not be sound for SVG, MathML or custom elements.
        trapClickOnNonInteractiveElement(domElement);
      }

      break;
  }
} // Calculate the diff between the two objects.

function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
  {
    validatePropertiesInDevelopment(tag, nextRawProps);
  }

  var updatePayload = null;
  var lastProps;
  var nextProps;

  switch (tag) {
    case 'input':
      lastProps = getHostProps(domElement, lastRawProps);
      nextProps = getHostProps(domElement, nextRawProps);
      updatePayload = [];
      break;

    case 'option':
      lastProps = getHostProps$1(domElement, lastRawProps);
      nextProps = getHostProps$1(domElement, nextRawProps);
      updatePayload = [];
      break;

    case 'select':
      lastProps = getHostProps$2(domElement, lastRawProps);
      nextProps = getHostProps$2(domElement, nextRawProps);
      updatePayload = [];
      break;

    case 'textarea':
      lastProps = getHostProps$3(domElement, lastRawProps);
      nextProps = getHostProps$3(domElement, nextRawProps);
      updatePayload = [];
      break;

    default:
      lastProps = lastRawProps;
      nextProps = nextRawProps;

      if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
        // TODO: This cast may not be sound for SVG, MathML or custom elements.
        trapClickOnNonInteractiveElement(domElement);
      }

      break;
  }

  assertValidProps(tag, nextProps);
  var propKey;
  var styleName;
  var styleUpdates = null;

  for (propKey in lastProps) {
    if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
      continue;
    }

    if (propKey === STYLE) {
      var lastStyle = lastProps[propKey];

      for (styleName in lastStyle) {
        if (lastStyle.hasOwnProperty(styleName)) {
          if (!styleUpdates) {
            styleUpdates = {};
          }

          styleUpdates[styleName] = '';
        }
      }
    } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
      // This is a special case. If any listener updates we need to ensure
      // that the "current" fiber pointer gets updated so we need a commit
      // to update this element.
      if (!updatePayload) {
        updatePayload = [];
      }
    } else {
      // For all other deleted properties we add it to the queue. We use
      // the whitelist in the commit phase instead.
      (updatePayload = updatePayload || []).push(propKey, null);
    }
  }

  for (propKey in nextProps) {
    var nextProp = nextProps[propKey];
    var lastProp = lastProps != null ? lastProps[propKey] : undefined;

    if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
      continue;
    }

    if (propKey === STYLE) {
      {
        if (nextProp) {
          // Freeze the next style object so that we can assume it won't be
          // mutated. We have already warned for this in the past.
          Object.freeze(nextProp);
        }
      }

      if (lastProp) {
        // Unset styles on `lastProp` but not on `nextProp`.
        for (styleName in lastProp) {
          if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
            if (!styleUpdates) {
              styleUpdates = {};
            }

            styleUpdates[styleName] = '';
          }
        } // Update styles that changed since `lastProp`.


        for (styleName in nextProp) {
          if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
            if (!styleUpdates) {
              styleUpdates = {};
            }

            styleUpdates[styleName] = nextProp[styleName];
          }
        }
      } else {
        // Relies on `updateStylesByID` not mutating `styleUpdates`.
        if (!styleUpdates) {
          if (!updatePayload) {
            updatePayload = [];
          }

          updatePayload.push(propKey, styleUpdates);
        }

        styleUpdates = nextProp;
      }
    } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
      var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
      var lastHtml = lastProp ? lastProp[HTML$1] : undefined;

      if (nextHtml != null) {
        if (lastHtml !== nextHtml) {
          (updatePayload = updatePayload || []).push(propKey, nextHtml);
        }
      }
    } else if (propKey === CHILDREN) {
      if (lastProp !== nextProp && (typeof nextProp === 'string' || typeof nextProp === 'number')) {
        (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
      }
    } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameModules.hasOwnProperty(propKey)) {
      if (nextProp != null) {
        // We eagerly listen to this even though we haven't committed yet.
        if ( typeof nextProp !== 'function') {
          warnForInvalidEventListener(propKey, nextProp);
        }

        ensureListeningTo(rootContainerElement, propKey);
      }

      if (!updatePayload && lastProp !== nextProp) {
        // This is a special case. If any listener updates we need to ensure
        // that the "current" props pointer gets updated so we need a commit
        // to update this element.
        updatePayload = [];
      }
    } else {
      // For any other property we always add it to the queue and then we
      // filter it out using the whitelist during the commit.
      (updatePayload = updatePayload || []).push(propKey, nextProp);
    }
  }

  if (styleUpdates) {
    {
      validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
    }

    (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
  }

  return updatePayload;
} // Apply the diff.

function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
  // Update checked *before* name.
  // In the middle of an update, it is possible to have multiple checked.
  // When a checked radio tries to change name, browser makes another radio's checked false.
  if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
    updateChecked(domElement, nextRawProps);
  }

  var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
  var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.

  updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
  // changed.

  switch (tag) {
    case 'input':
      // Update the wrapper around inputs *after* updating props. This has to
      // happen after `updateDOMProperties`. Otherwise HTML5 input validations
      // raise warnings and prevent the new value from being assigned.
      updateWrapper(domElement, nextRawProps);
      break;

    case 'textarea':
      updateWrapper$1(domElement, nextRawProps);
      break;

    case 'select':
      // <select> value update needs to occur after <option> children
      // reconciliation
      postUpdateWrapper(domElement, nextRawProps);
      break;
  }
}

function getPossibleStandardName(propName) {
  {
    var lowerCasedName = propName.toLowerCase();

    if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
      return null;
    }

    return possibleStandardNames[lowerCasedName] || null;
  }
}

function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
  var isCustomComponentTag;
  var extraAttributeNames;

  {
    suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
    isCustomComponentTag = isCustomComponent(tag, rawProps);
    validatePropertiesInDevelopment(tag, rawProps);
  } // TODO: Make sure that we check isMounted before firing any of these events.


  switch (tag) {
    case 'iframe':
    case 'object':
    case 'embed':
      trapBubbledEvent(TOP_LOAD, domElement);
      break;

    case 'video':
    case 'audio':
      // Create listener for each media event
      for (var i = 0; i < mediaEventTypes.length; i++) {
        trapBubbledEvent(mediaEventTypes[i], domElement);
      }

      break;

    case 'source':
      trapBubbledEvent(TOP_ERROR, domElement);
      break;

    case 'img':
    case 'image':
    case 'link':
      trapBubbledEvent(TOP_ERROR, domElement);
      trapBubbledEvent(TOP_LOAD, domElement);
      break;

    case 'form':
      trapBubbledEvent(TOP_RESET, domElement);
      trapBubbledEvent(TOP_SUBMIT, domElement);
      break;

    case 'details':
      trapBubbledEvent(TOP_TOGGLE, domElement);
      break;

    case 'input':
      initWrapperState(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.

      ensureListeningTo(rootContainerElement, 'onChange');
      break;

    case 'option':
      validateProps(domElement, rawProps);
      break;

    case 'select':
      initWrapperState$1(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.

      ensureListeningTo(rootContainerElement, 'onChange');
      break;

    case 'textarea':
      initWrapperState$2(domElement, rawProps);
      trapBubbledEvent(TOP_INVALID, domElement); // For controlled components we always need to ensure we're listening
      // to onChange. Even if there is no listener.

      ensureListeningTo(rootContainerElement, 'onChange');
      break;
  }

  assertValidProps(tag, rawProps);

  {
    extraAttributeNames = new Set();
    var attributes = domElement.attributes;

    for (var _i = 0; _i < attributes.length; _i++) {
      var name = attributes[_i].name.toLowerCase();

      switch (name) {
        // Built-in SSR attribute is whitelisted
        case 'data-reactroot':
          break;
        // Controlled attributes are not validated
        // TODO: Only ignore them on controlled tags.

        case 'value':
          break;

        case 'checked':
          break;

        case 'selected':
          break;

        default:
          // Intentionally use the original name.
          // See discussion in https://github.com/facebook/react/pull/10676.
          extraAttributeNames.add(attributes[_i].name);
      }
    }
  }

  var updatePayload = null;

  for (var propKey in rawProps) {
    if (!rawProps.hasOwnProperty(propKey)) {
      continue;
    }

    var nextProp = rawProps[propKey];

    if (propKey === CHILDREN) {
      // For text content children we compare against textContent. This
      // might match additional HTML that is hidden when we read it using
      // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
      // satisfies our requirement. Our requirement is not to produce perfect
      // HTML and attributes. Ideally we should preserve structure but it's
      // ok not to if the visible content is still enough to indicate what
      // even listeners these nodes might be wired up to.
      // TODO: Warn if there is more than a single textNode as a child.
      // TODO: Should we use domElement.firstChild.nodeValue to compare?
      if (typeof nextProp === 'string') {
        if (domElement.textContent !== nextProp) {
          if ( !suppressHydrationWarning) {
            warnForTextDifference(domElement.textContent, nextProp);
          }

          updatePayload = [CHILDREN, nextProp];
        }
      } else if (typeof nextProp === 'number') {
        if (domElement.textContent !== '' + nextProp) {
          if ( !suppressHydrationWarning) {
            warnForTextDifference(domElement.textContent, nextProp);
          }

          updatePayload = [CHILDREN, '' + nextProp];
        }
      }
    } else if (registrationNameModules.hasOwnProperty(propKey)) {
      if (nextProp != null) {
        if ( typeof nextProp !== 'function') {
          warnForInvalidEventListener(propKey, nextProp);
        }

        ensureListeningTo(rootContainerElement, propKey);
      }
    } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)
    typeof isCustomComponentTag === 'boolean') {
      // Validate that the properties correspond to their expected values.
      var serverValue = void 0;
      var propertyInfo = getPropertyInfo(propKey);

      if (suppressHydrationWarning) ; else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
      // TODO: Only ignore them on controlled tags.
      propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
        var serverHTML = domElement.innerHTML;
        var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
        var expectedHTML = normalizeHTML(domElement, nextHtml != null ? nextHtml : '');

        if (expectedHTML !== serverHTML) {
          warnForPropDifference(propKey, serverHTML, expectedHTML);
        }
      } else if (propKey === STYLE) {
        // $FlowFixMe - Should be inferred as not undefined.
        extraAttributeNames.delete(propKey);

        if (canDiffStyleForHydrationWarning) {
          var expectedStyle = createDangerousStringForStyles(nextProp);
          serverValue = domElement.getAttribute('style');

          if (expectedStyle !== serverValue) {
            warnForPropDifference(propKey, serverValue, expectedStyle);
          }
        }
      } else if (isCustomComponentTag) {
        // $FlowFixMe - Should be inferred as not undefined.
        extraAttributeNames.delete(propKey.toLowerCase());
        serverValue = getValueForAttribute(domElement, propKey, nextProp);

        if (nextProp !== serverValue) {
          warnForPropDifference(propKey, serverValue, nextProp);
        }
      } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
        var isMismatchDueToBadCasing = false;

        if (propertyInfo !== null) {
          // $FlowFixMe - Should be inferred as not undefined.
          extraAttributeNames.delete(propertyInfo.attributeName);
          serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
        } else {
          var ownNamespace = parentNamespace;

          if (ownNamespace === HTML_NAMESPACE$1) {
            ownNamespace = getIntrinsicNamespace(tag);
          }

          if (ownNamespace === HTML_NAMESPACE$1) {
            // $FlowFixMe - Should be inferred as not undefined.
            extraAttributeNames.delete(propKey.toLowerCase());
          } else {
            var standardName = getPossibleStandardName(propKey);

            if (standardName !== null && standardName !== propKey) {
              // If an SVG prop is supplied with bad casing, it will
              // be successfully parsed from HTML, but will produce a mismatch
              // (and would be incorrectly rendered on the client).
              // However, we already warn about bad casing elsewhere.
              // So we'll skip the misleading extra mismatch warning in this case.
              isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.

              extraAttributeNames.delete(standardName);
            } // $FlowFixMe - Should be inferred as not undefined.


            extraAttributeNames.delete(propKey);
          }

          serverValue = getValueForAttribute(domElement, propKey, nextProp);
        }

        if (nextProp !== serverValue && !isMismatchDueToBadCasing) {
          warnForPropDifference(propKey, serverValue, nextProp);
        }
      }
    }
  }

  {
    // $FlowFixMe - Should be inferred as not undefined.
    if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
      // $FlowFixMe - Should be inferred as not undefined.
      warnForExtraAttributes(extraAttributeNames);
    }
  }

  switch (tag) {
    case 'input':
      // TODO: Make sure we check if this is still unmounted or do any clean
      // up necessary since we never stop tracking anymore.
      track(domElement);
      postMountWrapper(domElement, rawProps, true);
      break;

    case 'textarea':
      // TODO: Make sure we check if this is still unmounted or do any clean
      // up necessary since we never stop tracking anymore.
      track(domElement);
      postMountWrapper$3(domElement);
      break;

    case 'select':
    case 'option':
      // For input and textarea we current always set the value property at
      // post mount to force it to diverge from attributes. However, for
      // option and select we don't quite do the same thing and select
      // is not resilient to the DOM state changing so we don't do that here.
      // TODO: Consider not doing this for input and textarea.
      break;

    default:
      if (typeof rawProps.onClick === 'function') {
        // TODO: This cast may not be sound for SVG, MathML or custom elements.
        trapClickOnNonInteractiveElement(domElement);
      }

      break;
  }

  return updatePayload;
}
function diffHydratedText(textNode, text) {
  var isDifferent = textNode.nodeValue !== text;
  return isDifferent;
}
function warnForUnmatchedText(textNode, text) {
  {
    warnForTextDifference(textNode.nodeValue, text);
  }
}
function warnForDeletedHydratableElement(parentNode, child) {
  {
    if (didWarnInvalidHydration) {
      return;
    }

    didWarnInvalidHydration = true;

    error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
  }
}
function warnForDeletedHydratableText(parentNode, child) {
  {
    if (didWarnInvalidHydration) {
      return;
    }

    didWarnInvalidHydration = true;

    error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
  }
}
function warnForInsertedHydratedElement(parentNode, tag, props) {
  {
    if (didWarnInvalidHydration) {
      return;
    }

    didWarnInvalidHydration = true;

    error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
  }
}
function warnForInsertedHydratedText(parentNode, text) {
  {
    if (text === '') {
      // We expect to insert empty text nodes since they're not represented in
      // the HTML.
      // TODO: Remove this special case if we can just avoid inserting empty
      // text nodes.
      return;
    }

    if (didWarnInvalidHydration) {
      return;
    }

    didWarnInvalidHydration = true;

    error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
  }
}
function restoreControlledState$3(domElement, tag, props) {
  switch (tag) {
    case 'input':
      restoreControlledState(domElement, props);
      return;

    case 'textarea':
      restoreControlledState$2(domElement, props);
      return;

    case 'select':
      restoreControlledState$1(domElement, props);
      return;
  }
}

function getActiveElement(doc) {
  doc = doc || (typeof document !== 'undefined' ? document : undefined);

  if (typeof doc === 'undefined') {
    return null;
  }

  try {
    return doc.activeElement || doc.body;
  } catch (e) {
    return doc.body;
  }
}

/**
 * Given any node return the first leaf node without children.
 *
 * @param {DOMElement|DOMTextNode} node
 * @return {DOMElement|DOMTextNode}
 */

function getLeafNode(node) {
  while (node && node.firstChild) {
    node = node.firstChild;
  }

  return node;
}
/**
 * Get the next sibling within a container. This will walk up the
 * DOM if a node's siblings have been exhausted.
 *
 * @param {DOMElement|DOMTextNode} node
 * @return {?DOMElement|DOMTextNode}
 */


function getSiblingNode(node) {
  while (node) {
    if (node.nextSibling) {
      return node.nextSibling;
    }

    node = node.parentNode;
  }
}
/**
 * Get object describing the nodes which contain characters at offset.
 *
 * @param {DOMElement|DOMTextNode} root
 * @param {number} offset
 * @return {?object}
 */


function getNodeForCharacterOffset(root, offset) {
  var node = getLeafNode(root);
  var nodeStart = 0;
  var nodeEnd = 0;

  while (node) {
    if (node.nodeType === TEXT_NODE) {
      nodeEnd = nodeStart + node.textContent.length;

      if (nodeStart <= offset && nodeEnd >= offset) {
        return {
          node: node,
          offset: offset - nodeStart
        };
      }

      nodeStart = nodeEnd;
    }

    node = getLeafNode(getSiblingNode(node));
  }
}

/**
 * @param {DOMElement} outerNode
 * @return {?object}
 */

function getOffsets(outerNode) {
  var ownerDocument = outerNode.ownerDocument;
  var win = ownerDocument && ownerDocument.defaultView || window;
  var selection = win.getSelection && win.getSelection();

  if (!selection || selection.rangeCount === 0) {
    return null;
  }

  var anchorNode = selection.anchorNode,
      anchorOffset = selection.anchorOffset,
      focusNode = selection.focusNode,
      focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
  // up/down buttons on an <input type="number">. Anonymous divs do not seem to
  // expose properties, triggering a "Permission denied error" if any of its
  // properties are accessed. The only seemingly possible way to avoid erroring
  // is to access a property that typically works for non-anonymous divs and
  // catch any error that may otherwise arise. See
  // https://bugzilla.mozilla.org/show_bug.cgi?id=208427

  try {
    /* eslint-disable no-unused-expressions */
    anchorNode.nodeType;
    focusNode.nodeType;
    /* eslint-enable no-unused-expressions */
  } catch (e) {
    return null;
  }

  return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
}
/**
 * Returns {start, end} where `start` is the character/codepoint index of
 * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
 * `end` is the index of (focusNode, focusOffset).
 *
 * Returns null if you pass in garbage input but we should probably just crash.
 *
 * Exported only for testing.
 */

function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
  var length = 0;
  var start = -1;
  var end = -1;
  var indexWithinAnchor = 0;
  var indexWithinFocus = 0;
  var node = outerNode;
  var parentNode = null;

  outer: while (true) {
    var next = null;

    while (true) {
      if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
        start = length + anchorOffset;
      }

      if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
        end = length + focusOffset;
      }

      if (node.nodeType === TEXT_NODE) {
        length += node.nodeValue.length;
      }

      if ((next = node.firstChild) === null) {
        break;
      } // Moving from `node` to its first child `next`.


      parentNode = node;
      node = next;
    }

    while (true) {
      if (node === outerNode) {
        // If `outerNode` has children, this is always the second time visiting
        // it. If it has no children, this is still the first loop, and the only
        // valid selection is anchorNode and focusNode both equal to this node
        // and both offsets 0, in which case we will have handled above.
        break outer;
      }

      if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
        start = length;
      }

      if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
        end = length;
      }

      if ((next = node.nextSibling) !== null) {
        break;
      }

      node = parentNode;
      parentNode = node.parentNode;
    } // Moving from `node` to its next sibling `next`.


    node = next;
  }

  if (start === -1 || end === -1) {
    // This should never happen. (Would happen if the anchor/focus nodes aren't
    // actually inside the passed-in node.)
    return null;
  }

  return {
    start: start,
    end: end
  };
}
/**
 * In modern non-IE browsers, we can support both forward and backward
 * selections.
 *
 * Note: IE10+ supports the Selection object, but it does not support
 * the `extend` method, which means that even in modern IE, it's not possible
 * to programmatically create a backward selection. Thus, for all IE
 * versions, we use the old IE API to create our selections.
 *
 * @param {DOMElement|DOMTextNode} node
 * @param {object} offsets
 */

function setOffsets(node, offsets) {
  var doc = node.ownerDocument || document;
  var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
  // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
  // fails when pasting 100+ items)

  if (!win.getSelection) {
    return;
  }

  var selection = win.getSelection();
  var length = node.textContent.length;
  var start = Math.min(offsets.start, length);
  var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
  // Flip backward selections, so we can set with a single range.

  if (!selection.extend && start > end) {
    var temp = end;
    end = start;
    start = temp;
  }

  var startMarker = getNodeForCharacterOffset(node, start);
  var endMarker = getNodeForCharacterOffset(node, end);

  if (startMarker && endMarker) {
    if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
      return;
    }

    var range = doc.createRange();
    range.setStart(startMarker.node, startMarker.offset);
    selection.removeAllRanges();

    if (start > end) {
      selection.addRange(range);
      selection.extend(endMarker.node, endMarker.offset);
    } else {
      range.setEnd(endMarker.node, endMarker.offset);
      selection.addRange(range);
    }
  }
}

function isTextNode(node) {
  return node && node.nodeType === TEXT_NODE;
}

function containsNode(outerNode, innerNode) {
  if (!outerNode || !innerNode) {
    return false;
  } else if (outerNode === innerNode) {
    return true;
  } else if (isTextNode(outerNode)) {
    return false;
  } else if (isTextNode(innerNode)) {
    return containsNode(outerNode, innerNode.parentNode);
  } else if ('contains' in outerNode) {
    return outerNode.contains(innerNode);
  } else if (outerNode.compareDocumentPosition) {
    return !!(outerNode.compareDocumentPosition(innerNode) & 16);
  } else {
    return false;
  }
}

function isInDocument(node) {
  return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
}

function isSameOriginFrame(iframe) {
  try {
    // Accessing the contentDocument of a HTMLIframeElement can cause the browser
    // to throw, e.g. if it has a cross-origin src attribute.
    // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
    // iframe.contentDocument.defaultView;
    // A safety way is to access one of the cross origin properties: Window or Location
    // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
    // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
    return typeof iframe.contentWindow.location.href === 'string';
  } catch (err) {
    return false;
  }
}

function getActiveElementDeep() {
  var win = window;
  var element = getActiveElement();

  while (element instanceof win.HTMLIFrameElement) {
    if (isSameOriginFrame(element)) {
      win = element.contentWindow;
    } else {
      return element;
    }

    element = getActiveElement(win.document);
  }

  return element;
}
/**
 * @ReactInputSelection: React input selection module. Based on Selection.js,
 * but modified to be suitable for react and has a couple of bug fixes (doesn't
 * assume buttons have range selections allowed).
 * Input selection module for React.
 */

/**
 * @hasSelectionCapabilities: we get the element types that support selection
 * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
 * and `selectionEnd` rows.
 */


function hasSelectionCapabilities(elem) {
  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
  return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
}
function getSelectionInformation() {
  var focusedElem = getActiveElementDeep();
  return {
    // Used by Flare
    activeElementDetached: null,
    focusedElem: focusedElem,
    selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
  };
}
/**
 * @restoreSelection: If any selection information was potentially lost,
 * restore it. This is useful when performing operations that could remove dom
 * nodes and place them back in, resulting in focus being lost.
 */

function restoreSelection(priorSelectionInformation) {
  var curFocusedElem = getActiveElementDeep();
  var priorFocusedElem = priorSelectionInformation.focusedElem;
  var priorSelectionRange = priorSelectionInformation.selectionRange;

  if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
    if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
      setSelection(priorFocusedElem, priorSelectionRange);
    } // Focusing a node can change the scroll position, which is undesirable


    var ancestors = [];
    var ancestor = priorFocusedElem;

    while (ancestor = ancestor.parentNode) {
      if (ancestor.nodeType === ELEMENT_NODE) {
        ancestors.push({
          element: ancestor,
          left: ancestor.scrollLeft,
          top: ancestor.scrollTop
        });
      }
    }

    if (typeof priorFocusedElem.focus === 'function') {
      priorFocusedElem.focus();
    }

    for (var i = 0; i < ancestors.length; i++) {
      var info = ancestors[i];
      info.element.scrollLeft = info.left;
      info.element.scrollTop = info.top;
    }
  }
}
/**
 * @getSelection: Gets the selection bounds of a focused textarea, input or
 * contentEditable node.
 * -@input: Look up selection bounds of this input
 * -@return {start: selectionStart, end: selectionEnd}
 */

function getSelection(input) {
  var selection;

  if ('selectionStart' in input) {
    // Modern browser with input or textarea.
    selection = {
      start: input.selectionStart,
      end: input.selectionEnd
    };
  } else {
    // Content editable or old IE textarea.
    selection = getOffsets(input);
  }

  return selection || {
    start: 0,
    end: 0
  };
}
/**
 * @setSelection: Sets the selection bounds of a textarea or input and focuses
 * the input.
 * -@input     Set selection bounds of this input or textarea
 * -@offsets   Object of same form that is returned from get*
 */

function setSelection(input, offsets) {
  var start = offsets.start,
      end = offsets.end;

  if (end === undefined) {
    end = start;
  }

  if ('selectionStart' in input) {
    input.selectionStart = start;
    input.selectionEnd = Math.min(end, input.value.length);
  } else {
    setOffsets(input, offsets);
  }
}

var validateDOMNesting = function () {};

var updatedAncestorInfo = function () {};

{
  // This validation code was written based on the HTML5 parsing spec:
  // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
  //
  // Note: this does not catch all invalid nesting, nor does it try to (as it's
  // not clear what practical benefit doing so provides); instead, we warn only
  // for cases where the parser will give a parse tree differing from what React
  // intended. For example, <b><div></div></b> is invalid but we don't warn
  // because it still parses correctly; we do warn for other cases like nested
  // <p> tags where the beginning of the second element implicitly closes the
  // first, causing a confusing mess.
  // https://html.spec.whatwg.org/multipage/syntax.html#special
  var specialTags = ['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']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope

  var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
  // TODO: Distinguish by namespace here -- for <title>, including it here
  // errs on the side of fewer warnings
  'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope

  var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags

  var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
  var emptyAncestorInfo = {
    current: null,
    formTag: null,
    aTagInScope: null,
    buttonTagInScope: null,
    nobrTagInScope: null,
    pTagInButtonScope: null,
    listItemTagAutoclosing: null,
    dlItemTagAutoclosing: null
  };

  updatedAncestorInfo = function (oldInfo, tag) {
    var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);

    var info = {
      tag: tag
    };

    if (inScopeTags.indexOf(tag) !== -1) {
      ancestorInfo.aTagInScope = null;
      ancestorInfo.buttonTagInScope = null;
      ancestorInfo.nobrTagInScope = null;
    }

    if (buttonScopeTags.indexOf(tag) !== -1) {
      ancestorInfo.pTagInButtonScope = null;
    } // See rules for 'li', 'dd', 'dt' start tags in
    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody


    if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
      ancestorInfo.listItemTagAutoclosing = null;
      ancestorInfo.dlItemTagAutoclosing = null;
    }

    ancestorInfo.current = info;

    if (tag === 'form') {
      ancestorInfo.formTag = info;
    }

    if (tag === 'a') {
      ancestorInfo.aTagInScope = info;
    }

    if (tag === 'button') {
      ancestorInfo.buttonTagInScope = info;
    }

    if (tag === 'nobr') {
      ancestorInfo.nobrTagInScope = info;
    }

    if (tag === 'p') {
      ancestorInfo.pTagInButtonScope = info;
    }

    if (tag === 'li') {
      ancestorInfo.listItemTagAutoclosing = info;
    }

    if (tag === 'dd' || tag === 'dt') {
      ancestorInfo.dlItemTagAutoclosing = info;
    }

    return ancestorInfo;
  };
  /**
   * Returns whether
   */


  var isTagValidWithParent = function (tag, parentTag) {
    // First, let's check if we're in an unusual parsing mode...
    switch (parentTag) {
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
      case 'select':
        return tag === 'option' || tag === 'optgroup' || tag === '#text';

      case 'optgroup':
        return tag === 'option' || tag === '#text';
      // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
      // but

      case 'option':
        return tag === '#text';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
      // No special behavior since these rules fall back to "in body" mode for
      // all except special table nodes which cause bad parsing behavior anyway.
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr

      case 'tr':
        return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody

      case 'tbody':
      case 'thead':
      case 'tfoot':
        return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup

      case 'colgroup':
        return tag === 'col' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable

      case 'table':
        return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead

      case 'head':
        return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
      // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element

      case 'html':
        return tag === 'head' || tag === 'body' || tag === 'frameset';

      case 'frameset':
        return tag === 'frame';

      case '#document':
        return tag === 'html';
    } // Probably in the "in body" parsing mode, so we outlaw only tag combos
    // where the parsing rules cause implicit opens or closes to be added.
    // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody


    switch (tag) {
      case 'h1':
      case 'h2':
      case 'h3':
      case 'h4':
      case 'h5':
      case 'h6':
        return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';

      case 'rp':
      case 'rt':
        return impliedEndTags.indexOf(parentTag) === -1;

      case 'body':
      case 'caption':
      case 'col':
      case 'colgroup':
      case 'frameset':
      case 'frame':
      case 'head':
      case 'html':
      case 'tbody':
      case 'td':
      case 'tfoot':
      case 'th':
      case 'thead':
      case 'tr':
        // These tags are only valid with a few parents that have special child
        // parsing rules -- if we're down here, then none of those matched and
        // so we allow it only if we don't know what the parent is, as all other
        // cases are invalid.
        return parentTag == null;
    }

    return true;
  };
  /**
   * Returns whether
   */


  var findInvalidAncestorForTag = function (tag, ancestorInfo) {
    switch (tag) {
      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 ancestorInfo.pTagInButtonScope;

      case 'form':
        return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;

      case 'li':
        return ancestorInfo.listItemTagAutoclosing;

      case 'dd':
      case 'dt':
        return ancestorInfo.dlItemTagAutoclosing;

      case 'button':
        return ancestorInfo.buttonTagInScope;

      case 'a':
        // Spec says something about storing a list of markers, but it sounds
        // equivalent to this check.
        return ancestorInfo.aTagInScope;

      case 'nobr':
        return ancestorInfo.nobrTagInScope;
    }

    return null;
  };

  var didWarn$1 = {};

  validateDOMNesting = function (childTag, childText, ancestorInfo) {
    ancestorInfo = ancestorInfo || emptyAncestorInfo;
    var parentInfo = ancestorInfo.current;
    var parentTag = parentInfo && parentInfo.tag;

    if (childText != null) {
      if (childTag != null) {
        error('validateDOMNesting: when childText is passed, childTag should be null');
      }

      childTag = '#text';
    }

    var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
    var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
    var invalidParentOrAncestor = invalidParent || invalidAncestor;

    if (!invalidParentOrAncestor) {
      return;
    }

    var ancestorTag = invalidParentOrAncestor.tag;
    var addendum = getCurrentFiberStackInDev();
    var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + addendum;

    if (didWarn$1[warnKey]) {
      return;
    }

    didWarn$1[warnKey] = true;
    var tagDisplayName = childTag;
    var whitespaceInfo = '';

    if (childTag === '#text') {
      if (/\S/.test(childText)) {
        tagDisplayName = 'Text nodes';
      } else {
        tagDisplayName = 'Whitespace text nodes';
        whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
      }
    } else {
      tagDisplayName = '<' + childTag + '>';
    }

    if (invalidParent) {
      var info = '';

      if (ancestorTag === 'table' && childTag === 'tr') {
        info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
      }

      error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
    } else {
      error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
    }
  };
}

var SUPPRESS_HYDRATION_WARNING$1;

{
  SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
}

var SUSPENSE_START_DATA = '$';
var SUSPENSE_END_DATA = '/$';
var SUSPENSE_PENDING_START_DATA = '$?';
var SUSPENSE_FALLBACK_START_DATA = '$!';
var STYLE$1 = 'style';
var eventsEnabled = null;
var selectionInformation = null;

function shouldAutoFocusHostComponent(type, props) {
  switch (type) {
    case 'button':
    case 'input':
    case 'select':
    case 'textarea':
      return !!props.autoFocus;
  }

  return false;
}
function getRootHostContext(rootContainerInstance) {
  var type;
  var namespace;
  var nodeType = rootContainerInstance.nodeType;

  switch (nodeType) {
    case DOCUMENT_NODE:
    case DOCUMENT_FRAGMENT_NODE:
      {
        type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
        var root = rootContainerInstance.documentElement;
        namespace = root ? root.namespaceURI : getChildNamespace(null, '');
        break;
      }

    default:
      {
        var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
        var ownNamespace = container.namespaceURI || null;
        type = container.tagName;
        namespace = getChildNamespace(ownNamespace, type);
        break;
      }
  }

  {
    var validatedTag = type.toLowerCase();
    var ancestorInfo = updatedAncestorInfo(null, validatedTag);
    return {
      namespace: namespace,
      ancestorInfo: ancestorInfo
    };
  }
}
function getChildHostContext(parentHostContext, type, rootContainerInstance) {
  {
    var parentHostContextDev = parentHostContext;
    var namespace = getChildNamespace(parentHostContextDev.namespace, type);
    var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
    return {
      namespace: namespace,
      ancestorInfo: ancestorInfo
    };
  }
}
function getPublicInstance(instance) {
  return instance;
}
function prepareForCommit(containerInfo) {
  eventsEnabled = isEnabled();
  selectionInformation = getSelectionInformation();
  setEnabled(false);
}
function resetAfterCommit(containerInfo) {
  restoreSelection(selectionInformation);
  setEnabled(eventsEnabled);
  eventsEnabled = null;

  selectionInformation = null;
}
function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
  var parentNamespace;

  {
    // TODO: take namespace into account when validating.
    var hostContextDev = hostContext;
    validateDOMNesting(type, null, hostContextDev.ancestorInfo);

    if (typeof props.children === 'string' || typeof props.children === 'number') {
      var string = '' + props.children;
      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
      validateDOMNesting(null, string, ownAncestorInfo);
    }

    parentNamespace = hostContextDev.namespace;
  }

  var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
  precacheFiberNode(internalInstanceHandle, domElement);
  updateFiberProps(domElement, props);
  return domElement;
}
function appendInitialChild(parentInstance, child) {
  parentInstance.appendChild(child);
}
function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
  setInitialProperties(domElement, type, props, rootContainerInstance);
  return shouldAutoFocusHostComponent(type, props);
}
function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
  {
    var hostContextDev = hostContext;

    if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
      var string = '' + newProps.children;
      var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
      validateDOMNesting(null, string, ownAncestorInfo);
    }
  }

  return diffProperties(domElement, type, oldProps, newProps, rootContainerInstance);
}
function shouldSetTextContent(type, props) {
  return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
}
function shouldDeprioritizeSubtree(type, props) {
  return !!props.hidden;
}
function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
  {
    var hostContextDev = hostContext;
    validateDOMNesting(null, text, hostContextDev.ancestorInfo);
  }

  var textNode = createTextNode(text, rootContainerInstance);
  precacheFiberNode(internalInstanceHandle, textNode);
  return textNode;
}
// if a component just imports ReactDOM (e.g. for findDOMNode).
// Some environments might not have setTimeout or clearTimeout.

var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
var noTimeout = -1; // -------------------
function commitMount(domElement, type, newProps, internalInstanceHandle) {
  // Despite the naming that might imply otherwise, this method only
  // fires if there is an `Update` effect scheduled during mounting.
  // This happens if `finalizeInitialChildren` returns `true` (which it
  // does to implement the `autoFocus` attribute on the client). But
  // there are also other cases when this might happen (such as patching
  // up text content during hydration mismatch). So we'll check this again.
  if (shouldAutoFocusHostComponent(type, newProps)) {
    domElement.focus();
  }
}
function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
  // Update the props handle so that we know which props are the ones with
  // with current event handlers.
  updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.

  updateProperties(domElement, updatePayload, type, oldProps, newProps);
}
function resetTextContent(domElement) {
  setTextContent(domElement, '');
}
function commitTextUpdate(textInstance, oldText, newText) {
  textInstance.nodeValue = newText;
}
function appendChild(parentInstance, child) {
  parentInstance.appendChild(child);
}
function appendChildToContainer(container, child) {
  var parentNode;

  if (container.nodeType === COMMENT_NODE) {
    parentNode = container.parentNode;
    parentNode.insertBefore(child, container);
  } else {
    parentNode = container;
    parentNode.appendChild(child);
  } // This container might be used for a portal.
  // If something inside a portal is clicked, that click should bubble
  // through the React tree. However, on Mobile Safari the click would
  // never bubble through the *DOM* tree unless an ancestor with onclick
  // event exists. So we wouldn't see it and dispatch it.
  // This is why we ensure that non React root containers have inline onclick
  // defined.
  // https://github.com/facebook/react/issues/11918


  var reactRootContainer = container._reactRootContainer;

  if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
    // TODO: This cast may not be sound for SVG, MathML or custom elements.
    trapClickOnNonInteractiveElement(parentNode);
  }
}
function insertBefore(parentInstance, child, beforeChild) {
  parentInstance.insertBefore(child, beforeChild);
}
function insertInContainerBefore(container, child, beforeChild) {
  if (container.nodeType === COMMENT_NODE) {
    container.parentNode.insertBefore(child, beforeChild);
  } else {
    container.insertBefore(child, beforeChild);
  }
}
function removeChild(parentInstance, child) {
  parentInstance.removeChild(child);
}
function removeChildFromContainer(container, child) {
  if (container.nodeType === COMMENT_NODE) {
    container.parentNode.removeChild(child);
  } else {
    container.removeChild(child);
  }
}

function hideInstance(instance) {
  // pass host context to this method?


  instance = instance;
  var style = instance.style;

  if (typeof style.setProperty === 'function') {
    style.setProperty('display', 'none', 'important');
  } else {
    style.display = 'none';
  }
}
function hideTextInstance(textInstance) {
  textInstance.nodeValue = '';
}
function unhideInstance(instance, props) {
  instance = instance;
  var styleProp = props[STYLE$1];
  var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
  instance.style.display = dangerousStyleValue('display', display);
}
function unhideTextInstance(textInstance, text) {
  textInstance.nodeValue = text;
} // -------------------
function canHydrateInstance(instance, type, props) {
  if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
    return null;
  } // This has now been refined to an element node.


  return instance;
}
function canHydrateTextInstance(instance, text) {
  if (text === '' || instance.nodeType !== TEXT_NODE) {
    // Empty strings are not parsed by HTML so there won't be a correct match here.
    return null;
  } // This has now been refined to a text node.


  return instance;
}
function isSuspenseInstancePending(instance) {
  return instance.data === SUSPENSE_PENDING_START_DATA;
}
function isSuspenseInstanceFallback(instance) {
  return instance.data === SUSPENSE_FALLBACK_START_DATA;
}

function getNextHydratable(node) {
  // Skip non-hydratable nodes.
  for (; node != null; node = node.nextSibling) {
    var nodeType = node.nodeType;

    if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
      break;
    }
  }

  return node;
}

function getNextHydratableSibling(instance) {
  return getNextHydratable(instance.nextSibling);
}
function getFirstHydratableChild(parentInstance) {
  return getNextHydratable(parentInstance.firstChild);
}
function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
  precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events
  // get attached.

  updateFiberProps(instance, props);
  var parentNamespace;

  {
    var hostContextDev = hostContext;
    parentNamespace = hostContextDev.namespace;
  }

  return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance);
}
function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
  precacheFiberNode(internalInstanceHandle, textInstance);
  return diffHydratedText(textInstance, text);
}
function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
  var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.
  // There might be nested nodes so we need to keep track of how
  // deep we are and only break out when we're back on top.

  var depth = 0;

  while (node) {
    if (node.nodeType === COMMENT_NODE) {
      var data = node.data;

      if (data === SUSPENSE_END_DATA) {
        if (depth === 0) {
          return getNextHydratableSibling(node);
        } else {
          depth--;
        }
      } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
        depth++;
      }
    }

    node = node.nextSibling;
  } // TODO: Warn, we didn't find the end comment boundary.


  return null;
} // Returns the SuspenseInstance if this node is a direct child of a
// SuspenseInstance. I.e. if its previous sibling is a Comment with
// SUSPENSE_x_START_DATA. Otherwise, null.

function getParentSuspenseInstance(targetInstance) {
  var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.
  // There might be nested nodes so we need to keep track of how
  // deep we are and only break out when we're back on top.

  var depth = 0;

  while (node) {
    if (node.nodeType === COMMENT_NODE) {
      var data = node.data;

      if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
        if (depth === 0) {
          return node;
        } else {
          depth--;
        }
      } else if (data === SUSPENSE_END_DATA) {
        depth++;
      }
    }

    node = node.previousSibling;
  }

  return null;
}
function commitHydratedContainer(container) {
  // Retry if any event replaying was blocked on this.
  retryIfBlockedOn(container);
}
function commitHydratedSuspenseInstance(suspenseInstance) {
  // Retry if any event replaying was blocked on this.
  retryIfBlockedOn(suspenseInstance);
}
function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
  {
    warnForUnmatchedText(textInstance, text);
  }
}
function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
    warnForUnmatchedText(textInstance, text);
  }
}
function didNotHydrateContainerInstance(parentContainer, instance) {
  {
    if (instance.nodeType === ELEMENT_NODE) {
      warnForDeletedHydratableElement(parentContainer, instance);
    } else if (instance.nodeType === COMMENT_NODE) ; else {
      warnForDeletedHydratableText(parentContainer, instance);
    }
  }
}
function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
    if (instance.nodeType === ELEMENT_NODE) {
      warnForDeletedHydratableElement(parentInstance, instance);
    } else if (instance.nodeType === COMMENT_NODE) ; else {
      warnForDeletedHydratableText(parentInstance, instance);
    }
  }
}
function didNotFindHydratableContainerInstance(parentContainer, type, props) {
  {
    warnForInsertedHydratedElement(parentContainer, type);
  }
}
function didNotFindHydratableContainerTextInstance(parentContainer, text) {
  {
    warnForInsertedHydratedText(parentContainer, text);
  }
}
function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
    warnForInsertedHydratedElement(parentInstance, type);
  }
}
function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
    warnForInsertedHydratedText(parentInstance, text);
  }
}
function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
  if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
}

var randomKey = Math.random().toString(36).slice(2);
var internalInstanceKey = '__reactInternalInstance$' + randomKey;
var internalEventHandlersKey = '__reactEventHandlers$' + randomKey;
var internalContainerInstanceKey = '__reactContainere$' + randomKey;
function precacheFiberNode(hostInst, node) {
  node[internalInstanceKey] = hostInst;
}
function markContainerAsRoot(hostRoot, node) {
  node[internalContainerInstanceKey] = hostRoot;
}
function unmarkContainerAsRoot(node) {
  node[internalContainerInstanceKey] = null;
}
function isContainerMarkedAsRoot(node) {
  return !!node[internalContainerInstanceKey];
} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
// If the target node is part of a hydrated or not yet rendered subtree, then
// this may also return a SuspenseComponent or HostRoot to indicate that.
// Conceptually the HostRoot fiber is a child of the Container node. So if you
// pass the Container node as the targetNode, you will not actually get the
// HostRoot back. To get to the HostRoot, you need to pass a child of it.
// The same thing applies to Suspense boundaries.

function getClosestInstanceFromNode(targetNode) {
  var targetInst = targetNode[internalInstanceKey];

  if (targetInst) {
    // Don't return HostRoot or SuspenseComponent here.
    return targetInst;
  } // If the direct event target isn't a React owned DOM node, we need to look
  // to see if one of its parents is a React owned DOM node.


  var parentNode = targetNode.parentNode;

  while (parentNode) {
    // We'll check if this is a container root that could include
    // React nodes in the future. We need to check this first because
    // if we're a child of a dehydrated container, we need to first
    // find that inner container before moving on to finding the parent
    // instance. Note that we don't check this field on  the targetNode
    // itself because the fibers are conceptually between the container
    // node and the first child. It isn't surrounding the container node.
    // If it's not a container, we check if it's an instance.
    targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];

    if (targetInst) {
      // Since this wasn't the direct target of the event, we might have
      // stepped past dehydrated DOM nodes to get here. However they could
      // also have been non-React nodes. We need to answer which one.
      // If we the instance doesn't have any children, then there can't be
      // a nested suspense boundary within it. So we can use this as a fast
      // bailout. Most of the time, when people add non-React children to
      // the tree, it is using a ref to a child-less DOM node.
      // Normally we'd only need to check one of the fibers because if it
      // has ever gone from having children to deleting them or vice versa
      // it would have deleted the dehydrated boundary nested inside already.
      // However, since the HostRoot starts out with an alternate it might
      // have one on the alternate so we need to check in case this was a
      // root.
      var alternate = targetInst.alternate;

      if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
        // Next we need to figure out if the node that skipped past is
        // nested within a dehydrated boundary and if so, which one.
        var suspenseInstance = getParentSuspenseInstance(targetNode);

        while (suspenseInstance !== null) {
          // We found a suspense instance. That means that we haven't
          // hydrated it yet. Even though we leave the comments in the
          // DOM after hydrating, and there are boundaries in the DOM
          // that could already be hydrated, we wouldn't have found them
          // through this pass since if the target is hydrated it would
          // have had an internalInstanceKey on it.
          // Let's get the fiber associated with the SuspenseComponent
          // as the deepest instance.
          var targetSuspenseInst = suspenseInstance[internalInstanceKey];

          if (targetSuspenseInst) {
            return targetSuspenseInst;
          } // If we don't find a Fiber on the comment, it might be because
          // we haven't gotten to hydrate it yet. There might still be a
          // parent boundary that hasn't above this one so we need to find
          // the outer most that is known.


          suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
          // host component also hasn't hydrated yet. We can return it
          // below since it will bail out on the isMounted check later.
        }
      }

      return targetInst;
    }

    targetNode = parentNode;
    parentNode = targetNode.parentNode;
  }

  return null;
}
/**
 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
 * instance, or null if the node was not rendered by this React.
 */

function getInstanceFromNode$1(node) {
  var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];

  if (inst) {
    if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
      return inst;
    } else {
      return null;
    }
  }

  return null;
}
/**
 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
 * DOM node.
 */

function getNodeFromInstance$1(inst) {
  if (inst.tag === HostComponent || inst.tag === HostText) {
    // In Fiber this, is just the state node right now. We assume it will be
    // a host component or host text.
    return inst.stateNode;
  } // Without this first invariant, passing a non-DOM-component triggers the next
  // invariant for a missing parent, which is super confusing.


  {
    {
      throw Error( "getNodeFromInstance: Invalid argument." );
    }
  }
}
function getFiberCurrentPropsFromNode$1(node) {
  return node[internalEventHandlersKey] || null;
}
function updateFiberProps(node, props) {
  node[internalEventHandlersKey] = props;
}

function getParent(inst) {
  do {
    inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
    // That is depending on if we want nested subtrees (layers) to bubble
    // events to their parent. We could also go through parentNode on the
    // host node but that wouldn't work for React Native and doesn't let us
    // do the portal feature.
  } while (inst && inst.tag !== HostComponent);

  if (inst) {
    return inst;
  }

  return null;
}
/**
 * Return the lowest common ancestor of A and B, or null if they are in
 * different trees.
 */


function getLowestCommonAncestor(instA, instB) {
  var depthA = 0;

  for (var tempA = instA; tempA; tempA = getParent(tempA)) {
    depthA++;
  }

  var depthB = 0;

  for (var tempB = instB; tempB; tempB = getParent(tempB)) {
    depthB++;
  } // If A is deeper, crawl up.


  while (depthA - depthB > 0) {
    instA = getParent(instA);
    depthA--;
  } // If B is deeper, crawl up.


  while (depthB - depthA > 0) {
    instB = getParent(instB);
    depthB--;
  } // Walk in lockstep until we find a match.


  var depth = depthA;

  while (depth--) {
    if (instA === instB || instA === instB.alternate) {
      return instA;
    }

    instA = getParent(instA);
    instB = getParent(instB);
  }

  return null;
}
/**
 * Simulates the traversal of a two-phase, capture/bubble event dispatch.
 */

function traverseTwoPhase(inst, fn, arg) {
  var path = [];

  while (inst) {
    path.push(inst);
    inst = getParent(inst);
  }

  var i;

  for (i = path.length; i-- > 0;) {
    fn(path[i], 'captured', arg);
  }

  for (i = 0; i < path.length; i++) {
    fn(path[i], 'bubbled', arg);
  }
}
/**
 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
 * should would receive a `mouseEnter` or `mouseLeave` event.
 *
 * Does not invoke the callback on the nearest common ancestor because nothing
 * "entered" or "left" that element.
 */

function traverseEnterLeave(from, to, fn, argFrom, argTo) {
  var common = from && to ? getLowestCommonAncestor(from, to) : null;
  var pathFrom = [];

  while (true) {
    if (!from) {
      break;
    }

    if (from === common) {
      break;
    }

    var alternate = from.alternate;

    if (alternate !== null && alternate === common) {
      break;
    }

    pathFrom.push(from);
    from = getParent(from);
  }

  var pathTo = [];

  while (true) {
    if (!to) {
      break;
    }

    if (to === common) {
      break;
    }

    var _alternate = to.alternate;

    if (_alternate !== null && _alternate === common) {
      break;
    }

    pathTo.push(to);
    to = getParent(to);
  }

  for (var i = 0; i < pathFrom.length; i++) {
    fn(pathFrom[i], 'bubbled', argFrom);
  }

  for (var _i = pathTo.length; _i-- > 0;) {
    fn(pathTo[_i], 'captured', argTo);
  }
}

function isInteractive(tag) {
  return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
}

function shouldPreventMouseEvent(name, type, props) {
  switch (name) {
    case 'onClick':
    case 'onClickCapture':
    case 'onDoubleClick':
    case 'onDoubleClickCapture':
    case 'onMouseDown':
    case 'onMouseDownCapture':
    case 'onMouseMove':
    case 'onMouseMoveCapture':
    case 'onMouseUp':
    case 'onMouseUpCapture':
    case 'onMouseEnter':
      return !!(props.disabled && isInteractive(type));

    default:
      return false;
  }
}
/**
 * @param {object} inst The instance, which is the source of events.
 * @param {string} registrationName Name of listener (e.g. `onClick`).
 * @return {?function} The stored callback.
 */


function getListener(inst, registrationName) {
  var listener; // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
  // live here; needs to be moved to a better place soon

  var stateNode = inst.stateNode;

  if (!stateNode) {
    // Work in progress (ex: onload events in incremental mode).
    return null;
  }

  var props = getFiberCurrentPropsFromNode(stateNode);

  if (!props) {
    // Work in progress.
    return null;
  }

  listener = props[registrationName];

  if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
    return null;
  }

  if (!(!listener || typeof listener === 'function')) {
    {
      throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
    }
  }

  return listener;
}

/**
 * Some event types have a notion of different registration names for different
 * "phases" of propagation. This finds listeners by a given phase.
 */
function listenerAtPhase(inst, event, propagationPhase) {
  var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
  return getListener(inst, registrationName);
}
/**
 * A small set of propagation patterns, each of which will accept a small amount
 * of information, and generate a set of "dispatch ready event objects" - which
 * are sets of events that have already been annotated with a set of dispatched
 * listener functions/ids. The API is designed this way to discourage these
 * propagation strategies from actually executing the dispatches, since we
 * always want to collect the entire set of dispatches before executing even a
 * single one.
 */

/**
 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
 * here, allows us to not have to bind or create functions for each event.
 * Mutating the event's members allows us to not have to create a wrapping
 * "dispatch" object that pairs the event with the listener.
 */


function accumulateDirectionalDispatches(inst, phase, event) {
  {
    if (!inst) {
      error('Dispatching inst must not be null');
    }
  }

  var listener = listenerAtPhase(inst, event, phase);

  if (listener) {
    event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
    event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
  }
}
/**
 * Collect dispatches (must be entirely collected before dispatching - see unit
 * tests). Lazily allocate the array to conserve memory.  We must loop through
 * each event and perform the traversal for each one. We cannot perform a
 * single traversal for the entire collection of events because each event may
 * have a different target.
 */


function accumulateTwoPhaseDispatchesSingle(event) {
  if (event && event.dispatchConfig.phasedRegistrationNames) {
    traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
  }
}
/**
 * Accumulates without regard to direction, does not look for phased
 * registration names. Same as `accumulateDirectDispatchesSingle` but without
 * requiring that the `dispatchMarker` be the same as the dispatched ID.
 */


function accumulateDispatches(inst, ignoredDirection, event) {
  if (inst && event && event.dispatchConfig.registrationName) {
    var registrationName = event.dispatchConfig.registrationName;
    var listener = getListener(inst, registrationName);

    if (listener) {
      event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
      event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
    }
  }
}
/**
 * Accumulates dispatches on an `SyntheticEvent`, but only for the
 * `dispatchMarker`.
 * @param {SyntheticEvent} event
 */


function accumulateDirectDispatchesSingle(event) {
  if (event && event.dispatchConfig.registrationName) {
    accumulateDispatches(event._targetInst, null, event);
  }
}

function accumulateTwoPhaseDispatches(events) {
  forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
}
function accumulateEnterLeaveDispatches(leave, enter, from, to) {
  traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
}
function accumulateDirectDispatches(events) {
  forEachAccumulated(events, accumulateDirectDispatchesSingle);
}

/**
 * These variables store information about text content of a target node,
 * allowing comparison of content before and after a given event.
 *
 * Identify the node where selection currently begins, then observe
 * both its text content and its current position in the DOM. Since the
 * browser may natively replace the target node during composition, we can
 * use its position to find its replacement.
 *
 *
 */
var root = null;
var startText = null;
var fallbackText = null;
function initialize(nativeEventTarget) {
  root = nativeEventTarget;
  startText = getText();
  return true;
}
function reset() {
  root = null;
  startText = null;
  fallbackText = null;
}
function getData() {
  if (fallbackText) {
    return fallbackText;
  }

  var start;
  var startValue = startText;
  var startLength = startValue.length;
  var end;
  var endValue = getText();
  var endLength = endValue.length;

  for (start = 0; start < startLength; start++) {
    if (startValue[start] !== endValue[start]) {
      break;
    }
  }

  var minEnd = startLength - start;

  for (end = 1; end <= minEnd; end++) {
    if (startValue[startLength - end] !== endValue[endLength - end]) {
      break;
    }
  }

  var sliceTail = end > 1 ? 1 - end : undefined;
  fallbackText = endValue.slice(start, sliceTail);
  return fallbackText;
}
function getText() {
  if ('value' in root) {
    return root.value;
  }

  return root.textContent;
}

var EVENT_POOL_SIZE = 10;
/**
 * @interface Event
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */

var EventInterface = {
  type: null,
  target: null,
  // currentTarget is set when dispatching; no use in copying it here
  currentTarget: function () {
    return null;
  },
  eventPhase: null,
  bubbles: null,
  cancelable: null,
  timeStamp: function (event) {
    return event.timeStamp || Date.now();
  },
  defaultPrevented: null,
  isTrusted: null
};

function functionThatReturnsTrue() {
  return true;
}

function functionThatReturnsFalse() {
  return false;
}
/**
 * Synthetic events are dispatched by event plugins, typically in response to a
 * top-level event delegation handler.
 *
 * These systems should generally use pooling to reduce the frequency of garbage
 * collection. The system should check `isPersistent` to determine whether the
 * event should be released into the pool after being dispatched. Users that
 * need a persisted event should invoke `persist`.
 *
 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
 * normalizing browser quirks. Subclasses do not necessarily have to implement a
 * DOM interface; custom application-specific events can also subclass this.
 *
 * @param {object} dispatchConfig Configuration used to dispatch this event.
 * @param {*} targetInst Marker identifying the event target.
 * @param {object} nativeEvent Native browser event.
 * @param {DOMEventTarget} nativeEventTarget Target node.
 */


function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
  {
    // these have a getter/setter for warnings
    delete this.nativeEvent;
    delete this.preventDefault;
    delete this.stopPropagation;
    delete this.isDefaultPrevented;
    delete this.isPropagationStopped;
  }

  this.dispatchConfig = dispatchConfig;
  this._targetInst = targetInst;
  this.nativeEvent = nativeEvent;
  var Interface = this.constructor.Interface;

  for (var propName in Interface) {
    if (!Interface.hasOwnProperty(propName)) {
      continue;
    }

    {
      delete this[propName]; // this has a getter/setter for warnings
    }

    var normalize = Interface[propName];

    if (normalize) {
      this[propName] = normalize(nativeEvent);
    } else {
      if (propName === 'target') {
        this.target = nativeEventTarget;
      } else {
        this[propName] = nativeEvent[propName];
      }
    }
  }

  var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;

  if (defaultPrevented) {
    this.isDefaultPrevented = functionThatReturnsTrue;
  } else {
    this.isDefaultPrevented = functionThatReturnsFalse;
  }

  this.isPropagationStopped = functionThatReturnsFalse;
  return this;
}

_assign(SyntheticEvent.prototype, {
  preventDefault: function () {
    this.defaultPrevented = true;
    var event = this.nativeEvent;

    if (!event) {
      return;
    }

    if (event.preventDefault) {
      event.preventDefault();
    } else if (typeof event.returnValue !== 'unknown') {
      event.returnValue = false;
    }

    this.isDefaultPrevented = functionThatReturnsTrue;
  },
  stopPropagation: function () {
    var event = this.nativeEvent;

    if (!event) {
      return;
    }

    if (event.stopPropagation) {
      event.stopPropagation();
    } else if (typeof event.cancelBubble !== 'unknown') {
      // The ChangeEventPlugin registers a "propertychange" event for
      // IE. This event does not support bubbling or cancelling, and
      // any references to cancelBubble throw "Member not found".  A
      // typeof check of "unknown" circumvents this issue (and is also
      // IE specific).
      event.cancelBubble = true;
    }

    this.isPropagationStopped = functionThatReturnsTrue;
  },

  /**
   * We release all dispatched `SyntheticEvent`s after each event loop, adding
   * them back into the pool. This allows a way to hold onto a reference that
   * won't be added back into the pool.
   */
  persist: function () {
    this.isPersistent = functionThatReturnsTrue;
  },

  /**
   * Checks if this event should be released back into the pool.
   *
   * @return {boolean} True if this should not be released, false otherwise.
   */
  isPersistent: functionThatReturnsFalse,

  /**
   * `PooledClass` looks for `destructor` on each instance it releases.
   */
  destructor: function () {
    var Interface = this.constructor.Interface;

    for (var propName in Interface) {
      {
        Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
      }
    }

    this.dispatchConfig = null;
    this._targetInst = null;
    this.nativeEvent = null;
    this.isDefaultPrevented = functionThatReturnsFalse;
    this.isPropagationStopped = functionThatReturnsFalse;
    this._dispatchListeners = null;
    this._dispatchInstances = null;

    {
      Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
      Object.defineProperty(this, 'isDefaultPrevented', getPooledWarningPropertyDefinition('isDefaultPrevented', functionThatReturnsFalse));
      Object.defineProperty(this, 'isPropagationStopped', getPooledWarningPropertyDefinition('isPropagationStopped', functionThatReturnsFalse));
      Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', function () {}));
      Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', function () {}));
    }
  }
});

SyntheticEvent.Interface = EventInterface;
/**
 * Helper to reduce boilerplate when creating subclasses.
 */

SyntheticEvent.extend = function (Interface) {
  var Super = this;

  var E = function () {};

  E.prototype = Super.prototype;
  var prototype = new E();

  function Class() {
    return Super.apply(this, arguments);
  }

  _assign(prototype, Class.prototype);

  Class.prototype = prototype;
  Class.prototype.constructor = Class;
  Class.Interface = _assign({}, Super.Interface, Interface);
  Class.extend = Super.extend;
  addEventPoolingTo(Class);
  return Class;
};

addEventPoolingTo(SyntheticEvent);
/**
 * Helper to nullify syntheticEvent instance properties when destructing
 *
 * @param {String} propName
 * @param {?object} getVal
 * @return {object} defineProperty object
 */

function getPooledWarningPropertyDefinition(propName, getVal) {
  var isFunction = typeof getVal === 'function';
  return {
    configurable: true,
    set: set,
    get: get
  };

  function set(val) {
    var action = isFunction ? 'setting the method' : 'setting the property';
    warn(action, 'This is effectively a no-op');
    return val;
  }

  function get() {
    var action = isFunction ? 'accessing the method' : 'accessing the property';
    var result = isFunction ? 'This is a no-op function' : 'This is set to null';
    warn(action, result);
    return getVal;
  }

  function warn(action, result) {
    {
      error("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.', action, propName, result);
    }
  }
}

function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
  var EventConstructor = this;

  if (EventConstructor.eventPool.length) {
    var instance = EventConstructor.eventPool.pop();
    EventConstructor.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
    return instance;
  }

  return new EventConstructor(dispatchConfig, targetInst, nativeEvent, nativeInst);
}

function releasePooledEvent(event) {
  var EventConstructor = this;

  if (!(event instanceof EventConstructor)) {
    {
      throw Error( "Trying to release an event instance into a pool of a different type." );
    }
  }

  event.destructor();

  if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
    EventConstructor.eventPool.push(event);
  }
}

function addEventPoolingTo(EventConstructor) {
  EventConstructor.eventPool = [];
  EventConstructor.getPooled = getPooledEvent;
  EventConstructor.release = releasePooledEvent;
}

/**
 * @interface Event
 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
 */

var SyntheticCompositionEvent = SyntheticEvent.extend({
  data: null
});

/**
 * @interface Event
 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
 *      /#events-inputevents
 */

var SyntheticInputEvent = SyntheticEvent.extend({
  data: null
});

var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space

var START_KEYCODE = 229;
var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
var documentMode = null;

if (canUseDOM && 'documentMode' in document) {
  documentMode = document.documentMode;
} // Webkit offers a very useful `textInput` event that can be used to
// directly represent `beforeInput`. The IE `textinput` event is not as
// useful, so we don't use it.


var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
// by the native compositionend event may be incorrect. Japanese ideographic
// spaces, for instance (\u3000) are not recorded correctly.

var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
var SPACEBAR_CODE = 32;
var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); // Events and their corresponding property names.

var eventTypes = {
  beforeInput: {
    phasedRegistrationNames: {
      bubbled: 'onBeforeInput',
      captured: 'onBeforeInputCapture'
    },
    dependencies: [TOP_COMPOSITION_END, TOP_KEY_PRESS, TOP_TEXT_INPUT, TOP_PASTE]
  },
  compositionEnd: {
    phasedRegistrationNames: {
      bubbled: 'onCompositionEnd',
      captured: 'onCompositionEndCapture'
    },
    dependencies: [TOP_BLUR, TOP_COMPOSITION_END, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
  },
  compositionStart: {
    phasedRegistrationNames: {
      bubbled: 'onCompositionStart',
      captured: 'onCompositionStartCapture'
    },
    dependencies: [TOP_BLUR, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
  },
  compositionUpdate: {
    phasedRegistrationNames: {
      bubbled: 'onCompositionUpdate',
      captured: 'onCompositionUpdateCapture'
    },
    dependencies: [TOP_BLUR, TOP_COMPOSITION_UPDATE, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_MOUSE_DOWN]
  }
}; // Track whether we've ever handled a keypress on the space key.

var hasSpaceKeypress = false;
/**
 * Return whether a native keypress event is assumed to be a command.
 * This is required because Firefox fires `keypress` events for key commands
 * (cut, copy, select-all, etc.) even though no character is inserted.
 */

function isKeypressCommand(nativeEvent) {
  return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
  !(nativeEvent.ctrlKey && nativeEvent.altKey);
}
/**
 * Translate native top level events into event types.
 *
 * @param {string} topLevelType
 * @return {object}
 */


function getCompositionEventType(topLevelType) {
  switch (topLevelType) {
    case TOP_COMPOSITION_START:
      return eventTypes.compositionStart;

    case TOP_COMPOSITION_END:
      return eventTypes.compositionEnd;

    case TOP_COMPOSITION_UPDATE:
      return eventTypes.compositionUpdate;
  }
}
/**
 * Does our fallback best-guess model think this event signifies that
 * composition has begun?
 *
 * @param {string} topLevelType
 * @param {object} nativeEvent
 * @return {boolean}
 */


function isFallbackCompositionStart(topLevelType, nativeEvent) {
  return topLevelType === TOP_KEY_DOWN && nativeEvent.keyCode === START_KEYCODE;
}
/**
 * Does our fallback mode think that this event is the end of composition?
 *
 * @param {string} topLevelType
 * @param {object} nativeEvent
 * @return {boolean}
 */


function isFallbackCompositionEnd(topLevelType, nativeEvent) {
  switch (topLevelType) {
    case TOP_KEY_UP:
      // Command keys insert or clear IME input.
      return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;

    case TOP_KEY_DOWN:
      // Expect IME keyCode on each keydown. If we get any other
      // code we must have exited earlier.
      return nativeEvent.keyCode !== START_KEYCODE;

    case TOP_KEY_PRESS:
    case TOP_MOUSE_DOWN:
    case TOP_BLUR:
      // Events are not possible without cancelling IME.
      return true;

    default:
      return false;
  }
}
/**
 * Google Input Tools provides composition data via a CustomEvent,
 * with the `data` property populated in the `detail` object. If this
 * is available on the event object, use it. If not, this is a plain
 * composition event and we have nothing special to extract.
 *
 * @param {object} nativeEvent
 * @return {?string}
 */


function getDataFromCustomEvent(nativeEvent) {
  var detail = nativeEvent.detail;

  if (typeof detail === 'object' && 'data' in detail) {
    return detail.data;
  }

  return null;
}
/**
 * Check if a composition event was triggered by Korean IME.
 * Our fallback mode does not work well with IE's Korean IME,
 * so just use native composition events when Korean IME is used.
 * Although CompositionEvent.locale property is deprecated,
 * it is available in IE, where our fallback mode is enabled.
 *
 * @param {object} nativeEvent
 * @return {boolean}
 */


function isUsingKoreanIME(nativeEvent) {
  return nativeEvent.locale === 'ko';
} // Track the current IME composition status, if any.


var isComposing = false;
/**
 * @return {?object} A SyntheticCompositionEvent.
 */

function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  var eventType;
  var fallbackData;

  if (canUseCompositionEvent) {
    eventType = getCompositionEventType(topLevelType);
  } else if (!isComposing) {
    if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
      eventType = eventTypes.compositionStart;
    }
  } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
    eventType = eventTypes.compositionEnd;
  }

  if (!eventType) {
    return null;
  }

  if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
    // The current composition is stored statically and must not be
    // overwritten while composition continues.
    if (!isComposing && eventType === eventTypes.compositionStart) {
      isComposing = initialize(nativeEventTarget);
    } else if (eventType === eventTypes.compositionEnd) {
      if (isComposing) {
        fallbackData = getData();
      }
    }
  }

  var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);

  if (fallbackData) {
    // Inject data generated from fallback path into the synthetic event.
    // This matches the property of native CompositionEventInterface.
    event.data = fallbackData;
  } else {
    var customData = getDataFromCustomEvent(nativeEvent);

    if (customData !== null) {
      event.data = customData;
    }
  }

  accumulateTwoPhaseDispatches(event);
  return event;
}
/**
 * @param {TopLevelType} topLevelType Number from `TopLevelType`.
 * @param {object} nativeEvent Native browser event.
 * @return {?string} The string corresponding to this `beforeInput` event.
 */


function getNativeBeforeInputChars(topLevelType, nativeEvent) {
  switch (topLevelType) {
    case TOP_COMPOSITION_END:
      return getDataFromCustomEvent(nativeEvent);

    case TOP_KEY_PRESS:
      /**
       * If native `textInput` events are available, our goal is to make
       * use of them. However, there is a special case: the spacebar key.
       * In Webkit, preventing default on a spacebar `textInput` event
       * cancels character insertion, but it *also* causes the browser
       * to fall back to its default spacebar behavior of scrolling the
       * page.
       *
       * Tracking at:
       * https://code.google.com/p/chromium/issues/detail?id=355103
       *
       * To avoid this issue, use the keypress event as if no `textInput`
       * event is available.
       */
      var which = nativeEvent.which;

      if (which !== SPACEBAR_CODE) {
        return null;
      }

      hasSpaceKeypress = true;
      return SPACEBAR_CHAR;

    case TOP_TEXT_INPUT:
      // Record the characters to be added to the DOM.
      var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
      // it at the keypress level and bail immediately. Android Chrome
      // doesn't give us keycodes, so we need to ignore it.

      if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
        return null;
      }

      return chars;

    default:
      // For other native event types, do nothing.
      return null;
  }
}
/**
 * For browsers that do not provide the `textInput` event, extract the
 * appropriate string to use for SyntheticInputEvent.
 *
 * @param {number} topLevelType Number from `TopLevelEventTypes`.
 * @param {object} nativeEvent Native browser event.
 * @return {?string} The fallback string for this `beforeInput` event.
 */


function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
  // If we are currently composing (IME) and using a fallback to do so,
  // try to extract the composed characters from the fallback object.
  // If composition event is available, we extract a string only at
  // compositionevent, otherwise extract it at fallback events.
  if (isComposing) {
    if (topLevelType === TOP_COMPOSITION_END || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
      var chars = getData();
      reset();
      isComposing = false;
      return chars;
    }

    return null;
  }

  switch (topLevelType) {
    case TOP_PASTE:
      // If a paste event occurs after a keypress, throw out the input
      // chars. Paste events should not lead to BeforeInput events.
      return null;

    case TOP_KEY_PRESS:
      /**
       * As of v27, Firefox may fire keypress events even when no character
       * will be inserted. A few possibilities:
       *
       * - `which` is `0`. Arrow keys, Esc key, etc.
       *
       * - `which` is the pressed key code, but no char is available.
       *   Ex: 'AltGr + d` in Polish. There is no modified character for
       *   this key combination and no character is inserted into the
       *   document, but FF fires the keypress for char code `100` anyway.
       *   No `input` event will occur.
       *
       * - `which` is the pressed key code, but a command combination is
       *   being used. Ex: `Cmd+C`. No character is inserted, and no
       *   `input` event will occur.
       */
      if (!isKeypressCommand(nativeEvent)) {
        // IE fires the `keypress` event when a user types an emoji via
        // Touch keyboard of Windows.  In such a case, the `char` property
        // holds an emoji character like `\uD83D\uDE0A`.  Because its length
        // is 2, the property `which` does not represent an emoji correctly.
        // In such a case, we directly return the `char` property instead of
        // using `which`.
        if (nativeEvent.char && nativeEvent.char.length > 1) {
          return nativeEvent.char;
        } else if (nativeEvent.which) {
          return String.fromCharCode(nativeEvent.which);
        }
      }

      return null;

    case TOP_COMPOSITION_END:
      return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;

    default:
      return null;
  }
}
/**
 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
 * `textInput` or fallback behavior.
 *
 * @return {?object} A SyntheticInputEvent.
 */


function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
  var chars;

  if (canUseTextInputEvent) {
    chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
  } else {
    chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
  } // If no characters are being inserted, no BeforeInput event should
  // be fired.


  if (!chars) {
    return null;
  }

  var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
  event.data = chars;
  accumulateTwoPhaseDispatches(event);
  return event;
}
/**
 * Create an `onBeforeInput` event to match
 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
 *
 * This event plugin is based on the native `textInput` event
 * available in Chrome, Safari, Opera, and IE. This event fires after
 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
 *
 * `beforeInput` is spec'd but not implemented in any browsers, and
 * the `input` event does not provide any useful information about what has
 * actually been added, contrary to the spec. Thus, `textInput` is the best
 * available event to identify the characters that have actually been inserted
 * into the target node.
 *
 * This plugin is also responsible for emitting `composition` events, thus
 * allowing us to share composition fallback code for both `beforeInput` and
 * `composition` event types.
 */


var BeforeInputEventPlugin = {
  eventTypes: eventTypes,
  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
    var composition = extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);
    var beforeInput = extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget);

    if (composition === null) {
      return beforeInput;
    }

    if (beforeInput === null) {
      return composition;
    }

    return [composition, beforeInput];
  }
};

/**
 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
 */
var supportedInputTypes = {
  color: true,
  date: true,
  datetime: true,
  'datetime-local': true,
  email: true,
  month: true,
  number: true,
  password: true,
  range: true,
  search: true,
  tel: true,
  text: true,
  time: true,
  url: true,
  week: true
};

function isTextInputElement(elem) {
  var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();

  if (nodeName === 'input') {
    return !!supportedInputTypes[elem.type];
  }

  if (nodeName === 'textarea') {
    return true;
  }

  return false;
}

var eventTypes$1 = {
  change: {
    phasedRegistrationNames: {
      bubbled: 'onChange',
      captured: 'onChangeCapture'
    },
    dependencies: [TOP_BLUR, TOP_CHANGE, TOP_CLICK, TOP_FOCUS, TOP_INPUT, TOP_KEY_DOWN, TOP_KEY_UP, TOP_SELECTION_CHANGE]
  }
};

function createAndAccumulateChangeEvent(inst, nativeEvent, target) {
  var event = SyntheticEvent.getPooled(eventTypes$1.change, inst, nativeEvent, target);
  event.type = 'change'; // Flag this event loop as needing state restore.

  enqueueStateRestore(target);
  accumulateTwoPhaseDispatches(event);
  return event;
}
/**
 * For IE shims
 */


var activeElement = null;
var activeElementInst = null;
/**
 * SECTION: handle `change` event
 */

function shouldUseChangeEvent(elem) {
  var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
  return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
}

function manualDispatchChangeEvent(nativeEvent) {
  var event = createAndAccumulateChangeEvent(activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
  // other events and have it go through ReactBrowserEventEmitter. Since it
  // doesn't, we manually listen for the events and so we have to enqueue and
  // process the abstract event manually.
  //
  // Batching is necessary here in order to ensure that all event handlers run
  // before the next rerender (including event handlers attached to ancestor
  // elements instead of directly on the input). Without this, controlled
  // components don't work properly in conjunction with event bubbling because
  // the component is rerendered and the value reverted before all the event
  // handlers can run. See https://github.com/facebook/react/issues/708.

  batchedUpdates(runEventInBatch, event);
}

function runEventInBatch(event) {
  runEventsInBatch(event);
}

function getInstIfValueChanged(targetInst) {
  var targetNode = getNodeFromInstance$1(targetInst);

  if (updateValueIfChanged(targetNode)) {
    return targetInst;
  }
}

function getTargetInstForChangeEvent(topLevelType, targetInst) {
  if (topLevelType === TOP_CHANGE) {
    return targetInst;
  }
}
/**
 * SECTION: handle `input` event
 */


var isInputEventSupported = false;

if (canUseDOM) {
  // IE9 claims to support the input event but fails to trigger it when
  // deleting text, so we ignore its input events.
  isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
}
/**
 * (For IE <=9) Starts tracking propertychange events on the passed-in element
 * and override the value property so that we can distinguish user events from
 * value changes in JS.
 */


function startWatchingForValueChange(target, targetInst) {
  activeElement = target;
  activeElementInst = targetInst;
  activeElement.attachEvent('onpropertychange', handlePropertyChange);
}
/**
 * (For IE <=9) Removes the event listeners from the currently-tracked element,
 * if any exists.
 */


function stopWatchingForValueChange() {
  if (!activeElement) {
    return;
  }

  activeElement.detachEvent('onpropertychange', handlePropertyChange);
  activeElement = null;
  activeElementInst = null;
}
/**
 * (For IE <=9) Handles a propertychange event, sending a `change` event if
 * the value of the active element has changed.
 */


function handlePropertyChange(nativeEvent) {
  if (nativeEvent.propertyName !== 'value') {
    return;
  }

  if (getInstIfValueChanged(activeElementInst)) {
    manualDispatchChangeEvent(nativeEvent);
  }
}

function handleEventsForInputEventPolyfill(topLevelType, target, targetInst) {
  if (topLevelType === TOP_FOCUS) {
    // In IE9, propertychange fires for most input events but is buggy and
    // doesn't fire when text is deleted, but conveniently, selectionchange
    // appears to fire in all of the remaining cases so we catch those and
    // forward the event if the value has changed
    // In either case, we don't want to call the event handler if the value
    // is changed from JS so we redefine a setter for `.value` that updates
    // our activeElementValue variable, allowing us to ignore those changes
    //
    // stopWatching() should be a noop here but we call it just in case we
    // missed a blur event somehow.
    stopWatchingForValueChange();
    startWatchingForValueChange(target, targetInst);
  } else if (topLevelType === TOP_BLUR) {
    stopWatchingForValueChange();
  }
} // For IE8 and IE9.


function getTargetInstForInputEventPolyfill(topLevelType, targetInst) {
  if (topLevelType === TOP_SELECTION_CHANGE || topLevelType === TOP_KEY_UP || topLevelType === TOP_KEY_DOWN) {
    // On the selectionchange event, the target is just document which isn't
    // helpful for us so just check activeElement instead.
    //
    // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
    // propertychange on the first input event after setting `value` from a
    // script and fires only keydown, keypress, keyup. Catching keyup usually
    // gets it and catching keydown lets us fire an event for the first
    // keystroke if user does a key repeat (it'll be a little delayed: right
    // before the second keystroke). Other input methods (e.g., paste) seem to
    // fire selectionchange normally.
    return getInstIfValueChanged(activeElementInst);
  }
}
/**
 * SECTION: handle `click` event
 */


function shouldUseClickEvent(elem) {
  // Use the `click` event to detect changes to checkbox and radio inputs.
  // This approach works across all browsers, whereas `change` does not fire
  // until `blur` in IE8.
  var nodeName = elem.nodeName;
  return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
}

function getTargetInstForClickEvent(topLevelType, targetInst) {
  if (topLevelType === TOP_CLICK) {
    return getInstIfValueChanged(targetInst);
  }
}

function getTargetInstForInputOrChangeEvent(topLevelType, targetInst) {
  if (topLevelType === TOP_INPUT || topLevelType === TOP_CHANGE) {
    return getInstIfValueChanged(targetInst);
  }
}

function handleControlledInputBlur(node) {
  var state = node._wrapperState;

  if (!state || !state.controlled || node.type !== 'number') {
    return;
  }

  {
    // If controlled, assign the value attribute to the current value on blur
    setDefaultValue(node, 'number', node.value);
  }
}
/**
 * This plugin creates an `onChange` event that normalizes change events
 * across form elements. This event fires at a time when it's possible to
 * change the element's value without seeing a flicker.
 *
 * Supported elements are:
 * - input (see `isTextInputElement`)
 * - textarea
 * - select
 */


var ChangeEventPlugin = {
  eventTypes: eventTypes$1,
  _isInputEventSupported: isInputEventSupported,
  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
    var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;
    var getTargetInstFunc, handleEventFunc;

    if (shouldUseChangeEvent(targetNode)) {
      getTargetInstFunc = getTargetInstForChangeEvent;
    } else if (isTextInputElement(targetNode)) {
      if (isInputEventSupported) {
        getTargetInstFunc = getTargetInstForInputOrChangeEvent;
      } else {
        getTargetInstFunc = getTargetInstForInputEventPolyfill;
        handleEventFunc = handleEventsForInputEventPolyfill;
      }
    } else if (shouldUseClickEvent(targetNode)) {
      getTargetInstFunc = getTargetInstForClickEvent;
    }

    if (getTargetInstFunc) {
      var inst = getTargetInstFunc(topLevelType, targetInst);

      if (inst) {
        var event = createAndAccumulateChangeEvent(inst, nativeEvent, nativeEventTarget);
        return event;
      }
    }

    if (handleEventFunc) {
      handleEventFunc(topLevelType, targetNode, targetInst);
    } // When blurring, set the value attribute for number inputs


    if (topLevelType === TOP_BLUR) {
      handleControlledInputBlur(targetNode);
    }
  }
};

var SyntheticUIEvent = SyntheticEvent.extend({
  view: null,
  detail: null
});

/**
 * Translation from modifier key to the associated property in the event.
 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
 */
var modifierKeyToProp = {
  Alt: 'altKey',
  Control: 'ctrlKey',
  Meta: 'metaKey',
  Shift: 'shiftKey'
}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
// getModifierState. If getModifierState is not supported, we map it to a set of
// modifier keys exposed by the event. In this case, Lock-keys are not supported.

function modifierStateGetter(keyArg) {
  var syntheticEvent = this;
  var nativeEvent = syntheticEvent.nativeEvent;

  if (nativeEvent.getModifierState) {
    return nativeEvent.getModifierState(keyArg);
  }

  var keyProp = modifierKeyToProp[keyArg];
  return keyProp ? !!nativeEvent[keyProp] : false;
}

function getEventModifierState(nativeEvent) {
  return modifierStateGetter;
}

var previousScreenX = 0;
var previousScreenY = 0; // Use flags to signal movementX/Y has already been set

var isMovementXSet = false;
var isMovementYSet = false;
/**
 * @interface MouseEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */

var SyntheticMouseEvent = SyntheticUIEvent.extend({
  screenX: null,
  screenY: null,
  clientX: null,
  clientY: null,
  pageX: null,
  pageY: null,
  ctrlKey: null,
  shiftKey: null,
  altKey: null,
  metaKey: null,
  getModifierState: getEventModifierState,
  button: null,
  buttons: null,
  relatedTarget: function (event) {
    return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
  },
  movementX: function (event) {
    if ('movementX' in event) {
      return event.movementX;
    }

    var screenX = previousScreenX;
    previousScreenX = event.screenX;

    if (!isMovementXSet) {
      isMovementXSet = true;
      return 0;
    }

    return event.type === 'mousemove' ? event.screenX - screenX : 0;
  },
  movementY: function (event) {
    if ('movementY' in event) {
      return event.movementY;
    }

    var screenY = previousScreenY;
    previousScreenY = event.screenY;

    if (!isMovementYSet) {
      isMovementYSet = true;
      return 0;
    }

    return event.type === 'mousemove' ? event.screenY - screenY : 0;
  }
});

/**
 * @interface PointerEvent
 * @see http://www.w3.org/TR/pointerevents/
 */

var SyntheticPointerEvent = SyntheticMouseEvent.extend({
  pointerId: null,
  width: null,
  height: null,
  pressure: null,
  tangentialPressure: null,
  tiltX: null,
  tiltY: null,
  twist: null,
  pointerType: null,
  isPrimary: null
});

var eventTypes$2 = {
  mouseEnter: {
    registrationName: 'onMouseEnter',
    dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
  },
  mouseLeave: {
    registrationName: 'onMouseLeave',
    dependencies: [TOP_MOUSE_OUT, TOP_MOUSE_OVER]
  },
  pointerEnter: {
    registrationName: 'onPointerEnter',
    dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
  },
  pointerLeave: {
    registrationName: 'onPointerLeave',
    dependencies: [TOP_POINTER_OUT, TOP_POINTER_OVER]
  }
};
var EnterLeaveEventPlugin = {
  eventTypes: eventTypes$2,

  /**
   * For almost every interaction we care about, there will be both a top-level
   * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
   * we do not extract duplicate events. However, moving the mouse into the
   * browser from outside will not fire a `mouseout` event. In this case, we use
   * the `mouseover` top-level event.
   */
  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
    var isOverEvent = topLevelType === TOP_MOUSE_OVER || topLevelType === TOP_POINTER_OVER;
    var isOutEvent = topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_POINTER_OUT;

    if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0 && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
      // If this is an over event with a target, then we've already dispatched
      // the event in the out event of the other target. If this is replayed,
      // then it's because we couldn't dispatch against this target previously
      // so we have to do it now instead.
      return null;
    }

    if (!isOutEvent && !isOverEvent) {
      // Must not be a mouse or pointer in or out - ignoring.
      return null;
    }

    var win;

    if (nativeEventTarget.window === nativeEventTarget) {
      // `nativeEventTarget` is probably a window object.
      win = nativeEventTarget;
    } else {
      // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
      var doc = nativeEventTarget.ownerDocument;

      if (doc) {
        win = doc.defaultView || doc.parentWindow;
      } else {
        win = window;
      }
    }

    var from;
    var to;

    if (isOutEvent) {
      from = targetInst;
      var related = nativeEvent.relatedTarget || nativeEvent.toElement;
      to = related ? getClosestInstanceFromNode(related) : null;

      if (to !== null) {
        var nearestMounted = getNearestMountedFiber(to);

        if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
          to = null;
        }
      }
    } else {
      // Moving to a node from outside the window.
      from = null;
      to = targetInst;
    }

    if (from === to) {
      // Nothing pertains to our managed components.
      return null;
    }

    var eventInterface, leaveEventType, enterEventType, eventTypePrefix;

    if (topLevelType === TOP_MOUSE_OUT || topLevelType === TOP_MOUSE_OVER) {
      eventInterface = SyntheticMouseEvent;
      leaveEventType = eventTypes$2.mouseLeave;
      enterEventType = eventTypes$2.mouseEnter;
      eventTypePrefix = 'mouse';
    } else if (topLevelType === TOP_POINTER_OUT || topLevelType === TOP_POINTER_OVER) {
      eventInterface = SyntheticPointerEvent;
      leaveEventType = eventTypes$2.pointerLeave;
      enterEventType = eventTypes$2.pointerEnter;
      eventTypePrefix = 'pointer';
    }

    var fromNode = from == null ? win : getNodeFromInstance$1(from);
    var toNode = to == null ? win : getNodeFromInstance$1(to);
    var leave = eventInterface.getPooled(leaveEventType, from, nativeEvent, nativeEventTarget);
    leave.type = eventTypePrefix + 'leave';
    leave.target = fromNode;
    leave.relatedTarget = toNode;
    var enter = eventInterface.getPooled(enterEventType, to, nativeEvent, nativeEventTarget);
    enter.type = eventTypePrefix + 'enter';
    enter.target = toNode;
    enter.relatedTarget = fromNode;
    accumulateEnterLeaveDispatches(leave, enter, from, to); // If we are not processing the first ancestor, then we
    // should not process the same nativeEvent again, as we
    // will have already processed it in the first ancestor.

    if ((eventSystemFlags & IS_FIRST_ANCESTOR) === 0) {
      return [leave];
    }

    return [leave, enter];
  }
};

/**
 * inlined Object.is polyfill to avoid requiring consumers ship their own
 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
 */
function is(x, y) {
  return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
  ;
}

var objectIs = typeof Object.is === 'function' ? Object.is : is;

var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
/**
 * Performs equality by iterating through keys on an object and returning false
 * when any key has values which are not strictly equal between the arguments.
 * Returns true when the values of all keys are strictly equal.
 */

function shallowEqual(objA, objB) {
  if (objectIs(objA, objB)) {
    return true;
  }

  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
    return false;
  }

  var keysA = Object.keys(objA);
  var keysB = Object.keys(objB);

  if (keysA.length !== keysB.length) {
    return false;
  } // Test for A's keys different from B.


  for (var i = 0; i < keysA.length; i++) {
    if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
      return false;
    }
  }

  return true;
}

var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
var eventTypes$3 = {
  select: {
    phasedRegistrationNames: {
      bubbled: 'onSelect',
      captured: 'onSelectCapture'
    },
    dependencies: [TOP_BLUR, TOP_CONTEXT_MENU, TOP_DRAG_END, TOP_FOCUS, TOP_KEY_DOWN, TOP_KEY_UP, TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_SELECTION_CHANGE]
  }
};
var activeElement$1 = null;
var activeElementInst$1 = null;
var lastSelection = null;
var mouseDown = false;
/**
 * Get an object which is a unique representation of the current selection.
 *
 * The return value will not be consistent across nodes or browsers, but
 * two identical selections on the same node will return identical objects.
 *
 * @param {DOMElement} node
 * @return {object}
 */

function getSelection$1(node) {
  if ('selectionStart' in node && hasSelectionCapabilities(node)) {
    return {
      start: node.selectionStart,
      end: node.selectionEnd
    };
  } else {
    var win = node.ownerDocument && node.ownerDocument.defaultView || window;
    var selection = win.getSelection();
    return {
      anchorNode: selection.anchorNode,
      anchorOffset: selection.anchorOffset,
      focusNode: selection.focusNode,
      focusOffset: selection.focusOffset
    };
  }
}
/**
 * Get document associated with the event target.
 *
 * @param {object} nativeEventTarget
 * @return {Document}
 */


function getEventTargetDocument(eventTarget) {
  return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
}
/**
 * Poll selection to see whether it's changed.
 *
 * @param {object} nativeEvent
 * @param {object} nativeEventTarget
 * @return {?SyntheticEvent}
 */


function constructSelectEvent(nativeEvent, nativeEventTarget) {
  // Ensure we have the right element, and that the user is not dragging a
  // selection (this matches native `select` event behavior). In HTML5, select
  // fires only on input and textarea thus if there's no focused element we
  // won't dispatch.
  var doc = getEventTargetDocument(nativeEventTarget);

  if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
    return null;
  } // Only fire when selection has actually changed.


  var currentSelection = getSelection$1(activeElement$1);

  if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
    lastSelection = currentSelection;
    var syntheticEvent = SyntheticEvent.getPooled(eventTypes$3.select, activeElementInst$1, nativeEvent, nativeEventTarget);
    syntheticEvent.type = 'select';
    syntheticEvent.target = activeElement$1;
    accumulateTwoPhaseDispatches(syntheticEvent);
    return syntheticEvent;
  }

  return null;
}
/**
 * This plugin creates an `onSelect` event that normalizes select events
 * across form elements.
 *
 * Supported elements are:
 * - input (see `isTextInputElement`)
 * - textarea
 * - contentEditable
 *
 * This differs from native browser implementations in the following ways:
 * - Fires on contentEditable fields as well as inputs.
 * - Fires for collapsed selection.
 * - Fires after user input.
 */


var SelectEventPlugin = {
  eventTypes: eventTypes$3,
  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, container) {
    var containerOrDoc = container || getEventTargetDocument(nativeEventTarget); // Track whether all listeners exists for this plugin. If none exist, we do
    // not extract events. See #3639.

    if (!containerOrDoc || !isListeningToAllDependencies('onSelect', containerOrDoc)) {
      return null;
    }

    var targetNode = targetInst ? getNodeFromInstance$1(targetInst) : window;

    switch (topLevelType) {
      // Track the input node that has focus.
      case TOP_FOCUS:
        if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
          activeElement$1 = targetNode;
          activeElementInst$1 = targetInst;
          lastSelection = null;
        }

        break;

      case TOP_BLUR:
        activeElement$1 = null;
        activeElementInst$1 = null;
        lastSelection = null;
        break;
      // Don't fire the event while the user is dragging. This matches the
      // semantics of the native select event.

      case TOP_MOUSE_DOWN:
        mouseDown = true;
        break;

      case TOP_CONTEXT_MENU:
      case TOP_MOUSE_UP:
      case TOP_DRAG_END:
        mouseDown = false;
        return constructSelectEvent(nativeEvent, nativeEventTarget);
      // Chrome and IE fire non-standard event when selection is changed (and
      // sometimes when it hasn't). IE's event fires out of order with respect
      // to key and input events on deletion, so we discard it.
      //
      // Firefox doesn't support selectionchange, so check selection status
      // after each key entry. The selection changes after keydown and before
      // keyup, but we check on keydown as well in the case of holding down a
      // key, when multiple keydown events are fired but only one keyup is.
      // This is also our approach for IE handling, for the reason above.

      case TOP_SELECTION_CHANGE:
        if (skipSelectionChangeEvent) {
          break;
        }

      // falls through

      case TOP_KEY_DOWN:
      case TOP_KEY_UP:
        return constructSelectEvent(nativeEvent, nativeEventTarget);
    }

    return null;
  }
};

/**
 * @interface Event
 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
 */

var SyntheticAnimationEvent = SyntheticEvent.extend({
  animationName: null,
  elapsedTime: null,
  pseudoElement: null
});

/**
 * @interface Event
 * @see http://www.w3.org/TR/clipboard-apis/
 */

var SyntheticClipboardEvent = SyntheticEvent.extend({
  clipboardData: function (event) {
    return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
  }
});

/**
 * @interface FocusEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */

var SyntheticFocusEvent = SyntheticUIEvent.extend({
  relatedTarget: null
});

/**
 * `charCode` represents the actual "character code" and is safe to use with
 * `String.fromCharCode`. As such, only keys that correspond to printable
 * characters produce a valid `charCode`, the only exception to this is Enter.
 * The Tab-key is considered non-printable and does not have a `charCode`,
 * presumably because it does not produce a tab-character in browsers.
 *
 * @param {object} nativeEvent Native browser event.
 * @return {number} Normalized `charCode` property.
 */
function getEventCharCode(nativeEvent) {
  var charCode;
  var keyCode = nativeEvent.keyCode;

  if ('charCode' in nativeEvent) {
    charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.

    if (charCode === 0 && keyCode === 13) {
      charCode = 13;
    }
  } else {
    // IE8 does not implement `charCode`, but `keyCode` has the correct value.
    charCode = keyCode;
  } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
  // report Enter as charCode 10 when ctrl is pressed.


  if (charCode === 10) {
    charCode = 13;
  } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
  // Must not discard the (non-)printable Enter-key.


  if (charCode >= 32 || charCode === 13) {
    return charCode;
  }

  return 0;
}

/**
 * Normalization of deprecated HTML5 `key` values
 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
 */

var normalizeKey = {
  Esc: 'Escape',
  Spacebar: ' ',
  Left: 'ArrowLeft',
  Up: 'ArrowUp',
  Right: 'ArrowRight',
  Down: 'ArrowDown',
  Del: 'Delete',
  Win: 'OS',
  Menu: 'ContextMenu',
  Apps: 'ContextMenu',
  Scroll: 'ScrollLock',
  MozPrintableKey: 'Unidentified'
};
/**
 * Translation from legacy `keyCode` to HTML5 `key`
 * Only special keys supported, all others depend on keyboard layout or browser
 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
 */

var translateToKey = {
  '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'
};
/**
 * @param {object} nativeEvent Native browser event.
 * @return {string} Normalized `key` property.
 */

function getEventKey(nativeEvent) {
  if (nativeEvent.key) {
    // Normalize inconsistent values reported by browsers due to
    // implementations of a working draft specification.
    // FireFox implements `key` but returns `MozPrintableKey` for all
    // printable characters (normalized to `Unidentified`), ignore it.
    var key = normalizeKey[nativeEvent.key] || nativeEvent.key;

    if (key !== 'Unidentified') {
      return key;
    }
  } // Browser does not implement `key`, polyfill as much of it as we can.


  if (nativeEvent.type === 'keypress') {
    var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
    // thus be captured by `keypress`, no other non-printable key should.

    return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
  }

  if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
    // While user keyboard layout determines the actual meaning of each
    // `keyCode` value, almost all function keys have a universal value.
    return translateToKey[nativeEvent.keyCode] || 'Unidentified';
  }

  return '';
}

/**
 * @interface KeyboardEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */

var SyntheticKeyboardEvent = SyntheticUIEvent.extend({
  key: getEventKey,
  location: null,
  ctrlKey: null,
  shiftKey: null,
  altKey: null,
  metaKey: null,
  repeat: null,
  locale: null,
  getModifierState: getEventModifierState,
  // Legacy Interface
  charCode: function (event) {
    // `charCode` is the result of a KeyPress event and represents the value of
    // the actual printable character.
    // KeyPress is deprecated, but its replacement is not yet final and not
    // implemented in any major browser. Only KeyPress has charCode.
    if (event.type === 'keypress') {
      return getEventCharCode(event);
    }

    return 0;
  },
  keyCode: function (event) {
    // `keyCode` is the result of a KeyDown/Up event and represents the value of
    // physical keyboard key.
    // The actual meaning of the value depends on the users' keyboard layout
    // which cannot be detected. Assuming that it is a US keyboard layout
    // provides a surprisingly accurate mapping for US and European users.
    // Due to this, it is left to the user to implement at this time.
    if (event.type === 'keydown' || event.type === 'keyup') {
      return event.keyCode;
    }

    return 0;
  },
  which: function (event) {
    // `which` is an alias for either `keyCode` or `charCode` depending on the
    // type of the event.
    if (event.type === 'keypress') {
      return getEventCharCode(event);
    }

    if (event.type === 'keydown' || event.type === 'keyup') {
      return event.keyCode;
    }

    return 0;
  }
});

/**
 * @interface DragEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */

var SyntheticDragEvent = SyntheticMouseEvent.extend({
  dataTransfer: null
});

/**
 * @interface TouchEvent
 * @see http://www.w3.org/TR/touch-events/
 */

var SyntheticTouchEvent = SyntheticUIEvent.extend({
  touches: null,
  targetTouches: null,
  changedTouches: null,
  altKey: null,
  metaKey: null,
  ctrlKey: null,
  shiftKey: null,
  getModifierState: getEventModifierState
});

/**
 * @interface Event
 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
 */

var SyntheticTransitionEvent = SyntheticEvent.extend({
  propertyName: null,
  elapsedTime: null,
  pseudoElement: null
});

/**
 * @interface WheelEvent
 * @see http://www.w3.org/TR/DOM-Level-3-Events/
 */

var SyntheticWheelEvent = SyntheticMouseEvent.extend({
  deltaX: function (event) {
    return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
    'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
  },
  deltaY: function (event) {
    return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
    'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
    'wheelDelta' in event ? -event.wheelDelta : 0;
  },
  deltaZ: null,
  // Browsers without "deltaMode" is reporting in raw wheel delta where one
  // notch on the scroll is always +/- 120, roughly equivalent to pixels.
  // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
  // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
  deltaMode: null
});

var knownHTMLTopLevelTypes = [TOP_ABORT, TOP_CANCEL, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_CLOSE, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_INPUT, TOP_INVALID, TOP_LOAD, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_RESET, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUBMIT, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_TOGGLE, TOP_VOLUME_CHANGE, TOP_WAITING];
var SimpleEventPlugin = {
  // simpleEventPluginEventTypes gets populated from
  // the DOMEventProperties module.
  eventTypes: simpleEventPluginEventTypes,
  extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
    var dispatchConfig = topLevelEventsToDispatchConfig.get(topLevelType);

    if (!dispatchConfig) {
      return null;
    }

    var EventConstructor;

    switch (topLevelType) {
      case TOP_KEY_PRESS:
        // Firefox creates a keypress event for function keys too. This removes
        // the unwanted keypress events. Enter is however both printable and
        // non-printable. One would expect Tab to be as well (but it isn't).
        if (getEventCharCode(nativeEvent) === 0) {
          return null;
        }

      /* falls through */

      case TOP_KEY_DOWN:
      case TOP_KEY_UP:
        EventConstructor = SyntheticKeyboardEvent;
        break;

      case TOP_BLUR:
      case TOP_FOCUS:
        EventConstructor = SyntheticFocusEvent;
        break;

      case TOP_CLICK:
        // Firefox creates a click event on right mouse clicks. This removes the
        // unwanted click events.
        if (nativeEvent.button === 2) {
          return null;
        }

      /* falls through */

      case TOP_AUX_CLICK:
      case TOP_DOUBLE_CLICK:
      case TOP_MOUSE_DOWN:
      case TOP_MOUSE_MOVE:
      case TOP_MOUSE_UP: // TODO: Disabled elements should not respond to mouse events

      /* falls through */

      case TOP_MOUSE_OUT:
      case TOP_MOUSE_OVER:
      case TOP_CONTEXT_MENU:
        EventConstructor = SyntheticMouseEvent;
        break;

      case TOP_DRAG:
      case TOP_DRAG_END:
      case TOP_DRAG_ENTER:
      case TOP_DRAG_EXIT:
      case TOP_DRAG_LEAVE:
      case TOP_DRAG_OVER:
      case TOP_DRAG_START:
      case TOP_DROP:
        EventConstructor = SyntheticDragEvent;
        break;

      case TOP_TOUCH_CANCEL:
      case TOP_TOUCH_END:
      case TOP_TOUCH_MOVE:
      case TOP_TOUCH_START:
        EventConstructor = SyntheticTouchEvent;
        break;

      case TOP_ANIMATION_END:
      case TOP_ANIMATION_ITERATION:
      case TOP_ANIMATION_START:
        EventConstructor = SyntheticAnimationEvent;
        break;

      case TOP_TRANSITION_END:
        EventConstructor = SyntheticTransitionEvent;
        break;

      case TOP_SCROLL:
        EventConstructor = SyntheticUIEvent;
        break;

      case TOP_WHEEL:
        EventConstructor = SyntheticWheelEvent;
        break;

      case TOP_COPY:
      case TOP_CUT:
      case TOP_PASTE:
        EventConstructor = SyntheticClipboardEvent;
        break;

      case TOP_GOT_POINTER_CAPTURE:
      case TOP_LOST_POINTER_CAPTURE:
      case TOP_POINTER_CANCEL:
      case TOP_POINTER_DOWN:
      case TOP_POINTER_MOVE:
      case TOP_POINTER_OUT:
      case TOP_POINTER_OVER:
      case TOP_POINTER_UP:
        EventConstructor = SyntheticPointerEvent;
        break;

      default:
        {
          if (knownHTMLTopLevelTypes.indexOf(topLevelType) === -1) {
            error('SimpleEventPlugin: Unhandled event type, `%s`. This warning ' + 'is likely caused by a bug in React. Please file an issue.', topLevelType);
          }
        } // HTML Events
        // @see http://www.w3.org/TR/html5/index.html#events-0


        EventConstructor = SyntheticEvent;
        break;
    }

    var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
    accumulateTwoPhaseDispatches(event);
    return event;
  }
};

/**
 * Specifies a deterministic ordering of `EventPlugin`s. A convenient way to
 * reason about plugins, without having to package every one of them. This
 * is better than having plugins be ordered in the same order that they
 * are injected because that ordering would be influenced by the packaging order.
 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
 */

var DOMEventPluginOrder = ['ResponderEventPlugin', 'SimpleEventPlugin', 'EnterLeaveEventPlugin', 'ChangeEventPlugin', 'SelectEventPlugin', 'BeforeInputEventPlugin'];
/**
 * Inject modules for resolving DOM hierarchy and plugin ordering.
 */

injectEventPluginOrder(DOMEventPluginOrder);
setComponentTree(getFiberCurrentPropsFromNode$1, getInstanceFromNode$1, getNodeFromInstance$1);
/**
 * Some important event plugins included by default (without having to require
 * them).
 */

injectEventPluginsByName({
  SimpleEventPlugin: SimpleEventPlugin,
  EnterLeaveEventPlugin: EnterLeaveEventPlugin,
  ChangeEventPlugin: ChangeEventPlugin,
  SelectEventPlugin: SelectEventPlugin,
  BeforeInputEventPlugin: BeforeInputEventPlugin
});

// Prefix measurements so that it's possible to filter them.
// Longer prefixes are hard to read in DevTools.
var reactEmoji = "\u269B";
var warningEmoji = "\u26D4";
var supportsUserTiming = typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.clearMarks === 'function' && typeof performance.measure === 'function' && typeof performance.clearMeasures === 'function'; // Keep track of current fiber so that we know the path to unwind on pause.
// TODO: this looks the same as nextUnitOfWork in scheduler. Can we unify them?

var currentFiber = null; // If we're in the middle of user code, which fiber and method is it?
// Reusing `currentFiber` would be confusing for this because user code fiber
// can change during commit phase too, but we don't need to unwind it (since
// lifecycles in the commit phase don't resemble a tree).

var currentPhase = null;
var currentPhaseFiber = null; // Did lifecycle hook schedule an update? This is often a performance problem,
// so we will keep track of it, and include it in the report.
// Track commits caused by cascading updates.

var isCommitting = false;
var hasScheduledUpdateInCurrentCommit = false;
var hasScheduledUpdateInCurrentPhase = false;
var commitCountInCurrentWorkLoop = 0;
var effectCountInCurrentCommit = 0;
// to avoid stretch the commit phase with measurement overhead.

var labelsInCurrentCommit = new Set();

var formatMarkName = function (markName) {
  return reactEmoji + " " + markName;
};

var formatLabel = function (label, warning) {
  var prefix = warning ? warningEmoji + " " : reactEmoji + " ";
  var suffix = warning ? " Warning: " + warning : '';
  return "" + prefix + label + suffix;
};

var beginMark = function (markName) {
  performance.mark(formatMarkName(markName));
};

var clearMark = function (markName) {
  performance.clearMarks(formatMarkName(markName));
};

var endMark = function (label, markName, warning) {
  var formattedMarkName = formatMarkName(markName);
  var formattedLabel = formatLabel(label, warning);

  try {
    performance.measure(formattedLabel, formattedMarkName);
  } catch (err) {} // If previous mark was missing for some reason, this will throw.
  // This could only happen if React crashed in an unexpected place earlier.
  // Don't pile on with more errors.
  // Clear marks immediately to avoid growing buffer.


  performance.clearMarks(formattedMarkName);
  performance.clearMeasures(formattedLabel);
};

var getFiberMarkName = function (label, debugID) {
  return label + " (#" + debugID + ")";
};

var getFiberLabel = function (componentName, isMounted, phase) {
  if (phase === null) {
    // These are composite component total time measurements.
    return componentName + " [" + (isMounted ? 'update' : 'mount') + "]";
  } else {
    // Composite component methods.
    return componentName + "." + phase;
  }
};

var beginFiberMark = function (fiber, phase) {
  var componentName = getComponentName(fiber.type) || 'Unknown';
  var debugID = fiber._debugID;
  var isMounted = fiber.alternate !== null;
  var label = getFiberLabel(componentName, isMounted, phase);

  if (isCommitting && labelsInCurrentCommit.has(label)) {
    // During the commit phase, we don't show duplicate labels because
    // there is a fixed overhead for every measurement, and we don't
    // want to stretch the commit phase beyond necessary.
    return false;
  }

  labelsInCurrentCommit.add(label);
  var markName = getFiberMarkName(label, debugID);
  beginMark(markName);
  return true;
};

var clearFiberMark = function (fiber, phase) {
  var componentName = getComponentName(fiber.type) || 'Unknown';
  var debugID = fiber._debugID;
  var isMounted = fiber.alternate !== null;
  var label = getFiberLabel(componentName, isMounted, phase);
  var markName = getFiberMarkName(label, debugID);
  clearMark(markName);
};

var endFiberMark = function (fiber, phase, warning) {
  var componentName = getComponentName(fiber.type) || 'Unknown';
  var debugID = fiber._debugID;
  var isMounted = fiber.alternate !== null;
  var label = getFiberLabel(componentName, isMounted, phase);
  var markName = getFiberMarkName(label, debugID);
  endMark(label, markName, warning);
};

var shouldIgnoreFiber = function (fiber) {
  // Host components should be skipped in the timeline.
  // We could check typeof fiber.type, but does this work with RN?
  switch (fiber.tag) {
    case HostRoot:
    case HostComponent:
    case HostText:
    case HostPortal:
    case Fragment:
    case ContextProvider:
    case ContextConsumer:
    case Mode:
      return true;

    default:
      return false;
  }
};

var clearPendingPhaseMeasurement = function () {
  if (currentPhase !== null && currentPhaseFiber !== null) {
    clearFiberMark(currentPhaseFiber, currentPhase);
  }

  currentPhaseFiber = null;
  currentPhase = null;
  hasScheduledUpdateInCurrentPhase = false;
};

var pauseTimers = function () {
  // Stops all currently active measurements so that they can be resumed
  // if we continue in a later deferred loop from the same unit of work.
  var fiber = currentFiber;

  while (fiber) {
    if (fiber._debugIsCurrentlyTiming) {
      endFiberMark(fiber, null, null);
    }

    fiber = fiber.return;
  }
};

var resumeTimersRecursively = function (fiber) {
  if (fiber.return !== null) {
    resumeTimersRecursively(fiber.return);
  }

  if (fiber._debugIsCurrentlyTiming) {
    beginFiberMark(fiber, null);
  }
};

var resumeTimers = function () {
  // Resumes all measurements that were active during the last deferred loop.
  if (currentFiber !== null) {
    resumeTimersRecursively(currentFiber);
  }
};

function recordEffect() {
  {
    effectCountInCurrentCommit++;
  }
}
function recordScheduleUpdate() {
  {
    if (isCommitting) {
      hasScheduledUpdateInCurrentCommit = true;
    }

    if (currentPhase !== null && currentPhase !== 'componentWillMount' && currentPhase !== 'componentWillReceiveProps') {
      hasScheduledUpdateInCurrentPhase = true;
    }
  }
}
function startWorkTimer(fiber) {
  {
    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
      return;
    } // If we pause, this is the fiber to unwind from.


    currentFiber = fiber;

    if (!beginFiberMark(fiber, null)) {
      return;
    }

    fiber._debugIsCurrentlyTiming = true;
  }
}
function cancelWorkTimer(fiber) {
  {
    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
      return;
    } // Remember we shouldn't complete measurement for this fiber.
    // Otherwise flamechart will be deep even for small updates.


    fiber._debugIsCurrentlyTiming = false;
    clearFiberMark(fiber, null);
  }
}
function stopWorkTimer(fiber) {
  {
    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
      return;
    } // If we pause, its parent is the fiber to unwind from.


    currentFiber = fiber.return;

    if (!fiber._debugIsCurrentlyTiming) {
      return;
    }

    fiber._debugIsCurrentlyTiming = false;
    endFiberMark(fiber, null, null);
  }
}
function stopFailedWorkTimer(fiber) {
  {
    if (!supportsUserTiming || shouldIgnoreFiber(fiber)) {
      return;
    } // If we pause, its parent is the fiber to unwind from.


    currentFiber = fiber.return;

    if (!fiber._debugIsCurrentlyTiming) {
      return;
    }

    fiber._debugIsCurrentlyTiming = false;
    var warning = fiber.tag === SuspenseComponent ? 'Rendering was suspended' : 'An error was thrown inside this error boundary';
    endFiberMark(fiber, null, warning);
  }
}
function startPhaseTimer(fiber, phase) {
  {
    if (!supportsUserTiming) {
      return;
    }

    clearPendingPhaseMeasurement();

    if (!beginFiberMark(fiber, phase)) {
      return;
    }

    currentPhaseFiber = fiber;
    currentPhase = phase;
  }
}
function stopPhaseTimer() {
  {
    if (!supportsUserTiming) {
      return;
    }

    if (currentPhase !== null && currentPhaseFiber !== null) {
      var warning = hasScheduledUpdateInCurrentPhase ? 'Scheduled a cascading update' : null;
      endFiberMark(currentPhaseFiber, currentPhase, warning);
    }

    currentPhase = null;
    currentPhaseFiber = null;
  }
}
function startWorkLoopTimer(nextUnitOfWork) {
  {
    currentFiber = nextUnitOfWork;

    if (!supportsUserTiming) {
      return;
    }

    commitCountInCurrentWorkLoop = 0; // This is top level call.
    // Any other measurements are performed within.

    beginMark('(React Tree Reconciliation)'); // Resume any measurements that were in progress during the last loop.

    resumeTimers();
  }
}
function stopWorkLoopTimer(interruptedBy, didCompleteRoot) {
  {
    if (!supportsUserTiming) {
      return;
    }

    var warning = null;

    if (interruptedBy !== null) {
      if (interruptedBy.tag === HostRoot) {
        warning = 'A top-level update interrupted the previous render';
      } else {
        var componentName = getComponentName(interruptedBy.type) || 'Unknown';
        warning = "An update to " + componentName + " interrupted the previous render";
      }
    } else if (commitCountInCurrentWorkLoop > 1) {
      warning = 'There were cascading updates';
    }

    commitCountInCurrentWorkLoop = 0;
    var label = didCompleteRoot ? '(React Tree Reconciliation: Completed Root)' : '(React Tree Reconciliation: Yielded)'; // Pause any measurements until the next loop.

    pauseTimers();
    endMark(label, '(React Tree Reconciliation)', warning);
  }
}
function startCommitTimer() {
  {
    if (!supportsUserTiming) {
      return;
    }

    isCommitting = true;
    hasScheduledUpdateInCurrentCommit = false;
    labelsInCurrentCommit.clear();
    beginMark('(Committing Changes)');
  }
}
function stopCommitTimer() {
  {
    if (!supportsUserTiming) {
      return;
    }

    var warning = null;

    if (hasScheduledUpdateInCurrentCommit) {
      warning = 'Lifecycle hook scheduled a cascading update';
    } else if (commitCountInCurrentWorkLoop > 0) {
      warning = 'Caused by a cascading update in earlier commit';
    }

    hasScheduledUpdateInCurrentCommit = false;
    commitCountInCurrentWorkLoop++;
    isCommitting = false;
    labelsInCurrentCommit.clear();
    endMark('(Committing Changes)', '(Committing Changes)', warning);
  }
}
function startCommitSnapshotEffectsTimer() {
  {
    if (!supportsUserTiming) {
      return;
    }

    effectCountInCurrentCommit = 0;
    beginMark('(Committing Snapshot Effects)');
  }
}
function stopCommitSnapshotEffectsTimer() {
  {
    if (!supportsUserTiming) {
      return;
    }

    var count = effectCountInCurrentCommit;
    effectCountInCurrentCommit = 0;
    endMark("(Committing Snapshot Effects: " + count + " Total)", '(Committing Snapshot Effects)', null);
  }
}
function startCommitHostEffectsTimer() {
  {
    if (!supportsUserTiming) {
      return;
    }

    effectCountInCurrentCommit = 0;
    beginMark('(Committing Host Effects)');
  }
}
function stopCommitHostEffectsTimer() {
  {
    if (!supportsUserTiming) {
      return;
    }

    var count = effectCountInCurrentCommit;
    effectCountInCurrentCommit = 0;
    endMark("(Committing Host Effects: " + count + " Total)", '(Committing Host Effects)', null);
  }
}
function startCommitLifeCyclesTimer() {
  {
    if (!supportsUserTiming) {
      return;
    }

    effectCountInCurrentCommit = 0;
    beginMark('(Calling Lifecycle Methods)');
  }
}
function stopCommitLifeCyclesTimer() {
  {
    if (!supportsUserTiming) {
      return;
    }

    var count = effectCountInCurrentCommit;
    effectCountInCurrentCommit = 0;
    endMark("(Calling Lifecycle Methods: " + count + " Total)", '(Calling Lifecycle Methods)', null);
  }
}

var valueStack = [];
var fiberStack;

{
  fiberStack = [];
}

var index = -1;

function createCursor(defaultValue) {
  return {
    current: defaultValue
  };
}

function pop(cursor, fiber) {
  if (index < 0) {
    {
      error('Unexpected pop.');
    }

    return;
  }

  {
    if (fiber !== fiberStack[index]) {
      error('Unexpected Fiber popped.');
    }
  }

  cursor.current = valueStack[index];
  valueStack[index] = null;

  {
    fiberStack[index] = null;
  }

  index--;
}

function push(cursor, value, fiber) {
  index++;
  valueStack[index] = cursor.current;

  {
    fiberStack[index] = fiber;
  }

  cursor.current = value;
}

var warnedAboutMissingGetChildContext;

{
  warnedAboutMissingGetChildContext = {};
}

var emptyContextObject = {};

{
  Object.freeze(emptyContextObject);
} // A cursor to the current merged context object on the stack.


var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.

var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
// We use this to get access to the parent context after we have already
// pushed the next context provider, and now need to merge their contexts.

var previousContext = emptyContextObject;

function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
  {
    if (didPushOwnContextIfProvider && isContextProvider(Component)) {
      // If the fiber is a context provider itself, when we read its context
      // we may have already pushed its own child context on the stack. A context
      // provider should not "see" its own child context. Therefore we read the
      // previous (parent) context instead for a context provider.
      return previousContext;
    }

    return contextStackCursor.current;
  }
}

function cacheContext(workInProgress, unmaskedContext, maskedContext) {
  {
    var instance = workInProgress.stateNode;
    instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
    instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
  }
}

function getMaskedContext(workInProgress, unmaskedContext) {
  {
    var type = workInProgress.type;
    var contextTypes = type.contextTypes;

    if (!contextTypes) {
      return emptyContextObject;
    } // Avoid recreating masked context unless unmasked context has changed.
    // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
    // This may trigger infinite loops if componentWillReceiveProps calls setState.


    var instance = workInProgress.stateNode;

    if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
      return instance.__reactInternalMemoizedMaskedChildContext;
    }

    var context = {};

    for (var key in contextTypes) {
      context[key] = unmaskedContext[key];
    }

    {
      var name = getComponentName(type) || 'Unknown';
      checkPropTypes(contextTypes, context, 'context', name, getCurrentFiberStackInDev);
    } // Cache unmasked context so we can avoid recreating masked context unless necessary.
    // Context is created before the class component is instantiated so check for instance.


    if (instance) {
      cacheContext(workInProgress, unmaskedContext, context);
    }

    return context;
  }
}

function hasContextChanged() {
  {
    return didPerformWorkStackCursor.current;
  }
}

function isContextProvider(type) {
  {
    var childContextTypes = type.childContextTypes;
    return childContextTypes !== null && childContextTypes !== undefined;
  }
}

function popContext(fiber) {
  {
    pop(didPerformWorkStackCursor, fiber);
    pop(contextStackCursor, fiber);
  }
}

function popTopLevelContextObject(fiber) {
  {
    pop(didPerformWorkStackCursor, fiber);
    pop(contextStackCursor, fiber);
  }
}

function pushTopLevelContextObject(fiber, context, didChange) {
  {
    if (!(contextStackCursor.current === emptyContextObject)) {
      {
        throw Error( "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue." );
      }
    }

    push(contextStackCursor, context, fiber);
    push(didPerformWorkStackCursor, didChange, fiber);
  }
}

function processChildContext(fiber, type, parentContext) {
  {
    var instance = fiber.stateNode;
    var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
    // It has only been added in Fiber to match the (unintentional) behavior in Stack.

    if (typeof instance.getChildContext !== 'function') {
      {
        var componentName = getComponentName(type) || 'Unknown';

        if (!warnedAboutMissingGetChildContext[componentName]) {
          warnedAboutMissingGetChildContext[componentName] = true;

          error('%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.', componentName, componentName);
        }
      }

      return parentContext;
    }

    var childContext;
    startPhaseTimer(fiber, 'getChildContext');
    childContext = instance.getChildContext();
    stopPhaseTimer();

    for (var contextKey in childContext) {
      if (!(contextKey in childContextTypes)) {
        {
          throw Error( (getComponentName(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
        }
      }
    }

    {
      var name = getComponentName(type) || 'Unknown';
      checkPropTypes(childContextTypes, childContext, 'child context', name, // In practice, there is one case in which we won't get a stack. It's when
      // somebody calls unstable_renderSubtreeIntoContainer() and we process
      // context from the parent component instance. The stack will be missing
      // because it's outside of the reconciliation, and so the pointer has not
      // been set. This is rare and doesn't matter. We'll also remove that API.
      getCurrentFiberStackInDev);
    }

    return _assign({}, parentContext, {}, childContext);
  }
}

function pushContextProvider(workInProgress) {
  {
    var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
    // If the instance does not exist yet, we will push null at first,
    // and replace it on the stack later when invalidating the context.

    var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
    // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.

    previousContext = contextStackCursor.current;
    push(contextStackCursor, memoizedMergedChildContext, workInProgress);
    push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
    return true;
  }
}

function invalidateContextProvider(workInProgress, type, didChange) {
  {
    var instance = workInProgress.stateNode;

    if (!instance) {
      {
        throw Error( "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue." );
      }
    }

    if (didChange) {
      // Merge parent and own context.
      // Skip this if we're not updating due to sCU.
      // This avoids unnecessarily recomputing memoized values.
      var mergedContext = processChildContext(workInProgress, type, previousContext);
      instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
      // It is important to unwind the context in the reverse order.

      pop(didPerformWorkStackCursor, workInProgress);
      pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.

      push(contextStackCursor, mergedContext, workInProgress);
      push(didPerformWorkStackCursor, didChange, workInProgress);
    } else {
      pop(didPerformWorkStackCursor, workInProgress);
      push(didPerformWorkStackCursor, didChange, workInProgress);
    }
  }
}

function findCurrentUnmaskedContext(fiber) {
  {
    // Currently this is only used with renderSubtreeIntoContainer; not sure if it
    // makes sense elsewhere
    if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {
      {
        throw Error( "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue." );
      }
    }

    var node = fiber;

    do {
      switch (node.tag) {
        case HostRoot:
          return node.stateNode.context;

        case ClassComponent:
          {
            var Component = node.type;

            if (isContextProvider(Component)) {
              return node.stateNode.__reactInternalMemoizedMergedChildContext;
            }

            break;
          }
      }

      node = node.return;
    } while (node !== null);

    {
      {
        throw Error( "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue." );
      }
    }
  }
}

var LegacyRoot = 0;
var BlockingRoot = 1;
var ConcurrentRoot = 2;

var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
    Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
    Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
    Scheduler_shouldYield = Scheduler.unstable_shouldYield,
    Scheduler_requestPaint = Scheduler.unstable_requestPaint,
    Scheduler_now = Scheduler.unstable_now,
    Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
    Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
    Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
    Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
    Scheduler_LowPriority = Scheduler.unstable_LowPriority,
    Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;

{
  // Provide explicit error message when production+profiling bundle of e.g.
  // react-dom is used with production (non-profiling) bundle of
  // scheduler/tracing
  if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
    {
      throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling" );
    }
  }
}

var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use
// ascending numbers so we can compare them like numbers. They start at 90 to
// avoid clashing with Scheduler's priorities.

var ImmediatePriority = 99;
var UserBlockingPriority$1 = 98;
var NormalPriority = 97;
var LowPriority = 96;
var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.

var NoPriority = 90;
var shouldYield = Scheduler_shouldYield;
var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.
Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};
var syncQueue = null;
var immediateQueueCallbackNode = null;
var isFlushingSyncQueue = false;
var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
// This will be the case for modern browsers that support `performance.now`. In
// older browsers, Scheduler falls back to `Date.now`, which returns a Unix
// timestamp. In that case, subtract the module initialization time to simulate
// the behavior of performance.now and keep our times small enough to fit
// within 32 bits.
// TODO: Consider lifting this into Scheduler.

var now = initialTimeMs < 10000 ? Scheduler_now : function () {
  return Scheduler_now() - initialTimeMs;
};
function getCurrentPriorityLevel() {
  switch (Scheduler_getCurrentPriorityLevel()) {
    case Scheduler_ImmediatePriority:
      return ImmediatePriority;

    case Scheduler_UserBlockingPriority:
      return UserBlockingPriority$1;

    case Scheduler_NormalPriority:
      return NormalPriority;

    case Scheduler_LowPriority:
      return LowPriority;

    case Scheduler_IdlePriority:
      return IdlePriority;

    default:
      {
        {
          throw Error( "Unknown priority level." );
        }
      }

  }
}

function reactPriorityToSchedulerPriority(reactPriorityLevel) {
  switch (reactPriorityLevel) {
    case ImmediatePriority:
      return Scheduler_ImmediatePriority;

    case UserBlockingPriority$1:
      return Scheduler_UserBlockingPriority;

    case NormalPriority:
      return Scheduler_NormalPriority;

    case LowPriority:
      return Scheduler_LowPriority;

    case IdlePriority:
      return Scheduler_IdlePriority;

    default:
      {
        {
          throw Error( "Unknown priority level." );
        }
      }

  }
}

function runWithPriority$1(reactPriorityLevel, fn) {
  var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  return Scheduler_runWithPriority(priorityLevel, fn);
}
function scheduleCallback(reactPriorityLevel, callback, options) {
  var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  return Scheduler_scheduleCallback(priorityLevel, callback, options);
}
function scheduleSyncCallback(callback) {
  // Push this callback into an internal queue. We'll flush these either in
  // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
  if (syncQueue === null) {
    syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.

    immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);
  } else {
    // Push onto existing queue. Don't need to schedule a callback because
    // we already scheduled one when we created the queue.
    syncQueue.push(callback);
  }

  return fakeCallbackNode;
}
function cancelCallback(callbackNode) {
  if (callbackNode !== fakeCallbackNode) {
    Scheduler_cancelCallback(callbackNode);
  }
}
function flushSyncCallbackQueue() {
  if (immediateQueueCallbackNode !== null) {
    var node = immediateQueueCallbackNode;
    immediateQueueCallbackNode = null;
    Scheduler_cancelCallback(node);
  }

  flushSyncCallbackQueueImpl();
}

function flushSyncCallbackQueueImpl() {
  if (!isFlushingSyncQueue && syncQueue !== null) {
    // Prevent re-entrancy.
    isFlushingSyncQueue = true;
    var i = 0;

    try {
      var _isSync = true;
      var queue = syncQueue;
      runWithPriority$1(ImmediatePriority, function () {
        for (; i < queue.length; i++) {
          var callback = queue[i];

          do {
            callback = callback(_isSync);
          } while (callback !== null);
        }
      });
      syncQueue = null;
    } catch (error) {
      // If something throws, leave the remaining callbacks on the queue.
      if (syncQueue !== null) {
        syncQueue = syncQueue.slice(i + 1);
      } // Resume flushing in the next tick


      Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
      throw error;
    } finally {
      isFlushingSyncQueue = false;
    }
  }
}

var NoMode = 0;
var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
// tag instead

var BlockingMode = 2;
var ConcurrentMode = 4;
var ProfileMode = 8;

// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
// Math.pow(2, 30) - 1
// 0b111111111111111111111111111111
var MAX_SIGNED_31_BIT_INT = 1073741823;

var NoWork = 0; // TODO: Think of a better name for Never. The key difference with Idle is that
// Never work can be committed in an inconsistent state without tearing the UI.
// The main example is offscreen content, like a hidden subtree. So one possible
// name is Offscreen. However, it also includes dehydrated Suspense boundaries,
// which are inconsistent in the sense that they haven't finished yet, but
// aren't visibly inconsistent because the server rendered HTML matches what the
// hydrated tree would look like.

var Never = 1; // Idle is slightly higher priority than Never. It must completely finish in
// order to be consistent.

var Idle = 2; // Continuous Hydration is slightly higher than Idle and is used to increase
// priority of hover targets.

var ContinuousHydration = 3;
var Sync = MAX_SIGNED_31_BIT_INT;
var Batched = Sync - 1;
var UNIT_SIZE = 10;
var MAGIC_NUMBER_OFFSET = Batched - 1; // 1 unit of expiration time represents 10ms.

function msToExpirationTime(ms) {
  // Always subtract from the offset so that we don't clash with the magic number for NoWork.
  return MAGIC_NUMBER_OFFSET - (ms / UNIT_SIZE | 0);
}
function expirationTimeToMs(expirationTime) {
  return (MAGIC_NUMBER_OFFSET - expirationTime) * UNIT_SIZE;
}

function ceiling(num, precision) {
  return ((num / precision | 0) + 1) * precision;
}

function computeExpirationBucket(currentTime, expirationInMs, bucketSizeMs) {
  return MAGIC_NUMBER_OFFSET - ceiling(MAGIC_NUMBER_OFFSET - currentTime + expirationInMs / UNIT_SIZE, bucketSizeMs / UNIT_SIZE);
} // TODO: This corresponds to Scheduler's NormalPriority, not LowPriority. Update
// the names to reflect.


var LOW_PRIORITY_EXPIRATION = 5000;
var LOW_PRIORITY_BATCH_SIZE = 250;
function computeAsyncExpiration(currentTime) {
  return computeExpirationBucket(currentTime, LOW_PRIORITY_EXPIRATION, LOW_PRIORITY_BATCH_SIZE);
}
function computeSuspenseExpiration(currentTime, timeoutMs) {
  // TODO: Should we warn if timeoutMs is lower than the normal pri expiration time?
  return computeExpirationBucket(currentTime, timeoutMs, LOW_PRIORITY_BATCH_SIZE);
} // We intentionally set a higher expiration time for interactive updates in
// dev than in production.
//
// If the main thread is being blocked so long that you hit the expiration,
// it's a problem that could be solved with better scheduling.
//
// People will be more likely to notice this and fix it with the long
// expiration time in development.
//
// In production we opt for better UX at the risk of masking scheduling
// problems, by expiring fast.

var HIGH_PRIORITY_EXPIRATION =  500 ;
var HIGH_PRIORITY_BATCH_SIZE = 100;
function computeInteractiveExpiration(currentTime) {
  return computeExpirationBucket(currentTime, HIGH_PRIORITY_EXPIRATION, HIGH_PRIORITY_BATCH_SIZE);
}
function inferPriorityFromExpirationTime(currentTime, expirationTime) {
  if (expirationTime === Sync) {
    return ImmediatePriority;
  }

  if (expirationTime === Never || expirationTime === Idle) {
    return IdlePriority;
  }

  var msUntil = expirationTimeToMs(expirationTime) - expirationTimeToMs(currentTime);

  if (msUntil <= 0) {
    return ImmediatePriority;
  }

  if (msUntil <= HIGH_PRIORITY_EXPIRATION + HIGH_PRIORITY_BATCH_SIZE) {
    return UserBlockingPriority$1;
  }

  if (msUntil <= LOW_PRIORITY_EXPIRATION + LOW_PRIORITY_BATCH_SIZE) {
    return NormalPriority;
  } // TODO: Handle LowPriority
  // Assume anything lower has idle priority


  return IdlePriority;
}

var ReactStrictModeWarnings = {
  recordUnsafeLifecycleWarnings: function (fiber, instance) {},
  flushPendingUnsafeLifecycleWarnings: function () {},
  recordLegacyContextWarning: function (fiber, instance) {},
  flushLegacyContextWarning: function () {},
  discardPendingWarnings: function () {}
};

{
  var findStrictRoot = function (fiber) {
    var maybeStrictRoot = null;
    var node = fiber;

    while (node !== null) {
      if (node.mode & StrictMode) {
        maybeStrictRoot = node;
      }

      node = node.return;
    }

    return maybeStrictRoot;
  };

  var setToSortedString = function (set) {
    var array = [];
    set.forEach(function (value) {
      array.push(value);
    });
    return array.sort().join(', ');
  };

  var pendingComponentWillMountWarnings = [];
  var pendingUNSAFE_ComponentWillMountWarnings = [];
  var pendingComponentWillReceivePropsWarnings = [];
  var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
  var pendingComponentWillUpdateWarnings = [];
  var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.

  var didWarnAboutUnsafeLifecycles = new Set();

  ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
    // Dedup strategy: Warn once per component.
    if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
      return;
    }

    if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.
    instance.componentWillMount.__suppressDeprecationWarning !== true) {
      pendingComponentWillMountWarnings.push(fiber);
    }

    if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {
      pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
    }

    if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
      pendingComponentWillReceivePropsWarnings.push(fiber);
    }

    if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
      pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
    }

    if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
      pendingComponentWillUpdateWarnings.push(fiber);
    }

    if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
      pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
    }
  };

  ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
    // We do an initial pass to gather component names
    var componentWillMountUniqueNames = new Set();

    if (pendingComponentWillMountWarnings.length > 0) {
      pendingComponentWillMountWarnings.forEach(function (fiber) {
        componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });
      pendingComponentWillMountWarnings = [];
    }

    var UNSAFE_componentWillMountUniqueNames = new Set();

    if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
      pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
        UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });
      pendingUNSAFE_ComponentWillMountWarnings = [];
    }

    var componentWillReceivePropsUniqueNames = new Set();

    if (pendingComponentWillReceivePropsWarnings.length > 0) {
      pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
        componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });
      pendingComponentWillReceivePropsWarnings = [];
    }

    var UNSAFE_componentWillReceivePropsUniqueNames = new Set();

    if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
      pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
        UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });
      pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
    }

    var componentWillUpdateUniqueNames = new Set();

    if (pendingComponentWillUpdateWarnings.length > 0) {
      pendingComponentWillUpdateWarnings.forEach(function (fiber) {
        componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });
      pendingComponentWillUpdateWarnings = [];
    }

    var UNSAFE_componentWillUpdateUniqueNames = new Set();

    if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
      pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
        UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutUnsafeLifecycles.add(fiber.type);
      });
      pendingUNSAFE_ComponentWillUpdateWarnings = [];
    } // Finally, we flush all the warnings
    // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'


    if (UNSAFE_componentWillMountUniqueNames.size > 0) {
      var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);

      error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
    }

    if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
      var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);

      error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
    }

    if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
      var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);

      error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
    }

    if (componentWillMountUniqueNames.size > 0) {
      var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);

      warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
    }

    if (componentWillReceivePropsUniqueNames.size > 0) {
      var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);

      warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
    }

    if (componentWillUpdateUniqueNames.size > 0) {
      var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);

      warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
    }
  };

  var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.

  var didWarnAboutLegacyContext = new Set();

  ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
    var strictRoot = findStrictRoot(fiber);

    if (strictRoot === null) {
      error('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.');

      return;
    } // Dedup strategy: Warn once per component.


    if (didWarnAboutLegacyContext.has(fiber.type)) {
      return;
    }

    var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);

    if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
      if (warningsForRoot === undefined) {
        warningsForRoot = [];
        pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
      }

      warningsForRoot.push(fiber);
    }
  };

  ReactStrictModeWarnings.flushLegacyContextWarning = function () {
    pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
      if (fiberArray.length === 0) {
        return;
      }

      var firstFiber = fiberArray[0];
      var uniqueNames = new Set();
      fiberArray.forEach(function (fiber) {
        uniqueNames.add(getComponentName(fiber.type) || 'Component');
        didWarnAboutLegacyContext.add(fiber.type);
      });
      var sortedNames = setToSortedString(uniqueNames);
      var firstComponentStack = getStackByFiberInDevAndProd(firstFiber);

      error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://fb.me/react-legacy-context' + '%s', sortedNames, firstComponentStack);
    });
  };

  ReactStrictModeWarnings.discardPendingWarnings = function () {
    pendingComponentWillMountWarnings = [];
    pendingUNSAFE_ComponentWillMountWarnings = [];
    pendingComponentWillReceivePropsWarnings = [];
    pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
    pendingComponentWillUpdateWarnings = [];
    pendingUNSAFE_ComponentWillUpdateWarnings = [];
    pendingLegacyContextWarning = new Map();
  };
}

var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.

var failedBoundaries = null;
var setRefreshHandler = function (handler) {
  {
    resolveFamily = handler;
  }
};
function resolveFunctionForHotReloading(type) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return type;
    }

    var family = resolveFamily(type);

    if (family === undefined) {
      return type;
    } // Use the latest known implementation.


    return family.current;
  }
}
function resolveClassForHotReloading(type) {
  // No implementation differences.
  return resolveFunctionForHotReloading(type);
}
function resolveForwardRefForHotReloading(type) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return type;
    }

    var family = resolveFamily(type);

    if (family === undefined) {
      // Check if we're dealing with a real forwardRef. Don't want to crash early.
      if (type !== null && type !== undefined && typeof type.render === 'function') {
        // ForwardRef is special because its resolved .type is an object,
        // but it's possible that we only have its inner render function in the map.
        // If that inner render function is different, we'll build a new forwardRef type.
        var currentRender = resolveFunctionForHotReloading(type.render);

        if (type.render !== currentRender) {
          var syntheticType = {
            $$typeof: REACT_FORWARD_REF_TYPE,
            render: currentRender
          };

          if (type.displayName !== undefined) {
            syntheticType.displayName = type.displayName;
          }

          return syntheticType;
        }
      }

      return type;
    } // Use the latest known implementation.


    return family.current;
  }
}
function isCompatibleFamilyForHotReloading(fiber, element) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return false;
    }

    var prevType = fiber.elementType;
    var nextType = element.type; // If we got here, we know types aren't === equal.

    var needsCompareFamilies = false;
    var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;

    switch (fiber.tag) {
      case ClassComponent:
        {
          if (typeof nextType === 'function') {
            needsCompareFamilies = true;
          }

          break;
        }

      case FunctionComponent:
        {
          if (typeof nextType === 'function') {
            needsCompareFamilies = true;
          } else if ($$typeofNextType === REACT_LAZY_TYPE) {
            // We don't know the inner type yet.
            // We're going to assume that the lazy inner type is stable,
            // and so it is sufficient to avoid reconciling it away.
            // We're not going to unwrap or actually use the new lazy type.
            needsCompareFamilies = true;
          }

          break;
        }

      case ForwardRef:
        {
          if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
            needsCompareFamilies = true;
          } else if ($$typeofNextType === REACT_LAZY_TYPE) {
            needsCompareFamilies = true;
          }

          break;
        }

      case MemoComponent:
      case SimpleMemoComponent:
        {
          if ($$typeofNextType === REACT_MEMO_TYPE) {
            // TODO: if it was but can no longer be simple,
            // we shouldn't set this.
            needsCompareFamilies = true;
          } else if ($$typeofNextType === REACT_LAZY_TYPE) {
            needsCompareFamilies = true;
          }

          break;
        }

      default:
        return false;
    } // Check if both types have a family and it's the same one.


    if (needsCompareFamilies) {
      // Note: memo() and forwardRef() we'll compare outer rather than inner type.
      // This means both of them need to be registered to preserve state.
      // If we unwrapped and compared the inner types for wrappers instead,
      // then we would risk falsely saying two separate memo(Foo)
      // calls are equivalent because they wrap the same Foo function.
      var prevFamily = resolveFamily(prevType);

      if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
        return true;
      }
    }

    return false;
  }
}
function markFailedErrorBoundaryForHotReloading(fiber) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return;
    }

    if (typeof WeakSet !== 'function') {
      return;
    }

    if (failedBoundaries === null) {
      failedBoundaries = new WeakSet();
    }

    failedBoundaries.add(fiber);
  }
}
var scheduleRefresh = function (root, update) {
  {
    if (resolveFamily === null) {
      // Hot reloading is disabled.
      return;
    }

    var staleFamilies = update.staleFamilies,
        updatedFamilies = update.updatedFamilies;
    flushPassiveEffects();
    flushSync(function () {
      scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
    });
  }
};
var scheduleRoot = function (root, element) {
  {
    if (root.context !== emptyContextObject) {
      // Super edge case: root has a legacy _renderSubtree context
      // but we don't know the parentComponent so we can't pass it.
      // Just ignore. We'll delete this with _renderSubtree code path later.
      return;
    }

    flushPassiveEffects();
    syncUpdates(function () {
      updateContainer(element, root, null, null);
    });
  }
};

function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
  {
    var alternate = fiber.alternate,
        child = fiber.child,
        sibling = fiber.sibling,
        tag = fiber.tag,
        type = fiber.type;
    var candidateType = null;

    switch (tag) {
      case FunctionComponent:
      case SimpleMemoComponent:
      case ClassComponent:
        candidateType = type;
        break;

      case ForwardRef:
        candidateType = type.render;
        break;
    }

    if (resolveFamily === null) {
      throw new Error('Expected resolveFamily to be set during hot reload.');
    }

    var needsRender = false;
    var needsRemount = false;

    if (candidateType !== null) {
      var family = resolveFamily(candidateType);

      if (family !== undefined) {
        if (staleFamilies.has(family)) {
          needsRemount = true;
        } else if (updatedFamilies.has(family)) {
          if (tag === ClassComponent) {
            needsRemount = true;
          } else {
            needsRender = true;
          }
        }
      }
    }

    if (failedBoundaries !== null) {
      if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
        needsRemount = true;
      }
    }

    if (needsRemount) {
      fiber._debugNeedsRemount = true;
    }

    if (needsRemount || needsRender) {
      scheduleWork(fiber, Sync);
    }

    if (child !== null && !needsRemount) {
      scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
    }

    if (sibling !== null) {
      scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
    }
  }
}

var findHostInstancesForRefresh = function (root, families) {
  {
    var hostInstances = new Set();
    var types = new Set(families.map(function (family) {
      return family.current;
    }));
    findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
    return hostInstances;
  }
};

function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
  {
    var child = fiber.child,
        sibling = fiber.sibling,
        tag = fiber.tag,
        type = fiber.type;
    var candidateType = null;

    switch (tag) {
      case FunctionComponent:
      case SimpleMemoComponent:
      case ClassComponent:
        candidateType = type;
        break;

      case ForwardRef:
        candidateType = type.render;
        break;
    }

    var didMatch = false;

    if (candidateType !== null) {
      if (types.has(candidateType)) {
        didMatch = true;
      }
    }

    if (didMatch) {
      // We have a match. This only drills down to the closest host components.
      // There's no need to search deeper because for the purpose of giving
      // visual feedback, "flashing" outermost parent rectangles is sufficient.
      findHostInstancesForFiberShallowly(fiber, hostInstances);
    } else {
      // If there's no match, maybe there will be one further down in the child tree.
      if (child !== null) {
        findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
      }
    }

    if (sibling !== null) {
      findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
    }
  }
}

function findHostInstancesForFiberShallowly(fiber, hostInstances) {
  {
    var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);

    if (foundHostInstances) {
      return;
    } // If we didn't find any host children, fallback to closest host parent.


    var node = fiber;

    while (true) {
      switch (node.tag) {
        case HostComponent:
          hostInstances.add(node.stateNode);
          return;

        case HostPortal:
          hostInstances.add(node.stateNode.containerInfo);
          return;

        case HostRoot:
          hostInstances.add(node.stateNode.containerInfo);
          return;
      }

      if (node.return === null) {
        throw new Error('Expected to reach root first.');
      }

      node = node.return;
    }
  }
}

function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
  {
    var node = fiber;
    var foundHostInstances = false;

    while (true) {
      if (node.tag === HostComponent) {
        // We got a match.
        foundHostInstances = true;
        hostInstances.add(node.stateNode); // There may still be more, so keep searching.
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }

      if (node === fiber) {
        return foundHostInstances;
      }

      while (node.sibling === null) {
        if (node.return === null || node.return === fiber) {
          return foundHostInstances;
        }

        node = node.return;
      }

      node.sibling.return = node.return;
      node = node.sibling;
    }
  }

  return false;
}

function resolveDefaultProps(Component, baseProps) {
  if (Component && Component.defaultProps) {
    // Resolve default props. Taken from ReactElement
    var props = _assign({}, baseProps);

    var defaultProps = Component.defaultProps;

    for (var propName in defaultProps) {
      if (props[propName] === undefined) {
        props[propName] = defaultProps[propName];
      }
    }

    return props;
  }

  return baseProps;
}
function readLazyComponentType(lazyComponent) {
  initializeLazyComponentType(lazyComponent);

  if (lazyComponent._status !== Resolved) {
    throw lazyComponent._result;
  }

  return lazyComponent._result;
}

var valueCursor = createCursor(null);
var rendererSigil;

{
  // Use this to detect multiple renderers using the same context
  rendererSigil = {};
}

var currentlyRenderingFiber = null;
var lastContextDependency = null;
var lastContextWithAllBitsObserved = null;
var isDisallowedContextReadInDEV = false;
function resetContextDependencies() {
  // This is called right before React yields execution, to ensure `readContext`
  // cannot be called outside the render phase.
  currentlyRenderingFiber = null;
  lastContextDependency = null;
  lastContextWithAllBitsObserved = null;

  {
    isDisallowedContextReadInDEV = false;
  }
}
function enterDisallowedContextReadInDEV() {
  {
    isDisallowedContextReadInDEV = true;
  }
}
function exitDisallowedContextReadInDEV() {
  {
    isDisallowedContextReadInDEV = false;
  }
}
function pushProvider(providerFiber, nextValue) {
  var context = providerFiber.type._context;

  {
    push(valueCursor, context._currentValue, providerFiber);
    context._currentValue = nextValue;

    {
      if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
        error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
      }

      context._currentRenderer = rendererSigil;
    }
  }
}
function popProvider(providerFiber) {
  var currentValue = valueCursor.current;
  pop(valueCursor, providerFiber);
  var context = providerFiber.type._context;

  {
    context._currentValue = currentValue;
  }
}
function calculateChangedBits(context, newValue, oldValue) {
  if (objectIs(oldValue, newValue)) {
    // No change
    return 0;
  } else {
    var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;

    {
      if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {
        error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
      }
    }

    return changedBits | 0;
  }
}
function scheduleWorkOnParentPath(parent, renderExpirationTime) {
  // Update the child expiration time of all the ancestors, including
  // the alternates.
  var node = parent;

  while (node !== null) {
    var alternate = node.alternate;

    if (node.childExpirationTime < renderExpirationTime) {
      node.childExpirationTime = renderExpirationTime;

      if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
        alternate.childExpirationTime = renderExpirationTime;
      }
    } else if (alternate !== null && alternate.childExpirationTime < renderExpirationTime) {
      alternate.childExpirationTime = renderExpirationTime;
    } else {
      // Neither alternate was updated, which means the rest of the
      // ancestor path already has sufficient priority.
      break;
    }

    node = node.return;
  }
}
function propagateContextChange(workInProgress, context, changedBits, renderExpirationTime) {
  var fiber = workInProgress.child;

  if (fiber !== null) {
    // Set the return pointer of the child to the work-in-progress fiber.
    fiber.return = workInProgress;
  }

  while (fiber !== null) {
    var nextFiber = void 0; // Visit this fiber.

    var list = fiber.dependencies;

    if (list !== null) {
      nextFiber = fiber.child;
      var dependency = list.firstContext;

      while (dependency !== null) {
        // Check if the context matches.
        if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
          // Match! Schedule an update on this fiber.
          if (fiber.tag === ClassComponent) {
            // Schedule a force update on the work-in-progress.
            var update = createUpdate(renderExpirationTime, null);
            update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
            // update to the current fiber, too, which means it will persist even if
            // this render is thrown away. Since it's a race condition, not sure it's
            // worth fixing.

            enqueueUpdate(fiber, update);
          }

          if (fiber.expirationTime < renderExpirationTime) {
            fiber.expirationTime = renderExpirationTime;
          }

          var alternate = fiber.alternate;

          if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
            alternate.expirationTime = renderExpirationTime;
          }

          scheduleWorkOnParentPath(fiber.return, renderExpirationTime); // Mark the expiration time on the list, too.

          if (list.expirationTime < renderExpirationTime) {
            list.expirationTime = renderExpirationTime;
          } // Since we already found a match, we can stop traversing the
          // dependency list.


          break;
        }

        dependency = dependency.next;
      }
    } else if (fiber.tag === ContextProvider) {
      // Don't scan deeper if this is a matching provider
      nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
    } else {
      // Traverse down.
      nextFiber = fiber.child;
    }

    if (nextFiber !== null) {
      // Set the return pointer of the child to the work-in-progress fiber.
      nextFiber.return = fiber;
    } else {
      // No child. Traverse to next sibling.
      nextFiber = fiber;

      while (nextFiber !== null) {
        if (nextFiber === workInProgress) {
          // We're back to the root of this subtree. Exit.
          nextFiber = null;
          break;
        }

        var sibling = nextFiber.sibling;

        if (sibling !== null) {
          // Set the return pointer of the sibling to the work-in-progress fiber.
          sibling.return = nextFiber.return;
          nextFiber = sibling;
          break;
        } // No more siblings. Traverse up.


        nextFiber = nextFiber.return;
      }
    }

    fiber = nextFiber;
  }
}
function prepareToReadContext(workInProgress, renderExpirationTime) {
  currentlyRenderingFiber = workInProgress;
  lastContextDependency = null;
  lastContextWithAllBitsObserved = null;
  var dependencies = workInProgress.dependencies;

  if (dependencies !== null) {
    var firstContext = dependencies.firstContext;

    if (firstContext !== null) {
      if (dependencies.expirationTime >= renderExpirationTime) {
        // Context list has a pending update. Mark that this fiber performed work.
        markWorkInProgressReceivedUpdate();
      } // Reset the work-in-progress list


      dependencies.firstContext = null;
    }
  }
}
function readContext(context, observedBits) {
  {
    // This warning would fire if you read context inside a Hook like useMemo.
    // Unlike the class check below, it's not enforced in production for perf.
    if (isDisallowedContextReadInDEV) {
      error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
    }
  }

  if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {
    var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.

    if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {
      // Observe all updates.
      lastContextWithAllBitsObserved = context;
      resolvedObservedBits = MAX_SIGNED_31_BIT_INT;
    } else {
      resolvedObservedBits = observedBits;
    }

    var contextItem = {
      context: context,
      observedBits: resolvedObservedBits,
      next: null
    };

    if (lastContextDependency === null) {
      if (!(currentlyRenderingFiber !== null)) {
        {
          throw Error( "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()." );
        }
      } // This is the first dependency for this component. Create a new list.


      lastContextDependency = contextItem;
      currentlyRenderingFiber.dependencies = {
        expirationTime: NoWork,
        firstContext: contextItem,
        responders: null
      };
    } else {
      // Append a new context item.
      lastContextDependency = lastContextDependency.next = contextItem;
    }
  }

  return  context._currentValue ;
}

var UpdateState = 0;
var ReplaceState = 1;
var ForceUpdate = 2;
var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.
// It should only be read right after calling `processUpdateQueue`, via
// `checkHasForceUpdateAfterProcessing`.

var hasForceUpdate = false;
var didWarnUpdateInsideUpdate;
var currentlyProcessingQueue;

{
  didWarnUpdateInsideUpdate = false;
  currentlyProcessingQueue = null;
}

function initializeUpdateQueue(fiber) {
  var queue = {
    baseState: fiber.memoizedState,
    baseQueue: null,
    shared: {
      pending: null
    },
    effects: null
  };
  fiber.updateQueue = queue;
}
function cloneUpdateQueue(current, workInProgress) {
  // Clone the update queue from current. Unless it's already a clone.
  var queue = workInProgress.updateQueue;
  var currentQueue = current.updateQueue;

  if (queue === currentQueue) {
    var clone = {
      baseState: currentQueue.baseState,
      baseQueue: currentQueue.baseQueue,
      shared: currentQueue.shared,
      effects: currentQueue.effects
    };
    workInProgress.updateQueue = clone;
  }
}
function createUpdate(expirationTime, suspenseConfig) {
  var update = {
    expirationTime: expirationTime,
    suspenseConfig: suspenseConfig,
    tag: UpdateState,
    payload: null,
    callback: null,
    next: null
  };
  update.next = update;

  {
    update.priority = getCurrentPriorityLevel();
  }

  return update;
}
function enqueueUpdate(fiber, update) {
  var updateQueue = fiber.updateQueue;

  if (updateQueue === null) {
    // Only occurs if the fiber has been unmounted.
    return;
  }

  var sharedQueue = updateQueue.shared;
  var pending = sharedQueue.pending;

  if (pending === null) {
    // This is the first update. Create a circular list.
    update.next = update;
  } else {
    update.next = pending.next;
    pending.next = update;
  }

  sharedQueue.pending = update;

  {
    if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
      error('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.');

      didWarnUpdateInsideUpdate = true;
    }
  }
}
function enqueueCapturedUpdate(workInProgress, update) {
  var current = workInProgress.alternate;

  if (current !== null) {
    // Ensure the work-in-progress queue is a clone
    cloneUpdateQueue(current, workInProgress);
  } // Captured updates go only on the work-in-progress queue.


  var queue = workInProgress.updateQueue; // Append the update to the end of the list.

  var last = queue.baseQueue;

  if (last === null) {
    queue.baseQueue = update.next = update;
    update.next = update;
  } else {
    update.next = last.next;
    last.next = update;
  }
}

function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
  switch (update.tag) {
    case ReplaceState:
      {
        var payload = update.payload;

        if (typeof payload === 'function') {
          // Updater function
          {
            enterDisallowedContextReadInDEV();

            if ( workInProgress.mode & StrictMode) {
              payload.call(instance, prevState, nextProps);
            }
          }

          var nextState = payload.call(instance, prevState, nextProps);

          {
            exitDisallowedContextReadInDEV();
          }

          return nextState;
        } // State object


        return payload;
      }

    case CaptureUpdate:
      {
        workInProgress.effectTag = workInProgress.effectTag & ~ShouldCapture | DidCapture;
      }
    // Intentional fallthrough

    case UpdateState:
      {
        var _payload = update.payload;
        var partialState;

        if (typeof _payload === 'function') {
          // Updater function
          {
            enterDisallowedContextReadInDEV();

            if ( workInProgress.mode & StrictMode) {
              _payload.call(instance, prevState, nextProps);
            }
          }

          partialState = _payload.call(instance, prevState, nextProps);

          {
            exitDisallowedContextReadInDEV();
          }
        } else {
          // Partial state object
          partialState = _payload;
        }

        if (partialState === null || partialState === undefined) {
          // Null and undefined are treated as no-ops.
          return prevState;
        } // Merge the partial state and the previous state.


        return _assign({}, prevState, partialState);
      }

    case ForceUpdate:
      {
        hasForceUpdate = true;
        return prevState;
      }
  }

  return prevState;
}

function processUpdateQueue(workInProgress, props, instance, renderExpirationTime) {
  // This is always non-null on a ClassComponent or HostRoot
  var queue = workInProgress.updateQueue;
  hasForceUpdate = false;

  {
    currentlyProcessingQueue = queue.shared;
  } // The last rebase update that is NOT part of the base state.


  var baseQueue = queue.baseQueue; // The last pending update that hasn't been processed yet.

  var pendingQueue = queue.shared.pending;

  if (pendingQueue !== null) {
    // We have new updates that haven't been processed yet.
    // We'll add them to the base queue.
    if (baseQueue !== null) {
      // Merge the pending queue and the base queue.
      var baseFirst = baseQueue.next;
      var pendingFirst = pendingQueue.next;
      baseQueue.next = pendingFirst;
      pendingQueue.next = baseFirst;
    }

    baseQueue = pendingQueue;
    queue.shared.pending = null; // TODO: Pass `current` as argument

    var current = workInProgress.alternate;

    if (current !== null) {
      var currentQueue = current.updateQueue;

      if (currentQueue !== null) {
        currentQueue.baseQueue = pendingQueue;
      }
    }
  } // These values may change as we process the queue.


  if (baseQueue !== null) {
    var first = baseQueue.next; // Iterate through the list of updates to compute the result.

    var newState = queue.baseState;
    var newExpirationTime = NoWork;
    var newBaseState = null;
    var newBaseQueueFirst = null;
    var newBaseQueueLast = null;

    if (first !== null) {
      var update = first;

      do {
        var updateExpirationTime = update.expirationTime;

        if (updateExpirationTime < renderExpirationTime) {
          // Priority is insufficient. Skip this update. If this is the first
          // skipped update, the previous update/state is the new base
          // update/state.
          var clone = {
            expirationTime: update.expirationTime,
            suspenseConfig: update.suspenseConfig,
            tag: update.tag,
            payload: update.payload,
            callback: update.callback,
            next: null
          };

          if (newBaseQueueLast === null) {
            newBaseQueueFirst = newBaseQueueLast = clone;
            newBaseState = newState;
          } else {
            newBaseQueueLast = newBaseQueueLast.next = clone;
          } // Update the remaining priority in the queue.


          if (updateExpirationTime > newExpirationTime) {
            newExpirationTime = updateExpirationTime;
          }
        } else {
          // This update does have sufficient priority.
          if (newBaseQueueLast !== null) {
            var _clone = {
              expirationTime: Sync,
              // This update is going to be committed so we never want uncommit it.
              suspenseConfig: update.suspenseConfig,
              tag: update.tag,
              payload: update.payload,
              callback: update.callback,
              next: null
            };
            newBaseQueueLast = newBaseQueueLast.next = _clone;
          } // Mark the event time of this update as relevant to this render pass.
          // TODO: This should ideally use the true event time of this update rather than
          // its priority which is a derived and not reverseable value.
          // TODO: We should skip this update if it was already committed but currently
          // we have no way of detecting the difference between a committed and suspended
          // update here.


          markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.

          newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
          var callback = update.callback;

          if (callback !== null) {
            workInProgress.effectTag |= Callback;
            var effects = queue.effects;

            if (effects === null) {
              queue.effects = [update];
            } else {
              effects.push(update);
            }
          }
        }

        update = update.next;

        if (update === null || update === first) {
          pendingQueue = queue.shared.pending;

          if (pendingQueue === null) {
            break;
          } else {
            // An update was scheduled from inside a reducer. Add the new
            // pending updates to the end of the list and keep processing.
            update = baseQueue.next = pendingQueue.next;
            pendingQueue.next = first;
            queue.baseQueue = baseQueue = pendingQueue;
            queue.shared.pending = null;
          }
        }
      } while (true);
    }

    if (newBaseQueueLast === null) {
      newBaseState = newState;
    } else {
      newBaseQueueLast.next = newBaseQueueFirst;
    }

    queue.baseState = newBaseState;
    queue.baseQueue = newBaseQueueLast; // Set the remaining expiration time to be whatever is remaining in the queue.
    // This should be fine because the only two other things that contribute to
    // expiration time are props and context. We're already in the middle of the
    // begin phase by the time we start processing the queue, so we've already
    // dealt with the props. Context in components that specify
    // shouldComponentUpdate is tricky; but we'll have to account for
    // that regardless.

    markUnprocessedUpdateTime(newExpirationTime);
    workInProgress.expirationTime = newExpirationTime;
    workInProgress.memoizedState = newState;
  }

  {
    currentlyProcessingQueue = null;
  }
}

function callCallback(callback, context) {
  if (!(typeof callback === 'function')) {
    {
      throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + callback );
    }
  }

  callback.call(context);
}

function resetHasForceUpdateBeforeProcessing() {
  hasForceUpdate = false;
}
function checkHasForceUpdateAfterProcessing() {
  return hasForceUpdate;
}
function commitUpdateQueue(finishedWork, finishedQueue, instance) {
  // Commit the effects
  var effects = finishedQueue.effects;
  finishedQueue.effects = null;

  if (effects !== null) {
    for (var i = 0; i < effects.length; i++) {
      var effect = effects[i];
      var callback = effect.callback;

      if (callback !== null) {
        effect.callback = null;
        callCallback(callback, instance);
      }
    }
  }
}

var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
function requestCurrentSuspenseConfig() {
  return ReactCurrentBatchConfig.suspense;
}

var fakeInternalInstance = {};
var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
// We'll use it to determine whether we need to initialize legacy refs.

var emptyRefsObject = new React.Component().refs;
var didWarnAboutStateAssignmentForComponent;
var didWarnAboutUninitializedState;
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
var didWarnAboutLegacyLifecyclesAndDerivedState;
var didWarnAboutUndefinedDerivedState;
var warnOnUndefinedDerivedState;
var warnOnInvalidCallback;
var didWarnAboutDirectlyAssigningPropsToState;
var didWarnAboutContextTypeAndContextTypes;
var didWarnAboutInvalidateContextType;

{
  didWarnAboutStateAssignmentForComponent = new Set();
  didWarnAboutUninitializedState = new Set();
  didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
  didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
  didWarnAboutDirectlyAssigningPropsToState = new Set();
  didWarnAboutUndefinedDerivedState = new Set();
  didWarnAboutContextTypeAndContextTypes = new Set();
  didWarnAboutInvalidateContextType = new Set();
  var didWarnOnInvalidCallback = new Set();

  warnOnInvalidCallback = function (callback, callerName) {
    if (callback === null || typeof callback === 'function') {
      return;
    }

    var key = callerName + "_" + callback;

    if (!didWarnOnInvalidCallback.has(key)) {
      didWarnOnInvalidCallback.add(key);

      error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
    }
  };

  warnOnUndefinedDerivedState = function (type, partialState) {
    if (partialState === undefined) {
      var componentName = getComponentName(type) || 'Component';

      if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
        didWarnAboutUndefinedDerivedState.add(componentName);

        error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
      }
    }
  }; // This is so gross but it's at least non-critical and can be removed if
  // it causes problems. This is meant to give a nicer error message for
  // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
  // ...)) which otherwise throws a "_processChildContext is not a function"
  // exception.


  Object.defineProperty(fakeInternalInstance, '_processChildContext', {
    enumerable: false,
    value: function () {
      {
        {
          throw Error( "_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(fakeInternalInstance);
}

function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
  var prevState = workInProgress.memoizedState;

  {
    if ( workInProgress.mode & StrictMode) {
      // Invoke the function an extra time to help detect side-effects.
      getDerivedStateFromProps(nextProps, prevState);
    }
  }

  var partialState = getDerivedStateFromProps(nextProps, prevState);

  {
    warnOnUndefinedDerivedState(ctor, partialState);
  } // Merge the partial state and the previous state.


  var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
  workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
  // base state.

  if (workInProgress.expirationTime === NoWork) {
    // Queue is always non-null for classes
    var updateQueue = workInProgress.updateQueue;
    updateQueue.baseState = memoizedState;
  }
}
var classComponentUpdater = {
  isMounted: isMounted,
  enqueueSetState: function (inst, payload, callback) {
    var fiber = get(inst);
    var currentTime = requestCurrentTimeForUpdate();
    var suspenseConfig = requestCurrentSuspenseConfig();
    var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
    var update = createUpdate(expirationTime, suspenseConfig);
    update.payload = payload;

    if (callback !== undefined && callback !== null) {
      {
        warnOnInvalidCallback(callback, 'setState');
      }

      update.callback = callback;
    }

    enqueueUpdate(fiber, update);
    scheduleWork(fiber, expirationTime);
  },
  enqueueReplaceState: function (inst, payload, callback) {
    var fiber = get(inst);
    var currentTime = requestCurrentTimeForUpdate();
    var suspenseConfig = requestCurrentSuspenseConfig();
    var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
    var update = createUpdate(expirationTime, suspenseConfig);
    update.tag = ReplaceState;
    update.payload = payload;

    if (callback !== undefined && callback !== null) {
      {
        warnOnInvalidCallback(callback, 'replaceState');
      }

      update.callback = callback;
    }

    enqueueUpdate(fiber, update);
    scheduleWork(fiber, expirationTime);
  },
  enqueueForceUpdate: function (inst, callback) {
    var fiber = get(inst);
    var currentTime = requestCurrentTimeForUpdate();
    var suspenseConfig = requestCurrentSuspenseConfig();
    var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
    var update = createUpdate(expirationTime, suspenseConfig);
    update.tag = ForceUpdate;

    if (callback !== undefined && callback !== null) {
      {
        warnOnInvalidCallback(callback, 'forceUpdate');
      }

      update.callback = callback;
    }

    enqueueUpdate(fiber, update);
    scheduleWork(fiber, expirationTime);
  }
};

function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
  var instance = workInProgress.stateNode;

  if (typeof instance.shouldComponentUpdate === 'function') {
    {
      if ( workInProgress.mode & StrictMode) {
        // Invoke the function an extra time to help detect side-effects.
        instance.shouldComponentUpdate(newProps, newState, nextContext);
      }
    }

    startPhaseTimer(workInProgress, 'shouldComponentUpdate');
    var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
    stopPhaseTimer();

    {
      if (shouldUpdate === undefined) {
        error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');
      }
    }

    return shouldUpdate;
  }

  if (ctor.prototype && ctor.prototype.isPureReactComponent) {
    return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
  }

  return true;
}

function checkClassInstance(workInProgress, ctor, newProps) {
  var instance = workInProgress.stateNode;

  {
    var name = getComponentName(ctor) || 'Component';
    var renderPresent = instance.render;

    if (!renderPresent) {
      if (ctor.prototype && typeof ctor.prototype.render === 'function') {
        error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
      } else {
        error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
      }
    }

    if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
      error('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?', name);
    }

    if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
      error('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.', name);
    }

    if (instance.propTypes) {
      error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
    }

    if (instance.contextType) {
      error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
    }

    {
      if (instance.contextTypes) {
        error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
      }

      if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
        didWarnAboutContextTypeAndContextTypes.add(ctor);

        error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
      }
    }

    if (typeof instance.componentShouldUpdate === 'function') {
      error('%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.', name);
    }

    if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
      error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
    }

    if (typeof instance.componentDidUnmount === 'function') {
      error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
    }

    if (typeof instance.componentDidReceiveProps === 'function') {
      error('%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().', name);
    }

    if (typeof instance.componentWillRecieveProps === 'function') {
      error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
    }

    if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
      error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
    }

    var hasMutatedProps = instance.props !== newProps;

    if (instance.props !== undefined && hasMutatedProps) {
      error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
    }

    if (instance.defaultProps) {
      error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
    }

    if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
      didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);

      error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
    }

    if (typeof instance.getDerivedStateFromProps === 'function') {
      error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
    }

    if (typeof instance.getDerivedStateFromError === 'function') {
      error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
    }

    if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
      error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
    }

    var _state = instance.state;

    if (_state && (typeof _state !== 'object' || isArray(_state))) {
      error('%s.state: must be set to an object or null', name);
    }

    if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
      error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
    }
  }
}

function adoptClassInstance(workInProgress, instance) {
  instance.updater = classComponentUpdater;
  workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates

  set(instance, workInProgress);

  {
    instance._reactInternalInstance = fakeInternalInstance;
  }
}

function constructClassInstance(workInProgress, ctor, props) {
  var isLegacyContextConsumer = false;
  var unmaskedContext = emptyContextObject;
  var context = emptyContextObject;
  var contextType = ctor.contextType;

  {
    if ('contextType' in ctor) {
      var isValid = // Allow null for conditional declaration
      contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>

      if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
        didWarnAboutInvalidateContextType.add(ctor);
        var addendum = '';

        if (contextType === undefined) {
          addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
        } else if (typeof contextType !== 'object') {
          addendum = ' However, it is set to a ' + typeof contextType + '.';
        } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
          addendum = ' Did you accidentally pass the Context.Provider instead?';
        } else if (contextType._context !== undefined) {
          // <Context.Consumer>
          addendum = ' Did you accidentally pass the Context.Consumer instead?';
        } else {
          addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
        }

        error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);
      }
    }
  }

  if (typeof contextType === 'object' && contextType !== null) {
    context = readContext(contextType);
  } else {
    unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
    var contextTypes = ctor.contextTypes;
    isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
    context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
  } // Instantiate twice to help detect side-effects.


  {
    if ( workInProgress.mode & StrictMode) {
      new ctor(props, context); // eslint-disable-line no-new
    }
  }

  var instance = new ctor(props, context);
  var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
  adoptClassInstance(workInProgress, instance);

  {
    if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
      var componentName = getComponentName(ctor) || 'Component';

      if (!didWarnAboutUninitializedState.has(componentName)) {
        didWarnAboutUninitializedState.add(componentName);

        error('`%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.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
      }
    } // If new component APIs are defined, "unsafe" lifecycles won't be called.
    // Warn about these lifecycles if they are present.
    // Don't warn about react-lifecycles-compat polyfilled methods though.


    if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
      var foundWillMountName = null;
      var foundWillReceivePropsName = null;
      var foundWillUpdateName = null;

      if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
        foundWillMountName = 'componentWillMount';
      } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
        foundWillMountName = 'UNSAFE_componentWillMount';
      }

      if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
        foundWillReceivePropsName = 'componentWillReceiveProps';
      } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
        foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
      }

      if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
        foundWillUpdateName = 'componentWillUpdate';
      } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
        foundWillUpdateName = 'UNSAFE_componentWillUpdate';
      }

      if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
        var _componentName = getComponentName(ctor) || 'Component';

        var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';

        if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
          didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);

          error('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\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n  " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n  " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n  " + foundWillUpdateName : '');
        }
      }
    }
  } // Cache unmasked context so we can avoid recreating masked context unless necessary.
  // ReactFiberContext usually updates this cache but can't for newly-created instances.


  if (isLegacyContextConsumer) {
    cacheContext(workInProgress, unmaskedContext, context);
  }

  return instance;
}

function callComponentWillMount(workInProgress, instance) {
  startPhaseTimer(workInProgress, 'componentWillMount');
  var oldState = instance.state;

  if (typeof instance.componentWillMount === 'function') {
    instance.componentWillMount();
  }

  if (typeof instance.UNSAFE_componentWillMount === 'function') {
    instance.UNSAFE_componentWillMount();
  }

  stopPhaseTimer();

  if (oldState !== instance.state) {
    {
      error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
    }

    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  }
}

function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
  var oldState = instance.state;
  startPhaseTimer(workInProgress, 'componentWillReceiveProps');

  if (typeof instance.componentWillReceiveProps === 'function') {
    instance.componentWillReceiveProps(newProps, nextContext);
  }

  if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
    instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  }

  stopPhaseTimer();

  if (instance.state !== oldState) {
    {
      var componentName = getComponentName(workInProgress.type) || 'Component';

      if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
        didWarnAboutStateAssignmentForComponent.add(componentName);

        error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
      }
    }

    classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  }
} // Invokes the mount life-cycles on a previously never rendered instance.


function mountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
  {
    checkClassInstance(workInProgress, ctor, newProps);
  }

  var instance = workInProgress.stateNode;
  instance.props = newProps;
  instance.state = workInProgress.memoizedState;
  instance.refs = emptyRefsObject;
  initializeUpdateQueue(workInProgress);
  var contextType = ctor.contextType;

  if (typeof contextType === 'object' && contextType !== null) {
    instance.context = readContext(contextType);
  } else {
    var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
    instance.context = getMaskedContext(workInProgress, unmaskedContext);
  }

  {
    if (instance.state === newProps) {
      var componentName = getComponentName(ctor) || 'Component';

      if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
        didWarnAboutDirectlyAssigningPropsToState.add(componentName);

        error('%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.', componentName);
      }
    }

    if (workInProgress.mode & StrictMode) {
      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
    }

    {
      ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
    }
  }

  processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  instance.state = workInProgress.memoizedState;
  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;

  if (typeof getDerivedStateFromProps === 'function') {
    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
    instance.state = workInProgress.memoizedState;
  } // In order to support react-lifecycles-compat polyfilled components,
  // Unsafe lifecycles should not be invoked for components using the new APIs.


  if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
    callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
    // process them now.

    processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
    instance.state = workInProgress.memoizedState;
  }

  if (typeof instance.componentDidMount === 'function') {
    workInProgress.effectTag |= Update;
  }
}

function resumeMountClassInstance(workInProgress, ctor, newProps, renderExpirationTime) {
  var instance = workInProgress.stateNode;
  var oldProps = workInProgress.memoizedProps;
  instance.props = oldProps;
  var oldContext = instance.context;
  var contextType = ctor.contextType;
  var nextContext = emptyContextObject;

  if (typeof contextType === 'object' && contextType !== null) {
    nextContext = readContext(contextType);
  } else {
    var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
    nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
  }

  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
  // ever the previously attempted to render - not the "current". However,
  // during componentDidUpdate we pass the "current" props.
  // In order to support react-lifecycles-compat polyfilled components,
  // Unsafe lifecycles should not be invoked for components using the new APIs.

  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
    if (oldProps !== newProps || oldContext !== nextContext) {
      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
    }
  }

  resetHasForceUpdateBeforeProcessing();
  var oldState = workInProgress.memoizedState;
  var newState = instance.state = oldState;
  processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  newState = workInProgress.memoizedState;

  if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
    // If an update was already in progress, we should schedule an Update
    // effect even though we're bailing out, so that cWU/cDU are called.
    if (typeof instance.componentDidMount === 'function') {
      workInProgress.effectTag |= Update;
    }

    return false;
  }

  if (typeof getDerivedStateFromProps === 'function') {
    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
    newState = workInProgress.memoizedState;
  }

  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);

  if (shouldUpdate) {
    // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.
    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
      startPhaseTimer(workInProgress, 'componentWillMount');

      if (typeof instance.componentWillMount === 'function') {
        instance.componentWillMount();
      }

      if (typeof instance.UNSAFE_componentWillMount === 'function') {
        instance.UNSAFE_componentWillMount();
      }

      stopPhaseTimer();
    }

    if (typeof instance.componentDidMount === 'function') {
      workInProgress.effectTag |= Update;
    }
  } else {
    // If an update was already in progress, we should schedule an Update
    // effect even though we're bailing out, so that cWU/cDU are called.
    if (typeof instance.componentDidMount === 'function') {
      workInProgress.effectTag |= Update;
    } // If shouldComponentUpdate returned false, we should still update the
    // memoized state to indicate that this work can be reused.


    workInProgress.memoizedProps = newProps;
    workInProgress.memoizedState = newState;
  } // Update the existing instance's state, props, and context pointers even
  // if shouldComponentUpdate returns false.


  instance.props = newProps;
  instance.state = newState;
  instance.context = nextContext;
  return shouldUpdate;
} // Invokes the update life-cycles and returns false if it shouldn't rerender.


function updateClassInstance(current, workInProgress, ctor, newProps, renderExpirationTime) {
  var instance = workInProgress.stateNode;
  cloneUpdateQueue(current, workInProgress);
  var oldProps = workInProgress.memoizedProps;
  instance.props = workInProgress.type === workInProgress.elementType ? oldProps : resolveDefaultProps(workInProgress.type, oldProps);
  var oldContext = instance.context;
  var contextType = ctor.contextType;
  var nextContext = emptyContextObject;

  if (typeof contextType === 'object' && contextType !== null) {
    nextContext = readContext(contextType);
  } else {
    var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
    nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
  }

  var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
  var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
  // ever the previously attempted to render - not the "current". However,
  // during componentDidUpdate we pass the "current" props.
  // In order to support react-lifecycles-compat polyfilled components,
  // Unsafe lifecycles should not be invoked for components using the new APIs.

  if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
    if (oldProps !== newProps || oldContext !== nextContext) {
      callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
    }
  }

  resetHasForceUpdateBeforeProcessing();
  var oldState = workInProgress.memoizedState;
  var newState = instance.state = oldState;
  processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  newState = workInProgress.memoizedState;

  if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
    // If an update was already in progress, we should schedule an Update
    // effect even though we're bailing out, so that cWU/cDU are called.
    if (typeof instance.componentDidUpdate === 'function') {
      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.effectTag |= Update;
      }
    }

    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.effectTag |= Snapshot;
      }
    }

    return false;
  }

  if (typeof getDerivedStateFromProps === 'function') {
    applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
    newState = workInProgress.memoizedState;
  }

  var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);

  if (shouldUpdate) {
    // In order to support react-lifecycles-compat polyfilled components,
    // Unsafe lifecycles should not be invoked for components using the new APIs.
    if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
      startPhaseTimer(workInProgress, 'componentWillUpdate');

      if (typeof instance.componentWillUpdate === 'function') {
        instance.componentWillUpdate(newProps, newState, nextContext);
      }

      if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
        instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
      }

      stopPhaseTimer();
    }

    if (typeof instance.componentDidUpdate === 'function') {
      workInProgress.effectTag |= Update;
    }

    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
      workInProgress.effectTag |= Snapshot;
    }
  } else {
    // If an update was already in progress, we should schedule an Update
    // effect even though we're bailing out, so that cWU/cDU are called.
    if (typeof instance.componentDidUpdate === 'function') {
      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.effectTag |= Update;
      }
    }

    if (typeof instance.getSnapshotBeforeUpdate === 'function') {
      if (oldProps !== current.memoizedProps || oldState !== current.memoizedState) {
        workInProgress.effectTag |= Snapshot;
      }
    } // If shouldComponentUpdate returned false, we should still update the
    // memoized props/state to indicate that this work can be reused.


    workInProgress.memoizedProps = newProps;
    workInProgress.memoizedState = newState;
  } // Update the existing instance's state, props, and context pointers even
  // if shouldComponentUpdate returns false.


  instance.props = newProps;
  instance.state = newState;
  instance.context = nextContext;
  return shouldUpdate;
}

var didWarnAboutMaps;
var didWarnAboutGenerators;
var didWarnAboutStringRefs;
var ownerHasKeyUseWarning;
var ownerHasFunctionTypeWarning;

var warnForMissingKey = function (child) {};

{
  didWarnAboutMaps = false;
  didWarnAboutGenerators = false;
  didWarnAboutStringRefs = {};
  /**
   * Warn if there's no key explicitly set on dynamic arrays of children or
   * object keys are not valid. This allows us to keep track of children between
   * updates.
   */

  ownerHasKeyUseWarning = {};
  ownerHasFunctionTypeWarning = {};

  warnForMissingKey = function (child) {
    if (child === null || typeof child !== 'object') {
      return;
    }

    if (!child._store || child._store.validated || child.key != null) {
      return;
    }

    if (!(typeof child._store === 'object')) {
      {
        throw Error( "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue." );
      }
    }

    child._store.validated = true;
    var currentComponentErrorInfo = 'Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.' + getCurrentFiberStackInDev();

    if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
      return;
    }

    ownerHasKeyUseWarning[currentComponentErrorInfo] = true;

    error('Each child in a list should have a unique ' + '"key" prop. See https://fb.me/react-warning-keys for ' + 'more information.');
  };
}

var isArray$1 = Array.isArray;

function coerceRef(returnFiber, current, element) {
  var mixedRef = element.ref;

  if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
    {
      // TODO: Clean this up once we turn on the string ref warning for
      // everyone, because the strict mode case will no longer be relevant
      if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
      // because these cannot be automatically converted to an arrow function
      // using a codemod. Therefore, we don't have to warn about string refs again.
      !(element._owner && element._self && element._owner.stateNode !== element._self)) {
        var componentName = getComponentName(returnFiber.type) || 'Component';

        if (!didWarnAboutStringRefs[componentName]) {
          {
            error('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 useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref%s', mixedRef, getStackByFiberInDevAndProd(returnFiber));
          }

          didWarnAboutStringRefs[componentName] = true;
        }
      }
    }

    if (element._owner) {
      var owner = element._owner;
      var inst;

      if (owner) {
        var ownerFiber = owner;

        if (!(ownerFiber.tag === ClassComponent)) {
          {
            throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref" );
          }
        }

        inst = ownerFiber.stateNode;
      }

      if (!inst) {
        {
          throw Error( "Missing owner for string ref " + mixedRef + ". This error is likely caused by a bug in React. Please file an issue." );
        }
      }

      var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref

      if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
        return current.ref;
      }

      var ref = function (value) {
        var refs = inst.refs;

        if (refs === emptyRefsObject) {
          // This is a lazy pooled frozen object, so we need to initialize.
          refs = inst.refs = {};
        }

        if (value === null) {
          delete refs[stringRef];
        } else {
          refs[stringRef] = value;
        }
      };

      ref._stringRef = stringRef;
      return ref;
    } else {
      if (!(typeof mixedRef === 'string')) {
        {
          throw Error( "Expected ref to be a function, a string, an object returned by React.createRef(), or null." );
        }
      }

      if (!element._owner) {
        {
          throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function 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." );
        }
      }
    }
  }

  return mixedRef;
}

function throwOnInvalidObjectType(returnFiber, newChild) {
  if (returnFiber.type !== 'textarea') {
    var addendum = '';

    {
      addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + getCurrentFiberStackInDev();
    }

    {
      {
        throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + ")." + addendum );
      }
    }
  }
}

function warnOnFunctionType() {
  {
    var currentComponentErrorInfo = '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.' + getCurrentFiberStackInDev();

    if (ownerHasFunctionTypeWarning[currentComponentErrorInfo]) {
      return;
    }

    ownerHasFunctionTypeWarning[currentComponentErrorInfo] = true;

    error('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.');
  }
} // This wrapper function exists because I expect to clone the code in each path
// to be able to optimize each path individually by branching early. This needs
// a compiler or we can do it manually. Helpers that don't need this branching
// live outside of this function.


function ChildReconciler(shouldTrackSideEffects) {
  function deleteChild(returnFiber, childToDelete) {
    if (!shouldTrackSideEffects) {
      // Noop.
      return;
    } // Deletions are added in reversed order so we add it to the front.
    // At this point, the return fiber's effect list is empty except for
    // deletions, so we can just append the deletion to the list. The remaining
    // effects aren't added until the complete phase. Once we implement
    // resuming, this may not be true.


    var last = returnFiber.lastEffect;

    if (last !== null) {
      last.nextEffect = childToDelete;
      returnFiber.lastEffect = childToDelete;
    } else {
      returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
    }

    childToDelete.nextEffect = null;
    childToDelete.effectTag = Deletion;
  }

  function deleteRemainingChildren(returnFiber, currentFirstChild) {
    if (!shouldTrackSideEffects) {
      // Noop.
      return null;
    } // TODO: For the shouldClone case, this could be micro-optimized a bit by
    // assuming that after the first child we've already added everything.


    var childToDelete = currentFirstChild;

    while (childToDelete !== null) {
      deleteChild(returnFiber, childToDelete);
      childToDelete = childToDelete.sibling;
    }

    return null;
  }

  function mapRemainingChildren(returnFiber, currentFirstChild) {
    // Add the remaining children to a temporary map so that we can find them by
    // keys quickly. Implicit (null) keys get added to this set with their index
    // instead.
    var existingChildren = new Map();
    var existingChild = currentFirstChild;

    while (existingChild !== null) {
      if (existingChild.key !== null) {
        existingChildren.set(existingChild.key, existingChild);
      } else {
        existingChildren.set(existingChild.index, existingChild);
      }

      existingChild = existingChild.sibling;
    }

    return existingChildren;
  }

  function useFiber(fiber, pendingProps) {
    // We currently set sibling to null and index to 0 here because it is easy
    // to forget to do before returning it. E.g. for the single child case.
    var clone = createWorkInProgress(fiber, pendingProps);
    clone.index = 0;
    clone.sibling = null;
    return clone;
  }

  function placeChild(newFiber, lastPlacedIndex, newIndex) {
    newFiber.index = newIndex;

    if (!shouldTrackSideEffects) {
      // Noop.
      return lastPlacedIndex;
    }

    var current = newFiber.alternate;

    if (current !== null) {
      var oldIndex = current.index;

      if (oldIndex < lastPlacedIndex) {
        // This is a move.
        newFiber.effectTag = Placement;
        return lastPlacedIndex;
      } else {
        // This item can stay in place.
        return oldIndex;
      }
    } else {
      // This is an insertion.
      newFiber.effectTag = Placement;
      return lastPlacedIndex;
    }
  }

  function placeSingleChild(newFiber) {
    // This is simpler for the single child case. We only need to do a
    // placement for inserting new children.
    if (shouldTrackSideEffects && newFiber.alternate === null) {
      newFiber.effectTag = Placement;
    }

    return newFiber;
  }

  function updateTextNode(returnFiber, current, textContent, expirationTime) {
    if (current === null || current.tag !== HostText) {
      // Insert
      var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
      created.return = returnFiber;
      return created;
    } else {
      // Update
      var existing = useFiber(current, textContent);
      existing.return = returnFiber;
      return existing;
    }
  }

  function updateElement(returnFiber, current, element, expirationTime) {
    if (current !== null) {
      if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
       isCompatibleFamilyForHotReloading(current, element) )) {
        // Move based on index
        var existing = useFiber(current, element.props);
        existing.ref = coerceRef(returnFiber, current, element);
        existing.return = returnFiber;

        {
          existing._debugSource = element._source;
          existing._debugOwner = element._owner;
        }

        return existing;
      }
    } // Insert


    var created = createFiberFromElement(element, returnFiber.mode, expirationTime);
    created.ref = coerceRef(returnFiber, current, element);
    created.return = returnFiber;
    return created;
  }

  function updatePortal(returnFiber, current, portal, expirationTime) {
    if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
      // Insert
      var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
      created.return = returnFiber;
      return created;
    } else {
      // Update
      var existing = useFiber(current, portal.children || []);
      existing.return = returnFiber;
      return existing;
    }
  }

  function updateFragment(returnFiber, current, fragment, expirationTime, key) {
    if (current === null || current.tag !== Fragment) {
      // Insert
      var created = createFiberFromFragment(fragment, returnFiber.mode, expirationTime, key);
      created.return = returnFiber;
      return created;
    } else {
      // Update
      var existing = useFiber(current, fragment);
      existing.return = returnFiber;
      return existing;
    }
  }

  function createChild(returnFiber, newChild, expirationTime) {
    if (typeof newChild === 'string' || typeof newChild === 'number') {
      // Text nodes don't have keys. If the previous node is implicitly keyed
      // we can continue to replace it without aborting even if it is not a text
      // node.
      var created = createFiberFromText('' + newChild, returnFiber.mode, expirationTime);
      created.return = returnFiber;
      return created;
    }

    if (typeof newChild === 'object' && newChild !== null) {
      switch (newChild.$$typeof) {
        case REACT_ELEMENT_TYPE:
          {
            var _created = createFiberFromElement(newChild, returnFiber.mode, expirationTime);

            _created.ref = coerceRef(returnFiber, null, newChild);
            _created.return = returnFiber;
            return _created;
          }

        case REACT_PORTAL_TYPE:
          {
            var _created2 = createFiberFromPortal(newChild, returnFiber.mode, expirationTime);

            _created2.return = returnFiber;
            return _created2;
          }
      }

      if (isArray$1(newChild) || getIteratorFn(newChild)) {
        var _created3 = createFiberFromFragment(newChild, returnFiber.mode, expirationTime, null);

        _created3.return = returnFiber;
        return _created3;
      }

      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType();
      }
    }

    return null;
  }

  function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
    // Update the fiber if the keys match, otherwise return null.
    var key = oldFiber !== null ? oldFiber.key : null;

    if (typeof newChild === 'string' || typeof newChild === 'number') {
      // Text nodes don't have keys. If the previous node is implicitly keyed
      // we can continue to replace it without aborting even if it is not a text
      // node.
      if (key !== null) {
        return null;
      }

      return updateTextNode(returnFiber, oldFiber, '' + newChild, expirationTime);
    }

    if (typeof newChild === 'object' && newChild !== null) {
      switch (newChild.$$typeof) {
        case REACT_ELEMENT_TYPE:
          {
            if (newChild.key === key) {
              if (newChild.type === REACT_FRAGMENT_TYPE) {
                return updateFragment(returnFiber, oldFiber, newChild.props.children, expirationTime, key);
              }

              return updateElement(returnFiber, oldFiber, newChild, expirationTime);
            } else {
              return null;
            }
          }

        case REACT_PORTAL_TYPE:
          {
            if (newChild.key === key) {
              return updatePortal(returnFiber, oldFiber, newChild, expirationTime);
            } else {
              return null;
            }
          }
      }

      if (isArray$1(newChild) || getIteratorFn(newChild)) {
        if (key !== null) {
          return null;
        }

        return updateFragment(returnFiber, oldFiber, newChild, expirationTime, null);
      }

      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType();
      }
    }

    return null;
  }

  function updateFromMap(existingChildren, returnFiber, newIdx, newChild, expirationTime) {
    if (typeof newChild === 'string' || typeof newChild === 'number') {
      // Text nodes don't have keys, so we neither have to check the old nor
      // new node for the key. If both are text nodes, they match.
      var matchedFiber = existingChildren.get(newIdx) || null;
      return updateTextNode(returnFiber, matchedFiber, '' + newChild, expirationTime);
    }

    if (typeof newChild === 'object' && newChild !== null) {
      switch (newChild.$$typeof) {
        case REACT_ELEMENT_TYPE:
          {
            var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;

            if (newChild.type === REACT_FRAGMENT_TYPE) {
              return updateFragment(returnFiber, _matchedFiber, newChild.props.children, expirationTime, newChild.key);
            }

            return updateElement(returnFiber, _matchedFiber, newChild, expirationTime);
          }

        case REACT_PORTAL_TYPE:
          {
            var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;

            return updatePortal(returnFiber, _matchedFiber2, newChild, expirationTime);
          }
      }

      if (isArray$1(newChild) || getIteratorFn(newChild)) {
        var _matchedFiber3 = existingChildren.get(newIdx) || null;

        return updateFragment(returnFiber, _matchedFiber3, newChild, expirationTime, null);
      }

      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType();
      }
    }

    return null;
  }
  /**
   * Warns if there is a duplicate or missing key
   */


  function warnOnInvalidKey(child, knownKeys) {
    {
      if (typeof child !== 'object' || child === null) {
        return knownKeys;
      }

      switch (child.$$typeof) {
        case REACT_ELEMENT_TYPE:
        case REACT_PORTAL_TYPE:
          warnForMissingKey(child);
          var key = child.key;

          if (typeof key !== 'string') {
            break;
          }

          if (knownKeys === null) {
            knownKeys = new Set();
            knownKeys.add(key);
            break;
          }

          if (!knownKeys.has(key)) {
            knownKeys.add(key);
            break;
          }

          error('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.', key);

          break;
      }
    }

    return knownKeys;
  }

  function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, expirationTime) {
    // This algorithm can't optimize by searching from both ends since we
    // don't have backpointers on fibers. I'm trying to see how far we can get
    // with that model. If it ends up not being worth the tradeoffs, we can
    // add it later.
    // Even with a two ended optimization, we'd want to optimize for the case
    // where there are few changes and brute force the comparison instead of
    // going for the Map. It'd like to explore hitting that path first in
    // forward-only mode and only go for the Map once we notice that we need
    // lots of look ahead. This doesn't handle reversal as well as two ended
    // search but that's unusual. Besides, for the two ended optimization to
    // work on Iterables, we'd need to copy the whole set.
    // In this first iteration, we'll just live with hitting the bad case
    // (adding everything to a Map) in for every insert/move.
    // If you change this code, also update reconcileChildrenIterator() which
    // uses the same algorithm.
    {
      // First, validate keys.
      var knownKeys = null;

      for (var i = 0; i < newChildren.length; i++) {
        var child = newChildren[i];
        knownKeys = warnOnInvalidKey(child, knownKeys);
      }
    }

    var resultingFirstChild = null;
    var previousNewFiber = null;
    var oldFiber = currentFirstChild;
    var lastPlacedIndex = 0;
    var newIdx = 0;
    var nextOldFiber = null;

    for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
      if (oldFiber.index > newIdx) {
        nextOldFiber = oldFiber;
        oldFiber = null;
      } else {
        nextOldFiber = oldFiber.sibling;
      }

      var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], expirationTime);

      if (newFiber === null) {
        // TODO: This breaks on empty slots like null children. That's
        // unfortunate because it triggers the slow path all the time. We need
        // a better way to communicate whether this was a miss or null,
        // boolean, undefined, etc.
        if (oldFiber === null) {
          oldFiber = nextOldFiber;
        }

        break;
      }

      if (shouldTrackSideEffects) {
        if (oldFiber && newFiber.alternate === null) {
          // We matched the slot, but we didn't reuse the existing fiber, so we
          // need to delete the existing child.
          deleteChild(returnFiber, oldFiber);
        }
      }

      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);

      if (previousNewFiber === null) {
        // TODO: Move out of the loop. This only happens for the first run.
        resultingFirstChild = newFiber;
      } else {
        // TODO: Defer siblings if we're not at the right index for this slot.
        // I.e. if we had null values before, then we want to defer this
        // for each null value. However, we also don't want to call updateSlot
        // with the previous one.
        previousNewFiber.sibling = newFiber;
      }

      previousNewFiber = newFiber;
      oldFiber = nextOldFiber;
    }

    if (newIdx === newChildren.length) {
      // We've reached the end of the new children. We can delete the rest.
      deleteRemainingChildren(returnFiber, oldFiber);
      return resultingFirstChild;
    }

    if (oldFiber === null) {
      // If we don't have any more existing children we can choose a fast path
      // since the rest will all be insertions.
      for (; newIdx < newChildren.length; newIdx++) {
        var _newFiber = createChild(returnFiber, newChildren[newIdx], expirationTime);

        if (_newFiber === null) {
          continue;
        }

        lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);

        if (previousNewFiber === null) {
          // TODO: Move out of the loop. This only happens for the first run.
          resultingFirstChild = _newFiber;
        } else {
          previousNewFiber.sibling = _newFiber;
        }

        previousNewFiber = _newFiber;
      }

      return resultingFirstChild;
    } // Add all children to a key map for quick lookups.


    var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.

    for (; newIdx < newChildren.length; newIdx++) {
      var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], expirationTime);

      if (_newFiber2 !== null) {
        if (shouldTrackSideEffects) {
          if (_newFiber2.alternate !== null) {
            // The new fiber is a work in progress, but if there exists a
            // current, that means that we reused the fiber. We need to delete
            // it from the child list so that we don't add it to the deletion
            // list.
            existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
          }
        }

        lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);

        if (previousNewFiber === null) {
          resultingFirstChild = _newFiber2;
        } else {
          previousNewFiber.sibling = _newFiber2;
        }

        previousNewFiber = _newFiber2;
      }
    }

    if (shouldTrackSideEffects) {
      // Any existing children that weren't consumed above were deleted. We need
      // to add them to the deletion list.
      existingChildren.forEach(function (child) {
        return deleteChild(returnFiber, child);
      });
    }

    return resultingFirstChild;
  }

  function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, expirationTime) {
    // This is the same implementation as reconcileChildrenArray(),
    // but using the iterator instead.
    var iteratorFn = getIteratorFn(newChildrenIterable);

    if (!(typeof iteratorFn === 'function')) {
      {
        throw Error( "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." );
      }
    }

    {
      // We don't support rendering Generators because it's a mutation.
      // See https://github.com/facebook/react/issues/12995
      if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag
      newChildrenIterable[Symbol.toStringTag] === 'Generator') {
        if (!didWarnAboutGenerators) {
          error('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.');
        }

        didWarnAboutGenerators = true;
      } // Warn about using Maps as children


      if (newChildrenIterable.entries === iteratorFn) {
        if (!didWarnAboutMaps) {
          error('Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.');
        }

        didWarnAboutMaps = true;
      } // First, validate keys.
      // We'll get a different iterator later for the main pass.


      var _newChildren = iteratorFn.call(newChildrenIterable);

      if (_newChildren) {
        var knownKeys = null;

        var _step = _newChildren.next();

        for (; !_step.done; _step = _newChildren.next()) {
          var child = _step.value;
          knownKeys = warnOnInvalidKey(child, knownKeys);
        }
      }
    }

    var newChildren = iteratorFn.call(newChildrenIterable);

    if (!(newChildren != null)) {
      {
        throw Error( "An iterable object provided no iterator." );
      }
    }

    var resultingFirstChild = null;
    var previousNewFiber = null;
    var oldFiber = currentFirstChild;
    var lastPlacedIndex = 0;
    var newIdx = 0;
    var nextOldFiber = null;
    var step = newChildren.next();

    for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
      if (oldFiber.index > newIdx) {
        nextOldFiber = oldFiber;
        oldFiber = null;
      } else {
        nextOldFiber = oldFiber.sibling;
      }

      var newFiber = updateSlot(returnFiber, oldFiber, step.value, expirationTime);

      if (newFiber === null) {
        // TODO: This breaks on empty slots like null children. That's
        // unfortunate because it triggers the slow path all the time. We need
        // a better way to communicate whether this was a miss or null,
        // boolean, undefined, etc.
        if (oldFiber === null) {
          oldFiber = nextOldFiber;
        }

        break;
      }

      if (shouldTrackSideEffects) {
        if (oldFiber && newFiber.alternate === null) {
          // We matched the slot, but we didn't reuse the existing fiber, so we
          // need to delete the existing child.
          deleteChild(returnFiber, oldFiber);
        }
      }

      lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);

      if (previousNewFiber === null) {
        // TODO: Move out of the loop. This only happens for the first run.
        resultingFirstChild = newFiber;
      } else {
        // TODO: Defer siblings if we're not at the right index for this slot.
        // I.e. if we had null values before, then we want to defer this
        // for each null value. However, we also don't want to call updateSlot
        // with the previous one.
        previousNewFiber.sibling = newFiber;
      }

      previousNewFiber = newFiber;
      oldFiber = nextOldFiber;
    }

    if (step.done) {
      // We've reached the end of the new children. We can delete the rest.
      deleteRemainingChildren(returnFiber, oldFiber);
      return resultingFirstChild;
    }

    if (oldFiber === null) {
      // If we don't have any more existing children we can choose a fast path
      // since the rest will all be insertions.
      for (; !step.done; newIdx++, step = newChildren.next()) {
        var _newFiber3 = createChild(returnFiber, step.value, expirationTime);

        if (_newFiber3 === null) {
          continue;
        }

        lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);

        if (previousNewFiber === null) {
          // TODO: Move out of the loop. This only happens for the first run.
          resultingFirstChild = _newFiber3;
        } else {
          previousNewFiber.sibling = _newFiber3;
        }

        previousNewFiber = _newFiber3;
      }

      return resultingFirstChild;
    } // Add all children to a key map for quick lookups.


    var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.

    for (; !step.done; newIdx++, step = newChildren.next()) {
      var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, expirationTime);

      if (_newFiber4 !== null) {
        if (shouldTrackSideEffects) {
          if (_newFiber4.alternate !== null) {
            // The new fiber is a work in progress, but if there exists a
            // current, that means that we reused the fiber. We need to delete
            // it from the child list so that we don't add it to the deletion
            // list.
            existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
          }
        }

        lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);

        if (previousNewFiber === null) {
          resultingFirstChild = _newFiber4;
        } else {
          previousNewFiber.sibling = _newFiber4;
        }

        previousNewFiber = _newFiber4;
      }
    }

    if (shouldTrackSideEffects) {
      // Any existing children that weren't consumed above were deleted. We need
      // to add them to the deletion list.
      existingChildren.forEach(function (child) {
        return deleteChild(returnFiber, child);
      });
    }

    return resultingFirstChild;
  }

  function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, expirationTime) {
    // There's no need to check for keys on text nodes since we don't have a
    // way to define them.
    if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
      // We already have an existing node so let's just update it and delete
      // the rest.
      deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
      var existing = useFiber(currentFirstChild, textContent);
      existing.return = returnFiber;
      return existing;
    } // The existing first child is not a text node so we need to create one
    // and delete the existing ones.


    deleteRemainingChildren(returnFiber, currentFirstChild);
    var created = createFiberFromText(textContent, returnFiber.mode, expirationTime);
    created.return = returnFiber;
    return created;
  }

  function reconcileSingleElement(returnFiber, currentFirstChild, element, expirationTime) {
    var key = element.key;
    var child = currentFirstChild;

    while (child !== null) {
      // TODO: If key === null and child.key === null, then this only applies to
      // the first item in the list.
      if (child.key === key) {
        switch (child.tag) {
          case Fragment:
            {
              if (element.type === REACT_FRAGMENT_TYPE) {
                deleteRemainingChildren(returnFiber, child.sibling);
                var existing = useFiber(child, element.props.children);
                existing.return = returnFiber;

                {
                  existing._debugSource = element._source;
                  existing._debugOwner = element._owner;
                }

                return existing;
              }

              break;
            }

          case Block:

          // We intentionally fallthrough here if enableBlocksAPI is not on.
          // eslint-disable-next-lined no-fallthrough

          default:
            {
              if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
               isCompatibleFamilyForHotReloading(child, element) )) {
                deleteRemainingChildren(returnFiber, child.sibling);

                var _existing3 = useFiber(child, element.props);

                _existing3.ref = coerceRef(returnFiber, child, element);
                _existing3.return = returnFiber;

                {
                  _existing3._debugSource = element._source;
                  _existing3._debugOwner = element._owner;
                }

                return _existing3;
              }

              break;
            }
        } // Didn't match.


        deleteRemainingChildren(returnFiber, child);
        break;
      } else {
        deleteChild(returnFiber, child);
      }

      child = child.sibling;
    }

    if (element.type === REACT_FRAGMENT_TYPE) {
      var created = createFiberFromFragment(element.props.children, returnFiber.mode, expirationTime, element.key);
      created.return = returnFiber;
      return created;
    } else {
      var _created4 = createFiberFromElement(element, returnFiber.mode, expirationTime);

      _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
      _created4.return = returnFiber;
      return _created4;
    }
  }

  function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) {
    var key = portal.key;
    var child = currentFirstChild;

    while (child !== null) {
      // TODO: If key === null and child.key === null, then this only applies to
      // the first item in the list.
      if (child.key === key) {
        if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
          deleteRemainingChildren(returnFiber, child.sibling);
          var existing = useFiber(child, portal.children || []);
          existing.return = returnFiber;
          return existing;
        } else {
          deleteRemainingChildren(returnFiber, child);
          break;
        }
      } else {
        deleteChild(returnFiber, child);
      }

      child = child.sibling;
    }

    var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime);
    created.return = returnFiber;
    return created;
  } // This API will tag the children with the side-effect of the reconciliation
  // itself. They will be added to the side-effect list as we pass through the
  // children and the parent.


  function reconcileChildFibers(returnFiber, currentFirstChild, newChild, expirationTime) {
    // This function is not recursive.
    // If the top level item is an array, we treat it as a set of children,
    // not as a fragment. Nested arrays on the other hand will be treated as
    // fragment nodes. Recursion happens at the normal flow.
    // Handle top level unkeyed fragments as if they were arrays.
    // This leads to an ambiguity between <>{[...]}</> and <>...</>.
    // We treat the ambiguous cases above the same.
    var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;

    if (isUnkeyedTopLevelFragment) {
      newChild = newChild.props.children;
    } // Handle object types


    var isObject = typeof newChild === 'object' && newChild !== null;

    if (isObject) {
      switch (newChild.$$typeof) {
        case REACT_ELEMENT_TYPE:
          return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, expirationTime));

        case REACT_PORTAL_TYPE:
          return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, expirationTime));
      }
    }

    if (typeof newChild === 'string' || typeof newChild === 'number') {
      return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, expirationTime));
    }

    if (isArray$1(newChild)) {
      return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, expirationTime);
    }

    if (getIteratorFn(newChild)) {
      return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, expirationTime);
    }

    if (isObject) {
      throwOnInvalidObjectType(returnFiber, newChild);
    }

    {
      if (typeof newChild === 'function') {
        warnOnFunctionType();
      }
    }

    if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
      // If the new child is undefined, and the return fiber is a composite
      // component, throw an error. If Fiber return types are disabled,
      // we already threw above.
      switch (returnFiber.tag) {
        case ClassComponent:
          {
            {
              var instance = returnFiber.stateNode;

              if (instance.render._isMockFunction) {
                // We allow auto-mocks to proceed as if they're returning null.
                break;
              }
            }
          }
        // Intentionally fall through to the next case, which handles both
        // functions and classes
        // eslint-disable-next-lined no-fallthrough

        case FunctionComponent:
          {
            var Component = returnFiber.type;

            {
              {
                throw Error( (Component.displayName || Component.name || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
              }
            }
          }
      }
    } // Remaining cases are all treated as empty.


    return deleteRemainingChildren(returnFiber, currentFirstChild);
  }

  return reconcileChildFibers;
}

var reconcileChildFibers = ChildReconciler(true);
var mountChildFibers = ChildReconciler(false);
function cloneChildFibers(current, workInProgress) {
  if (!(current === null || workInProgress.child === current.child)) {
    {
      throw Error( "Resuming work not yet implemented." );
    }
  }

  if (workInProgress.child === null) {
    return;
  }

  var currentChild = workInProgress.child;
  var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
  workInProgress.child = newChild;
  newChild.return = workInProgress;

  while (currentChild.sibling !== null) {
    currentChild = currentChild.sibling;
    newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
    newChild.return = workInProgress;
  }

  newChild.sibling = null;
} // Reset a workInProgress child set to prepare it for a second pass.

function resetChildFibers(workInProgress, renderExpirationTime) {
  var child = workInProgress.child;

  while (child !== null) {
    resetWorkInProgress(child, renderExpirationTime);
    child = child.sibling;
  }
}

var NO_CONTEXT = {};
var contextStackCursor$1 = createCursor(NO_CONTEXT);
var contextFiberStackCursor = createCursor(NO_CONTEXT);
var rootInstanceStackCursor = createCursor(NO_CONTEXT);

function requiredContext(c) {
  if (!(c !== NO_CONTEXT)) {
    {
      throw Error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." );
    }
  }

  return c;
}

function getRootHostContainer() {
  var rootInstance = requiredContext(rootInstanceStackCursor.current);
  return rootInstance;
}

function pushHostContainer(fiber, nextRootInstance) {
  // Push current root instance onto the stack;
  // This allows us to reset root when portals are popped.
  push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.
  // This enables us to pop only Fibers that provide unique contexts.

  push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.
  // However, we can't just call getRootHostContext() and push it because
  // we'd have a different number of entries on the stack depending on
  // whether getRootHostContext() throws somewhere in renderer code or not.
  // So we push an empty value first. This lets us safely unwind on errors.

  push(contextStackCursor$1, NO_CONTEXT, fiber);
  var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.

  pop(contextStackCursor$1, fiber);
  push(contextStackCursor$1, nextRootContext, fiber);
}

function popHostContainer(fiber) {
  pop(contextStackCursor$1, fiber);
  pop(contextFiberStackCursor, fiber);
  pop(rootInstanceStackCursor, fiber);
}

function getHostContext() {
  var context = requiredContext(contextStackCursor$1.current);
  return context;
}

function pushHostContext(fiber) {
  var rootInstance = requiredContext(rootInstanceStackCursor.current);
  var context = requiredContext(contextStackCursor$1.current);
  var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.

  if (context === nextContext) {
    return;
  } // Track the context and the Fiber that provided it.
  // This enables us to pop only Fibers that provide unique contexts.


  push(contextFiberStackCursor, fiber, fiber);
  push(contextStackCursor$1, nextContext, fiber);
}

function popHostContext(fiber) {
  // Do not pop unless this Fiber provided the current context.
  // pushHostContext() only pushes Fibers that provide unique contexts.
  if (contextFiberStackCursor.current !== fiber) {
    return;
  }

  pop(contextStackCursor$1, fiber);
  pop(contextFiberStackCursor, fiber);
}

var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is
// inherited deeply down the subtree. The upper bits only affect
// this immediate suspense boundary and gets reset each new
// boundary or suspense list.

var SubtreeSuspenseContextMask = 1; // Subtree Flags:
// InvisibleParentSuspenseContext indicates that one of our parent Suspense
// boundaries is not currently showing visible main content.
// Either because it is already showing a fallback or is not mounted at all.
// We can use this to determine if it is desirable to trigger a fallback at
// the parent. If not, then we might need to trigger undesirable boundaries
// and/or suspend the commit to avoid hiding the parent content.

var InvisibleParentSuspenseContext = 1; // Shallow Flags:
// ForceSuspenseFallback can be used by SuspenseList to force newly added
// items into their fallback state during one of the render passes.

var ForceSuspenseFallback = 2;
var suspenseStackCursor = createCursor(DefaultSuspenseContext);
function hasSuspenseContext(parentContext, flag) {
  return (parentContext & flag) !== 0;
}
function setDefaultShallowSuspenseContext(parentContext) {
  return parentContext & SubtreeSuspenseContextMask;
}
function setShallowSuspenseContext(parentContext, shallowContext) {
  return parentContext & SubtreeSuspenseContextMask | shallowContext;
}
function addSubtreeSuspenseContext(parentContext, subtreeContext) {
  return parentContext | subtreeContext;
}
function pushSuspenseContext(fiber, newContext) {
  push(suspenseStackCursor, newContext, fiber);
}
function popSuspenseContext(fiber) {
  pop(suspenseStackCursor, fiber);
}

function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
  // If it was the primary children that just suspended, capture and render the
  // fallback. Otherwise, don't capture and bubble to the next boundary.
  var nextState = workInProgress.memoizedState;

  if (nextState !== null) {
    if (nextState.dehydrated !== null) {
      // A dehydrated boundary always captures.
      return true;
    }

    return false;
  }

  var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.

  if (props.fallback === undefined) {
    return false;
  } // Regular boundaries always capture.


  if (props.unstable_avoidThisFallback !== true) {
    return true;
  } // If it's a boundary we should avoid, then we prefer to bubble up to the
  // parent boundary if it is currently invisible.


  if (hasInvisibleParent) {
    return false;
  } // If the parent is not able to handle it, we must handle it.


  return true;
}
function findFirstSuspended(row) {
  var node = row;

  while (node !== null) {
    if (node.tag === SuspenseComponent) {
      var state = node.memoizedState;

      if (state !== null) {
        var dehydrated = state.dehydrated;

        if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
          return node;
        }
      }
    } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
    // keep track of whether it suspended or not.
    node.memoizedProps.revealOrder !== undefined) {
      var didSuspend = (node.effectTag & DidCapture) !== NoEffect;

      if (didSuspend) {
        return node;
      }
    } else if (node.child !== null) {
      node.child.return = node;
      node = node.child;
      continue;
    }

    if (node === row) {
      return null;
    }

    while (node.sibling === null) {
      if (node.return === null || node.return === row) {
        return null;
      }

      node = node.return;
    }

    node.sibling.return = node.return;
    node = node.sibling;
  }

  return null;
}

function createDeprecatedResponderListener(responder, props) {
  var eventResponderListener = {
    responder: responder,
    props: props
  };

  {
    Object.freeze(eventResponderListener);
  }

  return eventResponderListener;
}

var HasEffect =
/* */
1; // Represents the phase in which the effect (not the clean-up) fires.

var Layout =
/*    */
2;
var Passive$1 =
/*   */
4;

var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
    ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
var didWarnAboutMismatchedHooksForComponent;

{
  didWarnAboutMismatchedHooksForComponent = new Set();
}

// These are set right before calling the component.
var renderExpirationTime = NoWork; // The work-in-progress fiber. I've named it differently to distinguish it from
// the work-in-progress hook.

var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
// current hook list is the list that belongs to the current fiber. The
// work-in-progress hook list is a new list that will be added to the
// work-in-progress fiber.

var currentHook = null;
var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This
// does not get reset if we do another render pass; only when we're completely
// finished evaluating this component. This is an optimization so we know
// whether we need to clear render phase updates after a throw.

var didScheduleRenderPhaseUpdate = false;
var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook

var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
// The list stores the order of hooks used during the initial render (mount).
// Subsequent renders (updates) reference this list.

var hookTypesDev = null;
var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore
// the dependencies for Hooks that need them (e.g. useEffect or useMemo).
// When true, such Hooks will always be "remounted". Only used during hot reload.

var ignorePreviousDependencies = false;

function mountHookTypesDev() {
  {
    var hookName = currentHookNameInDev;

    if (hookTypesDev === null) {
      hookTypesDev = [hookName];
    } else {
      hookTypesDev.push(hookName);
    }
  }
}

function updateHookTypesDev() {
  {
    var hookName = currentHookNameInDev;

    if (hookTypesDev !== null) {
      hookTypesUpdateIndexDev++;

      if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
        warnOnHookMismatchInDev(hookName);
      }
    }
  }
}

function checkDepsAreArrayDev(deps) {
  {
    if (deps !== undefined && deps !== null && !Array.isArray(deps)) {
      // Verify deps, but only on mount to avoid extra checks.
      // It's unlikely their type would change as usually you define them inline.
      error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);
    }
  }
}

function warnOnHookMismatchInDev(currentHookName) {
  {
    var componentName = getComponentName(currentlyRenderingFiber$1.type);

    if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
      didWarnAboutMismatchedHooksForComponent.add(componentName);

      if (hookTypesDev !== null) {
        var table = '';
        var secondColumnStart = 30;

        for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
          var oldHookName = hookTypesDev[i];
          var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;
          var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up
          // lol @ IE not supporting String#repeat

          while (row.length < secondColumnStart) {
            row += ' ';
          }

          row += newHookName + '\n';
          table += row;
        }

        error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://fb.me/rules-of-hooks\n\n' + '   Previous render            Next render\n' + '   ------------------------------------------------------\n' + '%s' + '   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
      }
    }
  }
}

function throwInvalidHookError() {
  {
    {
      throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
    }
  }
}

function areHookInputsEqual(nextDeps, prevDeps) {
  {
    if (ignorePreviousDependencies) {
      // Only true when this component is being hot reloaded.
      return false;
    }
  }

  if (prevDeps === null) {
    {
      error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
    }

    return false;
  }

  {
    // Don't bother comparing lengths in prod because these arrays should be
    // passed inline.
    if (nextDeps.length !== prevDeps.length) {
      error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]");
    }
  }

  for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
    if (objectIs(nextDeps[i], prevDeps[i])) {
      continue;
    }

    return false;
  }

  return true;
}

function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderExpirationTime) {
  renderExpirationTime = nextRenderExpirationTime;
  currentlyRenderingFiber$1 = workInProgress;

  {
    hookTypesDev = current !== null ? current._debugHookTypes : null;
    hookTypesUpdateIndexDev = -1; // Used for hot reloading:

    ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
  }

  workInProgress.memoizedState = null;
  workInProgress.updateQueue = null;
  workInProgress.expirationTime = NoWork; // The following should have already been reset
  // currentHook = null;
  // workInProgressHook = null;
  // didScheduleRenderPhaseUpdate = false;
  // TODO Warn if no hooks are used at all during mount, then some are used during update.
  // Currently we will identify the update render as a mount because memoizedState === null.
  // This is tricky because it's valid for certain types of components (e.g. React.lazy)
  // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.
  // Non-stateful hooks (e.g. context) don't get added to memoizedState,
  // so memoizedState would be null during updates and mounts.

  {
    if (current !== null && current.memoizedState !== null) {
      ReactCurrentDispatcher.current = HooksDispatcherOnUpdateInDEV;
    } else if (hookTypesDev !== null) {
      // This dispatcher handles an edge case where a component is updating,
      // but no stateful hooks have been used.
      // We want to match the production code behavior (which will use HooksDispatcherOnMount),
      // but with the extra DEV validation to ensure hooks ordering hasn't changed.
      // This dispatcher does that.
      ReactCurrentDispatcher.current = HooksDispatcherOnMountWithHookTypesInDEV;
    } else {
      ReactCurrentDispatcher.current = HooksDispatcherOnMountInDEV;
    }
  }

  var children = Component(props, secondArg); // Check if there was a render phase update

  if (workInProgress.expirationTime === renderExpirationTime) {
    // Keep rendering in a loop for as long as render phase updates continue to
    // be scheduled. Use a counter to prevent infinite loops.
    var numberOfReRenders = 0;

    do {
      workInProgress.expirationTime = NoWork;

      if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
        {
          throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
        }
      }

      numberOfReRenders += 1;

      {
        // Even when hot reloading, allow dependencies to stabilize
        // after first render to prevent infinite render phase updates.
        ignorePreviousDependencies = false;
      } // Start over from the beginning of the list


      currentHook = null;
      workInProgressHook = null;
      workInProgress.updateQueue = null;

      {
        // Also validate hook order for cascading updates.
        hookTypesUpdateIndexDev = -1;
      }

      ReactCurrentDispatcher.current =  HooksDispatcherOnRerenderInDEV ;
      children = Component(props, secondArg);
    } while (workInProgress.expirationTime === renderExpirationTime);
  } // We can assume the previous dispatcher is always this one, since we set it
  // at the beginning of the render phase and there's no re-entrancy.


  ReactCurrentDispatcher.current = ContextOnlyDispatcher;

  {
    workInProgress._debugHookTypes = hookTypesDev;
  } // This check uses currentHook so that it works the same in DEV and prod bundles.
  // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.


  var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
  renderExpirationTime = NoWork;
  currentlyRenderingFiber$1 = null;
  currentHook = null;
  workInProgressHook = null;

  {
    currentHookNameInDev = null;
    hookTypesDev = null;
    hookTypesUpdateIndexDev = -1;
  }

  didScheduleRenderPhaseUpdate = false;

  if (!!didRenderTooFewHooks) {
    {
      throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." );
    }
  }

  return children;
}
function bailoutHooks(current, workInProgress, expirationTime) {
  workInProgress.updateQueue = current.updateQueue;
  workInProgress.effectTag &= ~(Passive | Update);

  if (current.expirationTime <= expirationTime) {
    current.expirationTime = NoWork;
  }
}
function resetHooksAfterThrow() {
  // We can assume the previous dispatcher is always this one, since we set it
  // at the beginning of the render phase and there's no re-entrancy.
  ReactCurrentDispatcher.current = ContextOnlyDispatcher;

  if (didScheduleRenderPhaseUpdate) {
    // There were render phase updates. These are only valid for this render
    // phase, which we are now aborting. Remove the updates from the queues so
    // they do not persist to the next render. Do not remove updates from hooks
    // that weren't processed.
    //
    // Only reset the updates from the queue if it has a clone. If it does
    // not have a clone, that means it wasn't processed, and the updates were
    // scheduled before we entered the render phase.
    var hook = currentlyRenderingFiber$1.memoizedState;

    while (hook !== null) {
      var queue = hook.queue;

      if (queue !== null) {
        queue.pending = null;
      }

      hook = hook.next;
    }
  }

  renderExpirationTime = NoWork;
  currentlyRenderingFiber$1 = null;
  currentHook = null;
  workInProgressHook = null;

  {
    hookTypesDev = null;
    hookTypesUpdateIndexDev = -1;
    currentHookNameInDev = null;
  }

  didScheduleRenderPhaseUpdate = false;
}

function mountWorkInProgressHook() {
  var hook = {
    memoizedState: null,
    baseState: null,
    baseQueue: null,
    queue: null,
    next: null
  };

  if (workInProgressHook === null) {
    // This is the first hook in the list
    currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;
  } else {
    // Append to the end of the list
    workInProgressHook = workInProgressHook.next = hook;
  }

  return workInProgressHook;
}

function updateWorkInProgressHook() {
  // This function is used both for updates and for re-renders triggered by a
  // render phase update. It assumes there is either a current hook we can
  // clone, or a work-in-progress hook from a previous render pass that we can
  // use as a base. When we reach the end of the base list, we must switch to
  // the dispatcher used for mounts.
  var nextCurrentHook;

  if (currentHook === null) {
    var current = currentlyRenderingFiber$1.alternate;

    if (current !== null) {
      nextCurrentHook = current.memoizedState;
    } else {
      nextCurrentHook = null;
    }
  } else {
    nextCurrentHook = currentHook.next;
  }

  var nextWorkInProgressHook;

  if (workInProgressHook === null) {
    nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
  } else {
    nextWorkInProgressHook = workInProgressHook.next;
  }

  if (nextWorkInProgressHook !== null) {
    // There's already a work-in-progress. Reuse it.
    workInProgressHook = nextWorkInProgressHook;
    nextWorkInProgressHook = workInProgressHook.next;
    currentHook = nextCurrentHook;
  } else {
    // Clone from the current hook.
    if (!(nextCurrentHook !== null)) {
      {
        throw Error( "Rendered more hooks than during the previous render." );
      }
    }

    currentHook = nextCurrentHook;
    var newHook = {
      memoizedState: currentHook.memoizedState,
      baseState: currentHook.baseState,
      baseQueue: currentHook.baseQueue,
      queue: currentHook.queue,
      next: null
    };

    if (workInProgressHook === null) {
      // This is the first hook in the list.
      currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
    } else {
      // Append to the end of the list.
      workInProgressHook = workInProgressHook.next = newHook;
    }
  }

  return workInProgressHook;
}

function createFunctionComponentUpdateQueue() {
  return {
    lastEffect: null
  };
}

function basicStateReducer(state, action) {
  // $FlowFixMe: Flow doesn't like mixed types
  return typeof action === 'function' ? action(state) : action;
}

function mountReducer(reducer, initialArg, init) {
  var hook = mountWorkInProgressHook();
  var initialState;

  if (init !== undefined) {
    initialState = init(initialArg);
  } else {
    initialState = initialArg;
  }

  hook.memoizedState = hook.baseState = initialState;
  var queue = hook.queue = {
    pending: null,
    dispatch: null,
    lastRenderedReducer: reducer,
    lastRenderedState: initialState
  };
  var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
  return [hook.memoizedState, dispatch];
}

function updateReducer(reducer, initialArg, init) {
  var hook = updateWorkInProgressHook();
  var queue = hook.queue;

  if (!(queue !== null)) {
    {
      throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
    }
  }

  queue.lastRenderedReducer = reducer;
  var current = currentHook; // The last rebase update that is NOT part of the base state.

  var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.

  var pendingQueue = queue.pending;

  if (pendingQueue !== null) {
    // We have new updates that haven't been processed yet.
    // We'll add them to the base queue.
    if (baseQueue !== null) {
      // Merge the pending queue and the base queue.
      var baseFirst = baseQueue.next;
      var pendingFirst = pendingQueue.next;
      baseQueue.next = pendingFirst;
      pendingQueue.next = baseFirst;
    }

    current.baseQueue = baseQueue = pendingQueue;
    queue.pending = null;
  }

  if (baseQueue !== null) {
    // We have a queue to process.
    var first = baseQueue.next;
    var newState = current.baseState;
    var newBaseState = null;
    var newBaseQueueFirst = null;
    var newBaseQueueLast = null;
    var update = first;

    do {
      var updateExpirationTime = update.expirationTime;

      if (updateExpirationTime < renderExpirationTime) {
        // Priority is insufficient. Skip this update. If this is the first
        // skipped update, the previous update/state is the new base
        // update/state.
        var clone = {
          expirationTime: update.expirationTime,
          suspenseConfig: update.suspenseConfig,
          action: update.action,
          eagerReducer: update.eagerReducer,
          eagerState: update.eagerState,
          next: null
        };

        if (newBaseQueueLast === null) {
          newBaseQueueFirst = newBaseQueueLast = clone;
          newBaseState = newState;
        } else {
          newBaseQueueLast = newBaseQueueLast.next = clone;
        } // Update the remaining priority in the queue.


        if (updateExpirationTime > currentlyRenderingFiber$1.expirationTime) {
          currentlyRenderingFiber$1.expirationTime = updateExpirationTime;
          markUnprocessedUpdateTime(updateExpirationTime);
        }
      } else {
        // This update does have sufficient priority.
        if (newBaseQueueLast !== null) {
          var _clone = {
            expirationTime: Sync,
            // This update is going to be committed so we never want uncommit it.
            suspenseConfig: update.suspenseConfig,
            action: update.action,
            eagerReducer: update.eagerReducer,
            eagerState: update.eagerState,
            next: null
          };
          newBaseQueueLast = newBaseQueueLast.next = _clone;
        } // Mark the event time of this update as relevant to this render pass.
        // TODO: This should ideally use the true event time of this update rather than
        // its priority which is a derived and not reverseable value.
        // TODO: We should skip this update if it was already committed but currently
        // we have no way of detecting the difference between a committed and suspended
        // update here.


        markRenderEventTimeAndConfig(updateExpirationTime, update.suspenseConfig); // Process this update.

        if (update.eagerReducer === reducer) {
          // If this update was processed eagerly, and its reducer matches the
          // current reducer, we can use the eagerly computed state.
          newState = update.eagerState;
        } else {
          var action = update.action;
          newState = reducer(newState, action);
        }
      }

      update = update.next;
    } while (update !== null && update !== first);

    if (newBaseQueueLast === null) {
      newBaseState = newState;
    } else {
      newBaseQueueLast.next = newBaseQueueFirst;
    } // Mark that the fiber performed work, but only if the new state is
    // different from the current state.


    if (!objectIs(newState, hook.memoizedState)) {
      markWorkInProgressReceivedUpdate();
    }

    hook.memoizedState = newState;
    hook.baseState = newBaseState;
    hook.baseQueue = newBaseQueueLast;
    queue.lastRenderedState = newState;
  }

  var dispatch = queue.dispatch;
  return [hook.memoizedState, dispatch];
}

function rerenderReducer(reducer, initialArg, init) {
  var hook = updateWorkInProgressHook();
  var queue = hook.queue;

  if (!(queue !== null)) {
    {
      throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
    }
  }

  queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
  // work-in-progress hook.

  var dispatch = queue.dispatch;
  var lastRenderPhaseUpdate = queue.pending;
  var newState = hook.memoizedState;

  if (lastRenderPhaseUpdate !== null) {
    // The queue doesn't persist past this render pass.
    queue.pending = null;
    var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
    var update = firstRenderPhaseUpdate;

    do {
      // Process this render phase update. We don't have to check the
      // priority because it will always be the same as the current
      // render's.
      var action = update.action;
      newState = reducer(newState, action);
      update = update.next;
    } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is
    // different from the current state.


    if (!objectIs(newState, hook.memoizedState)) {
      markWorkInProgressReceivedUpdate();
    }

    hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to
    // the base state unless the queue is empty.
    // TODO: Not sure if this is the desired semantics, but it's what we
    // do for gDSFP. I can't remember why.

    if (hook.baseQueue === null) {
      hook.baseState = newState;
    }

    queue.lastRenderedState = newState;
  }

  return [newState, dispatch];
}

function mountState(initialState) {
  var hook = mountWorkInProgressHook();

  if (typeof initialState === 'function') {
    // $FlowFixMe: Flow doesn't like mixed types
    initialState = initialState();
  }

  hook.memoizedState = hook.baseState = initialState;
  var queue = hook.queue = {
    pending: null,
    dispatch: null,
    lastRenderedReducer: basicStateReducer,
    lastRenderedState: initialState
  };
  var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
  return [hook.memoizedState, dispatch];
}

function updateState(initialState) {
  return updateReducer(basicStateReducer);
}

function rerenderState(initialState) {
  return rerenderReducer(basicStateReducer);
}

function pushEffect(tag, create, destroy, deps) {
  var effect = {
    tag: tag,
    create: create,
    destroy: destroy,
    deps: deps,
    // Circular
    next: null
  };
  var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;

  if (componentUpdateQueue === null) {
    componentUpdateQueue = createFunctionComponentUpdateQueue();
    currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
    componentUpdateQueue.lastEffect = effect.next = effect;
  } else {
    var lastEffect = componentUpdateQueue.lastEffect;

    if (lastEffect === null) {
      componentUpdateQueue.lastEffect = effect.next = effect;
    } else {
      var firstEffect = lastEffect.next;
      lastEffect.next = effect;
      effect.next = firstEffect;
      componentUpdateQueue.lastEffect = effect;
    }
  }

  return effect;
}

function mountRef(initialValue) {
  var hook = mountWorkInProgressHook();
  var ref = {
    current: initialValue
  };

  {
    Object.seal(ref);
  }

  hook.memoizedState = ref;
  return ref;
}

function updateRef(initialValue) {
  var hook = updateWorkInProgressHook();
  return hook.memoizedState;
}

function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  var hook = mountWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, undefined, nextDeps);
}

function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  var hook = updateWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  var destroy = undefined;

  if (currentHook !== null) {
    var prevEffect = currentHook.memoizedState;
    destroy = prevEffect.destroy;

    if (nextDeps !== null) {
      var prevDeps = prevEffect.deps;

      if (areHookInputsEqual(nextDeps, prevDeps)) {
        pushEffect(hookEffectTag, create, destroy, nextDeps);
        return;
      }
    }
  }

  currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  hook.memoizedState = pushEffect(HasEffect | hookEffectTag, create, destroy, nextDeps);
}

function mountEffect(create, deps) {
  {
    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
    if ('undefined' !== typeof jest) {
      warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
    }
  }

  return mountEffectImpl(Update | Passive, Passive$1, create, deps);
}

function updateEffect(create, deps) {
  {
    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
    if ('undefined' !== typeof jest) {
      warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
    }
  }

  return updateEffectImpl(Update | Passive, Passive$1, create, deps);
}

function mountLayoutEffect(create, deps) {
  return mountEffectImpl(Update, Layout, create, deps);
}

function updateLayoutEffect(create, deps) {
  return updateEffectImpl(Update, Layout, create, deps);
}

function imperativeHandleEffect(create, ref) {
  if (typeof ref === 'function') {
    var refCallback = ref;

    var _inst = create();

    refCallback(_inst);
    return function () {
      refCallback(null);
    };
  } else if (ref !== null && ref !== undefined) {
    var refObject = ref;

    {
      if (!refObject.hasOwnProperty('current')) {
        error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');
      }
    }

    var _inst2 = create();

    refObject.current = _inst2;
    return function () {
      refObject.current = null;
    };
  }
}

function mountImperativeHandle(ref, create, deps) {
  {
    if (typeof create !== 'function') {
      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
    }
  } // TODO: If deps are provided, should we skip comparing the ref itself?


  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
  return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
}

function updateImperativeHandle(ref, create, deps) {
  {
    if (typeof create !== 'function') {
      error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
    }
  } // TODO: If deps are provided, should we skip comparing the ref itself?


  var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
  return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
}

function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.
  // The react-debug-hooks package injects its own implementation
  // so that e.g. DevTools can display custom hook values.
}

var updateDebugValue = mountDebugValue;

function mountCallback(callback, deps) {
  var hook = mountWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  hook.memoizedState = [callback, nextDeps];
  return callback;
}

function updateCallback(callback, deps) {
  var hook = updateWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  var prevState = hook.memoizedState;

  if (prevState !== null) {
    if (nextDeps !== null) {
      var prevDeps = prevState[1];

      if (areHookInputsEqual(nextDeps, prevDeps)) {
        return prevState[0];
      }
    }
  }

  hook.memoizedState = [callback, nextDeps];
  return callback;
}

function mountMemo(nextCreate, deps) {
  var hook = mountWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  var nextValue = nextCreate();
  hook.memoizedState = [nextValue, nextDeps];
  return nextValue;
}

function updateMemo(nextCreate, deps) {
  var hook = updateWorkInProgressHook();
  var nextDeps = deps === undefined ? null : deps;
  var prevState = hook.memoizedState;

  if (prevState !== null) {
    // Assume these are defined. If they're not, areHookInputsEqual will warn.
    if (nextDeps !== null) {
      var prevDeps = prevState[1];

      if (areHookInputsEqual(nextDeps, prevDeps)) {
        return prevState[0];
      }
    }
  }

  var nextValue = nextCreate();
  hook.memoizedState = [nextValue, nextDeps];
  return nextValue;
}

function mountDeferredValue(value, config) {
  var _mountState = mountState(value),
      prevValue = _mountState[0],
      setValue = _mountState[1];

  mountEffect(function () {
    var previousConfig = ReactCurrentBatchConfig$1.suspense;
    ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;

    try {
      setValue(value);
    } finally {
      ReactCurrentBatchConfig$1.suspense = previousConfig;
    }
  }, [value, config]);
  return prevValue;
}

function updateDeferredValue(value, config) {
  var _updateState = updateState(),
      prevValue = _updateState[0],
      setValue = _updateState[1];

  updateEffect(function () {
    var previousConfig = ReactCurrentBatchConfig$1.suspense;
    ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;

    try {
      setValue(value);
    } finally {
      ReactCurrentBatchConfig$1.suspense = previousConfig;
    }
  }, [value, config]);
  return prevValue;
}

function rerenderDeferredValue(value, config) {
  var _rerenderState = rerenderState(),
      prevValue = _rerenderState[0],
      setValue = _rerenderState[1];

  updateEffect(function () {
    var previousConfig = ReactCurrentBatchConfig$1.suspense;
    ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;

    try {
      setValue(value);
    } finally {
      ReactCurrentBatchConfig$1.suspense = previousConfig;
    }
  }, [value, config]);
  return prevValue;
}

function startTransition(setPending, config, callback) {
  var priorityLevel = getCurrentPriorityLevel();
  runWithPriority$1(priorityLevel < UserBlockingPriority$1 ? UserBlockingPriority$1 : priorityLevel, function () {
    setPending(true);
  });
  runWithPriority$1(priorityLevel > NormalPriority ? NormalPriority : priorityLevel, function () {
    var previousConfig = ReactCurrentBatchConfig$1.suspense;
    ReactCurrentBatchConfig$1.suspense = config === undefined ? null : config;

    try {
      setPending(false);
      callback();
    } finally {
      ReactCurrentBatchConfig$1.suspense = previousConfig;
    }
  });
}

function mountTransition(config) {
  var _mountState2 = mountState(false),
      isPending = _mountState2[0],
      setPending = _mountState2[1];

  var start = mountCallback(startTransition.bind(null, setPending, config), [setPending, config]);
  return [start, isPending];
}

function updateTransition(config) {
  var _updateState2 = updateState(),
      isPending = _updateState2[0],
      setPending = _updateState2[1];

  var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
  return [start, isPending];
}

function rerenderTransition(config) {
  var _rerenderState2 = rerenderState(),
      isPending = _rerenderState2[0],
      setPending = _rerenderState2[1];

  var start = updateCallback(startTransition.bind(null, setPending, config), [setPending, config]);
  return [start, isPending];
}

function dispatchAction(fiber, queue, action) {
  {
    if (typeof arguments[3] === 'function') {
      error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
    }
  }

  var currentTime = requestCurrentTimeForUpdate();
  var suspenseConfig = requestCurrentSuspenseConfig();
  var expirationTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
  var update = {
    expirationTime: expirationTime,
    suspenseConfig: suspenseConfig,
    action: action,
    eagerReducer: null,
    eagerState: null,
    next: null
  };

  {
    update.priority = getCurrentPriorityLevel();
  } // Append the update to the end of the list.


  var pending = queue.pending;

  if (pending === null) {
    // This is the first update. Create a circular list.
    update.next = update;
  } else {
    update.next = pending.next;
    pending.next = update;
  }

  queue.pending = update;
  var alternate = fiber.alternate;

  if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {
    // This is a render phase update. Stash it in a lazily-created map of
    // queue -> linked list of updates. After this render pass, we'll restart
    // and apply the stashed updates on top of the work-in-progress hook.
    didScheduleRenderPhaseUpdate = true;
    update.expirationTime = renderExpirationTime;
    currentlyRenderingFiber$1.expirationTime = renderExpirationTime;
  } else {
    if (fiber.expirationTime === NoWork && (alternate === null || alternate.expirationTime === NoWork)) {
      // The queue is currently empty, which means we can eagerly compute the
      // next state before entering the render phase. If the new state is the
      // same as the current state, we may be able to bail out entirely.
      var lastRenderedReducer = queue.lastRenderedReducer;

      if (lastRenderedReducer !== null) {
        var prevDispatcher;

        {
          prevDispatcher = ReactCurrentDispatcher.current;
          ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
        }

        try {
          var currentState = queue.lastRenderedState;
          var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute
          // it, on the update object. If the reducer hasn't changed by the
          // time we enter the render phase, then the eager state can be used
          // without calling the reducer again.

          update.eagerReducer = lastRenderedReducer;
          update.eagerState = eagerState;

          if (objectIs(eagerState, currentState)) {
            // Fast path. We can bail out without scheduling React to re-render.
            // It's still possible that we'll need to rebase this update later,
            // if the component re-renders for a different reason and by that
            // time the reducer has changed.
            return;
          }
        } catch (error) {// Suppress the error. It will throw again in the render phase.
        } finally {
          {
            ReactCurrentDispatcher.current = prevDispatcher;
          }
        }
      }
    }

    {
      // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
      if ('undefined' !== typeof jest) {
        warnIfNotScopedWithMatchingAct(fiber);
        warnIfNotCurrentlyActingUpdatesInDev(fiber);
      }
    }

    scheduleWork(fiber, expirationTime);
  }
}

var ContextOnlyDispatcher = {
  readContext: readContext,
  useCallback: throwInvalidHookError,
  useContext: throwInvalidHookError,
  useEffect: throwInvalidHookError,
  useImperativeHandle: throwInvalidHookError,
  useLayoutEffect: throwInvalidHookError,
  useMemo: throwInvalidHookError,
  useReducer: throwInvalidHookError,
  useRef: throwInvalidHookError,
  useState: throwInvalidHookError,
  useDebugValue: throwInvalidHookError,
  useResponder: throwInvalidHookError,
  useDeferredValue: throwInvalidHookError,
  useTransition: throwInvalidHookError
};
var HooksDispatcherOnMountInDEV = null;
var HooksDispatcherOnMountWithHookTypesInDEV = null;
var HooksDispatcherOnUpdateInDEV = null;
var HooksDispatcherOnRerenderInDEV = null;
var InvalidNestedHooksDispatcherOnMountInDEV = null;
var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
var InvalidNestedHooksDispatcherOnRerenderInDEV = null;

{
  var warnInvalidContextAccess = function () {
    error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
  };

  var warnInvalidHookAccess = function () {
    error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks');
  };

  HooksDispatcherOnMountInDEV = {
    readContext: function (context, observedBits) {
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      return mountCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      mountHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      return mountEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      return mountImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      return mountLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      mountHookTypesDev();
      checkDepsAreArrayDev(deps);
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;

      try {
        return mountMemo(create, deps);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;

      try {
        return mountReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      mountHookTypesDev();
      return mountRef(initialValue);
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;

      try {
        return mountState(initialState);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      mountHookTypesDev();
      return mountDebugValue();
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      mountHookTypesDev();
      return createDeprecatedResponderListener(responder, props);
    },
    useDeferredValue: function (value, config) {
      currentHookNameInDev = 'useDeferredValue';
      mountHookTypesDev();
      return mountDeferredValue(value, config);
    },
    useTransition: function (config) {
      currentHookNameInDev = 'useTransition';
      mountHookTypesDev();
      return mountTransition(config);
    }
  };
  HooksDispatcherOnMountWithHookTypesInDEV = {
    readContext: function (context, observedBits) {
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      updateHookTypesDev();
      return mountCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      updateHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      updateHookTypesDev();
      return mountEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      updateHookTypesDev();
      return mountImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      updateHookTypesDev();
      return mountLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;

      try {
        return mountMemo(create, deps);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;

      try {
        return mountReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      updateHookTypesDev();
      return mountRef(initialValue);
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;

      try {
        return mountState(initialState);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      updateHookTypesDev();
      return mountDebugValue();
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      updateHookTypesDev();
      return createDeprecatedResponderListener(responder, props);
    },
    useDeferredValue: function (value, config) {
      currentHookNameInDev = 'useDeferredValue';
      updateHookTypesDev();
      return mountDeferredValue(value, config);
    },
    useTransition: function (config) {
      currentHookNameInDev = 'useTransition';
      updateHookTypesDev();
      return mountTransition(config);
    }
  };
  HooksDispatcherOnUpdateInDEV = {
    readContext: function (context, observedBits) {
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      updateHookTypesDev();
      return updateCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      updateHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      updateHookTypesDev();
      return updateEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      updateHookTypesDev();
      return updateImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      updateHookTypesDev();
      return updateLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return updateMemo(create, deps);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return updateReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      updateHookTypesDev();
      return updateRef();
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return updateState(initialState);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      updateHookTypesDev();
      return updateDebugValue();
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      updateHookTypesDev();
      return createDeprecatedResponderListener(responder, props);
    },
    useDeferredValue: function (value, config) {
      currentHookNameInDev = 'useDeferredValue';
      updateHookTypesDev();
      return updateDeferredValue(value, config);
    },
    useTransition: function (config) {
      currentHookNameInDev = 'useTransition';
      updateHookTypesDev();
      return updateTransition(config);
    }
  };
  HooksDispatcherOnRerenderInDEV = {
    readContext: function (context, observedBits) {
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      updateHookTypesDev();
      return updateCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      updateHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      updateHookTypesDev();
      return updateEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      updateHookTypesDev();
      return updateImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      updateHookTypesDev();
      return updateLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;

      try {
        return updateMemo(create, deps);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;

      try {
        return rerenderReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      updateHookTypesDev();
      return updateRef();
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnRerenderInDEV;

      try {
        return rerenderState(initialState);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      updateHookTypesDev();
      return updateDebugValue();
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      updateHookTypesDev();
      return createDeprecatedResponderListener(responder, props);
    },
    useDeferredValue: function (value, config) {
      currentHookNameInDev = 'useDeferredValue';
      updateHookTypesDev();
      return rerenderDeferredValue(value, config);
    },
    useTransition: function (config) {
      currentHookNameInDev = 'useTransition';
      updateHookTypesDev();
      return rerenderTransition(config);
    }
  };
  InvalidNestedHooksDispatcherOnMountInDEV = {
    readContext: function (context, observedBits) {
      warnInvalidContextAccess();
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      warnInvalidHookAccess();
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;

      try {
        return mountMemo(create, deps);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      warnInvalidHookAccess();
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;

      try {
        return mountReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountRef(initialValue);
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      warnInvalidHookAccess();
      mountHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnMountInDEV;

      try {
        return mountState(initialState);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountDebugValue();
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return createDeprecatedResponderListener(responder, props);
    },
    useDeferredValue: function (value, config) {
      currentHookNameInDev = 'useDeferredValue';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountDeferredValue(value, config);
    },
    useTransition: function (config) {
      currentHookNameInDev = 'useTransition';
      warnInvalidHookAccess();
      mountHookTypesDev();
      return mountTransition(config);
    }
  };
  InvalidNestedHooksDispatcherOnUpdateInDEV = {
    readContext: function (context, observedBits) {
      warnInvalidContextAccess();
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return updateMemo(create, deps);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return updateReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateRef();
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return updateState(initialState);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateDebugValue();
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return createDeprecatedResponderListener(responder, props);
    },
    useDeferredValue: function (value, config) {
      currentHookNameInDev = 'useDeferredValue';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateDeferredValue(value, config);
    },
    useTransition: function (config) {
      currentHookNameInDev = 'useTransition';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateTransition(config);
    }
  };
  InvalidNestedHooksDispatcherOnRerenderInDEV = {
    readContext: function (context, observedBits) {
      warnInvalidContextAccess();
      return readContext(context, observedBits);
    },
    useCallback: function (callback, deps) {
      currentHookNameInDev = 'useCallback';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateCallback(callback, deps);
    },
    useContext: function (context, observedBits) {
      currentHookNameInDev = 'useContext';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return readContext(context, observedBits);
    },
    useEffect: function (create, deps) {
      currentHookNameInDev = 'useEffect';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateEffect(create, deps);
    },
    useImperativeHandle: function (ref, create, deps) {
      currentHookNameInDev = 'useImperativeHandle';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateImperativeHandle(ref, create, deps);
    },
    useLayoutEffect: function (create, deps) {
      currentHookNameInDev = 'useLayoutEffect';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateLayoutEffect(create, deps);
    },
    useMemo: function (create, deps) {
      currentHookNameInDev = 'useMemo';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return updateMemo(create, deps);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useReducer: function (reducer, initialArg, init) {
      currentHookNameInDev = 'useReducer';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return rerenderReducer(reducer, initialArg, init);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useRef: function (initialValue) {
      currentHookNameInDev = 'useRef';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateRef();
    },
    useState: function (initialState) {
      currentHookNameInDev = 'useState';
      warnInvalidHookAccess();
      updateHookTypesDev();
      var prevDispatcher = ReactCurrentDispatcher.current;
      ReactCurrentDispatcher.current = InvalidNestedHooksDispatcherOnUpdateInDEV;

      try {
        return rerenderState(initialState);
      } finally {
        ReactCurrentDispatcher.current = prevDispatcher;
      }
    },
    useDebugValue: function (value, formatterFn) {
      currentHookNameInDev = 'useDebugValue';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return updateDebugValue();
    },
    useResponder: function (responder, props) {
      currentHookNameInDev = 'useResponder';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return createDeprecatedResponderListener(responder, props);
    },
    useDeferredValue: function (value, config) {
      currentHookNameInDev = 'useDeferredValue';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return rerenderDeferredValue(value, config);
    },
    useTransition: function (config) {
      currentHookNameInDev = 'useTransition';
      warnInvalidHookAccess();
      updateHookTypesDev();
      return rerenderTransition(config);
    }
  };
}

var now$1 = Scheduler.unstable_now;
var commitTime = 0;
var profilerStartTime = -1;

function getCommitTime() {
  return commitTime;
}

function recordCommitTime() {

  commitTime = now$1();
}

function startProfilerTimer(fiber) {

  profilerStartTime = now$1();

  if (fiber.actualStartTime < 0) {
    fiber.actualStartTime = now$1();
  }
}

function stopProfilerTimerIfRunning(fiber) {

  profilerStartTime = -1;
}

function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {

  if (profilerStartTime >= 0) {
    var elapsedTime = now$1() - profilerStartTime;
    fiber.actualDuration += elapsedTime;

    if (overrideBaseTime) {
      fiber.selfBaseDuration = elapsedTime;
    }

    profilerStartTime = -1;
  }
}

// This may have been an insertion or a hydration.

var hydrationParentFiber = null;
var nextHydratableInstance = null;
var isHydrating = false;

function enterHydrationState(fiber) {

  var parentInstance = fiber.stateNode.containerInfo;
  nextHydratableInstance = getFirstHydratableChild(parentInstance);
  hydrationParentFiber = fiber;
  isHydrating = true;
  return true;
}

function deleteHydratableInstance(returnFiber, instance) {
  {
    switch (returnFiber.tag) {
      case HostRoot:
        didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
        break;

      case HostComponent:
        didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
        break;
    }
  }

  var childToDelete = createFiberFromHostInstanceForDeletion();
  childToDelete.stateNode = instance;
  childToDelete.return = returnFiber;
  childToDelete.effectTag = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
  // these children are not part of the reconciliation list of children.
  // Even if we abort and rereconcile the children, that will try to hydrate
  // again and the nodes are still in the host tree so these will be
  // recreated.

  if (returnFiber.lastEffect !== null) {
    returnFiber.lastEffect.nextEffect = childToDelete;
    returnFiber.lastEffect = childToDelete;
  } else {
    returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
  }
}

function insertNonHydratedInstance(returnFiber, fiber) {
  fiber.effectTag = fiber.effectTag & ~Hydrating | Placement;

  {
    switch (returnFiber.tag) {
      case HostRoot:
        {
          var parentContainer = returnFiber.stateNode.containerInfo;

          switch (fiber.tag) {
            case HostComponent:
              var type = fiber.type;
              var props = fiber.pendingProps;
              didNotFindHydratableContainerInstance(parentContainer, type);
              break;

            case HostText:
              var text = fiber.pendingProps;
              didNotFindHydratableContainerTextInstance(parentContainer, text);
              break;
          }

          break;
        }

      case HostComponent:
        {
          var parentType = returnFiber.type;
          var parentProps = returnFiber.memoizedProps;
          var parentInstance = returnFiber.stateNode;

          switch (fiber.tag) {
            case HostComponent:
              var _type = fiber.type;
              var _props = fiber.pendingProps;
              didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
              break;

            case HostText:
              var _text = fiber.pendingProps;
              didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
              break;

            case SuspenseComponent:
              didNotFindHydratableSuspenseInstance(parentType, parentProps);
              break;
          }

          break;
        }

      default:
        return;
    }
  }
}

function tryHydrate(fiber, nextInstance) {
  switch (fiber.tag) {
    case HostComponent:
      {
        var type = fiber.type;
        var props = fiber.pendingProps;
        var instance = canHydrateInstance(nextInstance, type);

        if (instance !== null) {
          fiber.stateNode = instance;
          return true;
        }

        return false;
      }

    case HostText:
      {
        var text = fiber.pendingProps;
        var textInstance = canHydrateTextInstance(nextInstance, text);

        if (textInstance !== null) {
          fiber.stateNode = textInstance;
          return true;
        }

        return false;
      }

    case SuspenseComponent:
      {

        return false;
      }

    default:
      return false;
  }
}

function tryToClaimNextHydratableInstance(fiber) {
  if (!isHydrating) {
    return;
  }

  var nextInstance = nextHydratableInstance;

  if (!nextInstance) {
    // Nothing to hydrate. Make it an insertion.
    insertNonHydratedInstance(hydrationParentFiber, fiber);
    isHydrating = false;
    hydrationParentFiber = fiber;
    return;
  }

  var firstAttemptedInstance = nextInstance;

  if (!tryHydrate(fiber, nextInstance)) {
    // If we can't hydrate this instance let's try the next one.
    // We use this as a heuristic. It's based on intuition and not data so it
    // might be flawed or unnecessary.
    nextInstance = getNextHydratableSibling(firstAttemptedInstance);

    if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
      // Nothing to hydrate. Make it an insertion.
      insertNonHydratedInstance(hydrationParentFiber, fiber);
      isHydrating = false;
      hydrationParentFiber = fiber;
      return;
    } // We matched the next one, we'll now assume that the first one was
    // superfluous and we'll delete it. Since we can't eagerly delete it
    // we'll have to schedule a deletion. To do that, this node needs a dummy
    // fiber associated with it.


    deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
  }

  hydrationParentFiber = fiber;
  nextHydratableInstance = getFirstHydratableChild(nextInstance);
}

function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {

  var instance = fiber.stateNode;
  var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.

  fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
  // is a new ref we mark this as an update.

  if (updatePayload !== null) {
    return true;
  }

  return false;
}

function prepareToHydrateHostTextInstance(fiber) {

  var textInstance = fiber.stateNode;
  var textContent = fiber.memoizedProps;
  var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);

  {
    if (shouldUpdate) {
      // We assume that prepareToHydrateHostTextInstance is called in a context where the
      // hydration parent is the parent host component of this host text.
      var returnFiber = hydrationParentFiber;

      if (returnFiber !== null) {
        switch (returnFiber.tag) {
          case HostRoot:
            {
              var parentContainer = returnFiber.stateNode.containerInfo;
              didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
              break;
            }

          case HostComponent:
            {
              var parentType = returnFiber.type;
              var parentProps = returnFiber.memoizedProps;
              var parentInstance = returnFiber.stateNode;
              didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
              break;
            }
        }
      }
    }
  }

  return shouldUpdate;
}

function skipPastDehydratedSuspenseInstance(fiber) {

  var suspenseState = fiber.memoizedState;
  var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;

  if (!suspenseInstance) {
    {
      throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
    }
  }

  return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
}

function popToNextHostParent(fiber) {
  var parent = fiber.return;

  while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
    parent = parent.return;
  }

  hydrationParentFiber = parent;
}

function popHydrationState(fiber) {

  if (fiber !== hydrationParentFiber) {
    // We're deeper than the current hydration context, inside an inserted
    // tree.
    return false;
  }

  if (!isHydrating) {
    // If we're not currently hydrating but we're in a hydration context, then
    // we were an insertion and now need to pop up reenter hydration of our
    // siblings.
    popToNextHostParent(fiber);
    isHydrating = true;
    return false;
  }

  var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
  // We only do this deeper than head and body since they tend to have random
  // other nodes in them. We also ignore components with pure text content in
  // side of them.
  // TODO: Better heuristic.

  if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
    var nextInstance = nextHydratableInstance;

    while (nextInstance) {
      deleteHydratableInstance(fiber, nextInstance);
      nextInstance = getNextHydratableSibling(nextInstance);
    }
  }

  popToNextHostParent(fiber);

  if (fiber.tag === SuspenseComponent) {
    nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
  } else {
    nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
  }

  return true;
}

function resetHydrationState() {

  hydrationParentFiber = null;
  nextHydratableInstance = null;
  isHydrating = false;
}

var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
var didReceiveUpdate = false;
var didWarnAboutBadClass;
var didWarnAboutModulePatternComponent;
var didWarnAboutContextTypeOnFunctionComponent;
var didWarnAboutGetDerivedStateOnFunctionComponent;
var didWarnAboutFunctionRefs;
var didWarnAboutReassigningProps;
var didWarnAboutRevealOrder;
var didWarnAboutTailOptions;

{
  didWarnAboutBadClass = {};
  didWarnAboutModulePatternComponent = {};
  didWarnAboutContextTypeOnFunctionComponent = {};
  didWarnAboutGetDerivedStateOnFunctionComponent = {};
  didWarnAboutFunctionRefs = {};
  didWarnAboutReassigningProps = false;
  didWarnAboutRevealOrder = {};
  didWarnAboutTailOptions = {};
}

function reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime) {
  if (current === null) {
    // If this is a fresh new component that hasn't been rendered yet, we
    // won't update its child set by applying minimal side-effects. Instead,
    // we will add them all to the child before it gets rendered. That means
    // we can optimize this reconciliation pass by not tracking side-effects.
    workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  } else {
    // If the current child is the same as the work in progress, it means that
    // we haven't yet started any work on these children. Therefore, we use
    // the clone algorithm to create a copy of all the current children.
    // If we had any progressed work already, that is invalid at this point so
    // let's throw it out.
    workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
  }
}

function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime) {
  // This function is fork of reconcileChildren. It's used in cases where we
  // want to reconcile without matching against the existing set. This has the
  // effect of all current children being unmounted; even if the type and key
  // are the same, the old child is unmounted and a new child is created.
  //
  // To do this, we're going to go through the reconcile algorithm twice. In
  // the first pass, we schedule a deletion for all the current children by
  // passing null.
  workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderExpirationTime); // In the second pass, we mount the new children. The trick here is that we
  // pass null in place of where we usually pass the current child set. This has
  // the effect of remounting all children regardless of whether their
  // identities match.

  workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
}

function updateForwardRef(current, workInProgress, Component, nextProps, renderExpirationTime) {
  // TODO: current can be non-null here even if the component
  // hasn't yet mounted. This happens after the first render suspends.
  // We'll need to figure out if this is fine or can cause issues.
  {
    if (workInProgress.type !== workInProgress.elementType) {
      // Lazy component props can't be validated in createElement
      // because they're only guaranteed to be resolved here.
      var innerPropTypes = Component.propTypes;

      if (innerPropTypes) {
        checkPropTypes(innerPropTypes, nextProps, // Resolved props
        'prop', getComponentName(Component), getCurrentFiberStackInDev);
      }
    }
  }

  var render = Component.render;
  var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent

  var nextChildren;
  prepareToReadContext(workInProgress, renderExpirationTime);

  {
    ReactCurrentOwner$1.current = workInProgress;
    setIsRendering(true);
    nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);

    if ( workInProgress.mode & StrictMode) {
      // Only double-render components with Hooks
      if (workInProgress.memoizedState !== null) {
        nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderExpirationTime);
      }
    }

    setIsRendering(false);
  }

  if (current !== null && !didReceiveUpdate) {
    bailoutHooks(current, workInProgress, renderExpirationTime);
    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  } // React DevTools reads this flag.


  workInProgress.effectTag |= PerformedWork;
  reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
  if (current === null) {
    var type = Component.type;

    if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
    Component.defaultProps === undefined) {
      var resolvedType = type;

      {
        resolvedType = resolveFunctionForHotReloading(type);
      } // If this is a plain function component without default props,
      // and with only the default shallow comparison, we upgrade it
      // to a SimpleMemoComponent to allow fast path updates.


      workInProgress.tag = SimpleMemoComponent;
      workInProgress.type = resolvedType;

      {
        validateFunctionComponentInDev(workInProgress, type);
      }

      return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateExpirationTime, renderExpirationTime);
    }

    {
      var innerPropTypes = type.propTypes;

      if (innerPropTypes) {
        // Inner memo component props aren't currently validated in createElement.
        // We could move it there, but we'd still need this for lazy code path.
        checkPropTypes(innerPropTypes, nextProps, // Resolved props
        'prop', getComponentName(type), getCurrentFiberStackInDev);
      }
    }

    var child = createFiberFromTypeAndProps(Component.type, null, nextProps, null, workInProgress.mode, renderExpirationTime);
    child.ref = workInProgress.ref;
    child.return = workInProgress;
    workInProgress.child = child;
    return child;
  }

  {
    var _type = Component.type;
    var _innerPropTypes = _type.propTypes;

    if (_innerPropTypes) {
      // Inner memo component props aren't currently validated in createElement.
      // We could move it there, but we'd still need this for lazy code path.
      checkPropTypes(_innerPropTypes, nextProps, // Resolved props
      'prop', getComponentName(_type), getCurrentFiberStackInDev);
    }
  }

  var currentChild = current.child; // This is always exactly one child

  if (updateExpirationTime < renderExpirationTime) {
    // This will be the props with resolved defaultProps,
    // unlike current.memoizedProps which will be the unresolved ones.
    var prevProps = currentChild.memoizedProps; // Default to shallow comparison

    var compare = Component.compare;
    compare = compare !== null ? compare : shallowEqual;

    if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
    }
  } // React DevTools reads this flag.


  workInProgress.effectTag |= PerformedWork;
  var newChild = createWorkInProgress(currentChild, nextProps);
  newChild.ref = workInProgress.ref;
  newChild.return = workInProgress;
  workInProgress.child = newChild;
  return newChild;
}

function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateExpirationTime, renderExpirationTime) {
  // TODO: current can be non-null here even if the component
  // hasn't yet mounted. This happens when the inner render suspends.
  // We'll need to figure out if this is fine or can cause issues.
  {
    if (workInProgress.type !== workInProgress.elementType) {
      // Lazy component props can't be validated in createElement
      // because they're only guaranteed to be resolved here.
      var outerMemoType = workInProgress.elementType;

      if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
        // We warn when you define propTypes on lazy()
        // so let's just skip over it to find memo() outer wrapper.
        // Inner props for memo are validated later.
        outerMemoType = refineResolvedLazyComponent(outerMemoType);
      }

      var outerPropTypes = outerMemoType && outerMemoType.propTypes;

      if (outerPropTypes) {
        checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
        'prop', getComponentName(outerMemoType), getCurrentFiberStackInDev);
      } // Inner propTypes will be validated in the function component path.

    }
  }

  if (current !== null) {
    var prevProps = current.memoizedProps;

    if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.
     workInProgress.type === current.type )) {
      didReceiveUpdate = false;

      if (updateExpirationTime < renderExpirationTime) {
        // The pending update priority was cleared at the beginning of
        // beginWork. We're about to bail out, but there might be additional
        // updates at a lower priority. Usually, the priority level of the
        // remaining updates is accumlated during the evaluation of the
        // component (i.e. when processing the update queue). But since since
        // we're bailing out early *without* evaluating the component, we need
        // to account for it here, too. Reset to the value of the current fiber.
        // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,
        // because a MemoComponent fiber does not have hooks or an update queue;
        // rather, it wraps around an inner component, which may or may not
        // contains hooks.
        // TODO: Move the reset at in beginWork out of the common path so that
        // this is no longer necessary.
        workInProgress.expirationTime = current.expirationTime;
        return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
      }
    }
  }

  return updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime);
}

function updateFragment(current, workInProgress, renderExpirationTime) {
  var nextChildren = workInProgress.pendingProps;
  reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateMode(current, workInProgress, renderExpirationTime) {
  var nextChildren = workInProgress.pendingProps.children;
  reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateProfiler(current, workInProgress, renderExpirationTime) {
  {
    workInProgress.effectTag |= Update;
  }

  var nextProps = workInProgress.pendingProps;
  var nextChildren = nextProps.children;
  reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function markRef(current, workInProgress) {
  var ref = workInProgress.ref;

  if (current === null && ref !== null || current !== null && current.ref !== ref) {
    // Schedule a Ref effect
    workInProgress.effectTag |= Ref;
  }
}

function updateFunctionComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
  {
    if (workInProgress.type !== workInProgress.elementType) {
      // Lazy component props can't be validated in createElement
      // because they're only guaranteed to be resolved here.
      var innerPropTypes = Component.propTypes;

      if (innerPropTypes) {
        checkPropTypes(innerPropTypes, nextProps, // Resolved props
        'prop', getComponentName(Component), getCurrentFiberStackInDev);
      }
    }
  }

  var context;

  {
    var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
    context = getMaskedContext(workInProgress, unmaskedContext);
  }

  var nextChildren;
  prepareToReadContext(workInProgress, renderExpirationTime);

  {
    ReactCurrentOwner$1.current = workInProgress;
    setIsRendering(true);
    nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);

    if ( workInProgress.mode & StrictMode) {
      // Only double-render components with Hooks
      if (workInProgress.memoizedState !== null) {
        nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderExpirationTime);
      }
    }

    setIsRendering(false);
  }

  if (current !== null && !didReceiveUpdate) {
    bailoutHooks(current, workInProgress, renderExpirationTime);
    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  } // React DevTools reads this flag.


  workInProgress.effectTag |= PerformedWork;
  reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateClassComponent(current, workInProgress, Component, nextProps, renderExpirationTime) {
  {
    if (workInProgress.type !== workInProgress.elementType) {
      // Lazy component props can't be validated in createElement
      // because they're only guaranteed to be resolved here.
      var innerPropTypes = Component.propTypes;

      if (innerPropTypes) {
        checkPropTypes(innerPropTypes, nextProps, // Resolved props
        'prop', getComponentName(Component), getCurrentFiberStackInDev);
      }
    }
  } // Push context providers early to prevent context stack mismatches.
  // During mounting we don't know the child context yet as the instance doesn't exist.
  // We will invalidate the child context in finishClassComponent() right after rendering.


  var hasContext;

  if (isContextProvider(Component)) {
    hasContext = true;
    pushContextProvider(workInProgress);
  } else {
    hasContext = false;
  }

  prepareToReadContext(workInProgress, renderExpirationTime);
  var instance = workInProgress.stateNode;
  var shouldUpdate;

  if (instance === null) {
    if (current !== null) {
      // A class component without an instance only mounts if it suspended
      // inside a non-concurrent tree, in an inconsistent state. We want to
      // treat it like a new mount, even though an empty version of it already
      // committed. Disconnect the alternate pointers.
      current.alternate = null;
      workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect

      workInProgress.effectTag |= Placement;
    } // In the initial pass we might need to construct the instance.


    constructClassInstance(workInProgress, Component, nextProps);
    mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
    shouldUpdate = true;
  } else if (current === null) {
    // In a resume, we'll already have an instance we can reuse.
    shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
  } else {
    shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderExpirationTime);
  }

  var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime);

  {
    var inst = workInProgress.stateNode;

    if (inst.props !== nextProps) {
      if (!didWarnAboutReassigningProps) {
        error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');
      }

      didWarnAboutReassigningProps = true;
    }
  }

  return nextUnitOfWork;
}

function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderExpirationTime) {
  // Refs should update even if shouldComponentUpdate returns false
  markRef(current, workInProgress);
  var didCaptureError = (workInProgress.effectTag & DidCapture) !== NoEffect;

  if (!shouldUpdate && !didCaptureError) {
    // Context providers should defer to sCU for rendering
    if (hasContext) {
      invalidateContextProvider(workInProgress, Component, false);
    }

    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  }

  var instance = workInProgress.stateNode; // Rerender

  ReactCurrentOwner$1.current = workInProgress;
  var nextChildren;

  if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
    // If we captured an error, but getDerivedStateFromError is not defined,
    // unmount all the children. componentDidCatch will schedule an update to
    // re-render a fallback. This is temporary until we migrate everyone to
    // the new API.
    // TODO: Warn in a future release.
    nextChildren = null;

    {
      stopProfilerTimerIfRunning();
    }
  } else {
    {
      setIsRendering(true);
      nextChildren = instance.render();

      if ( workInProgress.mode & StrictMode) {
        instance.render();
      }

      setIsRendering(false);
    }
  } // React DevTools reads this flag.


  workInProgress.effectTag |= PerformedWork;

  if (current !== null && didCaptureError) {
    // If we're recovering from an error, reconcile without reusing any of
    // the existing children. Conceptually, the normal children and the children
    // that are shown on error are two different sets, so we shouldn't reuse
    // normal children even if their identities match.
    forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderExpirationTime);
  } else {
    reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  } // Memoize state using the values we just used to render.
  // TODO: Restructure so we never read values from the instance.


  workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.

  if (hasContext) {
    invalidateContextProvider(workInProgress, Component, true);
  }

  return workInProgress.child;
}

function pushHostRootContext(workInProgress) {
  var root = workInProgress.stateNode;

  if (root.pendingContext) {
    pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
  } else if (root.context) {
    // Should always be set
    pushTopLevelContextObject(workInProgress, root.context, false);
  }

  pushHostContainer(workInProgress, root.containerInfo);
}

function updateHostRoot(current, workInProgress, renderExpirationTime) {
  pushHostRootContext(workInProgress);
  var updateQueue = workInProgress.updateQueue;

  if (!(current !== null && updateQueue !== null)) {
    {
      throw Error( "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 nextProps = workInProgress.pendingProps;
  var prevState = workInProgress.memoizedState;
  var prevChildren = prevState !== null ? prevState.element : null;
  cloneUpdateQueue(current, workInProgress);
  processUpdateQueue(workInProgress, nextProps, null, renderExpirationTime);
  var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property
  // being called "element".

  var nextChildren = nextState.element;

  if (nextChildren === prevChildren) {
    // If the state is the same as before, that's a bailout because we had
    // no work that expires at this time.
    resetHydrationState();
    return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
  }

  var root = workInProgress.stateNode;

  if (root.hydrate && enterHydrationState(workInProgress)) {
    // If we don't have any current children this might be the first pass.
    // We always try to hydrate. If this isn't a hydration pass there won't
    // be any children to hydrate which is effectively the same thing as
    // not hydrating.
    var child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
    workInProgress.child = child;
    var node = child;

    while (node) {
      // Mark each child as hydrating. This is a fast path to know whether this
      // tree is part of a hydrating tree. This is used to determine if a child
      // node has fully mounted yet, and for scheduling event replaying.
      // Conceptually this is similar to Placement in that a new subtree is
      // inserted into the React tree here. It just happens to not need DOM
      // mutations because it already exists.
      node.effectTag = node.effectTag & ~Placement | Hydrating;
      node = node.sibling;
    }
  } else {
    // Otherwise reset hydration state in case we aborted and resumed another
    // root.
    reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
    resetHydrationState();
  }

  return workInProgress.child;
}

function updateHostComponent(current, workInProgress, renderExpirationTime) {
  pushHostContext(workInProgress);

  if (current === null) {
    tryToClaimNextHydratableInstance(workInProgress);
  }

  var type = workInProgress.type;
  var nextProps = workInProgress.pendingProps;
  var prevProps = current !== null ? current.memoizedProps : null;
  var nextChildren = nextProps.children;
  var isDirectTextChild = shouldSetTextContent(type, nextProps);

  if (isDirectTextChild) {
    // We special case a direct text child of a host node. This is a common
    // case. We won't handle it as a reified child. We will instead handle
    // this in the host environment that also has access to this prop. That
    // avoids allocating another HostText fiber and traversing it.
    nextChildren = null;
  } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
    // If we're switching from a direct text child to a normal child, or to
    // empty, we need to schedule the text content to be reset.
    workInProgress.effectTag |= ContentReset;
  }

  markRef(current, workInProgress); // Check the host config to see if the children are offscreen/hidden.

  if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(type, nextProps)) {
    {
      markSpawnedWork(Never);
    } // Schedule this fiber to re-render at offscreen priority. Then bailout.


    workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
    return null;
  }

  reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  return workInProgress.child;
}

function updateHostText(current, workInProgress) {
  if (current === null) {
    tryToClaimNextHydratableInstance(workInProgress);
  } // Nothing to do here. This is terminal. We'll do the completion step
  // immediately after.


  return null;
}

function mountLazyComponent(_current, workInProgress, elementType, updateExpirationTime, renderExpirationTime) {
  if (_current !== null) {
    // A lazy component only mounts if it suspended inside a non-
    // concurrent tree, in an inconsistent state. We want to treat it like
    // a new mount, even though an empty version of it already committed.
    // Disconnect the alternate pointers.
    _current.alternate = null;
    workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect

    workInProgress.effectTag |= Placement;
  }

  var props = workInProgress.pendingProps; // We can't start a User Timing measurement with correct label yet.
  // Cancel and resume right after we know the tag.

  cancelWorkTimer(workInProgress);
  var Component = readLazyComponentType(elementType); // Store the unwrapped component in the type.

  workInProgress.type = Component;
  var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
  startWorkTimer(workInProgress);
  var resolvedProps = resolveDefaultProps(Component, props);
  var child;

  switch (resolvedTag) {
    case FunctionComponent:
      {
        {
          validateFunctionComponentInDev(workInProgress, Component);
          workInProgress.type = Component = resolveFunctionForHotReloading(Component);
        }

        child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
        return child;
      }

    case ClassComponent:
      {
        {
          workInProgress.type = Component = resolveClassForHotReloading(Component);
        }

        child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderExpirationTime);
        return child;
      }

    case ForwardRef:
      {
        {
          workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
        }

        child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderExpirationTime);
        return child;
      }

    case MemoComponent:
      {
        {
          if (workInProgress.type !== workInProgress.elementType) {
            var outerPropTypes = Component.propTypes;

            if (outerPropTypes) {
              checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
              'prop', getComponentName(Component), getCurrentFiberStackInDev);
            }
          }
        }

        child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
        updateExpirationTime, renderExpirationTime);
        return child;
      }
  }

  var hint = '';

  {
    if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
      hint = ' Did you wrap a component in React.lazy() more than once?';
    }
  } // This message intentionally doesn't mention ForwardRef or MemoComponent
  // because the fact that it's a separate type of work is an
  // implementation detail.


  {
    {
      throw Error( "Element type is invalid. Received a promise that resolves to: " + Component + ". Lazy element type must resolve to a class or function." + hint );
    }
  }
}

function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderExpirationTime) {
  if (_current !== null) {
    // An incomplete component only mounts if it suspended inside a non-
    // concurrent tree, in an inconsistent state. We want to treat it like
    // a new mount, even though an empty version of it already committed.
    // Disconnect the alternate pointers.
    _current.alternate = null;
    workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect

    workInProgress.effectTag |= Placement;
  } // Promote the fiber to a class and try rendering again.


  workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`
  // Push context providers early to prevent context stack mismatches.
  // During mounting we don't know the child context yet as the instance doesn't exist.
  // We will invalidate the child context in finishClassComponent() right after rendering.

  var hasContext;

  if (isContextProvider(Component)) {
    hasContext = true;
    pushContextProvider(workInProgress);
  } else {
    hasContext = false;
  }

  prepareToReadContext(workInProgress, renderExpirationTime);
  constructClassInstance(workInProgress, Component, nextProps);
  mountClassInstance(workInProgress, Component, nextProps, renderExpirationTime);
  return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
}

function mountIndeterminateComponent(_current, workInProgress, Component, renderExpirationTime) {
  if (_current !== null) {
    // An indeterminate component only mounts if it suspended inside a non-
    // concurrent tree, in an inconsistent state. We want to treat it like
    // a new mount, even though an empty version of it already committed.
    // Disconnect the alternate pointers.
    _current.alternate = null;
    workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect

    workInProgress.effectTag |= Placement;
  }

  var props = workInProgress.pendingProps;
  var context;

  {
    var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
    context = getMaskedContext(workInProgress, unmaskedContext);
  }

  prepareToReadContext(workInProgress, renderExpirationTime);
  var value;

  {
    if (Component.prototype && typeof Component.prototype.render === 'function') {
      var componentName = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutBadClass[componentName]) {
        error("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.', componentName, componentName);

        didWarnAboutBadClass[componentName] = true;
      }
    }

    if (workInProgress.mode & StrictMode) {
      ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
    }

    setIsRendering(true);
    ReactCurrentOwner$1.current = workInProgress;
    value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
    setIsRendering(false);
  } // React DevTools reads this flag.


  workInProgress.effectTag |= PerformedWork;

  if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
    {
      var _componentName = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutModulePatternComponent[_componentName]) {
        error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);

        didWarnAboutModulePatternComponent[_componentName] = true;
      }
    } // Proceed under the assumption that this is a class instance


    workInProgress.tag = ClassComponent; // Throw out any hooks that were used.

    workInProgress.memoizedState = null;
    workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.
    // During mounting we don't know the child context yet as the instance doesn't exist.
    // We will invalidate the child context in finishClassComponent() right after rendering.

    var hasContext = false;

    if (isContextProvider(Component)) {
      hasContext = true;
      pushContextProvider(workInProgress);
    } else {
      hasContext = false;
    }

    workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
    initializeUpdateQueue(workInProgress);
    var getDerivedStateFromProps = Component.getDerivedStateFromProps;

    if (typeof getDerivedStateFromProps === 'function') {
      applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
    }

    adoptClassInstance(workInProgress, value);
    mountClassInstance(workInProgress, Component, props, renderExpirationTime);
    return finishClassComponent(null, workInProgress, Component, true, hasContext, renderExpirationTime);
  } else {
    // Proceed under the assumption that this is a function component
    workInProgress.tag = FunctionComponent;

    {

      if ( workInProgress.mode & StrictMode) {
        // Only double-render components with Hooks
        if (workInProgress.memoizedState !== null) {
          value = renderWithHooks(null, workInProgress, Component, props, context, renderExpirationTime);
        }
      }
    }

    reconcileChildren(null, workInProgress, value, renderExpirationTime);

    {
      validateFunctionComponentInDev(workInProgress, Component);
    }

    return workInProgress.child;
  }
}

function validateFunctionComponentInDev(workInProgress, Component) {
  {
    if (Component) {
      if (Component.childContextTypes) {
        error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
      }
    }

    if (workInProgress.ref !== null) {
      var info = '';
      var ownerName = getCurrentFiberOwnerNameInDevOrNull();

      if (ownerName) {
        info += '\n\nCheck the render method of `' + ownerName + '`.';
      }

      var warningKey = ownerName || workInProgress._debugID || '';
      var debugSource = workInProgress._debugSource;

      if (debugSource) {
        warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
      }

      if (!didWarnAboutFunctionRefs[warningKey]) {
        didWarnAboutFunctionRefs[warningKey] = true;

        error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
      }
    }

    if (typeof Component.getDerivedStateFromProps === 'function') {
      var _componentName2 = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2]) {
        error('%s: Function components do not support getDerivedStateFromProps.', _componentName2);

        didWarnAboutGetDerivedStateOnFunctionComponent[_componentName2] = true;
      }
    }

    if (typeof Component.contextType === 'object' && Component.contextType !== null) {
      var _componentName3 = getComponentName(Component) || 'Unknown';

      if (!didWarnAboutContextTypeOnFunctionComponent[_componentName3]) {
        error('%s: Function components do not support contextType.', _componentName3);

        didWarnAboutContextTypeOnFunctionComponent[_componentName3] = true;
      }
    }
  }
}

var SUSPENDED_MARKER = {
  dehydrated: null,
  retryTime: NoWork
};

function shouldRemainOnFallback(suspenseContext, current, workInProgress) {
  // If the context is telling us that we should show a fallback, and we're not
  // already showing content, then we should show the fallback instead.
  return hasSuspenseContext(suspenseContext, ForceSuspenseFallback) && (current === null || current.memoizedState !== null);
}

function updateSuspenseComponent(current, workInProgress, renderExpirationTime) {
  var mode = workInProgress.mode;
  var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.

  {
    if (shouldSuspend(workInProgress)) {
      workInProgress.effectTag |= DidCapture;
    }
  }

  var suspenseContext = suspenseStackCursor.current;
  var nextDidTimeout = false;
  var didSuspend = (workInProgress.effectTag & DidCapture) !== NoEffect;

  if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
    // Something in this boundary's subtree already suspended. Switch to
    // rendering the fallback children.
    nextDidTimeout = true;
    workInProgress.effectTag &= ~DidCapture;
  } else {
    // Attempting the main content
    if (current === null || current.memoizedState !== null) {
      // This is a new mount or this boundary is already showing a fallback state.
      // Mark this subtree context as having at least one invisible parent that could
      // handle the fallback state.
      // Boundaries without fallbacks or should be avoided are not considered since
      // they cannot handle preferred fallback states.
      if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {
        suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
      }
    }
  }

  suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
  pushSuspenseContext(workInProgress, suspenseContext); // This next part is a bit confusing. If the children timeout, we switch to
  // showing the fallback children in place of the "primary" children.
  // However, we don't want to delete the primary children because then their
  // state will be lost (both the React state and the host state, e.g.
  // uncontrolled form inputs). Instead we keep them mounted and hide them.
  // Both the fallback children AND the primary children are rendered at the
  // same time. Once the primary children are un-suspended, we can delete
  // the fallback children — don't need to preserve their state.
  //
  // The two sets of children are siblings in the host environment, but
  // semantically, for purposes of reconciliation, they are two separate sets.
  // So we store them using two fragment fibers.
  //
  // However, we want to avoid allocating extra fibers for every placeholder.
  // They're only necessary when the children time out, because that's the
  // only time when both sets are mounted.
  //
  // So, the extra fragment fibers are only used if the children time out.
  // Otherwise, we render the primary children directly. This requires some
  // custom reconciliation logic to preserve the state of the primary
  // children. It's essentially a very basic form of re-parenting.

  if (current === null) {
    // If we're currently hydrating, try to hydrate this boundary.
    // But only if this has a fallback.
    if (nextProps.fallback !== undefined) {
      tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.
    } // This is the initial mount. This branch is pretty simple because there's
    // no previous state that needs to be preserved.


    if (nextDidTimeout) {
      // Mount separate fragments for primary and fallback children.
      var nextFallbackChildren = nextProps.fallback;
      var primaryChildFragment = createFiberFromFragment(null, mode, NoWork, null);
      primaryChildFragment.return = workInProgress;

      if ((workInProgress.mode & BlockingMode) === NoMode) {
        // Outside of blocking mode, we commit the effects from the
        // partially completed, timed-out tree, too.
        var progressedState = workInProgress.memoizedState;
        var progressedPrimaryChild = progressedState !== null ? workInProgress.child.child : workInProgress.child;
        primaryChildFragment.child = progressedPrimaryChild;
        var progressedChild = progressedPrimaryChild;

        while (progressedChild !== null) {
          progressedChild.return = primaryChildFragment;
          progressedChild = progressedChild.sibling;
        }
      }

      var fallbackChildFragment = createFiberFromFragment(nextFallbackChildren, mode, renderExpirationTime, null);
      fallbackChildFragment.return = workInProgress;
      primaryChildFragment.sibling = fallbackChildFragment; // Skip the primary children, and continue working on the
      // fallback children.

      workInProgress.memoizedState = SUSPENDED_MARKER;
      workInProgress.child = primaryChildFragment;
      return fallbackChildFragment;
    } else {
      // Mount the primary children without an intermediate fragment fiber.
      var nextPrimaryChildren = nextProps.children;
      workInProgress.memoizedState = null;
      return workInProgress.child = mountChildFibers(workInProgress, null, nextPrimaryChildren, renderExpirationTime);
    }
  } else {
    // This is an update. This branch is more complicated because we need to
    // ensure the state of the primary children is preserved.
    var prevState = current.memoizedState;

    if (prevState !== null) {
      // wrapped in a fragment fiber.


      var currentPrimaryChildFragment = current.child;
      var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;

      if (nextDidTimeout) {
        // Still timed out. Reuse the current primary children by cloning
        // its fragment. We're going to skip over these entirely.
        var _nextFallbackChildren2 = nextProps.fallback;

        var _primaryChildFragment2 = createWorkInProgress(currentPrimaryChildFragment, currentPrimaryChildFragment.pendingProps);

        _primaryChildFragment2.return = workInProgress;

        if ((workInProgress.mode & BlockingMode) === NoMode) {
          // Outside of blocking mode, we commit the effects from the
          // partially completed, timed-out tree, too.
          var _progressedState = workInProgress.memoizedState;

          var _progressedPrimaryChild = _progressedState !== null ? workInProgress.child.child : workInProgress.child;

          if (_progressedPrimaryChild !== currentPrimaryChildFragment.child) {
            _primaryChildFragment2.child = _progressedPrimaryChild;
            var _progressedChild2 = _progressedPrimaryChild;

            while (_progressedChild2 !== null) {
              _progressedChild2.return = _primaryChildFragment2;
              _progressedChild2 = _progressedChild2.sibling;
            }
          }
        } // Because primaryChildFragment is a new fiber that we're inserting as the
        // parent of a new tree, we need to set its treeBaseDuration.


        if ( workInProgress.mode & ProfileMode) {
          // treeBaseDuration is the sum of all the child tree base durations.
          var _treeBaseDuration = 0;
          var _hiddenChild = _primaryChildFragment2.child;

          while (_hiddenChild !== null) {
            _treeBaseDuration += _hiddenChild.treeBaseDuration;
            _hiddenChild = _hiddenChild.sibling;
          }

          _primaryChildFragment2.treeBaseDuration = _treeBaseDuration;
        } // Clone the fallback child fragment, too. These we'll continue
        // working on.


        var _fallbackChildFragment2 = createWorkInProgress(currentFallbackChildFragment, _nextFallbackChildren2);

        _fallbackChildFragment2.return = workInProgress;
        _primaryChildFragment2.sibling = _fallbackChildFragment2;
        _primaryChildFragment2.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
        // fallback children.

        workInProgress.memoizedState = SUSPENDED_MARKER;
        workInProgress.child = _primaryChildFragment2;
        return _fallbackChildFragment2;
      } else {
        // No longer suspended. Switch back to showing the primary children,
        // and remove the intermediate fragment fiber.
        var _nextPrimaryChildren = nextProps.children;
        var currentPrimaryChild = currentPrimaryChildFragment.child;
        var primaryChild = reconcileChildFibers(workInProgress, currentPrimaryChild, _nextPrimaryChildren, renderExpirationTime); // If this render doesn't suspend, we need to delete the fallback
        // children. Wait until the complete phase, after we've confirmed the
        // fallback is no longer needed.
        // TODO: Would it be better to store the fallback fragment on
        // the stateNode?
        // Continue rendering the children, like we normally do.

        workInProgress.memoizedState = null;
        return workInProgress.child = primaryChild;
      }
    } else {
      // The current tree has not already timed out. That means the primary
      // children are not wrapped in a fragment fiber.
      var _currentPrimaryChild = current.child;

      if (nextDidTimeout) {
        // Timed out. Wrap the children in a fragment fiber to keep them
        // separate from the fallback children.
        var _nextFallbackChildren3 = nextProps.fallback;

        var _primaryChildFragment3 = createFiberFromFragment( // It shouldn't matter what the pending props are because we aren't
        // going to render this fragment.
        null, mode, NoWork, null);

        _primaryChildFragment3.return = workInProgress;
        _primaryChildFragment3.child = _currentPrimaryChild;

        if (_currentPrimaryChild !== null) {
          _currentPrimaryChild.return = _primaryChildFragment3;
        } // Even though we're creating a new fiber, there are no new children,
        // because we're reusing an already mounted tree. So we don't need to
        // schedule a placement.
        // primaryChildFragment.effectTag |= Placement;


        if ((workInProgress.mode & BlockingMode) === NoMode) {
          // Outside of blocking mode, we commit the effects from the
          // partially completed, timed-out tree, too.
          var _progressedState2 = workInProgress.memoizedState;

          var _progressedPrimaryChild2 = _progressedState2 !== null ? workInProgress.child.child : workInProgress.child;

          _primaryChildFragment3.child = _progressedPrimaryChild2;
          var _progressedChild3 = _progressedPrimaryChild2;

          while (_progressedChild3 !== null) {
            _progressedChild3.return = _primaryChildFragment3;
            _progressedChild3 = _progressedChild3.sibling;
          }
        } // Because primaryChildFragment is a new fiber that we're inserting as the
        // parent of a new tree, we need to set its treeBaseDuration.


        if ( workInProgress.mode & ProfileMode) {
          // treeBaseDuration is the sum of all the child tree base durations.
          var _treeBaseDuration2 = 0;
          var _hiddenChild2 = _primaryChildFragment3.child;

          while (_hiddenChild2 !== null) {
            _treeBaseDuration2 += _hiddenChild2.treeBaseDuration;
            _hiddenChild2 = _hiddenChild2.sibling;
          }

          _primaryChildFragment3.treeBaseDuration = _treeBaseDuration2;
        } // Create a fragment from the fallback children, too.


        var _fallbackChildFragment3 = createFiberFromFragment(_nextFallbackChildren3, mode, renderExpirationTime, null);

        _fallbackChildFragment3.return = workInProgress;
        _primaryChildFragment3.sibling = _fallbackChildFragment3;
        _fallbackChildFragment3.effectTag |= Placement;
        _primaryChildFragment3.childExpirationTime = NoWork; // Skip the primary children, and continue working on the
        // fallback children.

        workInProgress.memoizedState = SUSPENDED_MARKER;
        workInProgress.child = _primaryChildFragment3;
        return _fallbackChildFragment3;
      } else {
        // Still haven't timed out. Continue rendering the children, like we
        // normally do.
        workInProgress.memoizedState = null;
        var _nextPrimaryChildren2 = nextProps.children;
        return workInProgress.child = reconcileChildFibers(workInProgress, _currentPrimaryChild, _nextPrimaryChildren2, renderExpirationTime);
      }
    }
  }
}

function scheduleWorkOnFiber(fiber, renderExpirationTime) {
  if (fiber.expirationTime < renderExpirationTime) {
    fiber.expirationTime = renderExpirationTime;
  }

  var alternate = fiber.alternate;

  if (alternate !== null && alternate.expirationTime < renderExpirationTime) {
    alternate.expirationTime = renderExpirationTime;
  }

  scheduleWorkOnParentPath(fiber.return, renderExpirationTime);
}

function propagateSuspenseContextChange(workInProgress, firstChild, renderExpirationTime) {
  // Mark any Suspense boundaries with fallbacks as having work to do.
  // If they were previously forced into fallbacks, they may now be able
  // to unblock.
  var node = firstChild;

  while (node !== null) {
    if (node.tag === SuspenseComponent) {
      var state = node.memoizedState;

      if (state !== null) {
        scheduleWorkOnFiber(node, renderExpirationTime);
      }
    } else if (node.tag === SuspenseListComponent) {
      // If the tail is hidden there might not be an Suspense boundaries
      // to schedule work on. In this case we have to schedule it on the
      // list itself.
      // We don't have to traverse to the children of the list since
      // the list will propagate the change when it rerenders.
      scheduleWorkOnFiber(node, renderExpirationTime);
    } else if (node.child !== null) {
      node.child.return = node;
      node = node.child;
      continue;
    }

    if (node === workInProgress) {
      return;
    }

    while (node.sibling === null) {
      if (node.return === null || node.return === workInProgress) {
        return;
      }

      node = node.return;
    }

    node.sibling.return = node.return;
    node = node.sibling;
  }
}

function findLastContentRow(firstChild) {
  // This is going to find the last row among these children that is already
  // showing content on the screen, as opposed to being in fallback state or
  // new. If a row has multiple Suspense boundaries, any of them being in the
  // fallback state, counts as the whole row being in a fallback state.
  // Note that the "rows" will be workInProgress, but any nested children
  // will still be current since we haven't rendered them yet. The mounted
  // order may not be the same as the new order. We use the new order.
  var row = firstChild;
  var lastContentRow = null;

  while (row !== null) {
    var currentRow = row.alternate; // New rows can't be content rows.

    if (currentRow !== null && findFirstSuspended(currentRow) === null) {
      lastContentRow = row;
    }

    row = row.sibling;
  }

  return lastContentRow;
}

function validateRevealOrder(revealOrder) {
  {
    if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {
      didWarnAboutRevealOrder[revealOrder] = true;

      if (typeof revealOrder === 'string') {
        switch (revealOrder.toLowerCase()) {
          case 'together':
          case 'forwards':
          case 'backwards':
            {
              error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());

              break;
            }

          case 'forward':
          case 'backward':
            {
              error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());

              break;
            }

          default:
            error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);

            break;
        }
      } else {
        error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
      }
    }
  }
}

function validateTailOptions(tailMode, revealOrder) {
  {
    if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
      if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
        didWarnAboutTailOptions[tailMode] = true;

        error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
      } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
        didWarnAboutTailOptions[tailMode] = true;

        error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
      }
    }
  }
}

function validateSuspenseListNestedChild(childSlot, index) {
  {
    var isArray = Array.isArray(childSlot);
    var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';

    if (isArray || isIterable) {
      var type = isArray ? 'array' : 'iterable';

      error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);

      return false;
    }
  }

  return true;
}

function validateSuspenseListChildren(children, revealOrder) {
  {
    if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {
      if (Array.isArray(children)) {
        for (var i = 0; i < children.length; i++) {
          if (!validateSuspenseListNestedChild(children[i], i)) {
            return;
          }
        }
      } else {
        var iteratorFn = getIteratorFn(children);

        if (typeof iteratorFn === 'function') {
          var childrenIterator = iteratorFn.call(children);

          if (childrenIterator) {
            var step = childrenIterator.next();
            var _i = 0;

            for (; !step.done; step = childrenIterator.next()) {
              if (!validateSuspenseListNestedChild(step.value, _i)) {
                return;
              }

              _i++;
            }
          }
        } else {
          error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);
        }
      }
    }
  }
}

function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {
  var renderState = workInProgress.memoizedState;

  if (renderState === null) {
    workInProgress.memoizedState = {
      isBackwards: isBackwards,
      rendering: null,
      renderingStartTime: 0,
      last: lastContentRow,
      tail: tail,
      tailExpiration: 0,
      tailMode: tailMode,
      lastEffect: lastEffectBeforeRendering
    };
  } else {
    // We can reuse the existing object from previous renders.
    renderState.isBackwards = isBackwards;
    renderState.rendering = null;
    renderState.renderingStartTime = 0;
    renderState.last = lastContentRow;
    renderState.tail = tail;
    renderState.tailExpiration = 0;
    renderState.tailMode = tailMode;
    renderState.lastEffect = lastEffectBeforeRendering;
  }
} // This can end up rendering this component multiple passes.
// The first pass splits the children fibers into two sets. A head and tail.
// We first render the head. If anything is in fallback state, we do another
// pass through beginWork to rerender all children (including the tail) with
// the force suspend context. If the first render didn't have anything in
// in fallback state. Then we render each row in the tail one-by-one.
// That happens in the completeWork phase without going back to beginWork.


function updateSuspenseListComponent(current, workInProgress, renderExpirationTime) {
  var nextProps = workInProgress.pendingProps;
  var revealOrder = nextProps.revealOrder;
  var tailMode = nextProps.tail;
  var newChildren = nextProps.children;
  validateRevealOrder(revealOrder);
  validateTailOptions(tailMode, revealOrder);
  validateSuspenseListChildren(newChildren, revealOrder);
  reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
  var suspenseContext = suspenseStackCursor.current;
  var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);

  if (shouldForceFallback) {
    suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
    workInProgress.effectTag |= DidCapture;
  } else {
    var didSuspendBefore = current !== null && (current.effectTag & DidCapture) !== NoEffect;

    if (didSuspendBefore) {
      // If we previously forced a fallback, we need to schedule work
      // on any nested boundaries to let them know to try to render
      // again. This is the same as context updating.
      propagateSuspenseContextChange(workInProgress, workInProgress.child, renderExpirationTime);
    }

    suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
  }

  pushSuspenseContext(workInProgress, suspenseContext);

  if ((workInProgress.mode & BlockingMode) === NoMode) {
    // Outside of blocking mode, SuspenseList doesn't work so we just
    // use make it a noop by treating it as the default revealOrder.
    workInProgress.memoizedState = null;
  } else {
    switch (revealOrder) {
      case 'forwards':
        {
          var lastContentRow = findLastContentRow(workInProgress.child);
          var tail;

          if (lastContentRow === null) {
            // The whole list is part of the tail.
            // TODO: We could fast path by just rendering the tail now.
            tail = workInProgress.child;
            workInProgress.child = null;
          } else {
            // Disconnect the tail rows after the content row.
            // We're going to render them separately later.
            tail = lastContentRow.sibling;
            lastContentRow.sibling = null;
          }

          initSuspenseListRenderState(workInProgress, false, // isBackwards
          tail, lastContentRow, tailMode, workInProgress.lastEffect);
          break;
        }

      case 'backwards':
        {
          // We're going to find the first row that has existing content.
          // At the same time we're going to reverse the list of everything
          // we pass in the meantime. That's going to be our tail in reverse
          // order.
          var _tail = null;
          var row = workInProgress.child;
          workInProgress.child = null;

          while (row !== null) {
            var currentRow = row.alternate; // New rows can't be content rows.

            if (currentRow !== null && findFirstSuspended(currentRow) === null) {
              // This is the beginning of the main content.
              workInProgress.child = row;
              break;
            }

            var nextRow = row.sibling;
            row.sibling = _tail;
            _tail = row;
            row = nextRow;
          } // TODO: If workInProgress.child is null, we can continue on the tail immediately.


          initSuspenseListRenderState(workInProgress, true, // isBackwards
          _tail, null, // last
          tailMode, workInProgress.lastEffect);
          break;
        }

      case 'together':
        {
          initSuspenseListRenderState(workInProgress, false, // isBackwards
          null, // tail
          null, // last
          undefined, workInProgress.lastEffect);
          break;
        }

      default:
        {
          // The default reveal order is the same as not having
          // a boundary.
          workInProgress.memoizedState = null;
        }
    }
  }

  return workInProgress.child;
}

function updatePortalComponent(current, workInProgress, renderExpirationTime) {
  pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
  var nextChildren = workInProgress.pendingProps;

  if (current === null) {
    // Portals are special because we don't append the children during mount
    // but at commit. Therefore we need to track insertions which the normal
    // flow doesn't do during mount. This doesn't happen at the root because
    // the root always starts with a "current" with a null child.
    // TODO: Consider unifying this with how the root works.
    workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
  } else {
    reconcileChildren(current, workInProgress, nextChildren, renderExpirationTime);
  }

  return workInProgress.child;
}

function updateContextProvider(current, workInProgress, renderExpirationTime) {
  var providerType = workInProgress.type;
  var context = providerType._context;
  var newProps = workInProgress.pendingProps;
  var oldProps = workInProgress.memoizedProps;
  var newValue = newProps.value;

  {
    var providerPropTypes = workInProgress.type.propTypes;

    if (providerPropTypes) {
      checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider', getCurrentFiberStackInDev);
    }
  }

  pushProvider(workInProgress, newValue);

  if (oldProps !== null) {
    var oldValue = oldProps.value;
    var changedBits = calculateChangedBits(context, newValue, oldValue);

    if (changedBits === 0) {
      // No change. Bailout early if children are the same.
      if (oldProps.children === newProps.children && !hasContextChanged()) {
        return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
      }
    } else {
      // The context value changed. Search for matching consumers and schedule
      // them to update.
      propagateContextChange(workInProgress, context, changedBits, renderExpirationTime);
    }
  }

  var newChildren = newProps.children;
  reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
  return workInProgress.child;
}

var hasWarnedAboutUsingContextAsConsumer = false;

function updateContextConsumer(current, workInProgress, renderExpirationTime) {
  var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
  // DEV mode, we create a separate object for Context.Consumer that acts
  // like a proxy to Context. This proxy object adds unnecessary code in PROD
  // so we use the old behaviour (Context.Consumer references Context) to
  // reduce size and overhead. The separate object references context via
  // a property called "_context", which also gives us the ability to check
  // in DEV mode if this property exists or not and warn if it does not.

  {
    if (context._context === undefined) {
      // This may be because it's a Context (rather than a Consumer).
      // Or it may be because it's older React where they're the same thing.
      // We only want to warn if we're sure it's a new React.
      if (context !== context.Consumer) {
        if (!hasWarnedAboutUsingContextAsConsumer) {
          hasWarnedAboutUsingContextAsConsumer = true;

          error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
        }
      }
    } else {
      context = context._context;
    }
  }

  var newProps = workInProgress.pendingProps;
  var render = newProps.children;

  {
    if (typeof render !== 'function') {
      error('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.');
    }
  }

  prepareToReadContext(workInProgress, renderExpirationTime);
  var newValue = readContext(context, newProps.unstable_observedBits);
  var newChildren;

  {
    ReactCurrentOwner$1.current = workInProgress;
    setIsRendering(true);
    newChildren = render(newValue);
    setIsRendering(false);
  } // React DevTools reads this flag.


  workInProgress.effectTag |= PerformedWork;
  reconcileChildren(current, workInProgress, newChildren, renderExpirationTime);
  return workInProgress.child;
}

function markWorkInProgressReceivedUpdate() {
  didReceiveUpdate = true;
}

function bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime) {
  cancelWorkTimer(workInProgress);

  if (current !== null) {
    // Reuse previous dependencies
    workInProgress.dependencies = current.dependencies;
  }

  {
    // Don't update "base" render times for bailouts.
    stopProfilerTimerIfRunning();
  }

  var updateExpirationTime = workInProgress.expirationTime;

  if (updateExpirationTime !== NoWork) {
    markUnprocessedUpdateTime(updateExpirationTime);
  } // Check if the children have any pending work.


  var childExpirationTime = workInProgress.childExpirationTime;

  if (childExpirationTime < renderExpirationTime) {
    // The children don't have any work either. We can skip them.
    // TODO: Once we add back resuming, we should check if the children are
    // a work-in-progress set. If so, we need to transfer their effects.
    return null;
  } else {
    // This fiber doesn't have work, but its subtree does. Clone the child
    // fibers and continue.
    cloneChildFibers(current, workInProgress);
    return workInProgress.child;
  }
}

function remountFiber(current, oldWorkInProgress, newWorkInProgress) {
  {
    var returnFiber = oldWorkInProgress.return;

    if (returnFiber === null) {
      throw new Error('Cannot swap the root fiber.');
    } // Disconnect from the old current.
    // It will get deleted.


    current.alternate = null;
    oldWorkInProgress.alternate = null; // Connect to the new tree.

    newWorkInProgress.index = oldWorkInProgress.index;
    newWorkInProgress.sibling = oldWorkInProgress.sibling;
    newWorkInProgress.return = oldWorkInProgress.return;
    newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.

    if (oldWorkInProgress === returnFiber.child) {
      returnFiber.child = newWorkInProgress;
    } else {
      var prevSibling = returnFiber.child;

      if (prevSibling === null) {
        throw new Error('Expected parent to have a child.');
      }

      while (prevSibling.sibling !== oldWorkInProgress) {
        prevSibling = prevSibling.sibling;

        if (prevSibling === null) {
          throw new Error('Expected to find the previous sibling.');
        }
      }

      prevSibling.sibling = newWorkInProgress;
    } // Delete the old fiber and place the new one.
    // Since the old fiber is disconnected, we have to schedule it manually.


    var last = returnFiber.lastEffect;

    if (last !== null) {
      last.nextEffect = current;
      returnFiber.lastEffect = current;
    } else {
      returnFiber.firstEffect = returnFiber.lastEffect = current;
    }

    current.nextEffect = null;
    current.effectTag = Deletion;
    newWorkInProgress.effectTag |= Placement; // Restart work from the new fiber.

    return newWorkInProgress;
  }
}

function beginWork(current, workInProgress, renderExpirationTime) {
  var updateExpirationTime = workInProgress.expirationTime;

  {
    if (workInProgress._debugNeedsRemount && current !== null) {
      // This will restart the begin phase with a new fiber.
      return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.expirationTime));
    }
  }

  if (current !== null) {
    var oldProps = current.memoizedProps;
    var newProps = workInProgress.pendingProps;

    if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:
     workInProgress.type !== current.type )) {
      // If props or context changed, mark the fiber as having performed work.
      // This may be unset if the props are determined to be equal later (memo).
      didReceiveUpdate = true;
    } else if (updateExpirationTime < renderExpirationTime) {
      didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering
      // the begin phase. There's still some bookkeeping we that needs to be done
      // in this optimized path, mostly pushing stuff onto the stack.

      switch (workInProgress.tag) {
        case HostRoot:
          pushHostRootContext(workInProgress);
          resetHydrationState();
          break;

        case HostComponent:
          pushHostContext(workInProgress);

          if (workInProgress.mode & ConcurrentMode && renderExpirationTime !== Never && shouldDeprioritizeSubtree(workInProgress.type, newProps)) {
            {
              markSpawnedWork(Never);
            } // Schedule this fiber to re-render at offscreen priority. Then bailout.


            workInProgress.expirationTime = workInProgress.childExpirationTime = Never;
            return null;
          }

          break;

        case ClassComponent:
          {
            var Component = workInProgress.type;

            if (isContextProvider(Component)) {
              pushContextProvider(workInProgress);
            }

            break;
          }

        case HostPortal:
          pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
          break;

        case ContextProvider:
          {
            var newValue = workInProgress.memoizedProps.value;
            pushProvider(workInProgress, newValue);
            break;
          }

        case Profiler:
          {
            // Profiler should only call onRender when one of its descendants actually rendered.
            var hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;

            if (hasChildWork) {
              workInProgress.effectTag |= Update;
            }
          }

          break;

        case SuspenseComponent:
          {
            var state = workInProgress.memoizedState;

            if (state !== null) {
              // whether to retry the primary children, or to skip over it and
              // go straight to the fallback. Check the priority of the primary
              // child fragment.


              var primaryChildFragment = workInProgress.child;
              var primaryChildExpirationTime = primaryChildFragment.childExpirationTime;

              if (primaryChildExpirationTime !== NoWork && primaryChildExpirationTime >= renderExpirationTime) {
                // The primary children have pending work. Use the normal path
                // to attempt to render the primary children again.
                return updateSuspenseComponent(current, workInProgress, renderExpirationTime);
              } else {
                pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
                // priority. Bailout.

                var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);

                if (child !== null) {
                  // The fallback children have pending work. Skip over the
                  // primary children and work on the fallback.
                  return child.sibling;
                } else {
                  return null;
                }
              }
            } else {
              pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
            }

            break;
          }

        case SuspenseListComponent:
          {
            var didSuspendBefore = (current.effectTag & DidCapture) !== NoEffect;

            var _hasChildWork = workInProgress.childExpirationTime >= renderExpirationTime;

            if (didSuspendBefore) {
              if (_hasChildWork) {
                // If something was in fallback state last time, and we have all the
                // same children then we're still in progressive loading state.
                // Something might get unblocked by state updates or retries in the
                // tree which will affect the tail. So we need to use the normal
                // path to compute the correct tail.
                return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
              } // If none of the children had any work, that means that none of
              // them got retried so they'll still be blocked in the same way
              // as before. We can fast bail out.


              workInProgress.effectTag |= DidCapture;
            } // If nothing suspended before and we're rendering the same children,
            // then the tail doesn't matter. Anything new that suspends will work
            // in the "together" mode, so we can continue from the state we had.


            var renderState = workInProgress.memoizedState;

            if (renderState !== null) {
              // Reset to the "together" mode in case we've started a different
              // update in the past but didn't complete it.
              renderState.rendering = null;
              renderState.tail = null;
            }

            pushSuspenseContext(workInProgress, suspenseStackCursor.current);

            if (_hasChildWork) {
              break;
            } else {
              // If none of the children had any work, that means that none of
              // them got retried so they'll still be blocked in the same way
              // as before. We can fast bail out.
              return null;
            }
          }
      }

      return bailoutOnAlreadyFinishedWork(current, workInProgress, renderExpirationTime);
    } else {
      // An update was scheduled on this fiber, but there are no new props
      // nor legacy context. Set this to false. If an update queue or context
      // consumer produces a changed value, it will set this to true. Otherwise,
      // the component will assume the children have not changed and bail out.
      didReceiveUpdate = false;
    }
  } else {
    didReceiveUpdate = false;
  } // Before entering the begin phase, clear pending update priority.
  // TODO: This assumes that we're about to evaluate the component and process
  // the update queue. However, there's an exception: SimpleMemoComponent
  // sometimes bails out later in the begin phase. This indicates that we should
  // move this assignment out of the common path and into each branch.


  workInProgress.expirationTime = NoWork;

  switch (workInProgress.tag) {
    case IndeterminateComponent:
      {
        return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderExpirationTime);
      }

    case LazyComponent:
      {
        var elementType = workInProgress.elementType;
        return mountLazyComponent(current, workInProgress, elementType, updateExpirationTime, renderExpirationTime);
      }

    case FunctionComponent:
      {
        var _Component = workInProgress.type;
        var unresolvedProps = workInProgress.pendingProps;
        var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
        return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderExpirationTime);
      }

    case ClassComponent:
      {
        var _Component2 = workInProgress.type;
        var _unresolvedProps = workInProgress.pendingProps;

        var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);

        return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderExpirationTime);
      }

    case HostRoot:
      return updateHostRoot(current, workInProgress, renderExpirationTime);

    case HostComponent:
      return updateHostComponent(current, workInProgress, renderExpirationTime);

    case HostText:
      return updateHostText(current, workInProgress);

    case SuspenseComponent:
      return updateSuspenseComponent(current, workInProgress, renderExpirationTime);

    case HostPortal:
      return updatePortalComponent(current, workInProgress, renderExpirationTime);

    case ForwardRef:
      {
        var type = workInProgress.type;
        var _unresolvedProps2 = workInProgress.pendingProps;

        var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);

        return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderExpirationTime);
      }

    case Fragment:
      return updateFragment(current, workInProgress, renderExpirationTime);

    case Mode:
      return updateMode(current, workInProgress, renderExpirationTime);

    case Profiler:
      return updateProfiler(current, workInProgress, renderExpirationTime);

    case ContextProvider:
      return updateContextProvider(current, workInProgress, renderExpirationTime);

    case ContextConsumer:
      return updateContextConsumer(current, workInProgress, renderExpirationTime);

    case MemoComponent:
      {
        var _type2 = workInProgress.type;
        var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.

        var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);

        {
          if (workInProgress.type !== workInProgress.elementType) {
            var outerPropTypes = _type2.propTypes;

            if (outerPropTypes) {
              checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
              'prop', getComponentName(_type2), getCurrentFiberStackInDev);
            }
          }
        }

        _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
        return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateExpirationTime, renderExpirationTime);
      }

    case SimpleMemoComponent:
      {
        return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateExpirationTime, renderExpirationTime);
      }

    case IncompleteClassComponent:
      {
        var _Component3 = workInProgress.type;
        var _unresolvedProps4 = workInProgress.pendingProps;

        var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);

        return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderExpirationTime);
      }

    case SuspenseListComponent:
      {
        return updateSuspenseListComponent(current, workInProgress, renderExpirationTime);
      }
  }

  {
    {
      throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
    }
  }
}

function markUpdate(workInProgress) {
  // Tag the fiber with an update effect. This turns a Placement into
  // a PlacementAndUpdate.
  workInProgress.effectTag |= Update;
}

function markRef$1(workInProgress) {
  workInProgress.effectTag |= Ref;
}

var appendAllChildren;
var updateHostContainer;
var updateHostComponent$1;
var updateHostText$1;

{
  // Mutation mode
  appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
    // We only have the top Fiber that was created but we need recurse down its
    // children to find all the terminal nodes.
    var node = workInProgress.child;

    while (node !== null) {
      if (node.tag === HostComponent || node.tag === HostText) {
        appendInitialChild(parent, node.stateNode);
      } else if (node.tag === HostPortal) ; else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }

      if (node === workInProgress) {
        return;
      }

      while (node.sibling === null) {
        if (node.return === null || node.return === workInProgress) {
          return;
        }

        node = node.return;
      }

      node.sibling.return = node.return;
      node = node.sibling;
    }
  };

  updateHostContainer = function (workInProgress) {// Noop
  };

  updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
    // If we have an alternate, that means this is an update and we need to
    // schedule a side-effect to do the updates.
    var oldProps = current.memoizedProps;

    if (oldProps === newProps) {
      // In mutation mode, this is sufficient for a bailout because
      // we won't touch this node even if children changed.
      return;
    } // If we get updated because one of our children updated, we don't
    // have newProps so we'll have to reuse them.
    // TODO: Split the update API as separate for the props vs. children.
    // Even better would be if children weren't special cased at all tho.


    var instance = workInProgress.stateNode;
    var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host
    // component is hitting the resume path. Figure out why. Possibly
    // related to `hidden`.

    var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.

    workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
    // is a new ref we mark this as an update. All the work is done in commitWork.

    if (updatePayload) {
      markUpdate(workInProgress);
    }
  };

  updateHostText$1 = function (current, workInProgress, oldText, newText) {
    // If the text differs, mark it as an update. All the work in done in commitWork.
    if (oldText !== newText) {
      markUpdate(workInProgress);
    }
  };
}

function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  switch (renderState.tailMode) {
    case 'hidden':
      {
        // Any insertions at the end of the tail list after this point
        // should be invisible. If there are already mounted boundaries
        // anything before them are not considered for collapsing.
        // Therefore we need to go through the whole tail to find if
        // there are any.
        var tailNode = renderState.tail;
        var lastTailNode = null;

        while (tailNode !== null) {
          if (tailNode.alternate !== null) {
            lastTailNode = tailNode;
          }

          tailNode = tailNode.sibling;
        } // Next we're simply going to delete all insertions after the
        // last rendered item.


        if (lastTailNode === null) {
          // All remaining items in the tail are insertions.
          renderState.tail = null;
        } else {
          // Detach the insertion after the last node that was already
          // inserted.
          lastTailNode.sibling = null;
        }

        break;
      }

    case 'collapsed':
      {
        // Any insertions at the end of the tail list after this point
        // should be invisible. If there are already mounted boundaries
        // anything before them are not considered for collapsing.
        // Therefore we need to go through the whole tail to find if
        // there are any.
        var _tailNode = renderState.tail;
        var _lastTailNode = null;

        while (_tailNode !== null) {
          if (_tailNode.alternate !== null) {
            _lastTailNode = _tailNode;
          }

          _tailNode = _tailNode.sibling;
        } // Next we're simply going to delete all insertions after the
        // last rendered item.


        if (_lastTailNode === null) {
          // All remaining items in the tail are insertions.
          if (!hasRenderedATailFallback && renderState.tail !== null) {
            // We suspended during the head. We want to show at least one
            // row at the tail. So we'll keep on and cut off the rest.
            renderState.tail.sibling = null;
          } else {
            renderState.tail = null;
          }
        } else {
          // Detach the insertion after the last node that was already
          // inserted.
          _lastTailNode.sibling = null;
        }

        break;
      }
  }
}

function completeWork(current, workInProgress, renderExpirationTime) {
  var newProps = workInProgress.pendingProps;

  switch (workInProgress.tag) {
    case IndeterminateComponent:
    case LazyComponent:
    case SimpleMemoComponent:
    case FunctionComponent:
    case ForwardRef:
    case Fragment:
    case Mode:
    case Profiler:
    case ContextConsumer:
    case MemoComponent:
      return null;

    case ClassComponent:
      {
        var Component = workInProgress.type;

        if (isContextProvider(Component)) {
          popContext(workInProgress);
        }

        return null;
      }

    case HostRoot:
      {
        popHostContainer(workInProgress);
        popTopLevelContextObject(workInProgress);
        var fiberRoot = workInProgress.stateNode;

        if (fiberRoot.pendingContext) {
          fiberRoot.context = fiberRoot.pendingContext;
          fiberRoot.pendingContext = null;
        }

        if (current === null || current.child === null) {
          // If we hydrated, pop so that we can delete any remaining children
          // that weren't hydrated.
          var wasHydrated = popHydrationState(workInProgress);

          if (wasHydrated) {
            // If we hydrated, then we'll need to schedule an update for
            // the commit side-effects on the root.
            markUpdate(workInProgress);
          }
        }

        updateHostContainer(workInProgress);
        return null;
      }

    case HostComponent:
      {
        popHostContext(workInProgress);
        var rootContainerInstance = getRootHostContainer();
        var type = workInProgress.type;

        if (current !== null && workInProgress.stateNode != null) {
          updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);

          if (current.ref !== workInProgress.ref) {
            markRef$1(workInProgress);
          }
        } else {
          if (!newProps) {
            if (!(workInProgress.stateNode !== null)) {
              {
                throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
              }
            } // This can happen when we abort work.


            return null;
          }

          var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
          // "stack" as the parent. Then append children as we go in beginWork
          // or completeWork depending on whether we want to add them top->down or
          // bottom->up. Top->down is faster in IE11.

          var _wasHydrated = popHydrationState(workInProgress);

          if (_wasHydrated) {
            // TODO: Move this and createInstance step into the beginPhase
            // to consolidate.
            if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
              // If changes to the hydrated node need to be applied at the
              // commit-phase we mark this as such.
              markUpdate(workInProgress);
            }
          } else {
            var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
            appendAllChildren(instance, workInProgress, false, false); // This needs to be set before we mount Flare event listeners

            workInProgress.stateNode = instance;
            // (eg DOM renderer supports auto-focus for certain elements).
            // Make sure such renderers get scheduled for later work.


            if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
              markUpdate(workInProgress);
            }
          }

          if (workInProgress.ref !== null) {
            // If there is a ref on a host node we need to schedule a callback
            markRef$1(workInProgress);
          }
        }

        return null;
      }

    case HostText:
      {
        var newText = newProps;

        if (current && workInProgress.stateNode != null) {
          var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need
          // to schedule a side-effect to do the updates.

          updateHostText$1(current, workInProgress, oldText, newText);
        } else {
          if (typeof newText !== 'string') {
            if (!(workInProgress.stateNode !== null)) {
              {
                throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
              }
            } // This can happen when we abort work.

          }

          var _rootContainerInstance = getRootHostContainer();

          var _currentHostContext = getHostContext();

          var _wasHydrated2 = popHydrationState(workInProgress);

          if (_wasHydrated2) {
            if (prepareToHydrateHostTextInstance(workInProgress)) {
              markUpdate(workInProgress);
            }
          } else {
            workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
          }
        }

        return null;
      }

    case SuspenseComponent:
      {
        popSuspenseContext(workInProgress);
        var nextState = workInProgress.memoizedState;

        if ((workInProgress.effectTag & DidCapture) !== NoEffect) {
          // Something suspended. Re-render with the fallback children.
          workInProgress.expirationTime = renderExpirationTime; // Do not reset the effect list.

          return workInProgress;
        }

        var nextDidTimeout = nextState !== null;
        var prevDidTimeout = false;

        if (current === null) {
          if (workInProgress.memoizedProps.fallback !== undefined) {
            popHydrationState(workInProgress);
          }
        } else {
          var prevState = current.memoizedState;
          prevDidTimeout = prevState !== null;

          if (!nextDidTimeout && prevState !== null) {
            // We just switched from the fallback to the normal children.
            // Delete the fallback.
            // TODO: Would it be better to store the fallback fragment on
            // the stateNode during the begin phase?
            var currentFallbackChild = current.child.sibling;

            if (currentFallbackChild !== null) {
              // Deletions go at the beginning of the return fiber's effect list
              var first = workInProgress.firstEffect;

              if (first !== null) {
                workInProgress.firstEffect = currentFallbackChild;
                currentFallbackChild.nextEffect = first;
              } else {
                workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChild;
                currentFallbackChild.nextEffect = null;
              }

              currentFallbackChild.effectTag = Deletion;
            }
          }
        }

        if (nextDidTimeout && !prevDidTimeout) {
          // If this subtreee is running in blocking mode we can suspend,
          // otherwise we won't suspend.
          // TODO: This will still suspend a synchronous tree if anything
          // in the concurrent tree already suspended during this render.
          // This is a known bug.
          if ((workInProgress.mode & BlockingMode) !== NoMode) {
            // TODO: Move this back to throwException because this is too late
            // if this is a large tree which is common for initial loads. We
            // don't know if we should restart a render or not until we get
            // this marker, and this is too late.
            // If this render already had a ping or lower pri updates,
            // and this is the first time we know we're going to suspend we
            // should be able to immediately restart from within throwException.
            var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;

            if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
              // If this was in an invisible tree or a new render, then showing
              // this boundary is ok.
              renderDidSuspend();
            } else {
              // Otherwise, we're going to have to hide content so we should
              // suspend for longer if possible.
              renderDidSuspendDelayIfPossible();
            }
          }
        }

        {
          // TODO: Only schedule updates if these values are non equal, i.e. it changed.
          if (nextDidTimeout || prevDidTimeout) {
            // If this boundary just timed out, schedule an effect to attach a
            // retry listener to the promise. This flag is also used to hide the
            // primary children. In mutation mode, we also need the flag to
            // *unhide* children that were previously hidden, so check if this
            // is currently timed out, too.
            workInProgress.effectTag |= Update;
          }
        }

        return null;
      }

    case HostPortal:
      popHostContainer(workInProgress);
      updateHostContainer(workInProgress);
      return null;

    case ContextProvider:
      // Pop provider fiber
      popProvider(workInProgress);
      return null;

    case IncompleteClassComponent:
      {
        // Same as class component case. I put it down here so that the tags are
        // sequential to ensure this switch is compiled to a jump table.
        var _Component = workInProgress.type;

        if (isContextProvider(_Component)) {
          popContext(workInProgress);
        }

        return null;
      }

    case SuspenseListComponent:
      {
        popSuspenseContext(workInProgress);
        var renderState = workInProgress.memoizedState;

        if (renderState === null) {
          // We're running in the default, "independent" mode.
          // We don't do anything in this mode.
          return null;
        }

        var didSuspendAlready = (workInProgress.effectTag & DidCapture) !== NoEffect;
        var renderedTail = renderState.rendering;

        if (renderedTail === null) {
          // We just rendered the head.
          if (!didSuspendAlready) {
            // This is the first pass. We need to figure out if anything is still
            // suspended in the rendered set.
            // If new content unsuspended, but there's still some content that
            // didn't. Then we need to do a second pass that forces everything
            // to keep showing their fallbacks.
            // We might be suspended if something in this render pass suspended, or
            // something in the previous committed pass suspended. Otherwise,
            // there's no chance so we can skip the expensive call to
            // findFirstSuspended.
            var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.effectTag & DidCapture) === NoEffect);

            if (!cannotBeSuspended) {
              var row = workInProgress.child;

              while (row !== null) {
                var suspended = findFirstSuspended(row);

                if (suspended !== null) {
                  didSuspendAlready = true;
                  workInProgress.effectTag |= DidCapture;
                  cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
                  // part of the second pass. In that case nothing will subscribe to
                  // its thennables. Instead, we'll transfer its thennables to the
                  // SuspenseList so that it can retry if they resolve.
                  // There might be multiple of these in the list but since we're
                  // going to wait for all of them anyway, it doesn't really matter
                  // which ones gets to ping. In theory we could get clever and keep
                  // track of how many dependencies remain but it gets tricky because
                  // in the meantime, we can add/remove/change items and dependencies.
                  // We might bail out of the loop before finding any but that
                  // doesn't matter since that means that the other boundaries that
                  // we did find already has their listeners attached.

                  var newThennables = suspended.updateQueue;

                  if (newThennables !== null) {
                    workInProgress.updateQueue = newThennables;
                    workInProgress.effectTag |= Update;
                  } // Rerender the whole list, but this time, we'll force fallbacks
                  // to stay in place.
                  // Reset the effect list before doing the second pass since that's now invalid.


                  if (renderState.lastEffect === null) {
                    workInProgress.firstEffect = null;
                  }

                  workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.

                  resetChildFibers(workInProgress, renderExpirationTime); // Set up the Suspense Context to force suspense and immediately
                  // rerender the children.

                  pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
                  return workInProgress.child;
                }

                row = row.sibling;
              }
            }
          } else {
            cutOffTailIfNeeded(renderState, false);
          } // Next we're going to render the tail.

        } else {
          // Append the rendered row to the child list.
          if (!didSuspendAlready) {
            var _suspended = findFirstSuspended(renderedTail);

            if (_suspended !== null) {
              workInProgress.effectTag |= DidCapture;
              didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
              // get lost if this row ends up dropped during a second pass.

              var _newThennables = _suspended.updateQueue;

              if (_newThennables !== null) {
                workInProgress.updateQueue = _newThennables;
                workInProgress.effectTag |= Update;
              }

              cutOffTailIfNeeded(renderState, true); // This might have been modified.

              if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate) {
                // We need to delete the row we just rendered.
                // Reset the effect list to what it was before we rendered this
                // child. The nested children have already appended themselves.
                var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.

                if (lastEffect !== null) {
                  lastEffect.nextEffect = null;
                } // We're done.


                return null;
              }
            } else if ( // The time it took to render last row is greater than time until
            // the expiration.
            now() * 2 - renderState.renderingStartTime > renderState.tailExpiration && renderExpirationTime > Never) {
              // We have now passed our CPU deadline and we'll just give up further
              // attempts to render the main content and only render fallbacks.
              // The assumption is that this is usually faster.
              workInProgress.effectTag |= DidCapture;
              didSuspendAlready = true;
              cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
              // to get it started back up to attempt the next item. If we can show
              // them, then they really have the same priority as this render.
              // So we'll pick it back up the very next render pass once we've had
              // an opportunity to yield for paint.

              var nextPriority = renderExpirationTime - 1;
              workInProgress.expirationTime = workInProgress.childExpirationTime = nextPriority;

              {
                markSpawnedWork(nextPriority);
              }
            }
          }

          if (renderState.isBackwards) {
            // The effect list of the backwards tail will have been added
            // to the end. This breaks the guarantee that life-cycles fire in
            // sibling order but that isn't a strong guarantee promised by React.
            // Especially since these might also just pop in during future commits.
            // Append to the beginning of the list.
            renderedTail.sibling = workInProgress.child;
            workInProgress.child = renderedTail;
          } else {
            var previousSibling = renderState.last;

            if (previousSibling !== null) {
              previousSibling.sibling = renderedTail;
            } else {
              workInProgress.child = renderedTail;
            }

            renderState.last = renderedTail;
          }
        }

        if (renderState.tail !== null) {
          // We still have tail rows to render.
          if (renderState.tailExpiration === 0) {
            // Heuristic for how long we're willing to spend rendering rows
            // until we just give up and show what we have so far.
            var TAIL_EXPIRATION_TIMEOUT_MS = 500;
            renderState.tailExpiration = now() + TAIL_EXPIRATION_TIMEOUT_MS; // TODO: This is meant to mimic the train model or JND but this
            // is a per component value. It should really be since the start
            // of the total render or last commit. Consider using something like
            // globalMostRecentFallbackTime. That doesn't account for being
            // suspended for part of the time or when it's a new render.
            // It should probably use a global start time value instead.
          } // Pop a row.


          var next = renderState.tail;
          renderState.rendering = next;
          renderState.tail = next.sibling;
          renderState.lastEffect = workInProgress.lastEffect;
          renderState.renderingStartTime = now();
          next.sibling = null; // Restore the context.
          // TODO: We can probably just avoid popping it instead and only
          // setting it the first time we go from not suspended to suspended.

          var suspenseContext = suspenseStackCursor.current;

          if (didSuspendAlready) {
            suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
          } else {
            suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
          }

          pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.

          return next;
        }

        return null;
      }
  }

  {
    {
      throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
    }
  }
}

function unwindWork(workInProgress, renderExpirationTime) {
  switch (workInProgress.tag) {
    case ClassComponent:
      {
        var Component = workInProgress.type;

        if (isContextProvider(Component)) {
          popContext(workInProgress);
        }

        var effectTag = workInProgress.effectTag;

        if (effectTag & ShouldCapture) {
          workInProgress.effectTag = effectTag & ~ShouldCapture | DidCapture;
          return workInProgress;
        }

        return null;
      }

    case HostRoot:
      {
        popHostContainer(workInProgress);
        popTopLevelContextObject(workInProgress);
        var _effectTag = workInProgress.effectTag;

        if (!((_effectTag & DidCapture) === NoEffect)) {
          {
            throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
          }
        }

        workInProgress.effectTag = _effectTag & ~ShouldCapture | DidCapture;
        return workInProgress;
      }

    case HostComponent:
      {
        // TODO: popHydrationState
        popHostContext(workInProgress);
        return null;
      }

    case SuspenseComponent:
      {
        popSuspenseContext(workInProgress);

        var _effectTag2 = workInProgress.effectTag;

        if (_effectTag2 & ShouldCapture) {
          workInProgress.effectTag = _effectTag2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.

          return workInProgress;
        }

        return null;
      }

    case SuspenseListComponent:
      {
        popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been
        // caught by a nested boundary. If not, it should bubble through.

        return null;
      }

    case HostPortal:
      popHostContainer(workInProgress);
      return null;

    case ContextProvider:
      popProvider(workInProgress);
      return null;

    default:
      return null;
  }
}

function unwindInterruptedWork(interruptedWork) {
  switch (interruptedWork.tag) {
    case ClassComponent:
      {
        var childContextTypes = interruptedWork.type.childContextTypes;

        if (childContextTypes !== null && childContextTypes !== undefined) {
          popContext(interruptedWork);
        }

        break;
      }

    case HostRoot:
      {
        popHostContainer(interruptedWork);
        popTopLevelContextObject(interruptedWork);
        break;
      }

    case HostComponent:
      {
        popHostContext(interruptedWork);
        break;
      }

    case HostPortal:
      popHostContainer(interruptedWork);
      break;

    case SuspenseComponent:
      popSuspenseContext(interruptedWork);
      break;

    case SuspenseListComponent:
      popSuspenseContext(interruptedWork);
      break;

    case ContextProvider:
      popProvider(interruptedWork);
      break;
  }
}

function createCapturedValue(value, source) {
  // If the value is an error, call this function immediately after it is thrown
  // so the stack is accurate.
  return {
    value: value,
    source: source,
    stack: getStackByFiberInDevAndProd(source)
  };
}

function logCapturedError(capturedError) {

  var error = capturedError.error;

  {
    var componentName = capturedError.componentName,
        componentStack = capturedError.componentStack,
        errorBoundaryName = capturedError.errorBoundaryName,
        errorBoundaryFound = capturedError.errorBoundaryFound,
        willRetry = capturedError.willRetry; // Browsers support silencing uncaught errors by calling
    // `preventDefault()` in window `error` handler.
    // We record this information as an expando on the error.

    if (error != null && error._suppressLogging) {
      if (errorBoundaryFound && willRetry) {
        // The error is recoverable and was silenced.
        // Ignore it and don't print the stack addendum.
        // This is handy for testing error boundaries without noise.
        return;
      } // The error is fatal. Since the silencing might have
      // been accidental, we'll surface it anyway.
      // However, the browser would have silenced the original error
      // so we'll print it first, and then print the stack addendum.


      console['error'](error); // Don't transform to our wrapper
      // For a more detailed description of this block, see:
      // https://github.com/facebook/react/pull/13384
    }

    var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
    var errorBoundaryMessage; // errorBoundaryFound check is sufficient; errorBoundaryName check is to satisfy Flow.

    if (errorBoundaryFound && errorBoundaryName) {
      if (willRetry) {
        errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
      } else {
        errorBoundaryMessage = "This error was initially handled by the error boundary " + errorBoundaryName + ".\n" + "Recreating the tree from scratch failed so React will unmount the tree.";
      }
    } else {
      errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://fb.me/react-error-boundaries to learn more about error boundaries.';
    }

    var combinedMessage = "" + componentNameMessage + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
    // We don't include the original error message and JS stack because the browser
    // has already printed it. Even if the application swallows the error, it is still
    // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.

    console['error'](combinedMessage); // Don't transform to our wrapper
  }
}

var didWarnAboutUndefinedSnapshotBeforeUpdate = null;

{
  didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
}

var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
function logError(boundary, errorInfo) {
  var source = errorInfo.source;
  var stack = errorInfo.stack;

  if (stack === null && source !== null) {
    stack = getStackByFiberInDevAndProd(source);
  }

  var capturedError = {
    componentName: source !== null ? getComponentName(source.type) : null,
    componentStack: stack !== null ? stack : '',
    error: errorInfo.value,
    errorBoundary: null,
    errorBoundaryName: null,
    errorBoundaryFound: false,
    willRetry: false
  };

  if (boundary !== null && boundary.tag === ClassComponent) {
    capturedError.errorBoundary = boundary.stateNode;
    capturedError.errorBoundaryName = getComponentName(boundary.type);
    capturedError.errorBoundaryFound = true;
    capturedError.willRetry = true;
  }

  try {
    logCapturedError(capturedError);
  } catch (e) {
    // This method must not throw, or React internal state will get messed up.
    // If console.error is overridden, or logCapturedError() shows a dialog that throws,
    // we want to report this error outside of the normal stack as a last resort.
    // https://github.com/facebook/react/issues/13188
    setTimeout(function () {
      throw e;
    });
  }
}

var callComponentWillUnmountWithTimer = function (current, instance) {
  startPhaseTimer(current, 'componentWillUnmount');
  instance.props = current.memoizedProps;
  instance.state = current.memoizedState;
  instance.componentWillUnmount();
  stopPhaseTimer();
}; // Capture errors so they don't interrupt unmounting.


function safelyCallComponentWillUnmount(current, instance) {
  {
    invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);

    if (hasCaughtError()) {
      var unmountError = clearCaughtError();
      captureCommitPhaseError(current, unmountError);
    }
  }
}

function safelyDetachRef(current) {
  var ref = current.ref;

  if (ref !== null) {
    if (typeof ref === 'function') {
      {
        invokeGuardedCallback(null, ref, null, null);

        if (hasCaughtError()) {
          var refError = clearCaughtError();
          captureCommitPhaseError(current, refError);
        }
      }
    } else {
      ref.current = null;
    }
  }
}

function safelyCallDestroy(current, destroy) {
  {
    invokeGuardedCallback(null, destroy, null);

    if (hasCaughtError()) {
      var error = clearCaughtError();
      captureCommitPhaseError(current, error);
    }
  }
}

function commitBeforeMutationLifeCycles(current, finishedWork) {
  switch (finishedWork.tag) {
    case FunctionComponent:
    case ForwardRef:
    case SimpleMemoComponent:
    case Block:
      {
        return;
      }

    case ClassComponent:
      {
        if (finishedWork.effectTag & Snapshot) {
          if (current !== null) {
            var prevProps = current.memoizedProps;
            var prevState = current.memoizedState;
            startPhaseTimer(finishedWork, 'getSnapshotBeforeUpdate');
            var instance = finishedWork.stateNode; // We could update instance props and state here,
            // but instead we rely on them being set during last render.
            // TODO: revisit this when we implement resuming.

            {
              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                if (instance.props !== finishedWork.memoizedProps) {
                  error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
                }

                if (instance.state !== finishedWork.memoizedState) {
                  error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
                }
              }
            }

            var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);

            {
              var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;

              if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
                didWarnSet.add(finishedWork.type);

                error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
              }
            }

            instance.__reactInternalSnapshotBeforeUpdate = snapshot;
            stopPhaseTimer();
          }
        }

        return;
      }

    case HostRoot:
    case HostComponent:
    case HostText:
    case HostPortal:
    case IncompleteClassComponent:
      // Nothing to do for these component types
      return;
  }

  {
    {
      throw Error( "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 commitHookEffectListUnmount(tag, finishedWork) {
  var updateQueue = finishedWork.updateQueue;
  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;

  if (lastEffect !== null) {
    var firstEffect = lastEffect.next;
    var effect = firstEffect;

    do {
      if ((effect.tag & tag) === tag) {
        // Unmount
        var destroy = effect.destroy;
        effect.destroy = undefined;

        if (destroy !== undefined) {
          destroy();
        }
      }

      effect = effect.next;
    } while (effect !== firstEffect);
  }
}

function commitHookEffectListMount(tag, finishedWork) {
  var updateQueue = finishedWork.updateQueue;
  var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;

  if (lastEffect !== null) {
    var firstEffect = lastEffect.next;
    var effect = firstEffect;

    do {
      if ((effect.tag & tag) === tag) {
        // Mount
        var create = effect.create;
        effect.destroy = create();

        {
          var destroy = effect.destroy;

          if (destroy !== undefined && typeof destroy !== 'function') {
            var addendum = void 0;

            if (destroy === null) {
              addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
            } else if (typeof destroy.then === 'function') {
              addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + '  async function fetchData() {\n' + '    // You can await here\n' + '    const response = await MyAPI.getData(someId);\n' + '    // ...\n' + '  }\n' + '  fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://fb.me/react-hooks-data-fetching';
            } else {
              addendum = ' You returned: ' + destroy;
            }

            error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s%s', addendum, getStackByFiberInDevAndProd(finishedWork));
          }
        }
      }

      effect = effect.next;
    } while (effect !== firstEffect);
  }
}

function commitPassiveHookEffects(finishedWork) {
  if ((finishedWork.effectTag & Passive) !== NoEffect) {
    switch (finishedWork.tag) {
      case FunctionComponent:
      case ForwardRef:
      case SimpleMemoComponent:
      case Block:
        {
          // TODO (#17945) We should call all passive destroy functions (for all fibers)
          // before calling any create functions. The current approach only serializes
          // these for a single fiber.
          commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork);
          commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
          break;
        }
    }
  }
}

function commitLifeCycles(finishedRoot, current, finishedWork, committedExpirationTime) {
  switch (finishedWork.tag) {
    case FunctionComponent:
    case ForwardRef:
    case SimpleMemoComponent:
    case Block:
      {
        // At this point layout effects have already been destroyed (during mutation phase).
        // This is done to prevent sibling component effects from interfering with each other,
        // e.g. a destroy function in one component should never override a ref set
        // by a create function in another component during the same commit.
        commitHookEffectListMount(Layout | HasEffect, finishedWork);

        return;
      }

    case ClassComponent:
      {
        var instance = finishedWork.stateNode;

        if (finishedWork.effectTag & Update) {
          if (current === null) {
            startPhaseTimer(finishedWork, 'componentDidMount'); // We could update instance props and state here,
            // but instead we rely on them being set during last render.
            // TODO: revisit this when we implement resuming.

            {
              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                if (instance.props !== finishedWork.memoizedProps) {
                  error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
                }

                if (instance.state !== finishedWork.memoizedState) {
                  error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
                }
              }
            }

            instance.componentDidMount();
            stopPhaseTimer();
          } else {
            var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
            var prevState = current.memoizedState;
            startPhaseTimer(finishedWork, 'componentDidUpdate'); // We could update instance props and state here,
            // but instead we rely on them being set during last render.
            // TODO: revisit this when we implement resuming.

            {
              if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
                if (instance.props !== finishedWork.memoizedProps) {
                  error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
                }

                if (instance.state !== finishedWork.memoizedState) {
                  error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
                }
              }
            }

            instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
            stopPhaseTimer();
          }
        }

        var updateQueue = finishedWork.updateQueue;

        if (updateQueue !== null) {
          {
            if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
              if (instance.props !== finishedWork.memoizedProps) {
                error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
              }

              if (instance.state !== finishedWork.memoizedState) {
                error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
              }
            }
          } // We could update instance props and state here,
          // but instead we rely on them being set during last render.
          // TODO: revisit this when we implement resuming.


          commitUpdateQueue(finishedWork, updateQueue, instance);
        }

        return;
      }

    case HostRoot:
      {
        var _updateQueue = finishedWork.updateQueue;

        if (_updateQueue !== null) {
          var _instance = null;

          if (finishedWork.child !== null) {
            switch (finishedWork.child.tag) {
              case HostComponent:
                _instance = getPublicInstance(finishedWork.child.stateNode);
                break;

              case ClassComponent:
                _instance = finishedWork.child.stateNode;
                break;
            }
          }

          commitUpdateQueue(finishedWork, _updateQueue, _instance);
        }

        return;
      }

    case HostComponent:
      {
        var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted
        // (eg DOM renderer may schedule auto-focus for inputs and form controls).
        // These effects should only be committed when components are first mounted,
        // aka when there is no current/alternate.

        if (current === null && finishedWork.effectTag & Update) {
          var type = finishedWork.type;
          var props = finishedWork.memoizedProps;
          commitMount(_instance2, type, props);
        }

        return;
      }

    case HostText:
      {
        // We have no life-cycles associated with text.
        return;
      }

    case HostPortal:
      {
        // We have no life-cycles associated with portals.
        return;
      }

    case Profiler:
      {
        {
          var onRender = finishedWork.memoizedProps.onRender;

          if (typeof onRender === 'function') {
            {
              onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, getCommitTime(), finishedRoot.memoizedInteractions);
            }
          }
        }

        return;
      }

    case SuspenseComponent:
      {
        commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
        return;
      }

    case SuspenseListComponent:
    case IncompleteClassComponent:
    case FundamentalComponent:
    case ScopeComponent:
      return;
  }

  {
    {
      throw Error( "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 hideOrUnhideAllChildren(finishedWork, isHidden) {
  {
    // We only have the top Fiber that was inserted but we need to recurse down its
    // children to find all the terminal nodes.
    var node = finishedWork;

    while (true) {
      if (node.tag === HostComponent) {
        var instance = node.stateNode;

        if (isHidden) {
          hideInstance(instance);
        } else {
          unhideInstance(node.stateNode, node.memoizedProps);
        }
      } else if (node.tag === HostText) {
        var _instance3 = node.stateNode;

        if (isHidden) {
          hideTextInstance(_instance3);
        } else {
          unhideTextInstance(_instance3, node.memoizedProps);
        }
      } else if (node.tag === SuspenseComponent && node.memoizedState !== null && node.memoizedState.dehydrated === null) {
        // Found a nested Suspense component that timed out. Skip over the
        // primary child fragment, which should remain hidden.
        var fallbackChildFragment = node.child.sibling;
        fallbackChildFragment.return = node;
        node = fallbackChildFragment;
        continue;
      } else if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }

      if (node === finishedWork) {
        return;
      }

      while (node.sibling === null) {
        if (node.return === null || node.return === finishedWork) {
          return;
        }

        node = node.return;
      }

      node.sibling.return = node.return;
      node = node.sibling;
    }
  }
}

function commitAttachRef(finishedWork) {
  var ref = finishedWork.ref;

  if (ref !== null) {
    var instance = finishedWork.stateNode;
    var instanceToUse;

    switch (finishedWork.tag) {
      case HostComponent:
        instanceToUse = getPublicInstance(instance);
        break;

      default:
        instanceToUse = instance;
    } // Moved outside to ensure DCE works with this flag

    if (typeof ref === 'function') {
      ref(instanceToUse);
    } else {
      {
        if (!ref.hasOwnProperty('current')) {
          error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().%s', getComponentName(finishedWork.type), getStackByFiberInDevAndProd(finishedWork));
        }
      }

      ref.current = instanceToUse;
    }
  }
}

function commitDetachRef(current) {
  var currentRef = current.ref;

  if (currentRef !== null) {
    if (typeof currentRef === 'function') {
      currentRef(null);
    } else {
      currentRef.current = null;
    }
  }
} // User-originating errors (lifecycles and refs) should not interrupt
// deletion, so don't let them throw. Host-originating errors should
// interrupt deletion, so it's okay


function commitUnmount(finishedRoot, current, renderPriorityLevel) {
  onCommitUnmount(current);

  switch (current.tag) {
    case FunctionComponent:
    case ForwardRef:
    case MemoComponent:
    case SimpleMemoComponent:
    case Block:
      {
        var updateQueue = current.updateQueue;

        if (updateQueue !== null) {
          var lastEffect = updateQueue.lastEffect;

          if (lastEffect !== null) {
            var firstEffect = lastEffect.next;

            {
              // When the owner fiber is deleted, the destroy function of a passive
              // effect hook is called during the synchronous commit phase. This is
              // a concession to implementation complexity. Calling it in the
              // passive effect phase (like they usually are, when dependencies
              // change during an update) would require either traversing the
              // children of the deleted fiber again, or including unmount effects
              // as part of the fiber effect list.
              //
              // Because this is during the sync commit phase, we need to change
              // the priority.
              //
              // TODO: Reconsider this implementation trade off.
              var priorityLevel = renderPriorityLevel > NormalPriority ? NormalPriority : renderPriorityLevel;
              runWithPriority$1(priorityLevel, function () {
                var effect = firstEffect;

                do {
                  var _destroy = effect.destroy;

                  if (_destroy !== undefined) {
                    safelyCallDestroy(current, _destroy);
                  }

                  effect = effect.next;
                } while (effect !== firstEffect);
              });
            }
          }
        }

        return;
      }

    case ClassComponent:
      {
        safelyDetachRef(current);
        var instance = current.stateNode;

        if (typeof instance.componentWillUnmount === 'function') {
          safelyCallComponentWillUnmount(current, instance);
        }

        return;
      }

    case HostComponent:
      {

        safelyDetachRef(current);
        return;
      }

    case HostPortal:
      {
        // TODO: this is recursive.
        // We are also not using this parent because
        // the portal will get pushed immediately.
        {
          unmountHostComponents(finishedRoot, current, renderPriorityLevel);
        }

        return;
      }

    case FundamentalComponent:
      {

        return;
      }

    case DehydratedFragment:
      {

        return;
      }

    case ScopeComponent:
      {

        return;
      }
  }
}

function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {
  // While we're inside a removed host node we don't want to call
  // removeChild on the inner nodes because they're removed by the top
  // call anyway. We also want to call componentWillUnmount on all
  // composites before this host node is removed from the tree. Therefore
  // we do an inner loop while we're still inside the host node.
  var node = root;

  while (true) {
    commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because they may contain more composite or host nodes.
    // Skip portals because commitUnmount() currently visits them recursively.

    if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.
    // If we don't use mutation we drill down into portals here instead.
     node.tag !== HostPortal)) {
      node.child.return = node;
      node = node.child;
      continue;
    }

    if (node === root) {
      return;
    }

    while (node.sibling === null) {
      if (node.return === null || node.return === root) {
        return;
      }

      node = node.return;
    }

    node.sibling.return = node.return;
    node = node.sibling;
  }
}

function detachFiber(current) {
  var alternate = current.alternate; // Cut off the return pointers to disconnect it from the tree. Ideally, we
  // should clear the child pointer of the parent alternate to let this
  // get GC:ed but we don't know which for sure which parent is the current
  // one so we'll settle for GC:ing the subtree of this child. This child
  // itself will be GC:ed when the parent updates the next time.

  current.return = null;
  current.child = null;
  current.memoizedState = null;
  current.updateQueue = null;
  current.dependencies = null;
  current.alternate = null;
  current.firstEffect = null;
  current.lastEffect = null;
  current.pendingProps = null;
  current.memoizedProps = null;
  current.stateNode = null;

  if (alternate !== null) {
    detachFiber(alternate);
  }
}

function getHostParentFiber(fiber) {
  var parent = fiber.return;

  while (parent !== null) {
    if (isHostParent(parent)) {
      return parent;
    }

    parent = parent.return;
  }

  {
    {
      throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
    }
  }
}

function isHostParent(fiber) {
  return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
}

function getHostSibling(fiber) {
  // We're going to search forward into the tree until we find a sibling host
  // node. Unfortunately, if multiple insertions are done in a row we have to
  // search past them. This leads to exponential search for the next sibling.
  // TODO: Find a more efficient way to do this.
  var node = fiber;

  siblings: while (true) {
    // If we didn't find anything, let's try the next sibling.
    while (node.sibling === null) {
      if (node.return === null || isHostParent(node.return)) {
        // If we pop out of the root or hit the parent the fiber we are the
        // last sibling.
        return null;
      }

      node = node.return;
    }

    node.sibling.return = node.return;
    node = node.sibling;

    while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
      // If it is not host node and, we might have a host node inside it.
      // Try to search down until we find one.
      if (node.effectTag & Placement) {
        // If we don't have a child, try the siblings instead.
        continue siblings;
      } // If we don't have a child, try the siblings instead.
      // We also skip portals because they are not part of this host tree.


      if (node.child === null || node.tag === HostPortal) {
        continue siblings;
      } else {
        node.child.return = node;
        node = node.child;
      }
    } // Check if this host node is stable or about to be placed.


    if (!(node.effectTag & Placement)) {
      // Found it!
      return node.stateNode;
    }
  }
}

function commitPlacement(finishedWork) {


  var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.

  var parent;
  var isContainer;
  var parentStateNode = parentFiber.stateNode;

  switch (parentFiber.tag) {
    case HostComponent:
      parent = parentStateNode;
      isContainer = false;
      break;

    case HostRoot:
      parent = parentStateNode.containerInfo;
      isContainer = true;
      break;

    case HostPortal:
      parent = parentStateNode.containerInfo;
      isContainer = true;
      break;

    case FundamentalComponent:

    // eslint-disable-next-line-no-fallthrough

    default:
      {
        {
          throw Error( "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." );
        }
      }

  }

  if (parentFiber.effectTag & ContentReset) {
    // Reset the text content of the parent before doing any insertions
    resetTextContent(parent); // Clear ContentReset from the effect tag

    parentFiber.effectTag &= ~ContentReset;
  }

  var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
  // children to find all the terminal nodes.

  if (isContainer) {
    insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);
  } else {
    insertOrAppendPlacementNode(finishedWork, before, parent);
  }
}

function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
  var tag = node.tag;
  var isHost = tag === HostComponent || tag === HostText;

  if (isHost || enableFundamentalAPI ) {
    var stateNode = isHost ? node.stateNode : node.stateNode.instance;

    if (before) {
      insertInContainerBefore(parent, stateNode, before);
    } else {
      appendChildToContainer(parent, stateNode);
    }
  } else if (tag === HostPortal) ; else {
    var child = node.child;

    if (child !== null) {
      insertOrAppendPlacementNodeIntoContainer(child, before, parent);
      var sibling = child.sibling;

      while (sibling !== null) {
        insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
        sibling = sibling.sibling;
      }
    }
  }
}

function insertOrAppendPlacementNode(node, before, parent) {
  var tag = node.tag;
  var isHost = tag === HostComponent || tag === HostText;

  if (isHost || enableFundamentalAPI ) {
    var stateNode = isHost ? node.stateNode : node.stateNode.instance;

    if (before) {
      insertBefore(parent, stateNode, before);
    } else {
      appendChild(parent, stateNode);
    }
  } else if (tag === HostPortal) ; else {
    var child = node.child;

    if (child !== null) {
      insertOrAppendPlacementNode(child, before, parent);
      var sibling = child.sibling;

      while (sibling !== null) {
        insertOrAppendPlacementNode(sibling, before, parent);
        sibling = sibling.sibling;
      }
    }
  }
}

function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
  // We only have the top Fiber that was deleted but we need to recurse down its
  // children to find all the terminal nodes.
  var node = current; // Each iteration, currentParent is populated with node's host parent if not
  // currentParentIsValid.

  var currentParentIsValid = false; // Note: these two variables *must* always be updated together.

  var currentParent;
  var currentParentIsContainer;

  while (true) {
    if (!currentParentIsValid) {
      var parent = node.return;

      findParent: while (true) {
        if (!(parent !== null)) {
          {
            throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
          }
        }

        var parentStateNode = parent.stateNode;

        switch (parent.tag) {
          case HostComponent:
            currentParent = parentStateNode;
            currentParentIsContainer = false;
            break findParent;

          case HostRoot:
            currentParent = parentStateNode.containerInfo;
            currentParentIsContainer = true;
            break findParent;

          case HostPortal:
            currentParent = parentStateNode.containerInfo;
            currentParentIsContainer = true;
            break findParent;

        }

        parent = parent.return;
      }

      currentParentIsValid = true;
    }

    if (node.tag === HostComponent || node.tag === HostText) {
      commitNestedUnmounts(finishedRoot, node, renderPriorityLevel); // After all the children have unmounted, it is now safe to remove the
      // node from the tree.

      if (currentParentIsContainer) {
        removeChildFromContainer(currentParent, node.stateNode);
      } else {
        removeChild(currentParent, node.stateNode);
      } // Don't visit children because we already visited them.

    } else if (node.tag === HostPortal) {
      if (node.child !== null) {
        // When we go into a portal, it becomes the parent to remove from.
        // We will reassign it back when we pop the portal on the way up.
        currentParent = node.stateNode.containerInfo;
        currentParentIsContainer = true; // Visit children because portals might contain host components.

        node.child.return = node;
        node = node.child;
        continue;
      }
    } else {
      commitUnmount(finishedRoot, node, renderPriorityLevel); // Visit children because we may find more host components below.

      if (node.child !== null) {
        node.child.return = node;
        node = node.child;
        continue;
      }
    }

    if (node === current) {
      return;
    }

    while (node.sibling === null) {
      if (node.return === null || node.return === current) {
        return;
      }

      node = node.return;

      if (node.tag === HostPortal) {
        // When we go out of the portal, we need to restore the parent.
        // Since we don't keep a stack of them, we will search for it.
        currentParentIsValid = false;
      }
    }

    node.sibling.return = node.return;
    node = node.sibling;
  }
}

function commitDeletion(finishedRoot, current, renderPriorityLevel) {
  {
    // Recursively delete all host nodes from the parent.
    // Detach refs and call componentWillUnmount() on the whole subtree.
    unmountHostComponents(finishedRoot, current, renderPriorityLevel);
  }

  detachFiber(current);
}

function commitWork(current, finishedWork) {

  switch (finishedWork.tag) {
    case FunctionComponent:
    case ForwardRef:
    case MemoComponent:
    case SimpleMemoComponent:
    case Block:
      {
        // Layout effects are destroyed during the mutation phase so that all
        // destroy functions for all fibers are called before any create functions.
        // This prevents sibling component effects from interfering with each other,
        // e.g. a destroy function in one component should never override a ref set
        // by a create function in another component during the same commit.
        commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
        return;
      }

    case ClassComponent:
      {
        return;
      }

    case HostComponent:
      {
        var instance = finishedWork.stateNode;

        if (instance != null) {
          // Commit the work prepared earlier.
          var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
          // as the newProps. The updatePayload will contain the real change in
          // this case.

          var oldProps = current !== null ? current.memoizedProps : newProps;
          var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.

          var updatePayload = finishedWork.updateQueue;
          finishedWork.updateQueue = null;

          if (updatePayload !== null) {
            commitUpdate(instance, updatePayload, type, oldProps, newProps);
          }
        }

        return;
      }

    case HostText:
      {
        if (!(finishedWork.stateNode !== null)) {
          {
            throw Error( "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue." );
          }
        }

        var textInstance = finishedWork.stateNode;
        var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
        // as the newProps. The updatePayload will contain the real change in
        // this case.

        var oldText = current !== null ? current.memoizedProps : newText;
        commitTextUpdate(textInstance, oldText, newText);
        return;
      }

    case HostRoot:
      {
        {
          var _root = finishedWork.stateNode;

          if (_root.hydrate) {
            // We've just hydrated. No need to hydrate again.
            _root.hydrate = false;
            commitHydratedContainer(_root.containerInfo);
          }
        }

        return;
      }

    case Profiler:
      {
        return;
      }

    case SuspenseComponent:
      {
        commitSuspenseComponent(finishedWork);
        attachSuspenseRetryListeners(finishedWork);
        return;
      }

    case SuspenseListComponent:
      {
        attachSuspenseRetryListeners(finishedWork);
        return;
      }

    case IncompleteClassComponent:
      {
        return;
      }
  }

  {
    {
      throw Error( "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 commitSuspenseComponent(finishedWork) {
  var newState = finishedWork.memoizedState;
  var newDidTimeout;
  var primaryChildParent = finishedWork;

  if (newState === null) {
    newDidTimeout = false;
  } else {
    newDidTimeout = true;
    primaryChildParent = finishedWork.child;
    markCommitTimeOfFallback();
  }

  if ( primaryChildParent !== null) {
    hideOrUnhideAllChildren(primaryChildParent, newDidTimeout);
  }
}

function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {

  var newState = finishedWork.memoizedState;

  if (newState === null) {
    var current = finishedWork.alternate;

    if (current !== null) {
      var prevState = current.memoizedState;

      if (prevState !== null) {
        var suspenseInstance = prevState.dehydrated;

        if (suspenseInstance !== null) {
          commitHydratedSuspenseInstance(suspenseInstance);
        }
      }
    }
  }
}

function attachSuspenseRetryListeners(finishedWork) {
  // If this boundary just timed out, then it will have a set of thenables.
  // For each thenable, attach a listener so that when it resolves, React
  // attempts to re-render the boundary in the primary (pre-timeout) state.
  var thenables = finishedWork.updateQueue;

  if (thenables !== null) {
    finishedWork.updateQueue = null;
    var retryCache = finishedWork.stateNode;

    if (retryCache === null) {
      retryCache = finishedWork.stateNode = new PossiblyWeakSet();
    }

    thenables.forEach(function (thenable) {
      // Memoize using the boundary fiber to prevent redundant listeners.
      var retry = resolveRetryThenable.bind(null, finishedWork, thenable);

      if (!retryCache.has(thenable)) {
        {
          if (thenable.__reactDoNotTraceInteractions !== true) {
            retry = tracing.unstable_wrap(retry);
          }
        }

        retryCache.add(thenable);
        thenable.then(retry, retry);
      }
    });
  }
}

function commitResetTextContent(current) {

  resetTextContent(current.stateNode);
}

var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;

function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
  var update = createUpdate(expirationTime, null); // Unmount the root by rendering null.

  update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
  // being called "element".

  update.payload = {
    element: null
  };
  var error = errorInfo.value;

  update.callback = function () {
    onUncaughtError(error);
    logError(fiber, errorInfo);
  };

  return update;
}

function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
  var update = createUpdate(expirationTime, null);
  update.tag = CaptureUpdate;
  var getDerivedStateFromError = fiber.type.getDerivedStateFromError;

  if (typeof getDerivedStateFromError === 'function') {
    var error$1 = errorInfo.value;

    update.payload = function () {
      logError(fiber, errorInfo);
      return getDerivedStateFromError(error$1);
    };
  }

  var inst = fiber.stateNode;

  if (inst !== null && typeof inst.componentDidCatch === 'function') {
    update.callback = function callback() {
      {
        markFailedErrorBoundaryForHotReloading(fiber);
      }

      if (typeof getDerivedStateFromError !== 'function') {
        // To preserve the preexisting retry behavior of error boundaries,
        // we keep track of which ones already failed during this batch.
        // This gets reset before we yield back to the browser.
        // TODO: Warn in strict mode if getDerivedStateFromError is
        // not defined.
        markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined

        logError(fiber, errorInfo);
      }

      var error$1 = errorInfo.value;
      var stack = errorInfo.stack;
      this.componentDidCatch(error$1, {
        componentStack: stack !== null ? stack : ''
      });

      {
        if (typeof getDerivedStateFromError !== 'function') {
          // If componentDidCatch is the only error boundary method defined,
          // then it needs to call setState to recover from errors.
          // If no state update is scheduled then the boundary will swallow the error.
          if (fiber.expirationTime !== Sync) {
            error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
          }
        }
      }
    };
  } else {
    update.callback = function () {
      markFailedErrorBoundaryForHotReloading(fiber);
    };
  }

  return update;
}

function attachPingListener(root, renderExpirationTime, thenable) {
  // Attach a listener to the promise to "ping" the root and retry. But
  // only if one does not already exist for the current render expiration
  // time (which acts like a "thread ID" here).
  var pingCache = root.pingCache;
  var threadIDs;

  if (pingCache === null) {
    pingCache = root.pingCache = new PossiblyWeakMap$1();
    threadIDs = new Set();
    pingCache.set(thenable, threadIDs);
  } else {
    threadIDs = pingCache.get(thenable);

    if (threadIDs === undefined) {
      threadIDs = new Set();
      pingCache.set(thenable, threadIDs);
    }
  }

  if (!threadIDs.has(renderExpirationTime)) {
    // Memoize using the thread ID to prevent redundant listeners.
    threadIDs.add(renderExpirationTime);
    var ping = pingSuspendedRoot.bind(null, root, thenable, renderExpirationTime);
    thenable.then(ping, ping);
  }
}

function throwException(root, returnFiber, sourceFiber, value, renderExpirationTime) {
  // The source fiber did not complete.
  sourceFiber.effectTag |= Incomplete; // Its effect list is no longer valid.

  sourceFiber.firstEffect = sourceFiber.lastEffect = null;

  if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
    // This is a thenable.
    var thenable = value;

    if ((sourceFiber.mode & BlockingMode) === NoMode) {
      // Reset the memoizedState to what it was before we attempted
      // to render it.
      var currentSource = sourceFiber.alternate;

      if (currentSource) {
        sourceFiber.updateQueue = currentSource.updateQueue;
        sourceFiber.memoizedState = currentSource.memoizedState;
        sourceFiber.expirationTime = currentSource.expirationTime;
      } else {
        sourceFiber.updateQueue = null;
        sourceFiber.memoizedState = null;
      }
    }

    var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.

    var _workInProgress = returnFiber;

    do {
      if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
        // Found the nearest boundary.
        // Stash the promise on the boundary fiber. If the boundary times out, we'll
        // attach another listener to flip the boundary back to its normal state.
        var thenables = _workInProgress.updateQueue;

        if (thenables === null) {
          var updateQueue = new Set();
          updateQueue.add(thenable);
          _workInProgress.updateQueue = updateQueue;
        } else {
          thenables.add(thenable);
        } // If the boundary is outside of blocking mode, we should *not*
        // suspend the commit. Pretend as if the suspended component rendered
        // null and keep rendering. In the commit phase, we'll schedule a
        // subsequent synchronous update to re-render the Suspense.
        //
        // Note: It doesn't matter whether the component that suspended was
        // inside a blocking mode tree. If the Suspense is outside of it, we
        // should *not* suspend the commit.


        if ((_workInProgress.mode & BlockingMode) === NoMode) {
          _workInProgress.effectTag |= DidCapture; // We're going to commit this fiber even though it didn't complete.
          // But we shouldn't call any lifecycle methods or callbacks. Remove
          // all lifecycle effect tags.

          sourceFiber.effectTag &= ~(LifecycleEffectMask | Incomplete);

          if (sourceFiber.tag === ClassComponent) {
            var currentSourceFiber = sourceFiber.alternate;

            if (currentSourceFiber === null) {
              // This is a new mount. Change the tag so it's not mistaken for a
              // completed class component. For example, we should not call
              // componentWillUnmount if it is deleted.
              sourceFiber.tag = IncompleteClassComponent;
            } else {
              // When we try rendering again, we should not reuse the current fiber,
              // since it's known to be in an inconsistent state. Use a force update to
              // prevent a bail out.
              var update = createUpdate(Sync, null);
              update.tag = ForceUpdate;
              enqueueUpdate(sourceFiber, update);
            }
          } // The source fiber did not complete. Mark it with Sync priority to
          // indicate that it still has pending work.


          sourceFiber.expirationTime = Sync; // Exit without suspending.

          return;
        } // Confirmed that the boundary is in a concurrent mode tree. Continue
        // with the normal suspend path.
        //
        // After this we'll use a set of heuristics to determine whether this
        // render pass will run to completion or restart or "suspend" the commit.
        // The actual logic for this is spread out in different places.
        //
        // This first principle is that if we're going to suspend when we complete
        // a root, then we should also restart if we get an update or ping that
        // might unsuspend it, and vice versa. The only reason to suspend is
        // because you think you might want to restart before committing. However,
        // it doesn't make sense to restart only while in the period we're suspended.
        //
        // Restarting too aggressively is also not good because it starves out any
        // intermediate loading state. So we use heuristics to determine when.
        // Suspense Heuristics
        //
        // If nothing threw a Promise or all the same fallbacks are already showing,
        // then don't suspend/restart.
        //
        // If this is an initial render of a new tree of Suspense boundaries and
        // those trigger a fallback, then don't suspend/restart. We want to ensure
        // that we can show the initial loading state as quickly as possible.
        //
        // If we hit a "Delayed" case, such as when we'd switch from content back into
        // a fallback, then we should always suspend/restart. SuspenseConfig applies to
        // this case. If none is defined, JND is used instead.
        //
        // If we're already showing a fallback and it gets "retried", allowing us to show
        // another level, but there's still an inner boundary that would show a fallback,
        // then we suspend/restart for 500ms since the last time we showed a fallback
        // anywhere in the tree. This effectively throttles progressive loading into a
        // consistent train of commits. This also gives us an opportunity to restart to
        // get to the completed state slightly earlier.
        //
        // If there's ambiguity due to batching it's resolved in preference of:
        // 1) "delayed", 2) "initial render", 3) "retry".
        //
        // We want to ensure that a "busy" state doesn't get force committed. We want to
        // ensure that new initial loading states can commit as soon as possible.


        attachPingListener(root, renderExpirationTime, thenable);
        _workInProgress.effectTag |= ShouldCapture;
        _workInProgress.expirationTime = renderExpirationTime;
        return;
      } // This boundary already captured during this render. Continue to the next
      // boundary.


      _workInProgress = _workInProgress.return;
    } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
    // TODO: Use invariant so the message is stripped in prod?


    value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.' + getStackByFiberInDevAndProd(sourceFiber));
  } // We didn't find a boundary that could handle this type of exception. Start
  // over and traverse parent path again, this time treating the exception
  // as an error.


  renderDidError();
  value = createCapturedValue(value, sourceFiber);
  var workInProgress = returnFiber;

  do {
    switch (workInProgress.tag) {
      case HostRoot:
        {
          var _errorInfo = value;
          workInProgress.effectTag |= ShouldCapture;
          workInProgress.expirationTime = renderExpirationTime;

          var _update = createRootErrorUpdate(workInProgress, _errorInfo, renderExpirationTime);

          enqueueCapturedUpdate(workInProgress, _update);
          return;
        }

      case ClassComponent:
        // Capture and retry
        var errorInfo = value;
        var ctor = workInProgress.type;
        var instance = workInProgress.stateNode;

        if ((workInProgress.effectTag & DidCapture) === NoEffect && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
          workInProgress.effectTag |= ShouldCapture;
          workInProgress.expirationTime = renderExpirationTime; // Schedule the error boundary to re-render using updated state

          var _update2 = createClassErrorUpdate(workInProgress, errorInfo, renderExpirationTime);

          enqueueCapturedUpdate(workInProgress, _update2);
          return;
        }

        break;
    }

    workInProgress = workInProgress.return;
  } while (workInProgress !== null);
}

var ceil = Math.ceil;
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
    ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
    IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
var NoContext =
/*                    */
0;
var BatchedContext =
/*               */
1;
var EventContext =
/*                 */
2;
var DiscreteEventContext =
/*         */
4;
var LegacyUnbatchedContext =
/*       */
8;
var RenderContext =
/*                */
16;
var CommitContext =
/*                */
32;
var RootIncomplete = 0;
var RootFatalErrored = 1;
var RootErrored = 2;
var RootSuspended = 3;
var RootSuspendedWithDelay = 4;
var RootCompleted = 5;
// Describes where we are in the React execution stack
var executionContext = NoContext; // The root we're working on

var workInProgressRoot = null; // The fiber we're working on

var workInProgress = null; // The expiration time we're rendering

var renderExpirationTime$1 = NoWork; // Whether to root completed, errored, suspended, etc.

var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown

var workInProgressRootFatalError = null; // Most recent event time among processed updates during this render.
// This is conceptually a time stamp but expressed in terms of an ExpirationTime
// because we deal mostly with expiration times in the hot path, so this avoids
// the conversion happening in the hot path.

var workInProgressRootLatestProcessedExpirationTime = Sync;
var workInProgressRootLatestSuspenseTimeout = Sync;
var workInProgressRootCanSuspendUsingConfig = null; // The work left over by components that were visited during this render. Only
// includes unprocessed updates, not work in bailed out children.

var workInProgressRootNextUnprocessedUpdateTime = NoWork; // If we're pinged while rendering we don't always restart immediately.
// This flag determines if it might be worthwhile to restart if an opportunity
// happens latere.

var workInProgressRootHasPendingPing = false; // The most recent time we committed a fallback. This lets us ensure a train
// model where we don't commit new loading states in too quick succession.

var globalMostRecentFallbackTime = 0;
var FALLBACK_THROTTLE_MS = 500;
var nextEffect = null;
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
var pendingPassiveEffectsRenderPriority = NoPriority;
var pendingPassiveEffectsExpirationTime = NoWork;
var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates

var NESTED_UPDATE_LIMIT = 50;
var nestedUpdateCount = 0;
var rootWithNestedUpdates = null;
var NESTED_PASSIVE_UPDATE_LIMIT = 50;
var nestedPassiveUpdateCount = 0;
var interruptedBy = null; // Marks the need to reschedule pending interactions at these expiration times
// during the commit phase. This enables them to be traced across components
// that spawn new work during render. E.g. hidden boundaries, suspended SSR
// hydration or SuspenseList.

var spawnedWorkDuringRender = null; // Expiration times are computed by adding to the current time (the start
// time). However, if two updates are scheduled within the same event, we
// should treat their start times as simultaneous, even if the actual clock
// time has advanced between the first and second call.
// In other words, because expiration times determine how updates are batched,
// we want all updates of like priority that occur within the same event to
// receive the same expiration time. Otherwise we get tearing.

var currentEventTime = NoWork;
function requestCurrentTimeForUpdate() {
  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
    // We're inside React, so it's fine to read the actual time.
    return msToExpirationTime(now());
  } // We're not inside React, so we may be in the middle of a browser event.


  if (currentEventTime !== NoWork) {
    // Use the same start time for all updates until we enter React again.
    return currentEventTime;
  } // This is the first update since React yielded. Compute a new start time.


  currentEventTime = msToExpirationTime(now());
  return currentEventTime;
}
function getCurrentTime() {
  return msToExpirationTime(now());
}
function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
  var mode = fiber.mode;

  if ((mode & BlockingMode) === NoMode) {
    return Sync;
  }

  var priorityLevel = getCurrentPriorityLevel();

  if ((mode & ConcurrentMode) === NoMode) {
    return priorityLevel === ImmediatePriority ? Sync : Batched;
  }

  if ((executionContext & RenderContext) !== NoContext) {
    // Use whatever time we're already rendering
    // TODO: Should there be a way to opt out, like with `runWithPriority`?
    return renderExpirationTime$1;
  }

  var expirationTime;

  if (suspenseConfig !== null) {
    // Compute an expiration time based on the Suspense timeout.
    expirationTime = computeSuspenseExpiration(currentTime, suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
  } else {
    // Compute an expiration time based on the Scheduler priority.
    switch (priorityLevel) {
      case ImmediatePriority:
        expirationTime = Sync;
        break;

      case UserBlockingPriority$1:
        // TODO: Rename this to computeUserBlockingExpiration
        expirationTime = computeInteractiveExpiration(currentTime);
        break;

      case NormalPriority:
      case LowPriority:
        // TODO: Handle LowPriority
        // TODO: Rename this to... something better.
        expirationTime = computeAsyncExpiration(currentTime);
        break;

      case IdlePriority:
        expirationTime = Idle;
        break;

      default:
        {
          {
            throw Error( "Expected a valid priority level" );
          }
        }

    }
  } // If we're in the middle of rendering a tree, do not update at the same
  // expiration time that is already rendering.
  // TODO: We shouldn't have to do this if the update is on a different root.
  // Refactor computeExpirationForFiber + scheduleUpdate so we have access to
  // the root when we check for this condition.


  if (workInProgressRoot !== null && expirationTime === renderExpirationTime$1) {
    // This is a trick to move this update into a separate batch
    expirationTime -= 1;
  }

  return expirationTime;
}
function scheduleUpdateOnFiber(fiber, expirationTime) {
  checkForNestedUpdates();
  warnAboutRenderPhaseUpdatesInDEV(fiber);
  var root = markUpdateTimeFromFiberToRoot(fiber, expirationTime);

  if (root === null) {
    warnAboutUpdateOnUnmountedFiberInDEV(fiber);
    return;
  }

  checkForInterruption(fiber, expirationTime);
  recordScheduleUpdate(); // TODO: computeExpirationForFiber also reads the priority. Pass the
  // priority as an argument to that function and this one.

  var priorityLevel = getCurrentPriorityLevel();

  if (expirationTime === Sync) {
    if ( // Check if we're inside unbatchedUpdates
    (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering
    (executionContext & (RenderContext | CommitContext)) === NoContext) {
      // Register pending interactions on the root to avoid losing traced interaction data.
      schedulePendingInteractions(root, expirationTime); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
      // root inside of batchedUpdates should be synchronous, but layout updates
      // should be deferred until the end of the batch.

      performSyncWorkOnRoot(root);
    } else {
      ensureRootIsScheduled(root);
      schedulePendingInteractions(root, expirationTime);

      if (executionContext === NoContext) {
        // Flush the synchronous work now, unless we're already working or inside
        // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
        // scheduleCallbackForFiber to preserve the ability to schedule a callback
        // without immediately flushing it. We only do this for user-initiated
        // updates, to preserve historical behavior of legacy mode.
        flushSyncCallbackQueue();
      }
    }
  } else {
    ensureRootIsScheduled(root);
    schedulePendingInteractions(root, expirationTime);
  }

  if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
  // discrete, even inside a discrete event.
  priorityLevel === UserBlockingPriority$1 || priorityLevel === ImmediatePriority)) {
    // This is the result of a discrete event. Track the lowest priority
    // discrete update per root so we can flush them early, if needed.
    if (rootsWithPendingDiscreteUpdates === null) {
      rootsWithPendingDiscreteUpdates = new Map([[root, expirationTime]]);
    } else {
      var lastDiscreteTime = rootsWithPendingDiscreteUpdates.get(root);

      if (lastDiscreteTime === undefined || lastDiscreteTime > expirationTime) {
        rootsWithPendingDiscreteUpdates.set(root, expirationTime);
      }
    }
  }
}
var scheduleWork = scheduleUpdateOnFiber; // This is split into a separate function so we can mark a fiber with pending
// work without treating it as a typical update that originates from an event;
// e.g. retrying a Suspense boundary isn't an update, but it does schedule work
// on a fiber.

function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
  // Update the source fiber's expiration time
  if (fiber.expirationTime < expirationTime) {
    fiber.expirationTime = expirationTime;
  }

  var alternate = fiber.alternate;

  if (alternate !== null && alternate.expirationTime < expirationTime) {
    alternate.expirationTime = expirationTime;
  } // Walk the parent path to the root and update the child expiration time.


  var node = fiber.return;
  var root = null;

  if (node === null && fiber.tag === HostRoot) {
    root = fiber.stateNode;
  } else {
    while (node !== null) {
      alternate = node.alternate;

      if (node.childExpirationTime < expirationTime) {
        node.childExpirationTime = expirationTime;

        if (alternate !== null && alternate.childExpirationTime < expirationTime) {
          alternate.childExpirationTime = expirationTime;
        }
      } else if (alternate !== null && alternate.childExpirationTime < expirationTime) {
        alternate.childExpirationTime = expirationTime;
      }

      if (node.return === null && node.tag === HostRoot) {
        root = node.stateNode;
        break;
      }

      node = node.return;
    }
  }

  if (root !== null) {
    if (workInProgressRoot === root) {
      // Received an update to a tree that's in the middle of rendering. Mark
      // that's unprocessed work on this root.
      markUnprocessedUpdateTime(expirationTime);

      if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
        // The root already suspended with a delay, which means this render
        // definitely won't finish. Since we have a new update, let's mark it as
        // suspended now, right before marking the incoming update. This has the
        // effect of interrupting the current render and switching to the update.
        // TODO: This happens to work when receiving an update during the render
        // phase, because of the trick inside computeExpirationForFiber to
        // subtract 1 from `renderExpirationTime` to move it into a
        // separate bucket. But we should probably model it with an exception,
        // using the same mechanism we use to force hydration of a subtree.
        // TODO: This does not account for low pri updates that were already
        // scheduled before the root started rendering. Need to track the next
        // pending expiration time (perhaps by backtracking the return path) and
        // then trigger a restart in the `renderDidSuspendDelayIfPossible` path.
        markRootSuspendedAtTime(root, renderExpirationTime$1);
      }
    } // Mark that the root has a pending update.


    markRootUpdatedAtTime(root, expirationTime);
  }

  return root;
}

function getNextRootExpirationTimeToWorkOn(root) {
  // Determines the next expiration time that the root should render, taking
  // into account levels that may be suspended, or levels that may have
  // received a ping.
  var lastExpiredTime = root.lastExpiredTime;

  if (lastExpiredTime !== NoWork) {
    return lastExpiredTime;
  } // "Pending" refers to any update that hasn't committed yet, including if it
  // suspended. The "suspended" range is therefore a subset.


  var firstPendingTime = root.firstPendingTime;

  if (!isRootSuspendedAtTime(root, firstPendingTime)) {
    // The highest priority pending time is not suspended. Let's work on that.
    return firstPendingTime;
  } // If the first pending time is suspended, check if there's a lower priority
  // pending level that we know about. Or check if we received a ping. Work
  // on whichever is higher priority.


  var lastPingedTime = root.lastPingedTime;
  var nextKnownPendingLevel = root.nextKnownPendingLevel;
  var nextLevel = lastPingedTime > nextKnownPendingLevel ? lastPingedTime : nextKnownPendingLevel;

  if ( nextLevel <= Idle && firstPendingTime !== nextLevel) {
    // Don't work on Idle/Never priority unless everything else is committed.
    return NoWork;
  }

  return nextLevel;
} // Use this function to schedule a task for a root. There's only one task per
// root; if a task was already scheduled, we'll check to make sure the
// expiration time of the existing task is the same as the expiration time of
// the next level that the root has work on. This function is called on every
// update, and right before exiting a task.


function ensureRootIsScheduled(root) {
  var lastExpiredTime = root.lastExpiredTime;

  if (lastExpiredTime !== NoWork) {
    // Special case: Expired work should flush synchronously.
    root.callbackExpirationTime = Sync;
    root.callbackPriority = ImmediatePriority;
    root.callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
    return;
  }

  var expirationTime = getNextRootExpirationTimeToWorkOn(root);
  var existingCallbackNode = root.callbackNode;

  if (expirationTime === NoWork) {
    // There's nothing to work on.
    if (existingCallbackNode !== null) {
      root.callbackNode = null;
      root.callbackExpirationTime = NoWork;
      root.callbackPriority = NoPriority;
    }

    return;
  } // TODO: If this is an update, we already read the current time. Pass the
  // time as an argument.


  var currentTime = requestCurrentTimeForUpdate();
  var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime); // If there's an existing render task, confirm it has the correct priority and
  // expiration time. Otherwise, we'll cancel it and schedule a new one.

  if (existingCallbackNode !== null) {
    var existingCallbackPriority = root.callbackPriority;
    var existingCallbackExpirationTime = root.callbackExpirationTime;

    if ( // Callback must have the exact same expiration time.
    existingCallbackExpirationTime === expirationTime && // Callback must have greater or equal priority.
    existingCallbackPriority >= priorityLevel) {
      // Existing callback is sufficient.
      return;
    } // Need to schedule a new task.
    // TODO: Instead of scheduling a new task, we should be able to change the
    // priority of the existing one.


    cancelCallback(existingCallbackNode);
  }

  root.callbackExpirationTime = expirationTime;
  root.callbackPriority = priorityLevel;
  var callbackNode;

  if (expirationTime === Sync) {
    // Sync React callbacks are scheduled on a special internal queue
    callbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
  } else {
    callbackNode = scheduleCallback(priorityLevel, performConcurrentWorkOnRoot.bind(null, root), // Compute a task timeout based on the expiration time. This also affects
    // ordering because tasks are processed in timeout order.
    {
      timeout: expirationTimeToMs(expirationTime) - now()
    });
  }

  root.callbackNode = callbackNode;
} // This is the entry point for every concurrent task, i.e. anything that
// goes through Scheduler.


function performConcurrentWorkOnRoot(root, didTimeout) {
  // Since we know we're in a React event, we can clear the current
  // event time. The next update will compute a new event time.
  currentEventTime = NoWork;

  if (didTimeout) {
    // The render task took too long to complete. Mark the current time as
    // expired to synchronously render all expired work in a single batch.
    var currentTime = requestCurrentTimeForUpdate();
    markRootExpiredAtTime(root, currentTime); // This will schedule a synchronous callback.

    ensureRootIsScheduled(root);
    return null;
  } // Determine the next expiration time to work on, using the fields stored
  // on the root.


  var expirationTime = getNextRootExpirationTimeToWorkOn(root);

  if (expirationTime !== NoWork) {
    var originalCallbackNode = root.callbackNode;

    if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
      {
        throw Error( "Should not already be working." );
      }
    }

    flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
    // and prepare a fresh one. Otherwise we'll continue where we left off.

    if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
      prepareFreshStack(root, expirationTime);
      startWorkOnPendingInteractions(root, expirationTime);
    } // If we have a work-in-progress fiber, it means there's still work to do
    // in this root.


    if (workInProgress !== null) {
      var prevExecutionContext = executionContext;
      executionContext |= RenderContext;
      var prevDispatcher = pushDispatcher();
      var prevInteractions = pushInteractions(root);
      startWorkLoopTimer(workInProgress);

      do {
        try {
          workLoopConcurrent();
          break;
        } catch (thrownValue) {
          handleError(root, thrownValue);
        }
      } while (true);

      resetContextDependencies();
      executionContext = prevExecutionContext;
      popDispatcher(prevDispatcher);

      {
        popInteractions(prevInteractions);
      }

      if (workInProgressRootExitStatus === RootFatalErrored) {
        var fatalError = workInProgressRootFatalError;
        stopInterruptedWorkLoopTimer();
        prepareFreshStack(root, expirationTime);
        markRootSuspendedAtTime(root, expirationTime);
        ensureRootIsScheduled(root);
        throw fatalError;
      }

      if (workInProgress !== null) {
        // There's still work left over. Exit without committing.
        stopInterruptedWorkLoopTimer();
      } else {
        // We now have a consistent tree. The next step is either to commit it,
        // or, if something suspended, wait to commit it after a timeout.
        stopFinishedWorkLoopTimer();
        var finishedWork = root.finishedWork = root.current.alternate;
        root.finishedExpirationTime = expirationTime;
        finishConcurrentRender(root, finishedWork, workInProgressRootExitStatus, expirationTime);
      }

      ensureRootIsScheduled(root);

      if (root.callbackNode === originalCallbackNode) {
        // The task node scheduled for this root is the same one that's
        // currently executed. Need to return a continuation.
        return performConcurrentWorkOnRoot.bind(null, root);
      }
    }
  }

  return null;
}

function finishConcurrentRender(root, finishedWork, exitStatus, expirationTime) {
  // Set this to null to indicate there's no in-progress render.
  workInProgressRoot = null;

  switch (exitStatus) {
    case RootIncomplete:
    case RootFatalErrored:
      {
        {
          {
            throw Error( "Root did not complete. This is a bug in React." );
          }
        }
      }
    // Flow knows about invariant, so it complains if I add a break
    // statement, but eslint doesn't know about invariant, so it complains
    // if I do. eslint-disable-next-line no-fallthrough

    case RootErrored:
      {
        // If this was an async render, the error may have happened due to
        // a mutation in a concurrent event. Try rendering one more time,
        // synchronously, to see if the error goes away. If there are
        // lower priority updates, let's include those, too, in case they
        // fix the inconsistency. Render at Idle to include all updates.
        // If it was Idle or Never or some not-yet-invented time, render
        // at that time.
        markRootExpiredAtTime(root, expirationTime > Idle ? Idle : expirationTime); // We assume that this second render pass will be synchronous
        // and therefore not hit this path again.

        break;
      }

    case RootSuspended:
      {
        markRootSuspendedAtTime(root, expirationTime);
        var lastSuspendedTime = root.lastSuspendedTime;

        if (expirationTime === lastSuspendedTime) {
          root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
        } // We have an acceptable loading state. We need to figure out if we
        // should immediately commit it or wait a bit.
        // If we have processed new updates during this render, we may now
        // have a new loading state ready. We want to ensure that we commit
        // that as soon as possible.


        var hasNotProcessedNewUpdates = workInProgressRootLatestProcessedExpirationTime === Sync;

        if (hasNotProcessedNewUpdates && // do not delay if we're inside an act() scope
        !( IsThisRendererActing.current)) {
          // If we have not processed any new updates during this pass, then
          // this is either a retry of an existing fallback state or a
          // hidden tree. Hidden trees shouldn't be batched with other work
          // and after that's fixed it can only be a retry. We're going to
          // throttle committing retries so that we don't show too many
          // loading states too quickly.
          var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.

          if (msUntilTimeout > 10) {
            if (workInProgressRootHasPendingPing) {
              var lastPingedTime = root.lastPingedTime;

              if (lastPingedTime === NoWork || lastPingedTime >= expirationTime) {
                // This render was pinged but we didn't get to restart
                // earlier so try restarting now instead.
                root.lastPingedTime = expirationTime;
                prepareFreshStack(root, expirationTime);
                break;
              }
            }

            var nextTime = getNextRootExpirationTimeToWorkOn(root);

            if (nextTime !== NoWork && nextTime !== expirationTime) {
              // There's additional work on this root.
              break;
            }

            if (lastSuspendedTime !== NoWork && lastSuspendedTime !== expirationTime) {
              // We should prefer to render the fallback of at the last
              // suspended level. Ping the last suspended level to try
              // rendering it again.
              root.lastPingedTime = lastSuspendedTime;
              break;
            } // The render is suspended, it hasn't timed out, and there's no
            // lower priority work to do. Instead of committing the fallback
            // immediately, wait for more data to arrive.


            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);
            break;
          }
        } // The work expired. Commit immediately.


        commitRoot(root);
        break;
      }

    case RootSuspendedWithDelay:
      {
        markRootSuspendedAtTime(root, expirationTime);
        var _lastSuspendedTime = root.lastSuspendedTime;

        if (expirationTime === _lastSuspendedTime) {
          root.nextKnownPendingLevel = getRemainingExpirationTime(finishedWork);
        }

        if ( // do not delay if we're inside an act() scope
        !( IsThisRendererActing.current)) {
          // We're suspended in a state that should be avoided. We'll try to
          // avoid committing it for as long as the timeouts let us.
          if (workInProgressRootHasPendingPing) {
            var _lastPingedTime = root.lastPingedTime;

            if (_lastPingedTime === NoWork || _lastPingedTime >= expirationTime) {
              // This render was pinged but we didn't get to restart earlier
              // so try restarting now instead.
              root.lastPingedTime = expirationTime;
              prepareFreshStack(root, expirationTime);
              break;
            }
          }

          var _nextTime = getNextRootExpirationTimeToWorkOn(root);

          if (_nextTime !== NoWork && _nextTime !== expirationTime) {
            // There's additional work on this root.
            break;
          }

          if (_lastSuspendedTime !== NoWork && _lastSuspendedTime !== expirationTime) {
            // We should prefer to render the fallback of at the last
            // suspended level. Ping the last suspended level to try
            // rendering it again.
            root.lastPingedTime = _lastSuspendedTime;
            break;
          }

          var _msUntilTimeout;

          if (workInProgressRootLatestSuspenseTimeout !== Sync) {
            // We have processed a suspense config whose expiration time we
            // can use as the timeout.
            _msUntilTimeout = expirationTimeToMs(workInProgressRootLatestSuspenseTimeout) - now();
          } else if (workInProgressRootLatestProcessedExpirationTime === Sync) {
            // This should never normally happen because only new updates
            // cause delayed states, so we should have processed something.
            // However, this could also happen in an offscreen tree.
            _msUntilTimeout = 0;
          } else {
            // If we don't have a suspense config, we're going to use a
            // heuristic to determine how long we can suspend.
            var eventTimeMs = inferTimeFromExpirationTime(workInProgressRootLatestProcessedExpirationTime);
            var currentTimeMs = now();
            var timeUntilExpirationMs = expirationTimeToMs(expirationTime) - currentTimeMs;
            var timeElapsed = currentTimeMs - eventTimeMs;

            if (timeElapsed < 0) {
              // We get this wrong some time since we estimate the time.
              timeElapsed = 0;
            }

            _msUntilTimeout = jnd(timeElapsed) - timeElapsed; // Clamp the timeout to the expiration time. TODO: Once the
            // event time is exact instead of inferred from expiration time
            // we don't need this.

            if (timeUntilExpirationMs < _msUntilTimeout) {
              _msUntilTimeout = timeUntilExpirationMs;
            }
          } // Don't bother with a very short suspense time.


          if (_msUntilTimeout > 10) {
            // The render is suspended, it hasn't timed out, and there's no
            // lower priority work to do. Instead of committing the fallback
            // immediately, wait for more data to arrive.
            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
            break;
          }
        } // The work expired. Commit immediately.


        commitRoot(root);
        break;
      }

    case RootCompleted:
      {
        // The work completed. Ready to commit.
        if ( // do not delay if we're inside an act() scope
        !( IsThisRendererActing.current) && workInProgressRootLatestProcessedExpirationTime !== Sync && workInProgressRootCanSuspendUsingConfig !== null) {
          // If we have exceeded the minimum loading delay, which probably
          // means we have shown a spinner already, we might have to suspend
          // a bit longer to ensure that the spinner is shown for
          // enough time.
          var _msUntilTimeout2 = computeMsUntilSuspenseLoadingDelay(workInProgressRootLatestProcessedExpirationTime, expirationTime, workInProgressRootCanSuspendUsingConfig);

          if (_msUntilTimeout2 > 10) {
            markRootSuspendedAtTime(root, expirationTime);
            root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout2);
            break;
          }
        }

        commitRoot(root);
        break;
      }

    default:
      {
        {
          {
            throw Error( "Unknown root exit status." );
          }
        }
      }
  }
} // This is the entry point for synchronous tasks that don't go
// through Scheduler


function performSyncWorkOnRoot(root) {
  // Check if there's expired work on this root. Otherwise, render at Sync.
  var lastExpiredTime = root.lastExpiredTime;
  var expirationTime = lastExpiredTime !== NoWork ? lastExpiredTime : Sync;

  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
    {
      throw Error( "Should not already be working." );
    }
  }

  flushPassiveEffects(); // If the root or expiration time have changed, throw out the existing stack
  // and prepare a fresh one. Otherwise we'll continue where we left off.

  if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1) {
    prepareFreshStack(root, expirationTime);
    startWorkOnPendingInteractions(root, expirationTime);
  } // If we have a work-in-progress fiber, it means there's still work to do
  // in this root.


  if (workInProgress !== null) {
    var prevExecutionContext = executionContext;
    executionContext |= RenderContext;
    var prevDispatcher = pushDispatcher();
    var prevInteractions = pushInteractions(root);
    startWorkLoopTimer(workInProgress);

    do {
      try {
        workLoopSync();
        break;
      } catch (thrownValue) {
        handleError(root, thrownValue);
      }
    } while (true);

    resetContextDependencies();
    executionContext = prevExecutionContext;
    popDispatcher(prevDispatcher);

    {
      popInteractions(prevInteractions);
    }

    if (workInProgressRootExitStatus === RootFatalErrored) {
      var fatalError = workInProgressRootFatalError;
      stopInterruptedWorkLoopTimer();
      prepareFreshStack(root, expirationTime);
      markRootSuspendedAtTime(root, expirationTime);
      ensureRootIsScheduled(root);
      throw fatalError;
    }

    if (workInProgress !== null) {
      // This is a sync render, so we should have finished the whole tree.
      {
        {
          throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
        }
      }
    } else {
      // We now have a consistent tree. Because this is a sync render, we
      // will commit it even if something suspended.
      stopFinishedWorkLoopTimer();
      root.finishedWork = root.current.alternate;
      root.finishedExpirationTime = expirationTime;
      finishSyncRender(root);
    } // Before exiting, make sure there's a callback scheduled for the next
    // pending level.


    ensureRootIsScheduled(root);
  }

  return null;
}

function finishSyncRender(root) {
  // Set this to null to indicate there's no in-progress render.
  workInProgressRoot = null;
  commitRoot(root);
}
function flushDiscreteUpdates() {
  // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
  // However, `act` uses `batchedUpdates`, so there's no way to distinguish
  // those two cases. Need to fix this before exposing flushDiscreteUpdates
  // as a public API.
  if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {
    {
      if ((executionContext & RenderContext) !== NoContext) {
        error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');
      }
    } // We're already rendering, so we can't synchronously flush pending work.
    // This is probably a nested event dispatch triggered by a lifecycle/effect,
    // like `el.focus()`. Exit.


    return;
  }

  flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that
  // they fire before the next serial event.

  flushPassiveEffects();
}
function syncUpdates(fn, a, b, c) {
  return runWithPriority$1(ImmediatePriority, fn.bind(null, a, b, c));
}

function flushPendingDiscreteUpdates() {
  if (rootsWithPendingDiscreteUpdates !== null) {
    // For each root with pending discrete updates, schedule a callback to
    // immediately flush them.
    var roots = rootsWithPendingDiscreteUpdates;
    rootsWithPendingDiscreteUpdates = null;
    roots.forEach(function (expirationTime, root) {
      markRootExpiredAtTime(root, expirationTime);
      ensureRootIsScheduled(root);
    }); // Now flush the immediate queue.

    flushSyncCallbackQueue();
  }
}

function batchedUpdates$1(fn, a) {
  var prevExecutionContext = executionContext;
  executionContext |= BatchedContext;

  try {
    return fn(a);
  } finally {
    executionContext = prevExecutionContext;

    if (executionContext === NoContext) {
      // Flush the immediate callbacks that were scheduled during this batch
      flushSyncCallbackQueue();
    }
  }
}
function batchedEventUpdates$1(fn, a) {
  var prevExecutionContext = executionContext;
  executionContext |= EventContext;

  try {
    return fn(a);
  } finally {
    executionContext = prevExecutionContext;

    if (executionContext === NoContext) {
      // Flush the immediate callbacks that were scheduled during this batch
      flushSyncCallbackQueue();
    }
  }
}
function discreteUpdates$1(fn, a, b, c, d) {
  var prevExecutionContext = executionContext;
  executionContext |= DiscreteEventContext;

  try {
    // Should this
    return runWithPriority$1(UserBlockingPriority$1, fn.bind(null, a, b, c, d));
  } finally {
    executionContext = prevExecutionContext;

    if (executionContext === NoContext) {
      // Flush the immediate callbacks that were scheduled during this batch
      flushSyncCallbackQueue();
    }
  }
}
function unbatchedUpdates(fn, a) {
  var prevExecutionContext = executionContext;
  executionContext &= ~BatchedContext;
  executionContext |= LegacyUnbatchedContext;

  try {
    return fn(a);
  } finally {
    executionContext = prevExecutionContext;

    if (executionContext === NoContext) {
      // Flush the immediate callbacks that were scheduled during this batch
      flushSyncCallbackQueue();
    }
  }
}
function flushSync(fn, a) {
  if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
    {
      {
        throw Error( "flushSync was called from inside a lifecycle method. It cannot be called when React is already rendering." );
      }
    }
  }

  var prevExecutionContext = executionContext;
  executionContext |= BatchedContext;

  try {
    return runWithPriority$1(ImmediatePriority, fn.bind(null, a));
  } finally {
    executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
    // Note that this will happen even if batchedUpdates is higher up
    // the stack.

    flushSyncCallbackQueue();
  }
}

function prepareFreshStack(root, expirationTime) {
  root.finishedWork = null;
  root.finishedExpirationTime = NoWork;
  var timeoutHandle = root.timeoutHandle;

  if (timeoutHandle !== noTimeout) {
    // The root previous suspended and scheduled a timeout to commit a fallback
    // state. Now that we have additional work, cancel the timeout.
    root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above

    cancelTimeout(timeoutHandle);
  }

  if (workInProgress !== null) {
    var interruptedWork = workInProgress.return;

    while (interruptedWork !== null) {
      unwindInterruptedWork(interruptedWork);
      interruptedWork = interruptedWork.return;
    }
  }

  workInProgressRoot = root;
  workInProgress = createWorkInProgress(root.current, null);
  renderExpirationTime$1 = expirationTime;
  workInProgressRootExitStatus = RootIncomplete;
  workInProgressRootFatalError = null;
  workInProgressRootLatestProcessedExpirationTime = Sync;
  workInProgressRootLatestSuspenseTimeout = Sync;
  workInProgressRootCanSuspendUsingConfig = null;
  workInProgressRootNextUnprocessedUpdateTime = NoWork;
  workInProgressRootHasPendingPing = false;

  {
    spawnedWorkDuringRender = null;
  }

  {
    ReactStrictModeWarnings.discardPendingWarnings();
  }
}

function handleError(root, thrownValue) {
  do {
    try {
      // Reset module-level state that was set during the render phase.
      resetContextDependencies();
      resetHooksAfterThrow();
      resetCurrentFiber();

      if (workInProgress === null || workInProgress.return === null) {
        // Expected to be working on a non-root fiber. This is a fatal error
        // because there's no ancestor that can handle it; the root is
        // supposed to capture all errors that weren't caught by an error
        // boundary.
        workInProgressRootExitStatus = RootFatalErrored;
        workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
        // sibling, or the parent if there are no siblings. But since the root
        // has no siblings nor a parent, we set it to null. Usually this is
        // handled by `completeUnitOfWork` or `unwindWork`, but since we're
        // interntionally not calling those, we need set it here.
        // TODO: Consider calling `unwindWork` to pop the contexts.

        workInProgress = null;
        return null;
      }

      if (enableProfilerTimer && workInProgress.mode & ProfileMode) {
        // Record the time spent rendering before an error was thrown. This
        // avoids inaccurate Profiler durations in the case of a
        // suspended render.
        stopProfilerTimerIfRunningAndRecordDelta(workInProgress, true);
      }

      throwException(root, workInProgress.return, workInProgress, thrownValue, renderExpirationTime$1);
      workInProgress = completeUnitOfWork(workInProgress);
    } catch (yetAnotherThrownValue) {
      // Something in the return path also threw.
      thrownValue = yetAnotherThrownValue;
      continue;
    } // Return to the normal work loop.


    return;
  } while (true);
}

function pushDispatcher(root) {
  var prevDispatcher = ReactCurrentDispatcher$1.current;
  ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;

  if (prevDispatcher === null) {
    // The React isomorphic package does not include a default dispatcher.
    // Instead the first renderer will lazily attach one, in order to give
    // nicer error messages.
    return ContextOnlyDispatcher;
  } else {
    return prevDispatcher;
  }
}

function popDispatcher(prevDispatcher) {
  ReactCurrentDispatcher$1.current = prevDispatcher;
}

function pushInteractions(root) {
  {
    var prevInteractions = tracing.__interactionsRef.current;
    tracing.__interactionsRef.current = root.memoizedInteractions;
    return prevInteractions;
  }
}

function popInteractions(prevInteractions) {
  {
    tracing.__interactionsRef.current = prevInteractions;
  }
}

function markCommitTimeOfFallback() {
  globalMostRecentFallbackTime = now();
}
function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
  if (expirationTime < workInProgressRootLatestProcessedExpirationTime && expirationTime > Idle) {
    workInProgressRootLatestProcessedExpirationTime = expirationTime;
  }

  if (suspenseConfig !== null) {
    if (expirationTime < workInProgressRootLatestSuspenseTimeout && expirationTime > Idle) {
      workInProgressRootLatestSuspenseTimeout = expirationTime; // Most of the time we only have one config and getting wrong is not bad.

      workInProgressRootCanSuspendUsingConfig = suspenseConfig;
    }
  }
}
function markUnprocessedUpdateTime(expirationTime) {
  if (expirationTime > workInProgressRootNextUnprocessedUpdateTime) {
    workInProgressRootNextUnprocessedUpdateTime = expirationTime;
  }
}
function renderDidSuspend() {
  if (workInProgressRootExitStatus === RootIncomplete) {
    workInProgressRootExitStatus = RootSuspended;
  }
}
function renderDidSuspendDelayIfPossible() {
  if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
    workInProgressRootExitStatus = RootSuspendedWithDelay;
  } // Check if there's a lower priority update somewhere else in the tree.


  if (workInProgressRootNextUnprocessedUpdateTime !== NoWork && workInProgressRoot !== null) {
    // Mark the current render as suspended, and then mark that there's a
    // pending update.
    // TODO: This should immediately interrupt the current render, instead
    // of waiting until the next time we yield.
    markRootSuspendedAtTime(workInProgressRoot, renderExpirationTime$1);
    markRootUpdatedAtTime(workInProgressRoot, workInProgressRootNextUnprocessedUpdateTime);
  }
}
function renderDidError() {
  if (workInProgressRootExitStatus !== RootCompleted) {
    workInProgressRootExitStatus = RootErrored;
  }
} // Called during render to determine if anything has suspended.
// Returns false if we're not sure.

function renderHasNotSuspendedYet() {
  // If something errored or completed, we can't really be sure,
  // so those are false.
  return workInProgressRootExitStatus === RootIncomplete;
}

function inferTimeFromExpirationTime(expirationTime) {
  // We don't know exactly when the update was scheduled, but we can infer an
  // approximate start time from the expiration time.
  var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
  return earliestExpirationTimeMs - LOW_PRIORITY_EXPIRATION;
}

function inferTimeFromExpirationTimeWithSuspenseConfig(expirationTime, suspenseConfig) {
  // We don't know exactly when the update was scheduled, but we can infer an
  // approximate start time from the expiration time by subtracting the timeout
  // that was added to the event time.
  var earliestExpirationTimeMs = expirationTimeToMs(expirationTime);
  return earliestExpirationTimeMs - (suspenseConfig.timeoutMs | 0 || LOW_PRIORITY_EXPIRATION);
} // The work loop is an extremely hot path. Tell Closure not to inline it.

/** @noinline */


function workLoopSync() {
  // Already timed out, so perform work without checking if we need to yield.
  while (workInProgress !== null) {
    workInProgress = performUnitOfWork(workInProgress);
  }
}
/** @noinline */


function workLoopConcurrent() {
  // Perform work until Scheduler asks us to yield
  while (workInProgress !== null && !shouldYield()) {
    workInProgress = performUnitOfWork(workInProgress);
  }
}

function performUnitOfWork(unitOfWork) {
  // The current, flushed, state of this fiber is the alternate. Ideally
  // nothing should rely on this, but relying on it here means that we don't
  // need an additional field on the work in progress.
  var current = unitOfWork.alternate;
  startWorkTimer(unitOfWork);
  setCurrentFiber(unitOfWork);
  var next;

  if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
    startProfilerTimer(unitOfWork);
    next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
    stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
  } else {
    next = beginWork$1(current, unitOfWork, renderExpirationTime$1);
  }

  resetCurrentFiber();
  unitOfWork.memoizedProps = unitOfWork.pendingProps;

  if (next === null) {
    // If this doesn't spawn new work, complete the current work.
    next = completeUnitOfWork(unitOfWork);
  }

  ReactCurrentOwner$2.current = null;
  return next;
}

function completeUnitOfWork(unitOfWork) {
  // Attempt to complete the current unit of work, then move to the next
  // sibling. If there are no more siblings, return to the parent fiber.
  workInProgress = unitOfWork;

  do {
    // The current, flushed, state of this fiber is the alternate. Ideally
    // nothing should rely on this, but relying on it here means that we don't
    // need an additional field on the work in progress.
    var current = workInProgress.alternate;
    var returnFiber = workInProgress.return; // Check if the work completed or if something threw.

    if ((workInProgress.effectTag & Incomplete) === NoEffect) {
      setCurrentFiber(workInProgress);
      var next = void 0;

      if ( (workInProgress.mode & ProfileMode) === NoMode) {
        next = completeWork(current, workInProgress, renderExpirationTime$1);
      } else {
        startProfilerTimer(workInProgress);
        next = completeWork(current, workInProgress, renderExpirationTime$1); // Update render duration assuming we didn't error.

        stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false);
      }

      stopWorkTimer(workInProgress);
      resetCurrentFiber();
      resetChildExpirationTime(workInProgress);

      if (next !== null) {
        // Completing this fiber spawned new work. Work on that next.
        return next;
      }

      if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
      (returnFiber.effectTag & Incomplete) === NoEffect) {
        // Append all the effects of the subtree and this fiber onto the effect
        // list of the parent. The completion order of the children affects the
        // side-effect order.
        if (returnFiber.firstEffect === null) {
          returnFiber.firstEffect = workInProgress.firstEffect;
        }

        if (workInProgress.lastEffect !== null) {
          if (returnFiber.lastEffect !== null) {
            returnFiber.lastEffect.nextEffect = workInProgress.firstEffect;
          }

          returnFiber.lastEffect = workInProgress.lastEffect;
        } // If this fiber had side-effects, we append it AFTER the children's
        // side-effects. We can perform certain side-effects earlier if needed,
        // by doing multiple passes over the effect list. We don't want to
        // schedule our own side-effect on our own list because if end up
        // reusing children we'll schedule this effect onto itself since we're
        // at the end.


        var effectTag = workInProgress.effectTag; // Skip both NoWork and PerformedWork tags when creating the effect
        // list. PerformedWork effect is read by React DevTools but shouldn't be
        // committed.

        if (effectTag > PerformedWork) {
          if (returnFiber.lastEffect !== null) {
            returnFiber.lastEffect.nextEffect = workInProgress;
          } else {
            returnFiber.firstEffect = workInProgress;
          }

          returnFiber.lastEffect = workInProgress;
        }
      }
    } else {
      // This fiber did not complete because something threw. Pop values off
      // the stack without entering the complete phase. If this is a boundary,
      // capture values if possible.
      var _next = unwindWork(workInProgress); // Because this fiber did not complete, don't reset its expiration time.


      if ( (workInProgress.mode & ProfileMode) !== NoMode) {
        // Record the render duration for the fiber that errored.
        stopProfilerTimerIfRunningAndRecordDelta(workInProgress, false); // Include the time spent working on failed children before continuing.

        var actualDuration = workInProgress.actualDuration;
        var child = workInProgress.child;

        while (child !== null) {
          actualDuration += child.actualDuration;
          child = child.sibling;
        }

        workInProgress.actualDuration = actualDuration;
      }

      if (_next !== null) {
        // If completing this work spawned new work, do that next. We'll come
        // back here again.
        // Since we're restarting, remove anything that is not a host effect
        // from the effect tag.
        // TODO: The name stopFailedWorkTimer is misleading because Suspense
        // also captures and restarts.
        stopFailedWorkTimer(workInProgress);
        _next.effectTag &= HostEffectMask;
        return _next;
      }

      stopWorkTimer(workInProgress);

      if (returnFiber !== null) {
        // Mark the parent fiber as incomplete and clear its effect list.
        returnFiber.firstEffect = returnFiber.lastEffect = null;
        returnFiber.effectTag |= Incomplete;
      }
    }

    var siblingFiber = workInProgress.sibling;

    if (siblingFiber !== null) {
      // If there is more work to do in this returnFiber, do that next.
      return siblingFiber;
    } // Otherwise, return to the parent


    workInProgress = returnFiber;
  } while (workInProgress !== null); // We've reached the root.


  if (workInProgressRootExitStatus === RootIncomplete) {
    workInProgressRootExitStatus = RootCompleted;
  }

  return null;
}

function getRemainingExpirationTime(fiber) {
  var updateExpirationTime = fiber.expirationTime;
  var childExpirationTime = fiber.childExpirationTime;
  return updateExpirationTime > childExpirationTime ? updateExpirationTime : childExpirationTime;
}

function resetChildExpirationTime(completedWork) {
  if (renderExpirationTime$1 !== Never && completedWork.childExpirationTime === Never) {
    // The children of this component are hidden. Don't bubble their
    // expiration times.
    return;
  }

  var newChildExpirationTime = NoWork; // Bubble up the earliest expiration time.

  if ( (completedWork.mode & ProfileMode) !== NoMode) {
    // In profiling mode, resetChildExpirationTime is also used to reset
    // profiler durations.
    var actualDuration = completedWork.actualDuration;
    var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will
    // only be updated if work is done on the fiber (i.e. it doesn't bailout).
    // When work is done, it should bubble to the parent's actualDuration. If
    // the fiber has not been cloned though, (meaning no work was done), then
    // this value will reflect the amount of time spent working on a previous
    // render. In that case it should not bubble. We determine whether it was
    // cloned by comparing the child pointer.

    var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;
    var child = completedWork.child;

    while (child !== null) {
      var childUpdateExpirationTime = child.expirationTime;
      var childChildExpirationTime = child.childExpirationTime;

      if (childUpdateExpirationTime > newChildExpirationTime) {
        newChildExpirationTime = childUpdateExpirationTime;
      }

      if (childChildExpirationTime > newChildExpirationTime) {
        newChildExpirationTime = childChildExpirationTime;
      }

      if (shouldBubbleActualDurations) {
        actualDuration += child.actualDuration;
      }

      treeBaseDuration += child.treeBaseDuration;
      child = child.sibling;
    }

    completedWork.actualDuration = actualDuration;
    completedWork.treeBaseDuration = treeBaseDuration;
  } else {
    var _child = completedWork.child;

    while (_child !== null) {
      var _childUpdateExpirationTime = _child.expirationTime;
      var _childChildExpirationTime = _child.childExpirationTime;

      if (_childUpdateExpirationTime > newChildExpirationTime) {
        newChildExpirationTime = _childUpdateExpirationTime;
      }

      if (_childChildExpirationTime > newChildExpirationTime) {
        newChildExpirationTime = _childChildExpirationTime;
      }

      _child = _child.sibling;
    }
  }

  completedWork.childExpirationTime = newChildExpirationTime;
}

function commitRoot(root) {
  var renderPriorityLevel = getCurrentPriorityLevel();
  runWithPriority$1(ImmediatePriority, commitRootImpl.bind(null, root, renderPriorityLevel));
  return null;
}

function commitRootImpl(root, renderPriorityLevel) {
  do {
    // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
    // means `flushPassiveEffects` will sometimes result in additional
    // passive effects. So we need to keep flushing in a loop until there are
    // no more pending effects.
    // TODO: Might be better if `flushPassiveEffects` did not automatically
    // flush synchronous work at the end, to avoid factoring hazards like this.
    flushPassiveEffects();
  } while (rootWithPendingPassiveEffects !== null);

  flushRenderPhaseStrictModeWarningsInDEV();

  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
    {
      throw Error( "Should not already be working." );
    }
  }

  var finishedWork = root.finishedWork;
  var expirationTime = root.finishedExpirationTime;

  if (finishedWork === null) {
    return null;
  }

  root.finishedWork = null;
  root.finishedExpirationTime = NoWork;

  if (!(finishedWork !== root.current)) {
    {
      throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." );
    }
  } // commitRoot never returns a continuation; it always finishes synchronously.
  // So we can clear these now to allow a new callback to be scheduled.


  root.callbackNode = null;
  root.callbackExpirationTime = NoWork;
  root.callbackPriority = NoPriority;
  root.nextKnownPendingLevel = NoWork;
  startCommitTimer(); // Update the first and last pending times on this root. The new first
  // pending time is whatever is left on the root fiber.

  var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(finishedWork);
  markRootFinishedAtTime(root, expirationTime, remainingExpirationTimeBeforeCommit);

  if (root === workInProgressRoot) {
    // We can reset these now that they are finished.
    workInProgressRoot = null;
    workInProgress = null;
    renderExpirationTime$1 = NoWork;
  } // This indicates that the last root we worked on is not the same one that
  // we're committing now. This most commonly happens when a suspended root
  // times out.
  // Get the list of effects.


  var firstEffect;

  if (finishedWork.effectTag > PerformedWork) {
    // A fiber's effect list consists only of its children, not itself. So if
    // the root has an effect, we need to add it to the end of the list. The
    // resulting list is the set that would belong to the root's parent, if it
    // had one; that is, all the effects in the tree including the root.
    if (finishedWork.lastEffect !== null) {
      finishedWork.lastEffect.nextEffect = finishedWork;
      firstEffect = finishedWork.firstEffect;
    } else {
      firstEffect = finishedWork;
    }
  } else {
    // There is no effect on the root.
    firstEffect = finishedWork.firstEffect;
  }

  if (firstEffect !== null) {
    var prevExecutionContext = executionContext;
    executionContext |= CommitContext;
    var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles

    ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass
    // of the effect list for each phase: all mutation effects come before all
    // layout effects, and so on.
    // The first phase a "before mutation" phase. We use this phase to read the
    // state of the host tree right before we mutate it. This is where
    // getSnapshotBeforeUpdate is called.

    startCommitSnapshotEffectsTimer();
    prepareForCommit(root.containerInfo);
    nextEffect = firstEffect;

    do {
      {
        invokeGuardedCallback(null, commitBeforeMutationEffects, null);

        if (hasCaughtError()) {
          if (!(nextEffect !== null)) {
            {
              throw Error( "Should be working on an effect." );
            }
          }

          var error = clearCaughtError();
          captureCommitPhaseError(nextEffect, error);
          nextEffect = nextEffect.nextEffect;
        }
      }
    } while (nextEffect !== null);

    stopCommitSnapshotEffectsTimer();

    {
      // Mark the current commit time to be shared by all Profilers in this
      // batch. This enables them to be grouped later.
      recordCommitTime();
    } // The next phase is the mutation phase, where we mutate the host tree.


    startCommitHostEffectsTimer();
    nextEffect = firstEffect;

    do {
      {
        invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);

        if (hasCaughtError()) {
          if (!(nextEffect !== null)) {
            {
              throw Error( "Should be working on an effect." );
            }
          }

          var _error = clearCaughtError();

          captureCommitPhaseError(nextEffect, _error);
          nextEffect = nextEffect.nextEffect;
        }
      }
    } while (nextEffect !== null);

    stopCommitHostEffectsTimer();
    resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
    // the mutation phase, so that the previous tree is still current during
    // componentWillUnmount, but before the layout phase, so that the finished
    // work is current during componentDidMount/Update.

    root.current = finishedWork; // The next phase is the layout phase, where we call effects that read
    // the host tree after it's been mutated. The idiomatic use case for this is
    // layout, but class component lifecycles also fire here for legacy reasons.

    startCommitLifeCyclesTimer();
    nextEffect = firstEffect;

    do {
      {
        invokeGuardedCallback(null, commitLayoutEffects, null, root, expirationTime);

        if (hasCaughtError()) {
          if (!(nextEffect !== null)) {
            {
              throw Error( "Should be working on an effect." );
            }
          }

          var _error2 = clearCaughtError();

          captureCommitPhaseError(nextEffect, _error2);
          nextEffect = nextEffect.nextEffect;
        }
      }
    } while (nextEffect !== null);

    stopCommitLifeCyclesTimer();
    nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an
    // opportunity to paint.

    requestPaint();

    {
      popInteractions(prevInteractions);
    }

    executionContext = prevExecutionContext;
  } else {
    // No effects.
    root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
    // no effects.
    // TODO: Maybe there's a better way to report this.

    startCommitSnapshotEffectsTimer();
    stopCommitSnapshotEffectsTimer();

    {
      recordCommitTime();
    }

    startCommitHostEffectsTimer();
    stopCommitHostEffectsTimer();
    startCommitLifeCyclesTimer();
    stopCommitLifeCyclesTimer();
  }

  stopCommitTimer();
  var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;

  if (rootDoesHavePassiveEffects) {
    // This commit has passive effects. Stash a reference to them. But don't
    // schedule a callback until after flushing layout work.
    rootDoesHavePassiveEffects = false;
    rootWithPendingPassiveEffects = root;
    pendingPassiveEffectsExpirationTime = expirationTime;
    pendingPassiveEffectsRenderPriority = renderPriorityLevel;
  } else {
    // We are done with the effect chain at this point so let's clear the
    // nextEffect pointers to assist with GC. If we have passive effects, we'll
    // clear this in flushPassiveEffects.
    nextEffect = firstEffect;

    while (nextEffect !== null) {
      var nextNextEffect = nextEffect.nextEffect;
      nextEffect.nextEffect = null;
      nextEffect = nextNextEffect;
    }
  } // Check if there's remaining work on this root


  var remainingExpirationTime = root.firstPendingTime;

  if (remainingExpirationTime !== NoWork) {
    {
      if (spawnedWorkDuringRender !== null) {
        var expirationTimes = spawnedWorkDuringRender;
        spawnedWorkDuringRender = null;

        for (var i = 0; i < expirationTimes.length; i++) {
          scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);
        }
      }

      schedulePendingInteractions(root, remainingExpirationTime);
    }
  } else {
    // If there's no remaining work, we can clear the set of already failed
    // error boundaries.
    legacyErrorBoundariesThatAlreadyFailed = null;
  }

  {
    if (!rootDidHavePassiveEffects) {
      // If there are no passive effects, then we can complete the pending interactions.
      // Otherwise, we'll wait until after the passive effects are flushed.
      // Wait to do this until after remaining work has been scheduled,
      // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.
      finishPendingInteractions(root, expirationTime);
    }
  }

  if (remainingExpirationTime === Sync) {
    // Count the number of times the root synchronously re-renders without
    // finishing. If there are too many, it indicates an infinite update loop.
    if (root === rootWithNestedUpdates) {
      nestedUpdateCount++;
    } else {
      nestedUpdateCount = 0;
      rootWithNestedUpdates = root;
    }
  } else {
    nestedUpdateCount = 0;
  }

  onCommitRoot(finishedWork.stateNode, expirationTime); // Always call this before exiting `commitRoot`, to ensure that any
  // additional work on this root is scheduled.

  ensureRootIsScheduled(root);

  if (hasUncaughtError) {
    hasUncaughtError = false;
    var _error3 = firstUncaughtError;
    firstUncaughtError = null;
    throw _error3;
  }

  if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
    // This is a legacy edge case. We just committed the initial mount of
    // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired
    // synchronously, but layout updates should be deferred until the end
    // of the batch.
    return null;
  } // If layout work was scheduled, flush it now.


  flushSyncCallbackQueue();
  return null;
}

function commitBeforeMutationEffects() {
  while (nextEffect !== null) {
    var effectTag = nextEffect.effectTag;

    if ((effectTag & Snapshot) !== NoEffect) {
      setCurrentFiber(nextEffect);
      recordEffect();
      var current = nextEffect.alternate;
      commitBeforeMutationLifeCycles(current, nextEffect);
      resetCurrentFiber();
    }

    if ((effectTag & Passive) !== NoEffect) {
      // If there are passive effects, schedule a callback to flush at
      // the earliest opportunity.
      if (!rootDoesHavePassiveEffects) {
        rootDoesHavePassiveEffects = true;
        scheduleCallback(NormalPriority, function () {
          flushPassiveEffects();
          return null;
        });
      }
    }

    nextEffect = nextEffect.nextEffect;
  }
}

function commitMutationEffects(root, renderPriorityLevel) {
  // TODO: Should probably move the bulk of this function to commitWork.
  while (nextEffect !== null) {
    setCurrentFiber(nextEffect);
    var effectTag = nextEffect.effectTag;

    if (effectTag & ContentReset) {
      commitResetTextContent(nextEffect);
    }

    if (effectTag & Ref) {
      var current = nextEffect.alternate;

      if (current !== null) {
        commitDetachRef(current);
      }
    } // The following switch statement is only concerned about placement,
    // updates, and deletions. To avoid needing to add a case for every possible
    // bitmap value, we remove the secondary effects from the effect tag and
    // switch on that value.


    var primaryEffectTag = effectTag & (Placement | Update | Deletion | Hydrating);

    switch (primaryEffectTag) {
      case Placement:
        {
          commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
          // inserted, before any life-cycles like componentDidMount gets called.
          // TODO: findDOMNode doesn't rely on this any more but isMounted does
          // and isMounted is deprecated anyway so we should be able to kill this.

          nextEffect.effectTag &= ~Placement;
          break;
        }

      case PlacementAndUpdate:
        {
          // Placement
          commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
          // inserted, before any life-cycles like componentDidMount gets called.

          nextEffect.effectTag &= ~Placement; // Update

          var _current = nextEffect.alternate;
          commitWork(_current, nextEffect);
          break;
        }

      case Hydrating:
        {
          nextEffect.effectTag &= ~Hydrating;
          break;
        }

      case HydratingAndUpdate:
        {
          nextEffect.effectTag &= ~Hydrating; // Update

          var _current2 = nextEffect.alternate;
          commitWork(_current2, nextEffect);
          break;
        }

      case Update:
        {
          var _current3 = nextEffect.alternate;
          commitWork(_current3, nextEffect);
          break;
        }

      case Deletion:
        {
          commitDeletion(root, nextEffect, renderPriorityLevel);
          break;
        }
    } // TODO: Only record a mutation effect if primaryEffectTag is non-zero.


    recordEffect();
    resetCurrentFiber();
    nextEffect = nextEffect.nextEffect;
  }
}

function commitLayoutEffects(root, committedExpirationTime) {
  // TODO: Should probably move the bulk of this function to commitWork.
  while (nextEffect !== null) {
    setCurrentFiber(nextEffect);
    var effectTag = nextEffect.effectTag;

    if (effectTag & (Update | Callback)) {
      recordEffect();
      var current = nextEffect.alternate;
      commitLifeCycles(root, current, nextEffect);
    }

    if (effectTag & Ref) {
      recordEffect();
      commitAttachRef(nextEffect);
    }

    resetCurrentFiber();
    nextEffect = nextEffect.nextEffect;
  }
}

function flushPassiveEffects() {
  if (pendingPassiveEffectsRenderPriority !== NoPriority) {
    var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority ? NormalPriority : pendingPassiveEffectsRenderPriority;
    pendingPassiveEffectsRenderPriority = NoPriority;
    return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
  }
}

function flushPassiveEffectsImpl() {
  if (rootWithPendingPassiveEffects === null) {
    return false;
  }

  var root = rootWithPendingPassiveEffects;
  var expirationTime = pendingPassiveEffectsExpirationTime;
  rootWithPendingPassiveEffects = null;
  pendingPassiveEffectsExpirationTime = NoWork;

  if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
    {
      throw Error( "Cannot flush passive effects while already rendering." );
    }
  }

  var prevExecutionContext = executionContext;
  executionContext |= CommitContext;
  var prevInteractions = pushInteractions(root);

  {
    // Note: This currently assumes there are no passive effects on the root fiber
    // because the root is not part of its own effect list.
    // This could change in the future.
    var _effect2 = root.current.firstEffect;

    while (_effect2 !== null) {
      {
        setCurrentFiber(_effect2);
        invokeGuardedCallback(null, commitPassiveHookEffects, null, _effect2);

        if (hasCaughtError()) {
          if (!(_effect2 !== null)) {
            {
              throw Error( "Should be working on an effect." );
            }
          }

          var _error5 = clearCaughtError();

          captureCommitPhaseError(_effect2, _error5);
        }

        resetCurrentFiber();
      }

      var nextNextEffect = _effect2.nextEffect; // Remove nextEffect pointer to assist GC

      _effect2.nextEffect = null;
      _effect2 = nextNextEffect;
    }
  }

  {
    popInteractions(prevInteractions);
    finishPendingInteractions(root, expirationTime);
  }

  executionContext = prevExecutionContext;
  flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this
  // exceeds the limit, we'll fire a warning.

  nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;
  return true;
}

function isAlreadyFailedLegacyErrorBoundary(instance) {
  return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
}
function markLegacyErrorBoundaryAsFailed(instance) {
  if (legacyErrorBoundariesThatAlreadyFailed === null) {
    legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
  } else {
    legacyErrorBoundariesThatAlreadyFailed.add(instance);
  }
}

function prepareToThrowUncaughtError(error) {
  if (!hasUncaughtError) {
    hasUncaughtError = true;
    firstUncaughtError = error;
  }
}

var onUncaughtError = prepareToThrowUncaughtError;

function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  var errorInfo = createCapturedValue(error, sourceFiber);
  var update = createRootErrorUpdate(rootFiber, errorInfo, Sync);
  enqueueUpdate(rootFiber, update);
  var root = markUpdateTimeFromFiberToRoot(rootFiber, Sync);

  if (root !== null) {
    ensureRootIsScheduled(root);
    schedulePendingInteractions(root, Sync);
  }
}

function captureCommitPhaseError(sourceFiber, error) {
  if (sourceFiber.tag === HostRoot) {
    // Error was thrown at the root. There is no parent, so the root
    // itself should capture it.
    captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
    return;
  }

  var fiber = sourceFiber.return;

  while (fiber !== null) {
    if (fiber.tag === HostRoot) {
      captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
      return;
    } else if (fiber.tag === ClassComponent) {
      var ctor = fiber.type;
      var instance = fiber.stateNode;

      if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
        var errorInfo = createCapturedValue(error, sourceFiber);
        var update = createClassErrorUpdate(fiber, errorInfo, // TODO: This is always sync
        Sync);
        enqueueUpdate(fiber, update);
        var root = markUpdateTimeFromFiberToRoot(fiber, Sync);

        if (root !== null) {
          ensureRootIsScheduled(root);
          schedulePendingInteractions(root, Sync);
        }

        return;
      }
    }

    fiber = fiber.return;
  }
}
function pingSuspendedRoot(root, thenable, suspendedTime) {
  var pingCache = root.pingCache;

  if (pingCache !== null) {
    // The thenable resolved, so we no longer need to memoize, because it will
    // never be thrown again.
    pingCache.delete(thenable);
  }

  if (workInProgressRoot === root && renderExpirationTime$1 === suspendedTime) {
    // Received a ping at the same priority level at which we're currently
    // rendering. We might want to restart this render. This should mirror
    // the logic of whether or not a root suspends once it completes.
    // TODO: If we're rendering sync either due to Sync, Batched or expired,
    // we should probably never restart.
    // If we're suspended with delay, we'll always suspend so we can always
    // restart. If we're suspended without any updates, it might be a retry.
    // If it's early in the retry we can restart. We can't know for sure
    // whether we'll eventually process an update during this render pass,
    // but it's somewhat unlikely that we get to a ping before that, since
    // getting to the root most update is usually very fast.
    if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && workInProgressRootLatestProcessedExpirationTime === Sync && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
      // Restart from the root. Don't need to schedule a ping because
      // we're already working on this tree.
      prepareFreshStack(root, renderExpirationTime$1);
    } else {
      // Even though we can't restart right now, we might get an
      // opportunity later. So we mark this render as having a ping.
      workInProgressRootHasPendingPing = true;
    }

    return;
  }

  if (!isRootSuspendedAtTime(root, suspendedTime)) {
    // The root is no longer suspended at this time.
    return;
  }

  var lastPingedTime = root.lastPingedTime;

  if (lastPingedTime !== NoWork && lastPingedTime < suspendedTime) {
    // There's already a lower priority ping scheduled.
    return;
  } // Mark the time at which this ping was scheduled.


  root.lastPingedTime = suspendedTime;

  ensureRootIsScheduled(root);
  schedulePendingInteractions(root, suspendedTime);
}

function retryTimedOutBoundary(boundaryFiber, retryTime) {
  // The boundary fiber (a Suspense component or SuspenseList component)
  // previously was rendered in its fallback state. One of the promises that
  // suspended it has resolved, which means at least part of the tree was
  // likely unblocked. Try rendering again, at a new expiration time.
  if (retryTime === NoWork) {
    var suspenseConfig = null; // Retries don't carry over the already committed update.

    var currentTime = requestCurrentTimeForUpdate();
    retryTime = computeExpirationForFiber(currentTime, boundaryFiber, suspenseConfig);
  } // TODO: Special case idle priority?


  var root = markUpdateTimeFromFiberToRoot(boundaryFiber, retryTime);

  if (root !== null) {
    ensureRootIsScheduled(root);
    schedulePendingInteractions(root, retryTime);
  }
}
function resolveRetryThenable(boundaryFiber, thenable) {
  var retryTime = NoWork; // Default

  var retryCache;

  {
    retryCache = boundaryFiber.stateNode;
  }

  if (retryCache !== null) {
    // The thenable resolved, so we no longer need to memoize, because it will
    // never be thrown again.
    retryCache.delete(thenable);
  }

  retryTimedOutBoundary(boundaryFiber, retryTime);
} // Computes the next Just Noticeable Difference (JND) boundary.
// The theory is that a person can't tell the difference between small differences in time.
// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
// difference in the experience. However, waiting for longer might mean that we can avoid
// showing an intermediate loading state. The longer we have already waited, the harder it
// is to tell small differences in time. Therefore, the longer we've already waited,
// the longer we can wait additionally. At some point we have to give up though.
// We pick a train model where the next boundary commits at a consistent schedule.
// These particular numbers are vague estimates. We expect to adjust them based on research.

function jnd(timeElapsed) {
  return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
}

function computeMsUntilSuspenseLoadingDelay(mostRecentEventTime, committedExpirationTime, suspenseConfig) {
  var busyMinDurationMs = suspenseConfig.busyMinDurationMs | 0;

  if (busyMinDurationMs <= 0) {
    return 0;
  }

  var busyDelayMs = suspenseConfig.busyDelayMs | 0; // Compute the time until this render pass would expire.

  var currentTimeMs = now();
  var eventTimeMs = inferTimeFromExpirationTimeWithSuspenseConfig(mostRecentEventTime, suspenseConfig);
  var timeElapsed = currentTimeMs - eventTimeMs;

  if (timeElapsed <= busyDelayMs) {
    // If we haven't yet waited longer than the initial delay, we don't
    // have to wait any additional time.
    return 0;
  }

  var msUntilTimeout = busyDelayMs + busyMinDurationMs - timeElapsed; // This is the value that is passed to `setTimeout`.

  return msUntilTimeout;
}

function checkForNestedUpdates() {
  if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
    nestedUpdateCount = 0;
    rootWithNestedUpdates = null;

    {
      {
        throw Error( "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." );
      }
    }
  }

  {
    if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
      nestedPassiveUpdateCount = 0;

      error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');
    }
  }
}

function flushRenderPhaseStrictModeWarningsInDEV() {
  {
    ReactStrictModeWarnings.flushLegacyContextWarning();

    {
      ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
    }
  }
}

function stopFinishedWorkLoopTimer() {
  var didCompleteRoot = true;
  stopWorkLoopTimer(interruptedBy, didCompleteRoot);
  interruptedBy = null;
}

function stopInterruptedWorkLoopTimer() {
  // TODO: Track which fiber caused the interruption.
  var didCompleteRoot = false;
  stopWorkLoopTimer(interruptedBy, didCompleteRoot);
  interruptedBy = null;
}

function checkForInterruption(fiberThatReceivedUpdate, updateExpirationTime) {
  if ( workInProgressRoot !== null && updateExpirationTime > renderExpirationTime$1) {
    interruptedBy = fiberThatReceivedUpdate;
  }
}

var didWarnStateUpdateForUnmountedComponent = null;

function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
  {
    var tag = fiber.tag;

    if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
      // Only warn for user-defined components, not internal ones like Suspense.
      return;
    }
    // the problematic code almost always lies inside that component.


    var componentName = getComponentName(fiber.type) || 'ReactComponent';

    if (didWarnStateUpdateForUnmountedComponent !== null) {
      if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
        return;
      }

      didWarnStateUpdateForUnmountedComponent.add(componentName);
    } else {
      didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
    }

    error("Can't perform a React state update 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 %s.%s', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function', getStackByFiberInDevAndProd(fiber));
  }
}

var beginWork$1;

{
  var dummyFiber = null;

  beginWork$1 = function (current, unitOfWork, expirationTime) {
    // If a component throws an error, we replay it again in a synchronously
    // dispatched event, so that the debugger will treat it as an uncaught
    // error See ReactErrorUtils for more information.
    // Before entering the begin phase, copy the work-in-progress onto a dummy
    // fiber. If beginWork throws, we'll use this to reset the state.
    var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);

    try {
      return beginWork(current, unitOfWork, expirationTime);
    } catch (originalError) {
      if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
        // Don't replay promises. Treat everything else like an error.
        throw originalError;
      } // Keep this code in sync with handleError; any changes here must have
      // corresponding changes there.


      resetContextDependencies();
      resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the
      // same fiber again.
      // Unwind the failed stack frame

      unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.

      assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);

      if ( unitOfWork.mode & ProfileMode) {
        // Reset the profiler timer.
        startProfilerTimer(unitOfWork);
      } // Run beginWork again.


      invokeGuardedCallback(null, beginWork, null, current, unitOfWork, expirationTime);

      if (hasCaughtError()) {
        var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
        // Rethrow this error instead of the original one.

        throw replayError;
      } else {
        // This branch is reachable if the render phase is impure.
        throw originalError;
      }
    }
  };
}

var didWarnAboutUpdateInRender = false;
var didWarnAboutUpdateInRenderForAnotherComponent;

{
  didWarnAboutUpdateInRenderForAnotherComponent = new Set();
}

function warnAboutRenderPhaseUpdatesInDEV(fiber) {
  {
    if (isRendering && (executionContext & RenderContext) !== NoContext) {
      switch (fiber.tag) {
        case FunctionComponent:
        case ForwardRef:
        case SimpleMemoComponent:
          {
            var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.

            var dedupeKey = renderingComponentName;

            if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
              didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
              var setStateComponentName = getComponentName(fiber.type) || 'Unknown';

              error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://fb.me/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
            }

            break;
          }

        case ClassComponent:
          {
            if (!didWarnAboutUpdateInRender) {
              error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');

              didWarnAboutUpdateInRender = true;
            }

            break;
          }
      }
    }
  }
} // a 'shared' variable that changes when act() opens/closes in tests.


var IsThisRendererActing = {
  current: false
};
function warnIfNotScopedWithMatchingAct(fiber) {
  {
    if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
      error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + "import {act} from 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + "import TestRenderer from 'react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);' + '%s', getStackByFiberInDevAndProd(fiber));
    }
  }
}
function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
  {
    if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
      error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + '  /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
    }
  }
}

function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
  {
    if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
      error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + '  /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://fb.me/react-wrap-tests-with-act' + '%s', getComponentName(fiber.type), getStackByFiberInDevAndProd(fiber));
    }
  }
}

var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.

var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked
// scheduler is the actual recommendation. The alternative could be a testing build,
// a new lib, or whatever; we dunno just yet. This message is for early adopters
// to get their tests right.

function warnIfUnmockedScheduler(fiber) {
  {
    if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {
      if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
        didWarnAboutUnmockedScheduler = true;

        error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + "jest.mock('scheduler', () => require('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://fb.me/react-mock-scheduler');
      }
    }
  }
}

function computeThreadID(root, expirationTime) {
  // Interaction threads are unique per root and expiration time.
  return expirationTime * 1000 + root.interactionThreadID;
}

function markSpawnedWork(expirationTime) {

  if (spawnedWorkDuringRender === null) {
    spawnedWorkDuringRender = [expirationTime];
  } else {
    spawnedWorkDuringRender.push(expirationTime);
  }
}

function scheduleInteractions(root, expirationTime, interactions) {

  if (interactions.size > 0) {
    var pendingInteractionMap = root.pendingInteractionMap;
    var pendingInteractions = pendingInteractionMap.get(expirationTime);

    if (pendingInteractions != null) {
      interactions.forEach(function (interaction) {
        if (!pendingInteractions.has(interaction)) {
          // Update the pending async work count for previously unscheduled interaction.
          interaction.__count++;
        }

        pendingInteractions.add(interaction);
      });
    } else {
      pendingInteractionMap.set(expirationTime, new Set(interactions)); // Update the pending async work count for the current interactions.

      interactions.forEach(function (interaction) {
        interaction.__count++;
      });
    }

    var subscriber = tracing.__subscriberRef.current;

    if (subscriber !== null) {
      var threadID = computeThreadID(root, expirationTime);
      subscriber.onWorkScheduled(interactions, threadID);
    }
  }
}

function schedulePendingInteractions(root, expirationTime) {

  scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);
}

function startWorkOnPendingInteractions(root, expirationTime) {
  // we can accurately attribute time spent working on it, And so that cascading
  // work triggered during the render phase will be associated with it.


  var interactions = new Set();
  root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
    if (scheduledExpirationTime >= expirationTime) {
      scheduledInteractions.forEach(function (interaction) {
        return interactions.add(interaction);
      });
    }
  }); // Store the current set of interactions on the FiberRoot for a few reasons:
  // We can re-use it in hot functions like performConcurrentWorkOnRoot()
  // without having to recalculate it. We will also use it in commitWork() to
  // pass to any Profiler onRender() hooks. This also provides DevTools with a
  // way to access it when the onCommitRoot() hook is called.

  root.memoizedInteractions = interactions;

  if (interactions.size > 0) {
    var subscriber = tracing.__subscriberRef.current;

    if (subscriber !== null) {
      var threadID = computeThreadID(root, expirationTime);

      try {
        subscriber.onWorkStarted(interactions, threadID);
      } catch (error) {
        // If the subscriber throws, rethrow it in a separate task
        scheduleCallback(ImmediatePriority, function () {
          throw error;
        });
      }
    }
  }
}

function finishPendingInteractions(root, committedExpirationTime) {

  var earliestRemainingTimeAfterCommit = root.firstPendingTime;
  var subscriber;

  try {
    subscriber = tracing.__subscriberRef.current;

    if (subscriber !== null && root.memoizedInteractions.size > 0) {
      var threadID = computeThreadID(root, committedExpirationTime);
      subscriber.onWorkStopped(root.memoizedInteractions, threadID);
    }
  } catch (error) {
    // If the subscriber throws, rethrow it in a separate task
    scheduleCallback(ImmediatePriority, function () {
      throw error;
    });
  } finally {
    // Clear completed interactions from the pending Map.
    // Unless the render was suspended or cascading work was scheduled,
    // In which case– leave pending interactions until the subsequent render.
    var pendingInteractionMap = root.pendingInteractionMap;
    pendingInteractionMap.forEach(function (scheduledInteractions, scheduledExpirationTime) {
      // Only decrement the pending interaction count if we're done.
      // If there's still work at the current priority,
      // That indicates that we are waiting for suspense data.
      if (scheduledExpirationTime > earliestRemainingTimeAfterCommit) {
        pendingInteractionMap.delete(scheduledExpirationTime);
        scheduledInteractions.forEach(function (interaction) {
          interaction.__count--;

          if (subscriber !== null && interaction.__count === 0) {
            try {
              subscriber.onInteractionScheduledWorkCompleted(interaction);
            } catch (error) {
              // If the subscriber throws, rethrow it in a separate task
              scheduleCallback(ImmediatePriority, function () {
                throw error;
              });
            }
          }
        });
      }
    });
  }
}

var onScheduleFiberRoot = null;
var onCommitFiberRoot = null;
var onCommitFiberUnmount = null;
var hasLoggedError = false;
var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
function injectInternals(internals) {
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
    // No DevTools
    return false;
  }

  var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;

  if (hook.isDisabled) {
    // This isn't a real property on the hook, but it can be set to opt out
    // of DevTools integration and associated warnings and logs.
    // https://github.com/facebook/react/issues/3877
    return true;
  }

  if (!hook.supportsFiber) {
    {
      error('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');
    } // DevTools exists, even though it doesn't support Fiber.


    return true;
  }

  try {
    var rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.

    if (true) {
      // Only used by Fast Refresh
      if (typeof hook.onScheduleFiberRoot === 'function') {
        onScheduleFiberRoot = function (root, children) {
          try {
            hook.onScheduleFiberRoot(rendererID, root, children);
          } catch (err) {
            if (true && !hasLoggedError) {
              hasLoggedError = true;

              error('React instrumentation encountered an error: %s', err);
            }
          }
        };
      }
    }

    onCommitFiberRoot = function (root, expirationTime) {
      try {
        var didError = (root.current.effectTag & DidCapture) === DidCapture;

        if (enableProfilerTimer) {
          var currentTime = getCurrentTime();
          var priorityLevel = inferPriorityFromExpirationTime(currentTime, expirationTime);
          hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
        } else {
          hook.onCommitFiberRoot(rendererID, root, undefined, didError);
        }
      } catch (err) {
        if (true) {
          if (!hasLoggedError) {
            hasLoggedError = true;

            error('React instrumentation encountered an error: %s', err);
          }
        }
      }
    };

    onCommitFiberUnmount = function (fiber) {
      try {
        hook.onCommitFiberUnmount(rendererID, fiber);
      } catch (err) {
        if (true) {
          if (!hasLoggedError) {
            hasLoggedError = true;

            error('React instrumentation encountered an error: %s', err);
          }
        }
      }
    };
  } catch (err) {
    // Catch all errors because it is unsafe to throw during initialization.
    {
      error('React instrumentation encountered an error: %s.', err);
    }
  } // DevTools exists


  return true;
}
function onScheduleRoot(root, children) {
  if (typeof onScheduleFiberRoot === 'function') {
    onScheduleFiberRoot(root, children);
  }
}
function onCommitRoot(root, expirationTime) {
  if (typeof onCommitFiberRoot === 'function') {
    onCommitFiberRoot(root, expirationTime);
  }
}
function onCommitUnmount(fiber) {
  if (typeof onCommitFiberUnmount === 'function') {
    onCommitFiberUnmount(fiber);
  }
}

var hasBadMapPolyfill;

{
  hasBadMapPolyfill = false;

  try {
    var nonExtensibleObject = Object.preventExtensions({});
    var testMap = new Map([[nonExtensibleObject, null]]);
    var testSet = new Set([nonExtensibleObject]); // This is necessary for Rollup to not consider these unused.
    // https://github.com/rollup/rollup/issues/1771
    // TODO: we can remove these if Rollup fixes the bug.

    testMap.set(0, 0);
    testSet.add(0);
  } catch (e) {
    // TODO: Consider warning about bad polyfills
    hasBadMapPolyfill = true;
  }
}

var debugCounter = 1;

function FiberNode(tag, pendingProps, key, mode) {
  // Instance
  this.tag = tag;
  this.key = key;
  this.elementType = null;
  this.type = null;
  this.stateNode = null; // Fiber

  this.return = null;
  this.child = null;
  this.sibling = null;
  this.index = 0;
  this.ref = null;
  this.pendingProps = pendingProps;
  this.memoizedProps = null;
  this.updateQueue = null;
  this.memoizedState = null;
  this.dependencies = null;
  this.mode = mode; // Effects

  this.effectTag = NoEffect;
  this.nextEffect = null;
  this.firstEffect = null;
  this.lastEffect = null;
  this.expirationTime = NoWork;
  this.childExpirationTime = NoWork;
  this.alternate = null;

  {
    // Note: The following is done to avoid a v8 performance cliff.
    //
    // Initializing the fields below to smis and later updating them with
    // double values will cause Fibers to end up having separate shapes.
    // This behavior/bug has something to do with Object.preventExtension().
    // Fortunately this only impacts DEV builds.
    // Unfortunately it makes React unusably slow for some applications.
    // To work around this, initialize the fields below with doubles.
    //
    // Learn more about this here:
    // https://github.com/facebook/react/issues/14365
    // https://bugs.chromium.org/p/v8/issues/detail?id=8538
    this.actualDuration = Number.NaN;
    this.actualStartTime = Number.NaN;
    this.selfBaseDuration = Number.NaN;
    this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.
    // This won't trigger the performance cliff mentioned above,
    // and it simplifies other profiler code (including DevTools).

    this.actualDuration = 0;
    this.actualStartTime = -1;
    this.selfBaseDuration = 0;
    this.treeBaseDuration = 0;
  } // This is normally DEV-only except www when it adds listeners.
  // TODO: remove the User Timing integration in favor of Root Events.


  {
    this._debugID = debugCounter++;
    this._debugIsCurrentlyTiming = false;
  }

  {
    this._debugSource = null;
    this._debugOwner = null;
    this._debugNeedsRemount = false;
    this._debugHookTypes = null;

    if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
      Object.preventExtensions(this);
    }
  }
} // This is a constructor function, rather than a POJO constructor, still
// please ensure we do the following:
// 1) Nobody should add any instance methods on this. Instance methods can be
//    more difficult to predict when they get optimized and they are almost
//    never inlined properly in static compilers.
// 2) Nobody should rely on `instanceof Fiber` for type testing. We should
//    always know when it is a fiber.
// 3) We might want to experiment with using numeric keys since they are easier
//    to optimize in a non-JIT environment.
// 4) We can easily go from a constructor to a createFiber object literal if that
//    is faster.
// 5) It should be easy to port this to a C struct and keep a C implementation
//    compatible.


var createFiber = function (tag, pendingProps, key, mode) {
  // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
  return new FiberNode(tag, pendingProps, key, mode);
};

function shouldConstruct(Component) {
  var prototype = Component.prototype;
  return !!(prototype && prototype.isReactComponent);
}

function isSimpleFunctionComponent(type) {
  return typeof type === 'function' && !shouldConstruct(type) && type.defaultProps === undefined;
}
function resolveLazyComponentTag(Component) {
  if (typeof Component === 'function') {
    return shouldConstruct(Component) ? ClassComponent : FunctionComponent;
  } else if (Component !== undefined && Component !== null) {
    var $$typeof = Component.$$typeof;

    if ($$typeof === REACT_FORWARD_REF_TYPE) {
      return ForwardRef;
    }

    if ($$typeof === REACT_MEMO_TYPE) {
      return MemoComponent;
    }
  }

  return IndeterminateComponent;
} // This is used to create an alternate fiber to do work on.

function createWorkInProgress(current, pendingProps) {
  var workInProgress = current.alternate;

  if (workInProgress === null) {
    // We use a double buffering pooling technique because we know that we'll
    // only ever need at most two versions of a tree. We pool the "other" unused
    // node that we're free to reuse. This is lazily created to avoid allocating
    // extra objects for things that are never updated. It also allow us to
    // reclaim the extra memory if needed.
    workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
    workInProgress.elementType = current.elementType;
    workInProgress.type = current.type;
    workInProgress.stateNode = current.stateNode;

    {
      // DEV-only fields
      {
        workInProgress._debugID = current._debugID;
      }

      workInProgress._debugSource = current._debugSource;
      workInProgress._debugOwner = current._debugOwner;
      workInProgress._debugHookTypes = current._debugHookTypes;
    }

    workInProgress.alternate = current;
    current.alternate = workInProgress;
  } else {
    workInProgress.pendingProps = pendingProps; // We already have an alternate.
    // Reset the effect tag.

    workInProgress.effectTag = NoEffect; // The effect list is no longer valid.

    workInProgress.nextEffect = null;
    workInProgress.firstEffect = null;
    workInProgress.lastEffect = null;

    {
      // We intentionally reset, rather than copy, actualDuration & actualStartTime.
      // This prevents time from endlessly accumulating in new commits.
      // This has the downside of resetting values for different priority renders,
      // But works for yielding (the common case) and should support resuming.
      workInProgress.actualDuration = 0;
      workInProgress.actualStartTime = -1;
    }
  }

  workInProgress.childExpirationTime = current.childExpirationTime;
  workInProgress.expirationTime = current.expirationTime;
  workInProgress.child = current.child;
  workInProgress.memoizedProps = current.memoizedProps;
  workInProgress.memoizedState = current.memoizedState;
  workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
  // it cannot be shared with the current fiber.

  var currentDependencies = current.dependencies;
  workInProgress.dependencies = currentDependencies === null ? null : {
    expirationTime: currentDependencies.expirationTime,
    firstContext: currentDependencies.firstContext,
    responders: currentDependencies.responders
  }; // These will be overridden during the parent's reconciliation

  workInProgress.sibling = current.sibling;
  workInProgress.index = current.index;
  workInProgress.ref = current.ref;

  {
    workInProgress.selfBaseDuration = current.selfBaseDuration;
    workInProgress.treeBaseDuration = current.treeBaseDuration;
  }

  {
    workInProgress._debugNeedsRemount = current._debugNeedsRemount;

    switch (workInProgress.tag) {
      case IndeterminateComponent:
      case FunctionComponent:
      case SimpleMemoComponent:
        workInProgress.type = resolveFunctionForHotReloading(current.type);
        break;

      case ClassComponent:
        workInProgress.type = resolveClassForHotReloading(current.type);
        break;

      case ForwardRef:
        workInProgress.type = resolveForwardRefForHotReloading(current.type);
        break;
    }
  }

  return workInProgress;
} // Used to reuse a Fiber for a second pass.

function resetWorkInProgress(workInProgress, renderExpirationTime) {
  // This resets the Fiber to what createFiber or createWorkInProgress would
  // have set the values to before during the first pass. Ideally this wouldn't
  // be necessary but unfortunately many code paths reads from the workInProgress
  // when they should be reading from current and writing to workInProgress.
  // We assume pendingProps, index, key, ref, return are still untouched to
  // avoid doing another reconciliation.
  // Reset the effect tag but keep any Placement tags, since that's something
  // that child fiber is setting, not the reconciliation.
  workInProgress.effectTag &= Placement; // The effect list is no longer valid.

  workInProgress.nextEffect = null;
  workInProgress.firstEffect = null;
  workInProgress.lastEffect = null;
  var current = workInProgress.alternate;

  if (current === null) {
    // Reset to createFiber's initial values.
    workInProgress.childExpirationTime = NoWork;
    workInProgress.expirationTime = renderExpirationTime;
    workInProgress.child = null;
    workInProgress.memoizedProps = null;
    workInProgress.memoizedState = null;
    workInProgress.updateQueue = null;
    workInProgress.dependencies = null;

    {
      // Note: We don't reset the actualTime counts. It's useful to accumulate
      // actual time across multiple render passes.
      workInProgress.selfBaseDuration = 0;
      workInProgress.treeBaseDuration = 0;
    }
  } else {
    // Reset to the cloned values that createWorkInProgress would've.
    workInProgress.childExpirationTime = current.childExpirationTime;
    workInProgress.expirationTime = current.expirationTime;
    workInProgress.child = current.child;
    workInProgress.memoizedProps = current.memoizedProps;
    workInProgress.memoizedState = current.memoizedState;
    workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
    // it cannot be shared with the current fiber.

    var currentDependencies = current.dependencies;
    workInProgress.dependencies = currentDependencies === null ? null : {
      expirationTime: currentDependencies.expirationTime,
      firstContext: currentDependencies.firstContext,
      responders: currentDependencies.responders
    };

    {
      // Note: We don't reset the actualTime counts. It's useful to accumulate
      // actual time across multiple render passes.
      workInProgress.selfBaseDuration = current.selfBaseDuration;
      workInProgress.treeBaseDuration = current.treeBaseDuration;
    }
  }

  return workInProgress;
}
function createHostRootFiber(tag) {
  var mode;

  if (tag === ConcurrentRoot) {
    mode = ConcurrentMode | BlockingMode | StrictMode;
  } else if (tag === BlockingRoot) {
    mode = BlockingMode | StrictMode;
  } else {
    mode = NoMode;
  }

  if ( isDevToolsPresent) {
    // Always collect profile timings when DevTools are present.
    // This enables DevTools to start capturing timing at any point–
    // Without some nodes in the tree having empty base times.
    mode |= ProfileMode;
  }

  return createFiber(HostRoot, null, null, mode);
}
function createFiberFromTypeAndProps(type, // React$ElementType
key, pendingProps, owner, mode, expirationTime) {
  var fiber;
  var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.

  var resolvedType = type;

  if (typeof type === 'function') {
    if (shouldConstruct(type)) {
      fiberTag = ClassComponent;

      {
        resolvedType = resolveClassForHotReloading(resolvedType);
      }
    } else {
      {
        resolvedType = resolveFunctionForHotReloading(resolvedType);
      }
    }
  } else if (typeof type === 'string') {
    fiberTag = HostComponent;
  } else {
    getTag: switch (type) {
      case REACT_FRAGMENT_TYPE:
        return createFiberFromFragment(pendingProps.children, mode, expirationTime, key);

      case REACT_CONCURRENT_MODE_TYPE:
        fiberTag = Mode;
        mode |= ConcurrentMode | BlockingMode | StrictMode;
        break;

      case REACT_STRICT_MODE_TYPE:
        fiberTag = Mode;
        mode |= StrictMode;
        break;

      case REACT_PROFILER_TYPE:
        return createFiberFromProfiler(pendingProps, mode, expirationTime, key);

      case REACT_SUSPENSE_TYPE:
        return createFiberFromSuspense(pendingProps, mode, expirationTime, key);

      case REACT_SUSPENSE_LIST_TYPE:
        return createFiberFromSuspenseList(pendingProps, mode, expirationTime, key);

      default:
        {
          if (typeof type === 'object' && type !== null) {
            switch (type.$$typeof) {
              case REACT_PROVIDER_TYPE:
                fiberTag = ContextProvider;
                break getTag;

              case REACT_CONTEXT_TYPE:
                // This is a consumer
                fiberTag = ContextConsumer;
                break getTag;

              case REACT_FORWARD_REF_TYPE:
                fiberTag = ForwardRef;

                {
                  resolvedType = resolveForwardRefForHotReloading(resolvedType);
                }

                break getTag;

              case REACT_MEMO_TYPE:
                fiberTag = MemoComponent;
                break getTag;

              case REACT_LAZY_TYPE:
                fiberTag = LazyComponent;
                resolvedType = null;
                break getTag;

              case REACT_BLOCK_TYPE:
                fiberTag = Block;
                break getTag;

            }
          }

          var info = '';

          {
            if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
              info += ' 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 ownerName = owner ? getComponentName(owner.type) : null;

            if (ownerName) {
              info += '\n\nCheck the render method of `' + ownerName + '`.';
            }
          }

          {
            {
              throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (type == null ? type : typeof type) + "." + info );
            }
          }
        }
    }
  }

  fiber = createFiber(fiberTag, pendingProps, key, mode);
  fiber.elementType = type;
  fiber.type = resolvedType;
  fiber.expirationTime = expirationTime;
  return fiber;
}
function createFiberFromElement(element, mode, expirationTime) {
  var owner = null;

  {
    owner = element._owner;
  }

  var type = element.type;
  var key = element.key;
  var pendingProps = element.props;
  var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, expirationTime);

  {
    fiber._debugSource = element._source;
    fiber._debugOwner = element._owner;
  }

  return fiber;
}
function createFiberFromFragment(elements, mode, expirationTime, key) {
  var fiber = createFiber(Fragment, elements, key, mode);
  fiber.expirationTime = expirationTime;
  return fiber;
}

function createFiberFromProfiler(pendingProps, mode, expirationTime, key) {
  {
    if (typeof pendingProps.id !== 'string' || typeof pendingProps.onRender !== 'function') {
      error('Profiler must specify an "id" string and "onRender" function as props');
    }
  }

  var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.

  fiber.elementType = REACT_PROFILER_TYPE;
  fiber.type = REACT_PROFILER_TYPE;
  fiber.expirationTime = expirationTime;
  return fiber;
}

function createFiberFromSuspense(pendingProps, mode, expirationTime, key) {
  var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
  // This needs to be fixed in getComponentName so that it relies on the tag
  // instead.

  fiber.type = REACT_SUSPENSE_TYPE;
  fiber.elementType = REACT_SUSPENSE_TYPE;
  fiber.expirationTime = expirationTime;
  return fiber;
}
function createFiberFromSuspenseList(pendingProps, mode, expirationTime, key) {
  var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);

  {
    // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.
    // This needs to be fixed in getComponentName so that it relies on the tag
    // instead.
    fiber.type = REACT_SUSPENSE_LIST_TYPE;
  }

  fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
  fiber.expirationTime = expirationTime;
  return fiber;
}
function createFiberFromText(content, mode, expirationTime) {
  var fiber = createFiber(HostText, content, null, mode);
  fiber.expirationTime = expirationTime;
  return fiber;
}
function createFiberFromHostInstanceForDeletion() {
  var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.

  fiber.elementType = 'DELETED';
  fiber.type = 'DELETED';
  return fiber;
}
function createFiberFromPortal(portal, mode, expirationTime) {
  var pendingProps = portal.children !== null ? portal.children : [];
  var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
  fiber.expirationTime = expirationTime;
  fiber.stateNode = {
    containerInfo: portal.containerInfo,
    pendingChildren: null,
    // Used by persistent updates
    implementation: portal.implementation
  };
  return fiber;
} // Used for stashing WIP properties to replay failed work in DEV.

function assignFiberPropertiesInDEV(target, source) {
  if (target === null) {
    // This Fiber's initial properties will always be overwritten.
    // We only use a Fiber to ensure the same hidden class so DEV isn't slow.
    target = createFiber(IndeterminateComponent, null, null, NoMode);
  } // This is intentionally written as a list of all properties.
  // We tried to use Object.assign() instead but this is called in
  // the hottest path, and Object.assign() was too slow:
  // https://github.com/facebook/react/issues/12502
  // This code is DEV-only so size is not a concern.


  target.tag = source.tag;
  target.key = source.key;
  target.elementType = source.elementType;
  target.type = source.type;
  target.stateNode = source.stateNode;
  target.return = source.return;
  target.child = source.child;
  target.sibling = source.sibling;
  target.index = source.index;
  target.ref = source.ref;
  target.pendingProps = source.pendingProps;
  target.memoizedProps = source.memoizedProps;
  target.updateQueue = source.updateQueue;
  target.memoizedState = source.memoizedState;
  target.dependencies = source.dependencies;
  target.mode = source.mode;
  target.effectTag = source.effectTag;
  target.nextEffect = source.nextEffect;
  target.firstEffect = source.firstEffect;
  target.lastEffect = source.lastEffect;
  target.expirationTime = source.expirationTime;
  target.childExpirationTime = source.childExpirationTime;
  target.alternate = source.alternate;

  {
    target.actualDuration = source.actualDuration;
    target.actualStartTime = source.actualStartTime;
    target.selfBaseDuration = source.selfBaseDuration;
    target.treeBaseDuration = source.treeBaseDuration;
  }

  {
    target._debugID = source._debugID;
  }

  target._debugSource = source._debugSource;
  target._debugOwner = source._debugOwner;
  target._debugIsCurrentlyTiming = source._debugIsCurrentlyTiming;
  target._debugNeedsRemount = source._debugNeedsRemount;
  target._debugHookTypes = source._debugHookTypes;
  return target;
}

function FiberRootNode(containerInfo, tag, hydrate) {
  this.tag = tag;
  this.current = null;
  this.containerInfo = containerInfo;
  this.pendingChildren = null;
  this.pingCache = null;
  this.finishedExpirationTime = NoWork;
  this.finishedWork = null;
  this.timeoutHandle = noTimeout;
  this.context = null;
  this.pendingContext = null;
  this.hydrate = hydrate;
  this.callbackNode = null;
  this.callbackPriority = NoPriority;
  this.firstPendingTime = NoWork;
  this.firstSuspendedTime = NoWork;
  this.lastSuspendedTime = NoWork;
  this.nextKnownPendingLevel = NoWork;
  this.lastPingedTime = NoWork;
  this.lastExpiredTime = NoWork;

  {
    this.interactionThreadID = tracing.unstable_getThreadID();
    this.memoizedInteractions = new Set();
    this.pendingInteractionMap = new Map();
  }
}

function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
  var root = new FiberRootNode(containerInfo, tag, hydrate);
  // stateNode is any.


  var uninitializedFiber = createHostRootFiber(tag);
  root.current = uninitializedFiber;
  uninitializedFiber.stateNode = root;
  initializeUpdateQueue(uninitializedFiber);
  return root;
}
function isRootSuspendedAtTime(root, expirationTime) {
  var firstSuspendedTime = root.firstSuspendedTime;
  var lastSuspendedTime = root.lastSuspendedTime;
  return firstSuspendedTime !== NoWork && firstSuspendedTime >= expirationTime && lastSuspendedTime <= expirationTime;
}
function markRootSuspendedAtTime(root, expirationTime) {
  var firstSuspendedTime = root.firstSuspendedTime;
  var lastSuspendedTime = root.lastSuspendedTime;

  if (firstSuspendedTime < expirationTime) {
    root.firstSuspendedTime = expirationTime;
  }

  if (lastSuspendedTime > expirationTime || firstSuspendedTime === NoWork) {
    root.lastSuspendedTime = expirationTime;
  }

  if (expirationTime <= root.lastPingedTime) {
    root.lastPingedTime = NoWork;
  }

  if (expirationTime <= root.lastExpiredTime) {
    root.lastExpiredTime = NoWork;
  }
}
function markRootUpdatedAtTime(root, expirationTime) {
  // Update the range of pending times
  var firstPendingTime = root.firstPendingTime;

  if (expirationTime > firstPendingTime) {
    root.firstPendingTime = expirationTime;
  } // Update the range of suspended times. Treat everything lower priority or
  // equal to this update as unsuspended.


  var firstSuspendedTime = root.firstSuspendedTime;

  if (firstSuspendedTime !== NoWork) {
    if (expirationTime >= firstSuspendedTime) {
      // The entire suspended range is now unsuspended.
      root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
    } else if (expirationTime >= root.lastSuspendedTime) {
      root.lastSuspendedTime = expirationTime + 1;
    } // This is a pending level. Check if it's higher priority than the next
    // known pending level.


    if (expirationTime > root.nextKnownPendingLevel) {
      root.nextKnownPendingLevel = expirationTime;
    }
  }
}
function markRootFinishedAtTime(root, finishedExpirationTime, remainingExpirationTime) {
  // Update the range of pending times
  root.firstPendingTime = remainingExpirationTime; // Update the range of suspended times. Treat everything higher priority or
  // equal to this update as unsuspended.

  if (finishedExpirationTime <= root.lastSuspendedTime) {
    // The entire suspended range is now unsuspended.
    root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = NoWork;
  } else if (finishedExpirationTime <= root.firstSuspendedTime) {
    // Part of the suspended range is now unsuspended. Narrow the range to
    // include everything between the unsuspended time (non-inclusive) and the
    // last suspended time.
    root.firstSuspendedTime = finishedExpirationTime - 1;
  }

  if (finishedExpirationTime <= root.lastPingedTime) {
    // Clear the pinged time
    root.lastPingedTime = NoWork;
  }

  if (finishedExpirationTime <= root.lastExpiredTime) {
    // Clear the expired time
    root.lastExpiredTime = NoWork;
  }
}
function markRootExpiredAtTime(root, expirationTime) {
  var lastExpiredTime = root.lastExpiredTime;

  if (lastExpiredTime === NoWork || lastExpiredTime > expirationTime) {
    root.lastExpiredTime = expirationTime;
  }
}

var didWarnAboutNestedUpdates;
var didWarnAboutFindNodeInStrictMode;

{
  didWarnAboutNestedUpdates = false;
  didWarnAboutFindNodeInStrictMode = {};
}

function getContextForSubtree(parentComponent) {
  if (!parentComponent) {
    return emptyContextObject;
  }

  var fiber = get(parentComponent);
  var parentContext = findCurrentUnmaskedContext(fiber);

  if (fiber.tag === ClassComponent) {
    var Component = fiber.type;

    if (isContextProvider(Component)) {
      return processChildContext(fiber, Component, parentContext);
    }
  }

  return parentContext;
}

function findHostInstanceWithWarning(component, methodName) {
  {
    var fiber = get(component);

    if (fiber === undefined) {
      if (typeof component.render === 'function') {
        {
          {
            throw Error( "Unable to find node on an unmounted component." );
          }
        }
      } else {
        {
          {
            throw Error( "Argument appears to not be a ReactComponent. Keys: " + Object.keys(component) );
          }
        }
      }
    }

    var hostFiber = findCurrentHostFiber(fiber);

    if (hostFiber === null) {
      return null;
    }

    if (hostFiber.mode & StrictMode) {
      var componentName = getComponentName(fiber.type) || 'Component';

      if (!didWarnAboutFindNodeInStrictMode[componentName]) {
        didWarnAboutFindNodeInStrictMode[componentName] = true;

        if (fiber.mode & StrictMode) {
          error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
        } else {
          error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-find-node%s', methodName, methodName, componentName, getStackByFiberInDevAndProd(hostFiber));
        }
      }
    }

    return hostFiber.stateNode;
  }
}

function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {
  return createFiberRoot(containerInfo, tag, hydrate);
}
function updateContainer(element, container, parentComponent, callback) {
  {
    onScheduleRoot(container, element);
  }

  var current$1 = container.current;
  var currentTime = requestCurrentTimeForUpdate();

  {
    // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
    if ('undefined' !== typeof jest) {
      warnIfUnmockedScheduler(current$1);
      warnIfNotScopedWithMatchingAct(current$1);
    }
  }

  var suspenseConfig = requestCurrentSuspenseConfig();
  var expirationTime = computeExpirationForFiber(currentTime, current$1, suspenseConfig);
  var context = getContextForSubtree(parentComponent);

  if (container.context === null) {
    container.context = context;
  } else {
    container.pendingContext = context;
  }

  {
    if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
      didWarnAboutNestedUpdates = true;

      error('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\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
    }
  }

  var update = createUpdate(expirationTime, suspenseConfig); // Caution: React DevTools currently depends on this property
  // being called "element".

  update.payload = {
    element: element
  };
  callback = callback === undefined ? null : callback;

  if (callback !== null) {
    {
      if (typeof callback !== 'function') {
        error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
      }
    }

    update.callback = callback;
  }

  enqueueUpdate(current$1, update);
  scheduleWork(current$1, expirationTime);
  return expirationTime;
}
function getPublicRootInstance(container) {
  var containerFiber = container.current;

  if (!containerFiber.child) {
    return null;
  }

  switch (containerFiber.child.tag) {
    case HostComponent:
      return getPublicInstance(containerFiber.child.stateNode);

    default:
      return containerFiber.child.stateNode;
  }
}

function markRetryTimeImpl(fiber, retryTime) {
  var suspenseState = fiber.memoizedState;

  if (suspenseState !== null && suspenseState.dehydrated !== null) {
    if (suspenseState.retryTime < retryTime) {
      suspenseState.retryTime = retryTime;
    }
  }
} // Increases the priority of thennables when they resolve within this boundary.


function markRetryTimeIfNotHydrated(fiber, retryTime) {
  markRetryTimeImpl(fiber, retryTime);
  var alternate = fiber.alternate;

  if (alternate) {
    markRetryTimeImpl(alternate, retryTime);
  }
}

function attemptUserBlockingHydration$1(fiber) {
  if (fiber.tag !== SuspenseComponent) {
    // We ignore HostRoots here because we can't increase
    // their priority and they should not suspend on I/O,
    // since you have to wrap anything that might suspend in
    // Suspense.
    return;
  }

  var expTime = computeInteractiveExpiration(requestCurrentTimeForUpdate());
  scheduleWork(fiber, expTime);
  markRetryTimeIfNotHydrated(fiber, expTime);
}
function attemptContinuousHydration$1(fiber) {
  if (fiber.tag !== SuspenseComponent) {
    // We ignore HostRoots here because we can't increase
    // their priority and they should not suspend on I/O,
    // since you have to wrap anything that might suspend in
    // Suspense.
    return;
  }

  scheduleWork(fiber, ContinuousHydration);
  markRetryTimeIfNotHydrated(fiber, ContinuousHydration);
}
function attemptHydrationAtCurrentPriority$1(fiber) {
  if (fiber.tag !== SuspenseComponent) {
    // We ignore HostRoots here because we can't increase
    // their priority other than synchronously flush it.
    return;
  }

  var currentTime = requestCurrentTimeForUpdate();
  var expTime = computeExpirationForFiber(currentTime, fiber, null);
  scheduleWork(fiber, expTime);
  markRetryTimeIfNotHydrated(fiber, expTime);
}
function findHostInstanceWithNoPortals(fiber) {
  var hostFiber = findCurrentHostFiberWithNoPortals(fiber);

  if (hostFiber === null) {
    return null;
  }

  if (hostFiber.tag === FundamentalComponent) {
    return hostFiber.stateNode.instance;
  }

  return hostFiber.stateNode;
}

var shouldSuspendImpl = function (fiber) {
  return false;
};

function shouldSuspend(fiber) {
  return shouldSuspendImpl(fiber);
}
var overrideHookState = null;
var overrideProps = null;
var scheduleUpdate = null;
var setSuspenseHandler = null;

{
  var copyWithSetImpl = function (obj, path, idx, value) {
    if (idx >= path.length) {
      return value;
    }

    var key = path[idx];
    var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here

    updated[key] = copyWithSetImpl(obj[key], path, idx + 1, value);
    return updated;
  };

  var copyWithSet = function (obj, path, value) {
    return copyWithSetImpl(obj, path, 0, value);
  }; // Support DevTools editable values for useState and useReducer.


  overrideHookState = function (fiber, id, path, value) {
    // For now, the "id" of stateful hooks is just the stateful hook index.
    // This may change in the future with e.g. nested hooks.
    var currentHook = fiber.memoizedState;

    while (currentHook !== null && id > 0) {
      currentHook = currentHook.next;
      id--;
    }

    if (currentHook !== null) {
      var newState = copyWithSet(currentHook.memoizedState, path, value);
      currentHook.memoizedState = newState;
      currentHook.baseState = newState; // We aren't actually adding an update to the queue,
      // because there is no update we can add for useReducer hooks that won't trigger an error.
      // (There's no appropriate action type for DevTools overrides.)
      // As a result though, React will see the scheduled update as a noop and bailout.
      // Shallow cloning props works as a workaround for now to bypass the bailout check.

      fiber.memoizedProps = _assign({}, fiber.memoizedProps);
      scheduleWork(fiber, Sync);
    }
  }; // Support DevTools props for function components, forwardRef, memo, host components, etc.


  overrideProps = function (fiber, path, value) {
    fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);

    if (fiber.alternate) {
      fiber.alternate.pendingProps = fiber.pendingProps;
    }

    scheduleWork(fiber, Sync);
  };

  scheduleUpdate = function (fiber) {
    scheduleWork(fiber, Sync);
  };

  setSuspenseHandler = function (newShouldSuspendImpl) {
    shouldSuspendImpl = newShouldSuspendImpl;
  };
}

function injectIntoDevTools(devToolsConfig) {
  var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
  var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
  return injectInternals(_assign({}, devToolsConfig, {
    overrideHookState: overrideHookState,
    overrideProps: overrideProps,
    setSuspenseHandler: setSuspenseHandler,
    scheduleUpdate: scheduleUpdate,
    currentDispatcherRef: ReactCurrentDispatcher,
    findHostInstanceByFiber: function (fiber) {
      var hostFiber = findCurrentHostFiber(fiber);

      if (hostFiber === null) {
        return null;
      }

      return hostFiber.stateNode;
    },
    findFiberByHostInstance: function (instance) {
      if (!findFiberByHostInstance) {
        // Might not be implemented by the renderer.
        return null;
      }

      return findFiberByHostInstance(instance);
    },
    // React Refresh
    findHostInstancesForRefresh:  findHostInstancesForRefresh ,
    scheduleRefresh:  scheduleRefresh ,
    scheduleRoot:  scheduleRoot ,
    setRefreshHandler:  setRefreshHandler ,
    // Enables DevTools to append owner stacks to error messages in DEV mode.
    getCurrentFiber:  function () {
      return current;
    } 
  }));
}
var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing;

function ReactDOMRoot(container, options) {
  this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
}

function ReactDOMBlockingRoot(container, tag, options) {
  this._internalRoot = createRootImpl(container, tag, options);
}

ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {
  var root = this._internalRoot;

  {
    if (typeof arguments[1] === 'function') {
      error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
    }

    var container = root.containerInfo;

    if (container.nodeType !== COMMENT_NODE) {
      var hostInstance = findHostInstanceWithNoPortals(root.current);

      if (hostInstance) {
        if (hostInstance.parentNode !== container) {
          error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container.");
        }
      }
    }
  }

  updateContainer(children, root, null, null);
};

ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {
  {
    if (typeof arguments[0] === 'function') {
      error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
    }
  }

  var root = this._internalRoot;
  var container = root.containerInfo;
  updateContainer(null, root, null, function () {
    unmarkContainerAsRoot(container);
  });
};

function createRootImpl(container, tag, options) {
  // Tag is either LegacyRoot or Concurrent Root
  var hydrate = options != null && options.hydrate === true;
  var hydrationCallbacks = options != null && options.hydrationOptions || null;
  var root = createContainer(container, tag, hydrate);
  markContainerAsRoot(root.current, container);

  if (hydrate && tag !== LegacyRoot) {
    var doc = container.nodeType === DOCUMENT_NODE ? container : container.ownerDocument;
    eagerlyTrapReplayableEvents(container, doc);
  }

  return root;
}
function createLegacyRoot(container, options) {
  return new ReactDOMBlockingRoot(container, LegacyRoot, options);
}
function isValidContainer(node) {
  return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
}

var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
var topLevelUpdateWarnings;
var warnedAboutHydrateAPI = false;

{
  topLevelUpdateWarnings = function (container) {
    if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
      var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);

      if (hostInstance) {
        if (hostInstance.parentNode !== container) {
          error('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 isRootRenderedBySomeReact = !!container._reactRootContainer;
    var rootEl = getReactRootElementInContainer(container);
    var hasNonRootReactChild = !!(rootEl && getInstanceFromNode$1(rootEl));

    if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
      error('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.');
    }

    if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
      error('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.');
    }
  };
}

function getReactRootElementInContainer(container) {
  if (!container) {
    return null;
  }

  if (container.nodeType === DOCUMENT_NODE) {
    return container.documentElement;
  } else {
    return container.firstChild;
  }
}

function shouldHydrateDueToLegacyHeuristic(container) {
  var rootElement = getReactRootElementInContainer(container);
  return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));
}

function legacyCreateRootFromDOMContainer(container, forceHydrate) {
  var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.

  if (!shouldHydrate) {
    var warned = false;
    var rootSibling;

    while (rootSibling = container.lastChild) {
      {
        if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
          warned = true;

          error('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.');
        }
      }

      container.removeChild(rootSibling);
    }
  }

  {
    if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
      warnedAboutHydrateAPI = true;

      warn('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 createLegacyRoot(container, shouldHydrate ? {
    hydrate: true
  } : undefined);
}

function warnOnInvalidCallback$1(callback, callerName) {
  {
    if (callback !== null && typeof callback !== 'function') {
      error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
    }
  }
}

function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
  {
    topLevelUpdateWarnings(container);
    warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');
  } // TODO: Without `any` type, Flow says "Property cannot be accessed on any
  // member of intersection type." Whyyyyyy.


  var root = container._reactRootContainer;
  var fiberRoot;

  if (!root) {
    // Initial mount
    root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);
    fiberRoot = root._internalRoot;

    if (typeof callback === 'function') {
      var originalCallback = callback;

      callback = function () {
        var instance = getPublicRootInstance(fiberRoot);
        originalCallback.call(instance);
      };
    } // Initial mount should not be batched.


    unbatchedUpdates(function () {
      updateContainer(children, fiberRoot, parentComponent, callback);
    });
  } else {
    fiberRoot = root._internalRoot;

    if (typeof callback === 'function') {
      var _originalCallback = callback;

      callback = function () {
        var instance = getPublicRootInstance(fiberRoot);

        _originalCallback.call(instance);
      };
    } // Update


    updateContainer(children, fiberRoot, parentComponent, callback);
  }

  return getPublicRootInstance(fiberRoot);
}

function findDOMNode(componentOrElement) {
  {
    var owner = ReactCurrentOwner$3.current;

    if (owner !== null && owner.stateNode !== null) {
      var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;

      if (!warnedAboutRefsInRender) {
        error('%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.', getComponentName(owner.type) || 'A component');
      }

      owner.stateNode._warnedAboutRefsInRender = true;
    }
  }

  if (componentOrElement == null) {
    return null;
  }

  if (componentOrElement.nodeType === ELEMENT_NODE) {
    return componentOrElement;
  }

  {
    return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
  }
}
function hydrate(element, container, callback) {
  if (!isValidContainer(container)) {
    {
      throw Error( "Target container is not a DOM element." );
    }
  }

  {
    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;

    if (isModernRoot) {
      error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');
    }
  } // TODO: throw or warn if we couldn't hydrate?


  return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
}
function render(element, container, callback) {
  if (!isValidContainer(container)) {
    {
      throw Error( "Target container is not a DOM element." );
    }
  }

  {
    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;

    if (isModernRoot) {
      error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
    }
  }

  return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
}
function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
  if (!isValidContainer(containerNode)) {
    {
      throw Error( "Target container is not a DOM element." );
    }
  }

  if (!(parentComponent != null && has(parentComponent))) {
    {
      throw Error( "parentComponent must be a valid React Component" );
    }
  }

  return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
}
function unmountComponentAtNode(container) {
  if (!isValidContainer(container)) {
    {
      throw Error( "unmountComponentAtNode(...): Target container is not a DOM element." );
    }
  }

  {
    var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;

    if (isModernRoot) {
      error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');
    }
  }

  if (container._reactRootContainer) {
    {
      var rootEl = getReactRootElementInContainer(container);
      var renderedByDifferentReact = rootEl && !getInstanceFromNode$1(rootEl);

      if (renderedByDifferentReact) {
        error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
      }
    } // Unmount should not be batched.


    unbatchedUpdates(function () {
      legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
        // $FlowFixMe This should probably use `delete container._reactRootContainer`
        container._reactRootContainer = null;
        unmarkContainerAsRoot(container);
      });
    }); // If you call unmountComponentAtNode twice in quick succession, you'll
    // get `true` twice. That's probably fine?

    return true;
  } else {
    {
      var _rootEl = getReactRootElementInContainer(container);

      var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode$1(_rootEl)); // Check if the container itself is a React root node.

      var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;

      if (hasNonRootReactChild) {
        error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? '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.');
      }
    }

    return false;
  }
}

function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
implementation) {
  var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
  return {
    // This tag allow us to uniquely identify this as a React Portal
    $$typeof: REACT_PORTAL_TYPE,
    key: key == null ? null : '' + key,
    children: children,
    containerInfo: containerInfo,
    implementation: implementation
  };
}

var ReactVersion = '16.13.1';

setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
setAttemptContinuousHydration(attemptContinuousHydration$1);
setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
var didWarnAboutUnstableCreatePortal = false;

{
  if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
  Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
  Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
    error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
  }
}

setRestoreImplementation(restoreControlledState$3);
setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);

function createPortal$1(children, container) {
  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

  if (!isValidContainer(container)) {
    {
      throw Error( "Target container is not a DOM element." );
    }
  } // TODO: pass ReactDOM portal implementation as third argument
  // $FlowFixMe The Flow type is opaque but there's no way to actually create it.


  return createPortal(children, container, null, key);
}

function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {

  return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
}

function unstable_createPortal(children, container) {
  var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;

  {
    if (!didWarnAboutUnstableCreatePortal) {
      didWarnAboutUnstableCreatePortal = true;

      warn('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.');
    }
  }

  return createPortal$1(children, container, key);
}

var Internals = {
  // Keep in sync with ReactDOMUnstableNativeDependencies.js
  // ReactTestUtils.js, and ReactTestUtilsAct.js. This is an array for better minification.
  Events: [getInstanceFromNode$1, getNodeFromInstance$1, getFiberCurrentPropsFromNode$1, injectEventPluginsByName, eventNameDispatchConfigs, accumulateTwoPhaseDispatches, accumulateDirectDispatches, enqueueStateRestore, restoreStateIfNeeded, dispatchEvent, runEventsInBatch, flushPassiveEffects, IsThisRendererActing]
};
var foundDevTools = injectIntoDevTools({
  findFiberByHostInstance: getClosestInstanceFromNode,
  bundleType:  1 ,
  version: ReactVersion,
  rendererPackageName: 'react-dom'
});

{
  if (!foundDevTools && canUseDOM && window.top === window.self) {
    // If we're in Chrome or Firefox, provide a download link if not installed.
    if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
      var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.

      if (/^(https?|file):$/.test(protocol)) {
        // eslint-disable-next-line react-internal/no-production-logging
        console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://fb.me/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://fb.me/react-devtools-faq' : ''), 'font-weight:bold');
      }
    }
  }
}

exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = createPortal$1;
exports.findDOMNode = findDOMNode;
exports.flushSync = flushSync;
exports.hydrate = hydrate;
exports.render = render;
exports.unmountComponentAtNode = unmountComponentAtNode;
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_createPortal = unstable_createPortal;
exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
exports.version = ReactVersion;
  })();
}

}).call(this)}).call(this,require('_process'))
},{"_process":358,"object-assign":357,"prop-types/checkPropTypes":367,"react":380,"scheduler":385,"scheduler/tracing":386}],373:[function(require,module,exports){
/** @license React v16.13.1
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

/*
 Modernizr 3.0.0pre (Custom Build) | MIT
*/
'use strict';var aa=require("react"),n=require("object-assign"),r=require("scheduler");function u(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(u(227));
function ba(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var da=!1,ea=null,fa=!1,ha=null,ia={onError:function(a){da=!0;ea=a}};function ja(a,b,c,d,e,f,g,h,k){da=!1;ea=null;ba.apply(ia,arguments)}function ka(a,b,c,d,e,f,g,h,k){ja.apply(this,arguments);if(da){if(da){var l=ea;da=!1;ea=null}else throw Error(u(198));fa||(fa=!0,ha=l)}}var la=null,ma=null,na=null;
function oa(a,b,c){var d=a.type||"unknown-event";a.currentTarget=na(c);ka(d,b,void 0,a);a.currentTarget=null}var pa=null,qa={};
function ra(){if(pa)for(var a in qa){var b=qa[a],c=pa.indexOf(a);if(!(-1<c))throw Error(u(96,a));if(!sa[c]){if(!b.extractEvents)throw Error(u(97,a));sa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(ta.hasOwnProperty(h))throw Error(u(99,h));ta[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ua(k[e],g,h);e=!0}else f.registrationName?(ua(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(u(98,d,a));}}}}
function ua(a,b,c){if(va[a])throw Error(u(100,a));va[a]=b;wa[a]=b.eventTypes[c].dependencies}var sa=[],ta={},va={},wa={};function xa(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!qa.hasOwnProperty(c)||qa[c]!==d){if(qa[c])throw Error(u(102,c));qa[c]=d;b=!0}}b&&ra()}var ya=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),za=null,Aa=null,Ba=null;
function Ca(a){if(a=ma(a)){if("function"!==typeof za)throw Error(u(280));var b=a.stateNode;b&&(b=la(b),za(a.stateNode,a.type,b))}}function Da(a){Aa?Ba?Ba.push(a):Ba=[a]:Aa=a}function Ea(){if(Aa){var a=Aa,b=Ba;Ba=Aa=null;Ca(a);if(b)for(a=0;a<b.length;a++)Ca(b[a])}}function Fa(a,b){return a(b)}function Ga(a,b,c,d,e){return a(b,c,d,e)}function Ha(){}var Ia=Fa,Ja=!1,Ka=!1;function La(){if(null!==Aa||null!==Ba)Ha(),Ea()}
function Ma(a,b,c){if(Ka)return a(b,c);Ka=!0;try{return Ia(a,b,c)}finally{Ka=!1,La()}}var Na=/^[: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]*$/,Oa=Object.prototype.hasOwnProperty,Pa={},Qa={};
function Ra(a){if(Oa.call(Qa,a))return!0;if(Oa.call(Pa,a))return!1;if(Na.test(a))return Qa[a]=!0;Pa[a]=!0;return!1}function Sa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
function Ta(a,b,c,d){if(null===b||"undefined"===typeof b||Sa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function v(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var C={};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){C[a]=new v(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];C[b]=new v(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){C[a]=new v(a,2,!1,a.toLowerCase(),null,!1)});
["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){C[a]=new v(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){C[a]=new v(a,3,!1,a.toLowerCase(),null,!1)});
["checked","multiple","muted","selected"].forEach(function(a){C[a]=new v(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){C[a]=new v(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){C[a]=new v(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){C[a]=new v(a,5,!1,a.toLowerCase(),null,!1)});var Ua=/[\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()}
"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(a){var b=a.replace(Ua,
Va);C[b]=new v(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!1)});
C.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!0)});var Wa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty("ReactCurrentDispatcher")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty("ReactCurrentBatchConfig")||(Wa.ReactCurrentBatchConfig={suspense:null});
function Xa(a,b,c,d){var e=C.hasOwnProperty(b)?C[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Ta(b,c,e,d)&&(c=null),d||null===e?Ra(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
var Ya=/^(.*)[\\\/]/,E="function"===typeof Symbol&&Symbol.for,Za=E?Symbol.for("react.element"):60103,$a=E?Symbol.for("react.portal"):60106,ab=E?Symbol.for("react.fragment"):60107,bb=E?Symbol.for("react.strict_mode"):60108,cb=E?Symbol.for("react.profiler"):60114,db=E?Symbol.for("react.provider"):60109,eb=E?Symbol.for("react.context"):60110,fb=E?Symbol.for("react.concurrent_mode"):60111,gb=E?Symbol.for("react.forward_ref"):60112,hb=E?Symbol.for("react.suspense"):60113,ib=E?Symbol.for("react.suspense_list"):
60120,jb=E?Symbol.for("react.memo"):60115,kb=E?Symbol.for("react.lazy"):60116,lb=E?Symbol.for("react.block"):60121,mb="function"===typeof Symbol&&Symbol.iterator;function nb(a){if(null===a||"object"!==typeof a)return null;a=mb&&a[mb]||a["@@iterator"];return"function"===typeof a?a:null}function ob(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}
function pb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ab:return"Fragment";case $a:return"Portal";case cb:return"Profiler";case bb:return"StrictMode";case hb:return"Suspense";case ib:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case eb:return"Context.Consumer";case db:return"Context.Provider";case gb:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":
"ForwardRef");case jb:return pb(a.type);case lb:return pb(a.render);case kb:if(a=1===a._status?a._result:null)return pb(a)}return null}function qb(a){var b="";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c="";break a;default:var d=a._debugOwner,e=a._debugSource,f=pb(a.type);c=null;d&&(c=pb(d.type));d=f;f="";e?f=" (at "+e.fileName.replace(Ya,"")+":"+e.lineNumber+")":c&&(f=" (created by "+c+")");c="\n    in "+(d||"Unknown")+f}b+=c;a=a.return}while(a);return b}
function rb(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}function sb(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
function tb(a){var b=sb(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
null;delete a[b]}}}}function xb(a){a._valueTracker||(a._valueTracker=tb(a))}function yb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=sb(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function zb(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}
function Ab(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=rb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Bb(a,b){b=b.checked;null!=b&&Xa(a,"checked",b,!1)}
function Cb(a,b){Bb(a,b);var c=rb(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Db(a,b.type,c):b.hasOwnProperty("defaultValue")&&Db(a,b.type,rb(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
function Eb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
function Db(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Fb(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Gb(a,b){a=n({children:void 0},b);if(b=Fb(b.children))a.children=b;return a}
function Hb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+rb(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
function Ib(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(u(91));return n({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Jb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(u(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(u(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:rb(c)}}
function Kb(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var Mb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
function Nb(a){switch(a){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 Ob(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Nb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
var Pb,Qb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Mb.svg||"innerHTML"in a)a.innerHTML=b;else{Pb=Pb||document.createElement("div");Pb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
function Rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Tb={animationend:Sb("Animation","AnimationEnd"),animationiteration:Sb("Animation","AnimationIteration"),animationstart:Sb("Animation","AnimationStart"),transitionend:Sb("Transition","TransitionEnd")},Ub={},Vb={};
ya&&(Vb=document.createElement("div").style,"AnimationEvent"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),"TransitionEvent"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a}
var Xb=Wb("animationend"),Yb=Wb("animationiteration"),Zb=Wb("animationstart"),$b=Wb("transitionend"),ac="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),bc=new ("function"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b}
function dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function ec(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function fc(a){if(dc(a)!==a)throw Error(u(188));}
function gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
function ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var kc=null;
function lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)oa(a,b[d],c[d]);else b&&oa(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function mc(a){null!==a&&(kc=ic(kc,a));a=kc;kc=null;if(a){jc(a,lc);if(kc)throw Error(u(95));if(fa)throw a=ha,fa=!1,ha=null,a;}}
function nc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function oc(a){if(!ya)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}var pc=[];function qc(a){a.topLevelType=null;a.nativeEvent=null;a.targetInst=null;a.ancestors.length=0;10>pc.length&&pc.push(a)}
function rc(a,b,c,d){if(pc.length){var e=pc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}
function sc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=tc(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=nc(a.nativeEvent);d=a.topLevelType;var f=a.nativeEvent,g=a.eventSystemFlags;0===c&&(g|=64);for(var h=null,k=0;k<sa.length;k++){var l=sa[k];l&&(l=l.extractEvents(d,b,f,e,g))&&(h=
ic(h,l))}mc(h)}}function uc(a,b,c){if(!c.has(a)){switch(a){case "scroll":vc(b,"scroll",!0);break;case "focus":case "blur":vc(b,"focus",!0);vc(b,"blur",!0);c.set("blur",null);c.set("focus",null);break;case "cancel":case "close":oc(a)&&vc(b,a,!0);break;case "invalid":case "submit":case "reset":break;default:-1===ac.indexOf(a)&&F(a,b)}c.set(a,null)}}
var wc,xc,yc,zc=!1,Ac=[],Bc=null,Cc=null,Dc=null,Ec=new Map,Fc=new Map,Gc=[],Hc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ic="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");
function Jc(a,b){var c=cc(b);Hc.forEach(function(a){uc(a,b,c)});Ic.forEach(function(a){uc(a,b,c)})}function Kc(a,b,c,d,e){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:e,container:d}}
function Lc(a,b){switch(a){case "focus":case "blur":Bc=null;break;case "dragenter":case "dragleave":Cc=null;break;case "mouseover":case "mouseout":Dc=null;break;case "pointerover":case "pointerout":Ec.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Fc.delete(b.pointerId)}}function Mc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=Kc(b,c,d,e,f),null!==b&&(b=Nc(b),null!==b&&xc(b)),a;a.eventSystemFlags|=d;return a}
function Oc(a,b,c,d,e){switch(b){case "focus":return Bc=Mc(Bc,a,b,c,d,e),!0;case "dragenter":return Cc=Mc(Cc,a,b,c,d,e),!0;case "mouseover":return Dc=Mc(Dc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Ec.set(f,Mc(Ec.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Fc.set(f,Mc(Fc.get(f)||null,a,b,c,d,e)),!0}return!1}
function Pc(a){var b=tc(a.target);if(null!==b){var c=dc(b);if(null!==c)if(b=c.tag,13===b){if(b=ec(c),null!==b){a.blockedOn=b;r.unstable_runWithPriority(a.priority,function(){yc(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Qc(a){if(null!==a.blockedOn)return!1;var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);if(null!==b){var c=Nc(b);null!==c&&xc(c);a.blockedOn=b;return!1}return!0}
function Sc(a,b,c){Qc(a)&&c.delete(b)}function Tc(){for(zc=!1;0<Ac.length;){var a=Ac[0];if(null!==a.blockedOn){a=Nc(a.blockedOn);null!==a&&wc(a);break}var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);null!==b?a.blockedOn=b:Ac.shift()}null!==Bc&&Qc(Bc)&&(Bc=null);null!==Cc&&Qc(Cc)&&(Cc=null);null!==Dc&&Qc(Dc)&&(Dc=null);Ec.forEach(Sc);Fc.forEach(Sc)}function Uc(a,b){a.blockedOn===b&&(a.blockedOn=null,zc||(zc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Tc)))}
function Vc(a){function b(b){return Uc(b,a)}if(0<Ac.length){Uc(Ac[0],a);for(var c=1;c<Ac.length;c++){var d=Ac[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==Bc&&Uc(Bc,a);null!==Cc&&Uc(Cc,a);null!==Dc&&Uc(Dc,a);Ec.forEach(b);Fc.forEach(b);for(c=0;c<Gc.length;c++)d=Gc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Gc.length&&(c=Gc[0],null===c.blockedOn);)Pc(c),null===c.blockedOn&&Gc.shift()}
var Wc={},Yc=new Map,Zc=new Map,$c=["abort","abort",Xb,"animationEnd",Yb,"animationIteration",Zb,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking",
"seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",$b,"transitionEnd","waiting","waiting"];function ad(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1],f="on"+(e[0].toUpperCase()+e.slice(1));f={phasedRegistrationNames:{bubbled:f,captured:f+"Capture"},dependencies:[d],eventPriority:b};Zc.set(d,b);Yc.set(d,f);Wc[e]=f}}
ad("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".split(" "),0);
ad("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ad($c,2);for(var bd="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),cd=0;cd<bd.length;cd++)Zc.set(bd[cd],0);
var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function F(a,b){vc(b,a,!1)}function vc(a,b,c){var d=Zc.get(b);switch(void 0===d?2:d){case 0:d=gd.bind(null,b,1,a);break;case 1:d=hd.bind(null,b,1,a);break;default:d=id.bind(null,b,1,a)}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1)}function gd(a,b,c,d){Ja||Ha();var e=id,f=Ja;Ja=!0;try{Ga(e,a,b,c,d)}finally{(Ja=f)||La()}}function hd(a,b,c,d){ed(dd,id.bind(null,a,b,c,d))}
function id(a,b,c,d){if(fd)if(0<Ac.length&&-1<Hc.indexOf(a))a=Kc(null,a,b,c,d),Ac.push(a);else{var e=Rc(a,b,c,d);if(null===e)Lc(a,d);else if(-1<Hc.indexOf(a))a=Kc(e,a,b,c,d),Ac.push(a);else if(!Oc(e,a,b,c,d)){Lc(a,d);a=rc(a,d,null,b);try{Ma(sc,a)}finally{qc(a)}}}}
function Rc(a,b,c,d){c=nc(d);c=tc(c);if(null!==c){var e=dc(c);if(null===e)c=null;else{var f=e.tag;if(13===f){c=ec(e);if(null!==c)return c;c=null}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;c=null}else e!==c&&(c=null)}}a=rc(a,d,c,b);try{Ma(sc,a)}finally{qc(a)}return null}
var jd={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},kd=["Webkit","ms","Moz","O"];Object.keys(jd).forEach(function(a){kd.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);jd[b]=jd[a]})});function ld(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||jd.hasOwnProperty(a)&&jd[a]?(""+b).trim():b+"px"}
function md(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=ld(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var nd=n({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 od(a,b){if(b){if(nd[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(u(137,a,""));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(u(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(u(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(u(62,""));}}
function pd(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){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}}var qd=Mb.html;function rd(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=cc(a);b=wa[b];for(var d=0;d<b.length;d++)uc(b[d],a,c)}function sd(){}
function td(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function ud(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function vd(a,b){var c=ud(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ud(c)}}
function wd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wd(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xd(){for(var a=window,b=td();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=td(a.document)}return b}
function yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var zd="$",Ad="/$",Bd="$?",Cd="$!",Dd=null,Ed=null;function Fd(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
function Gd(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Hd="function"===typeof setTimeout?setTimeout:void 0,Id="function"===typeof clearTimeout?clearTimeout:void 0;function Jd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}
function Kd(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===zd||c===Cd||c===Bd){if(0===b)return a;b--}else c===Ad&&b++}a=a.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md="__reactInternalInstance$"+Ld,Nd="__reactEventHandlers$"+Ld,Od="__reactContainere$"+Ld;
function tc(a){var b=a[Md];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Od]||c[Md]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Kd(a);null!==a;){if(c=a[Md])return c;a=Kd(a)}return b}a=c;c=a.parentNode}return null}function Nc(a){a=a[Md]||a[Od];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Qd(a){return a[Nd]||null}
function Rd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}
function Sd(a,b){var c=a.stateNode;if(!c)return null;var d=la(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(u(231,
b,typeof c));return c}function Td(a,b,c){if(b=Sd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a)}function Ud(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Rd(b);for(b=c.length;0<b--;)Td(c[b],"captured",a);for(b=0;b<c.length;b++)Td(c[b],"bubbled",a)}}
function Vd(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Sd(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a))}function Wd(a){a&&a.dispatchConfig.registrationName&&Vd(a._targetInst,null,a)}function Xd(a){jc(a,Ud)}var Yd=null,Zd=null,$d=null;
function ae(){if($d)return $d;var a,b=Zd,c=b.length,d,e="value"in Yd?Yd.value:Yd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return $d=e.slice(a,1<d?1-d:void 0)}function be(){return!0}function ce(){return!1}
function G(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?be:ce;this.isPropagationStopped=ce;return this}
n(G.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=be)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=be)},persist:function(){this.isPersistent=be},isPersistent:ce,destructor:function(){var a=this.constructor.Interface,
b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=ce;this._dispatchInstances=this._dispatchListeners=null}});G.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
G.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;n(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=n({},d.Interface,a);c.extend=d.extend;de(c);return c};de(G);function ee(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}
function fe(a){if(!(a instanceof this))throw Error(u(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe}var ge=G.extend({data:null}),he=G.extend({data:null}),ie=[9,13,27,32],je=ya&&"CompositionEvent"in window,ke=null;ya&&"documentMode"in document&&(ke=document.documentMode);
var le=ya&&"TextEvent"in window&&!ke,me=ya&&(!je||ke&&8<ke&&11>=ke),ne=String.fromCharCode(32),oe={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(" ")}},pe=!1;
function qe(a,b){switch(a){case "keyup":return-1!==ie.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function re(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var se=!1;function te(a,b){switch(a){case "compositionend":return re(b);case "keypress":if(32!==b.which)return null;pe=!0;return ne;case "textInput":return a=b.data,a===ne&&pe?null:a;default:return null}}
function ue(a,b){if(se)return"compositionend"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return me&&"ko"!==b.locale?null:b.data;default:return null}}
var ve={eventTypes:oe,extractEvents:function(a,b,c,d){var e;if(je)b:{switch(a){case "compositionstart":var f=oe.compositionStart;break b;case "compositionend":f=oe.compositionEnd;break b;case "compositionupdate":f=oe.compositionUpdate;break b}f=void 0}else se?qe(a,c)&&(f=oe.compositionEnd):"keydown"===a&&229===c.keyCode&&(f=oe.compositionStart);f?(me&&"ko"!==c.locale&&(se||f!==oe.compositionStart?f===oe.compositionEnd&&se&&(e=ae()):(Yd=d,Zd="value"in Yd?Yd.value:Yd.textContent,se=!0)),f=ge.getPooled(f,
b,c,d),e?f.data=e:(e=re(c),null!==e&&(f.data=e)),Xd(f),e=f):e=null;(a=le?te(a,c):ue(a,c))?(b=he.getPooled(oe.beforeInput,b,c,d),b.data=a,Xd(b)):b=null;return null===e?b:null===b?e:[e,b]}},we={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 xe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!we[a.type]:"textarea"===b?!0:!1}
var ye={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function ze(a,b,c){a=G.getPooled(ye.change,a,b,c);a.type="change";Da(c);Xd(a);return a}var Ae=null,Be=null;function Ce(a){mc(a)}function De(a){var b=Pd(a);if(yb(b))return a}function Ee(a,b){if("change"===a)return b}var Fe=!1;ya&&(Fe=oc("input")&&(!document.documentMode||9<document.documentMode));
function Ge(){Ae&&(Ae.detachEvent("onpropertychange",He),Be=Ae=null)}function He(a){if("value"===a.propertyName&&De(Be))if(a=ze(Be,a,nc(a)),Ja)mc(a);else{Ja=!0;try{Fa(Ce,a)}finally{Ja=!1,La()}}}function Ie(a,b,c){"focus"===a?(Ge(),Ae=b,Be=c,Ae.attachEvent("onpropertychange",He)):"blur"===a&&Ge()}function Je(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return De(Be)}function Ke(a,b){if("click"===a)return De(b)}function Le(a,b){if("input"===a||"change"===a)return De(b)}
var Me={eventTypes:ye,_isInputEventSupported:Fe,extractEvents:function(a,b,c,d){var e=b?Pd(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=Ee;else if(xe(e))if(Fe)g=Le;else{g=Je;var h=Ie}else(f=e.nodeName)&&"input"===f.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(g=Ke);if(g&&(g=g(a,b)))return ze(g,c,d);h&&h(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Db(e,"number",e.value)}},Ne=G.extend({view:null,detail:null}),
Oe={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pe(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Oe[a])?!!b[a]:!1}function Qe(){return Pe}
var Re=0,Se=0,Te=!1,Ue=!1,Ve=Ne.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Qe,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=Re;Re=a.screenX;return Te?"mousemove"===a.type?a.screenX-b:0:(Te=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;
var b=Se;Se=a.screenY;return Ue?"mousemove"===a.type?a.screenY-b:0:(Ue=!0,0)}}),We=Ve.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Xe={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",
dependencies:["pointerout","pointerover"]}},Ye={eventTypes:Xe,extractEvents:function(a,b,c,d,e){var f="mouseover"===a||"pointerover"===a,g="mouseout"===a||"pointerout"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?tc(b):null,null!==b){var h=dc(b);if(b!==h||5!==b.tag&&6!==b.tag)b=null}}else g=null;if(g===b)return null;if("mouseout"===a||"mouseover"===
a){var k=Ve;var l=Xe.mouseLeave;var m=Xe.mouseEnter;var p="mouse"}else if("pointerout"===a||"pointerover"===a)k=We,l=Xe.pointerLeave,m=Xe.pointerEnter,p="pointer";a=null==g?f:Pd(g);f=null==b?f:Pd(b);l=k.getPooled(l,g,c,d);l.type=p+"leave";l.target=a;l.relatedTarget=f;c=k.getPooled(m,b,c,d);c.type=p+"enter";c.target=f;c.relatedTarget=a;d=g;p=b;if(d&&p)a:{k=d;m=p;g=0;for(a=k;a;a=Rd(a))g++;a=0;for(b=m;b;b=Rd(b))a++;for(;0<g-a;)k=Rd(k),g--;for(;0<a-g;)m=Rd(m),a--;for(;g--;){if(k===m||k===m.alternate)break a;
k=Rd(k);m=Rd(m)}k=null}else k=null;m=k;for(k=[];d&&d!==m;){g=d.alternate;if(null!==g&&g===m)break;k.push(d);d=Rd(d)}for(d=[];p&&p!==m;){g=p.alternate;if(null!==g&&g===m)break;d.push(p);p=Rd(p)}for(p=0;p<k.length;p++)Vd(k[p],"bubbled",l);for(p=d.length;0<p--;)Vd(d[p],"captured",c);return 0===(e&64)?[l]:[l,c]}};function Ze(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var $e="function"===typeof Object.is?Object.is:Ze,af=Object.prototype.hasOwnProperty;
function bf(a,b){if($e(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!af.call(b,c[d])||!$e(a[c[d]],b[c[d]]))return!1;return!0}
var cf=ya&&"documentMode"in document&&11>=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},ef=null,ff=null,gf=null,hf=!1;
function jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;"selectionStart"in c&&yd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return gf&&bf(gf,c)?null:(gf=c,a=G.getPooled(df.select,ff,a,b),a.type="select",a.target=ef,Xd(a),a)}
var kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=wa.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?Pd(b):window;switch(a){case "focus":if(xe(e)||"true"===e.contentEditable)ef=e,ff=b,gf=null;break;case "blur":gf=ff=ef=null;break;case "mousedown":hf=!0;break;case "contextmenu":case "mouseup":case "dragend":return hf=!1,jf(c,d);case "selectionchange":if(cf)break;
case "keydown":case "keyup":return jf(c,d)}return null}},lf=G.extend({animationName:null,elapsedTime:null,pseudoElement:null}),mf=G.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),nf=Ne.extend({relatedTarget:null});function of(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}
var pf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qf={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"},rf=Ne.extend({key:function(a){if(a.key){var b=pf[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=of(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?qf[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Qe,charCode:function(a){return"keypress"===
a.type?of(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?of(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),sf=Ve.extend({dataTransfer:null}),tf=Ne.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Qe}),uf=G.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),vf=Ve.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in
a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),wf={eventTypes:Wc,extractEvents:function(a,b,c,d){var e=Yc.get(a);if(!e)return null;switch(a){case "keypress":if(0===of(c))return null;case "keydown":case "keyup":a=rf;break;case "blur":case "focus":a=nf;break;case "click":if(2===c.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=
Ve;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=sf;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=tf;break;case Xb:case Yb:case Zb:a=lf;break;case $b:a=uf;break;case "scroll":a=Ne;break;case "wheel":a=vf;break;case "copy":case "cut":case "paste":a=mf;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=
We;break;default:a=G}b=a.getPooled(e,b,c,d);Xd(b);return b}};if(pa)throw Error(u(101));pa=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));ra();var xf=Nc;la=Qd;ma=xf;na=Pd;xa({SimpleEventPlugin:wf,EnterLeaveEventPlugin:Ye,ChangeEventPlugin:Me,SelectEventPlugin:kf,BeforeInputEventPlugin:ve});var yf=[],zf=-1;function H(a){0>zf||(a.current=yf[zf],yf[zf]=null,zf--)}
function I(a,b){zf++;yf[zf]=a.current;a.current=b}var Af={},J={current:Af},K={current:!1},Bf=Af;function Cf(a,b){var c=a.type.contextTypes;if(!c)return Af;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}
function Df(){H(K);H(J)}function Ef(a,b,c){if(J.current!==Af)throw Error(u(168));I(J,b);I(K,c)}function Ff(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,pb(b)||"Unknown",e));return n({},c,{},d)}function Gf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Af;Bf=J.current;I(J,a);I(K,K.current);return!0}
function Hf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Ff(a,b,Bf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c)}
var If=r.unstable_runWithPriority,Jf=r.unstable_scheduleCallback,Kf=r.unstable_cancelCallback,Lf=r.unstable_requestPaint,Mf=r.unstable_now,Nf=r.unstable_getCurrentPriorityLevel,Of=r.unstable_ImmediatePriority,Pf=r.unstable_UserBlockingPriority,Qf=r.unstable_NormalPriority,Rf=r.unstable_LowPriority,Sf=r.unstable_IdlePriority,Tf={},Uf=r.unstable_shouldYield,Vf=void 0!==Lf?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1E4>Zf?Mf:function(){return Mf()-Zf};
function ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332));}}function bg(a){switch(a){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332));}}function cg(a,b){a=bg(a);return If(a,b)}function dg(a,b,c){a=bg(a);return Jf(a,b,c)}function eg(a){null===Wf?(Wf=[a],Xf=Jf(Of,fg)):Wf.push(a);return Tf}function gg(){if(null!==Xf){var a=Xf;Xf=null;Kf(a)}fg()}
function fg(){if(!Yf&&null!==Wf){Yf=!0;var a=0;try{var b=Wf;cg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});Wf=null}catch(c){throw null!==Wf&&(Wf=Wf.slice(a+1)),Jf(Of,gg),c;}finally{Yf=!1}}}function hg(a,b,c){c/=10;return 1073741821-(((1073741821-a+b/10)/c|0)+1)*c}function ig(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}var jg={current:null},kg=null,lg=null,mg=null;function ng(){mg=lg=kg=null}
function og(a){var b=jg.current;H(jg);a.type._context._currentValue=b}function pg(a,b){for(;null!==a;){var c=a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}function qg(a,b){kg=a;mg=lg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(rg=!0),a.firstContext=null)}
function sg(a,b){if(mg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)mg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===lg){if(null===kg)throw Error(u(308));lg=b;kg.dependencies={expirationTime:0,firstContext:b,responders:null}}else lg=lg.next=b}return a._currentValue}var tg=!1;function ug(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}
function vg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function wg(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function xg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}
function yg(a,b){var c=a.alternate;null!==c&&vg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}
function zg(a,b,c,d){var e=a.updateQueue;tg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,p=null,x=null;if(null!==h){var z=h;do{g=z.expirationTime;if(g<d){var ca={expirationTime:z.expirationTime,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null};null===x?(p=x=
ca,m=k):x=x.next=ca;g>l&&(l=g)}else{null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null});Ag(g,z.suspenseConfig);a:{var D=a,t=z;g=b;ca=c;switch(t.tag){case 1:D=t.payload;if("function"===typeof D){k=D.call(ca,k,g);break a}k=D;break a;case 3:D.effectTag=D.effectTag&-4097|64;case 0:D=t.payload;g="function"===typeof D?D.call(ca,k,g):D;if(null===g||void 0===g)break a;k=n({},k,g);break a;case 2:tg=!0}}null!==z.callback&&
(a.effectTag|=32,g=e.effects,null===g?e.effects=[z]:g.push(z))}z=z.next;if(null===z||z===h)if(g=e.shared.pending,null===g)break;else z=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===x?m=k:x.next=p;e.baseState=m;e.baseQueue=x;Bg(l);a.expirationTime=l;a.memoizedState=k}}
function Cg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=e;e=c;if("function"!==typeof d)throw Error(u(191,d));d.call(e)}}}var Dg=Wa.ReactCurrentBatchConfig,Eg=(new aa.Component).refs;function Fg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;0===a.expirationTime&&(a.updateQueue.baseState=c)}
var Jg={isMounted:function(a){return(a=a._reactInternalFiber)?dc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=Gg(),d=Dg.suspense;
c=Hg(c,a,d);d=wg(c,d);d.tag=2;void 0!==b&&null!==b&&(d.callback=b);xg(a,d);Ig(a,c)}};function Kg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!bf(c,d)||!bf(e,f):!0}
function Lg(a,b,c){var d=!1,e=Af;var f=b.contextType;"object"===typeof f&&null!==f?f=sg(f):(e=L(b)?Bf:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Cf(a,e):Af);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Jg;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
function Mg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Jg.enqueueReplaceState(b,b.state,null)}
function Ng(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Eg;ug(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=sg(f):(f=L(b)?Bf:J.current,e.context=Cf(a,f));zg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Fg(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||
(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Jg.enqueueReplaceState(e,e.state,null),zg(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.effectTag|=4)}var Og=Array.isArray;
function Pg(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(u(309));var d=c.stateNode}if(!d)throw Error(u(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Eg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(u(284));if(!c._owner)throw Error(u(290,a));}return a}
function Qg(a,b){if("textarea"!==a.type)throw Error(u(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,""));}
function Rg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Sg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=
2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Tg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Pg(a,b,c),d.return=a,d;d=Ug(c.type,c.key,c.props,null,a.mode,d);d.ref=Pg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==
c.implementation)return b=Vg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Wg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function p(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Tg(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Za:return c=Ug(b.type,b.key,b.props,null,a.mode,c),c.ref=Pg(a,null,b),c.return=a,c;case $a:return b=Vg(b,a.mode,c),b.return=a,b}if(Og(b)||
nb(b))return b=Wg(b,a.mode,c,null),b.return=a,b;Qg(a,b)}return null}function x(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Za:return c.key===e?c.type===ab?m(a,b,c.props.children,d,e):k(a,b,c,d):null;case $a:return c.key===e?l(a,b,c,d):null}if(Og(c)||nb(c))return null!==e?null:m(a,b,c,d,null);Qg(a,c)}return null}function z(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=
a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Za:return a=a.get(null===d.key?c:d.key)||null,d.type===ab?m(b,a,d.props.children,e,d.key):k(b,a,d,e);case $a:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Og(d)||nb(d))return a=a.get(c)||null,m(b,a,d,e,null);Qg(b,d)}return null}function ca(e,g,h,k){for(var l=null,t=null,m=g,y=g=0,A=null;null!==m&&y<h.length;y++){m.index>y?(A=m,m=null):A=m.sibling;var q=x(e,m,h[y],k);if(null===q){null===m&&(m=A);break}a&&
m&&null===q.alternate&&b(e,m);g=f(q,g,y);null===t?l=q:t.sibling=q;t=q;m=A}if(y===h.length)return c(e,m),l;if(null===m){for(;y<h.length;y++)m=p(e,h[y],k),null!==m&&(g=f(m,g,y),null===t?l=m:t.sibling=m,t=m);return l}for(m=d(e,m);y<h.length;y++)A=z(m,e,y,h[y],k),null!==A&&(a&&null!==A.alternate&&m.delete(null===A.key?y:A.key),g=f(A,g,y),null===t?l=A:t.sibling=A,t=A);a&&m.forEach(function(a){return b(e,a)});return l}function D(e,g,h,l){var k=nb(h);if("function"!==typeof k)throw Error(u(150));h=k.call(h);
if(null==h)throw Error(u(151));for(var m=k=null,t=g,y=g=0,A=null,q=h.next();null!==t&&!q.done;y++,q=h.next()){t.index>y?(A=t,t=null):A=t.sibling;var D=x(e,t,q.value,l);if(null===D){null===t&&(t=A);break}a&&t&&null===D.alternate&&b(e,t);g=f(D,g,y);null===m?k=D:m.sibling=D;m=D;t=A}if(q.done)return c(e,t),k;if(null===t){for(;!q.done;y++,q=h.next())q=p(e,q.value,l),null!==q&&(g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);return k}for(t=d(e,t);!q.done;y++,q=h.next())q=z(t,e,y,q.value,l),null!==q&&(a&&null!==
q.alternate&&t.delete(null===q.key?y:q.key),g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);a&&t.forEach(function(a){return b(e,a)});return k}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ab&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Za:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ab){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,
k.sibling);d=e(k,f.props);d.ref=Pg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ab?(d=Wg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ug(f.type,f.key,f.props,null,a.mode,h),h.ref=Pg(a,d,f),h.return=a,a=h)}return g(a);case $a:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=
d.sibling}d=Vg(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Tg(f,a.mode,h),d.return=a,a=d),g(a);if(Og(f))return ca(a,d,f,h);if(nb(f))return D(a,d,f,h);l&&Qg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||"Component"));}return c(a,d)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};
function ch(a){if(a===Zg)throw Error(u(174));return a}function dh(a,b){I(bh,b);I(ah,a);I($g,Zg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ob(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Ob(b,a)}H($g);I($g,b)}function eh(){H($g);H(ah);H(bh)}function fh(a){ch(bh.current);var b=ch($g.current);var c=Ob(b,a.type);b!==c&&(I(ah,a),I($g,c))}function gh(a){ah.current===a&&(H($g),H(ah))}var M={current:0};
function hh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Bd||c.data===Cd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function ih(a,b){return{responder:a,props:b}}
var jh=Wa.ReactCurrentDispatcher,kh=Wa.ReactCurrentBatchConfig,lh=0,N=null,O=null,P=null,mh=!1;function Q(){throw Error(u(321));}function nh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!$e(a[c],b[c]))return!1;return!0}
function oh(a,b,c,d,e,f){lh=f;N=b;b.memoizedState=null;b.updateQueue=null;b.expirationTime=0;jh.current=null===a||null===a.memoizedState?ph:qh;a=c(d,e);if(b.expirationTime===lh){f=0;do{b.expirationTime=0;if(!(25>f))throw Error(u(301));f+=1;P=O=null;b.updateQueue=null;jh.current=rh;a=c(d,e)}while(b.expirationTime===lh)}jh.current=sh;b=null!==O&&null!==O.next;lh=0;P=O=N=null;mh=!1;if(b)throw Error(u(300));return a}
function th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function uh(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(u(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P}
function vh(a,b){return"function"===typeof b?b(a):b}
function wh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(l<lh){var m={expirationTime:k.expirationTime,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=m,f=d):h=h.next=m;l>N.expirationTime&&
(N.expirationTime=l,Bg(l))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),Ag(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;$e(d,b.memoizedState)||(rg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}
function xh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(rg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}
function yh(a){var b=th();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:a};a=a.dispatch=zh.bind(null,N,a);return[b.memoizedState,a]}function Ah(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}
function Bh(){return uh().memoizedState}function Ch(a,b,c,d){var e=th();N.effectTag|=a;e.memoizedState=Ah(1|b,c,void 0,void 0===d?null:d)}function Dh(a,b,c,d){var e=uh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&nh(d,g.deps)){Ah(b,c,f,d);return}}N.effectTag|=a;e.memoizedState=Ah(1|b,c,f,d)}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Dh(516,4,a,b)}function Gh(a,b){return Dh(4,2,a,b)}
function Hh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Ih(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Dh(4,2,Hh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){th().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}
function Mh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=ag();cg(98>d?98:d,function(){a(!0)});cg(97<d?97:d,function(){var d=kh.suspense;kh.suspense=void 0===b?null:b;try{a(!1),c()}finally{kh.suspense=d}})}
function zh(a,b,c){var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e={expirationTime:d,suspenseConfig:e,action:c,eagerReducer:null,eagerState:null,next:null};var f=b.pending;null===f?e.next=e:(e.next=f.next,f.next=e);b.pending=e;f=a.alternate;if(a===N||null!==f&&f===N)mh=!0,e.expirationTime=lh,N.expirationTime=lh;else{if(0===a.expirationTime&&(null===f||0===f.expirationTime)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.eagerReducer=f;e.eagerState=h;if($e(h,g))return}catch(k){}finally{}Ig(a,
d)}}
var sh={readContext:sg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useResponder:Q,useDeferredValue:Q,useTransition:Q},ph={readContext:sg,useCallback:Kh,useContext:sg,useEffect:Eh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Ch(4,2,Hh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Ch(4,2,a,b)},useMemo:function(a,b){var c=th();b=void 0===b?null:b;a=a();c.memoizedState=[a,
b];return a},useReducer:function(a,b,c){var d=th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=zh.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=th();a={current:a};return b.memoizedState=a},useState:yh,useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=yh(a),d=c[0],e=c[1];Eh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=
c}},[a,b]);return d},useTransition:function(a){var b=yh(!1),c=b[0];b=b[1];return[Kh(Nh.bind(null,b,a),[b,a]),c]}},qh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:wh,useRef:Bh,useState:function(){return wh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=wh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=
wh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,b,a),[b,a]),c]}},rh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:xh,useRef:Bh,useState:function(){return xh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=xh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=xh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,
b,a),[b,a]),c]}},Oh=null,Ph=null,Qh=!1;function Rh(a,b){var c=Sh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}
function Th(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
function Uh(a){if(Qh){var b=Ph;if(b){var c=b;if(!Th(a,b)){b=Jd(c.nextSibling);if(!b||!Th(a,b)){a.effectTag=a.effectTag&-1025|2;Qh=!1;Oh=a;return}Rh(Oh,c)}Oh=a;Ph=Jd(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,Qh=!1,Oh=a}}function Vh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;Oh=a}
function Wh(a){if(a!==Oh)return!1;if(!Qh)return Vh(a),Qh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Gd(b,a.memoizedProps))for(b=Ph;b;)Rh(a,b),b=Jd(b.nextSibling);Vh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(u(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===Ad){if(0===b){Ph=Jd(a.nextSibling);break a}b--}else c!==zd&&c!==Cd&&c!==Bd||b++}a=a.nextSibling}Ph=null}}else Ph=Oh?Jd(a.stateNode.nextSibling):null;return!0}
function Xh(){Ph=Oh=null;Qh=!1}var Yh=Wa.ReactCurrentOwner,rg=!1;function R(a,b,c,d){b.child=null===a?Yg(b,null,c,d):Xg(b,a.child,c,d)}function Zh(a,b,c,d,e){c=c.render;var f=b.ref;qg(b,e);d=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,d,e);return b.child}
function ai(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!bi(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ci(a,b,g,d,e,f);a=Ug(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:bf,c(e,d)&&a.ref===b.ref))return $h(a,b,f);b.effectTag|=1;a=Sg(g,d);a.ref=b.ref;a.return=b;return b.child=a}
function ci(a,b,c,d,e,f){return null!==a&&bf(a.memoizedProps,d)&&a.ref===b.ref&&(rg=!1,e<f)?(b.expirationTime=a.expirationTime,$h(a,b,f)):di(a,b,c,d,f)}function ei(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function di(a,b,c,d,e){var f=L(c)?Bf:J.current;f=Cf(b,f);qg(b,e);c=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,c,e);return b.child}
function fi(a,b,c,d,e){if(L(c)){var f=!0;Gf(b)}else f=!1;qg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Lg(b,c,d),Ng(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l));var m=c.getDerivedStateFromProps,p="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;p||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l);tg=!1;var x=b.memoizedState;g.state=x;zg(b,d,g,e);k=b.memoizedState;h!==d||x!==k||K.current||tg?("function"===typeof m&&(Fg(b,c,m,d),k=b.memoizedState),(h=tg||Kg(b,c,h,d,x,k,l))?(p||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===
typeof g.componentDidMount&&(b.effectTag|=4)):("function"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,vg(a,b),h=b.memoizedProps,g.props=b.type===b.elementType?h:ig(b.type,h),k=g.context,l=c.contextType,"object"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l)),m=c.getDerivedStateFromProps,(p="function"===typeof m||"function"===
typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l),tg=!1,k=b.memoizedState,g.state=k,zg(b,d,g,e),x=b.memoizedState,h!==d||k!==x||K.current||tg?("function"===typeof m&&(Fg(b,c,m,d),x=b.memoizedState),(m=tg||Kg(b,c,h,d,k,x,l))?(p||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,
x,l),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,l)),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=l,d=m):
("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return gi(a,b,c,d,f,e)}
function gi(a,b,c,d,e,f){ei(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&Hf(b,c,!1),$h(a,b,f);d=b.stateNode;Yh.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.effectTag|=1;null!==a&&g?(b.child=Xg(b,a.child,null,f),b.child=Xg(b,null,h,f)):R(a,b,h,f);b.memoizedState=d.state;e&&Hf(b,c,!0);return b.child}function hi(a){var b=a.stateNode;b.pendingContext?Ef(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Ef(a,b.context,!1);dh(a,b.containerInfo)}
var ii={dehydrated:null,retryTime:0};
function ji(a,b,c){var d=b.mode,e=b.pendingProps,f=M.current,g=!1,h;(h=0!==(b.effectTag&64))||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);I(M,f&1);if(null===a){void 0!==e.fallback&&Uh(b);if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=
b;e.sibling=c;b.memoizedState=ii;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=Yg(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;c=Sg(a,a.pendingProps);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,g=g.sibling;d=Sg(d,e);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=ii;b.child=c;return d}c=Xg(b,a.child,e.children,c);b.memoizedState=null;return b.child=
c}a=a.child;if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=2;e.childExpirationTime=0;b.memoizedState=ii;b.child=e;return c}b.memoizedState=null;return b.child=Xg(b,a,e.children,c)}
function ki(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);pg(a.return,b)}function li(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailExpiration:0,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailExpiration=0,g.tailMode=e,g.lastEffect=f)}
function mi(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=M.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&0!==(a.effectTag&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&ki(a,c);else if(19===a.tag)ki(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(M,d);if(0===(b.mode&2))b.memoizedState=
null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===hh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);li(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===hh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}li(b,!0,c,null,f,b.lastEffect);break;case "together":li(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}
function $h(a,b,c){null!==a&&(b.dependencies=a.dependencies);var d=b.expirationTime;0!==d&&Bg(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw Error(u(153));if(null!==b.child){a=b.child;c=Sg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Sg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}var ni,oi,pi,qi;
ni=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};oi=function(){};
pi=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;ch($g.current);a=null;switch(c){case "input":f=zb(g,f);d=zb(g,d);a=[];break;case "option":f=Gb(g,f);d=Gb(g,d);a=[];break;case "select":f=n({},f,{value:void 0});d=n({},d,{value:void 0});a=[];break;case "textarea":f=Ib(g,f);d=Ib(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=sd)}od(c,d);var h,k;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if("style"===
h)for(k in g=f[h],g)g.hasOwnProperty(k)&&(c||(c={}),c[k]="");else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(va.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var l=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&l!==g&&(null!=l||null!=g))if("style"===h)if(g){for(k in g)!g.hasOwnProperty(k)||l&&l.hasOwnProperty(k)||(c||(c={}),c[k]="");for(k in l)l.hasOwnProperty(k)&&g[k]!==l[k]&&(c||(c={}),
c[k]=l[k])}else c||(a||(a=[]),a.push(h,c)),c=l;else"dangerouslySetInnerHTML"===h?(l=l?l.__html:void 0,g=g?g.__html:void 0,null!=l&&g!==l&&(a=a||[]).push(h,l)):"children"===h?g===l||"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(h,""+l):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(va.hasOwnProperty(h)?(null!=l&&rd(e,h),a||g===l||(a=[])):(a=a||[]).push(h,l))}c&&(a=a||[]).push("style",c);e=a;if(b.updateQueue=e)b.effectTag|=4}};
qi=function(a,b,c,d){c!==d&&(b.effectTag|=4)};function ri(a,b){switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
function si(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return L(b.type)&&Df(),null;case 3:return eh(),H(K),H(J),c=b.stateNode,c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),null!==a&&null!==a.child||!Wh(b)||(b.effectTag|=4),oi(b),null;case 5:gh(b);c=ch(bh.current);var e=b.type;if(null!==a&&null!=b.stateNode)pi(a,b,e,d,c),a.ref!==b.ref&&(b.effectTag|=128);else{if(!d){if(null===b.stateNode)throw Error(u(166));
return null}a=ch($g.current);if(Wh(b)){d=b.stateNode;e=b.type;var f=b.memoizedProps;d[Md]=b;d[Nd]=f;switch(e){case "iframe":case "object":case "embed":F("load",d);break;case "video":case "audio":for(a=0;a<ac.length;a++)F(ac[a],d);break;case "source":F("error",d);break;case "img":case "image":case "link":F("error",d);F("load",d);break;case "form":F("reset",d);F("submit",d);break;case "details":F("toggle",d);break;case "input":Ab(d,f);F("invalid",d);rd(c,"onChange");break;case "select":d._wrapperState=
{wasMultiple:!!f.multiple};F("invalid",d);rd(c,"onChange");break;case "textarea":Jb(d,f),F("invalid",d),rd(c,"onChange")}od(e,f);a=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(a=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(a=["children",""+h]):va.hasOwnProperty(g)&&null!=h&&rd(c,g)}switch(e){case "input":xb(d);Eb(d,f,!0);break;case "textarea":xb(d);Lb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&
(d.onclick=sd)}c=a;b.updateQueue=c;null!==c&&(b.effectTag|=4)}else{g=9===c.nodeType?c:c.ownerDocument;a===qd&&(a=Nb(e));a===qd?"script"===e?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),"select"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Md]=b;a[Nd]=d;ni(a,b,!1,!1);b.stateNode=a;g=pd(e,d);switch(e){case "iframe":case "object":case "embed":F("load",
a);h=d;break;case "video":case "audio":for(h=0;h<ac.length;h++)F(ac[h],a);h=d;break;case "source":F("error",a);h=d;break;case "img":case "image":case "link":F("error",a);F("load",a);h=d;break;case "form":F("reset",a);F("submit",a);h=d;break;case "details":F("toggle",a);h=d;break;case "input":Ab(a,d);h=zb(a,d);F("invalid",a);rd(c,"onChange");break;case "option":h=Gb(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};h=n({},d,{value:void 0});F("invalid",a);rd(c,"onChange");break;case "textarea":Jb(a,
d);h=Ib(a,d);F("invalid",a);rd(c,"onChange");break;default:h=d}od(e,h);var k=h;for(f in k)if(k.hasOwnProperty(f)){var l=k[f];"style"===f?md(a,l):"dangerouslySetInnerHTML"===f?(l=l?l.__html:void 0,null!=l&&Qb(a,l)):"children"===f?"string"===typeof l?("textarea"!==e||""!==l)&&Rb(a,l):"number"===typeof l&&Rb(a,""+l):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(va.hasOwnProperty(f)?null!=l&&rd(c,f):null!=l&&Xa(a,f,l,g))}switch(e){case "input":xb(a);Eb(a,d,!1);
break;case "textarea":xb(a);Lb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+rb(d.value));break;case "select":a.multiple=!!d.multiple;c=d.value;null!=c?Hb(a,!!d.multiple,c,!1):null!=d.defaultValue&&Hb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof h.onClick&&(a.onclick=sd)}Fd(e,d)&&(b.effectTag|=4)}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)qi(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(u(166));
c=ch(bh.current);ch($g.current);Wh(b)?(c=b.stateNode,d=b.memoizedProps,c[Md]=b,c.nodeValue!==d&&(b.effectTag|=4)):(c=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),c[Md]=b,b.stateNode=c)}return null;case 13:H(M);d=b.memoizedState;if(0!==(b.effectTag&64))return b.expirationTime=c,b;c=null!==d;d=!1;null===a?void 0!==b.memoizedProps.fallback&&Wh(b):(e=a.memoizedState,d=null!==e,c||null===e||(e=a.child.sibling,null!==e&&(f=b.firstEffect,null!==f?(b.firstEffect=e,e.nextEffect=f):(b.firstEffect=b.lastEffect=
e,e.nextEffect=null),e.effectTag=8)));if(c&&!d&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(M.current&1))S===ti&&(S=ui);else{if(S===ti||S===ui)S=vi;0!==wi&&null!==T&&(xi(T,U),yi(T,wi))}if(c||d)b.effectTag|=4;return null;case 4:return eh(),oi(b),null;case 10:return og(b),null;case 17:return L(b.type)&&Df(),null;case 19:H(M);d=b.memoizedState;if(null===d)return null;e=0!==(b.effectTag&64);f=d.rendering;if(null===f)if(e)ri(d,!1);else{if(S!==ti||null!==a&&0!==(a.effectTag&
64))for(f=b.child;null!==f;){a=hh(f);if(null!==a){b.effectTag|=64;ri(d,!1);e=a.updateQueue;null!==e&&(b.updateQueue=e,b.effectTag|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;for(d=b.child;null!==d;)e=d,f=c,e.effectTag&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null,a=e.alternate,null===a?(e.childExpirationTime=0,e.expirationTime=f,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null):(e.childExpirationTime=a.childExpirationTime,
e.expirationTime=a.expirationTime,e.child=a.child,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,f=a.dependencies,e.dependencies=null===f?null:{expirationTime:f.expirationTime,firstContext:f.firstContext,responders:f.responders}),d=d.sibling;I(M,M.current&1|2);return b.child}f=f.sibling}}else{if(!e)if(a=hh(f),null!==a){if(b.effectTag|=64,e=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),ri(d,!0),null===d.tail&&"hidden"===d.tailMode&&!f.alternate)return b=
b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*$f()-d.renderingStartTime>d.tailExpiration&&1<c&&(b.effectTag|=64,e=!0,ri(d,!1),b.expirationTime=b.childExpirationTime=c-1);d.isBackwards?(f.sibling=b.child,b.child=f):(c=d.last,null!==c?c.sibling=f:b.child=f,d.last=f)}return null!==d.tail?(0===d.tailExpiration&&(d.tailExpiration=$f()+500),c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=$f(),c.sibling=null,b=M.current,I(M,e?b&1|2:b&1),c):null}throw Error(u(156,
b.tag));}function zi(a){switch(a.tag){case 1:L(a.type)&&Df();var b=a.effectTag;return b&4096?(a.effectTag=b&-4097|64,a):null;case 3:eh();H(K);H(J);b=a.effectTag;if(0!==(b&64))throw Error(u(285));a.effectTag=b&-4097|64;return a;case 5:return gh(a),null;case 13:return H(M),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return H(M),null;case 4:return eh(),null;case 10:return og(a),null;default:return null}}function Ai(a,b){return{value:a,source:b,stack:qb(b)}}
var Bi="function"===typeof WeakSet?WeakSet:Set;function Ci(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=qb(c));null!==c&&pb(c.type);b=b.value;null!==a&&1===a.tag&&pb(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Di(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Ei(a,c)}}function Fi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Ei(a,c)}else b.current=null}
function Gi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:ig(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(u(163));}
function Hi(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.destroy;c.destroy=void 0;void 0!==d&&d()}c=c.next}while(c!==b)}}function Ii(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}
function Ji(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:Ii(3,c);return;case 1:a=c.stateNode;if(c.effectTag&4)if(null===b)a.componentDidMount();else{var d=c.elementType===c.type?b.memoizedProps:ig(c.type,b.memoizedProps);a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}b=c.updateQueue;null!==b&&Cg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Cg(c,b,a)}return;
case 5:a=c.stateNode;null===b&&c.effectTag&4&&Fd(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Vc(c))));return;case 19:case 17:case 20:case 21:return}throw Error(u(163));}
function Ki(a,b,c){"function"===typeof Li&&Li(b);switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;cg(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){Ei(g,h)}}a=a.next}while(a!==d)})}break;case 1:Fi(b);c=b.stateNode;"function"===typeof c.componentWillUnmount&&Di(b,c);break;case 5:Fi(b);break;case 4:Mi(a,b,c)}}
function Ni(a){var b=a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;a.stateNode=null;null!==b&&Ni(b)}function Oi(a){return 5===a.tag||3===a.tag||4===a.tag}
function Pi(a){a:{for(var b=a.return;null!==b;){if(Oi(b)){var c=b;break a}b=b.return}throw Error(u(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(u(161));}c.effectTag&16&&(Rb(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Oi(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;
if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}d?Qi(a,c,b):Ri(a,c,b)}
function Qi(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=sd));else if(4!==d&&(a=a.child,null!==a))for(Qi(a,b,c),a=a.sibling;null!==a;)Qi(a,b,c),a=a.sibling}
function Ri(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Ri(a,b,c),a=a.sibling;null!==a;)Ri(a,b,c),a=a.sibling}
function Mi(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw Error(u(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=a,k=d,l=c,m=k;;)if(Ki(h,m,l),null!==m.child&&4!==m.tag)m.child.return=m,m=m.child;else{if(m===k)break a;for(;null===m.sibling;){if(null===m.return||m.return===k)break a;m=m.return}m.sibling.return=m.return;m=m.sibling}g?(h=
f,k=d.stateNode,8===h.nodeType?h.parentNode.removeChild(k):h.removeChild(k)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Ki(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}
function Si(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:Hi(3,b);return;case 1:return;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Nd]=d;"input"===a&&"radio"===d.type&&null!=d.name&&Bb(c,d);pd(a,e);b=pd(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];"style"===g?md(c,h):"dangerouslySetInnerHTML"===g?Qb(c,h):"children"===g?Rb(c,h):Xa(c,g,h,b)}switch(a){case "input":Cb(c,d);break;
case "textarea":Kb(c,d);break;case "select":b=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?Hb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?Hb(c,!!d.multiple,d.defaultValue,!0):Hb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(u(162));b.stateNode.nodeValue=b.memoizedProps;return;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,Vc(b.containerInfo));return;case 12:return;case 13:c=b;null===b.memoizedState?
d=!1:(d=!0,c=b.child,Ti=$f());if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,d?(f=f.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null,f.style.display=ld("display",e));else if(6===a.tag)a.stateNode.nodeValue=d?"":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=
f;continue}else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===c)break;for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}Ui(b);return;case 19:Ui(b);return;case 17:return}throw Error(u(163));}function Ui(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Bi);b.forEach(function(b){var d=Vi.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}
var Wi="function"===typeof WeakMap?WeakMap:Map;function Xi(a,b,c){c=wg(c,null);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Yi||(Yi=!0,Zi=d);Ci(a,b)};return c}
function $i(a,b,c){c=wg(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ci(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===aj?aj=new Set([this]):aj.add(this),Ci(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}
var bj=Math.ceil,cj=Wa.ReactCurrentDispatcher,dj=Wa.ReactCurrentOwner,V=0,ej=8,fj=16,gj=32,ti=0,hj=1,ij=2,ui=3,vi=4,jj=5,W=V,T=null,X=null,U=0,S=ti,kj=null,lj=1073741823,mj=1073741823,nj=null,wi=0,oj=!1,Ti=0,pj=500,Y=null,Yi=!1,Zi=null,aj=null,qj=!1,rj=null,sj=90,tj=null,uj=0,vj=null,wj=0;function Gg(){return(W&(fj|gj))!==V?1073741821-($f()/10|0):0!==wj?wj:wj=1073741821-($f()/10|0)}
function Hg(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=ag();if(0===(b&4))return 99===d?1073741823:1073741822;if((W&fj)!==V)return U;if(null!==c)a=hg(a,c.timeoutMs|0||5E3,250);else switch(d){case 99:a=1073741823;break;case 98:a=hg(a,150,100);break;case 97:case 96:a=hg(a,5E3,250);break;case 95:a=2;break;default:throw Error(u(326));}null!==T&&a===U&&--a;return a}
function Ig(a,b){if(50<uj)throw uj=0,vj=null,Error(u(185));a=xj(a,b);if(null!==a){var c=ag();1073741823===b?(W&ej)!==V&&(W&(fj|gj))===V?yj(a):(Z(a),W===V&&gg()):Z(a);(W&4)===V||98!==c&&99!==c||(null===tj?tj=new Map([[a,b]]):(c=tj.get(a),(void 0===c||c>b)&&tj.set(a,b)))}}
function xj(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&(T===e&&(Bg(b),S===vi&&xi(e,U)),yi(e,b));return e}
function zj(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Aj(a,b))return b;var c=a.lastPingedTime;a=a.nextKnownPendingLevel;a=c>a?c:a;return 2>=a&&b!==a?0:a}
function Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=eg(yj.bind(null,a));else{var b=zj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Gg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Tf&&Kf(c)}a.callbackExpirationTime=
b;a.callbackPriority=d;b=1073741823===b?eg(yj.bind(null,a)):dg(d,Bj.bind(null,a),{timeout:10*(1073741821-b)-$f()});a.callbackNode=b}}}
function Bj(a,b){wj=0;if(b)return b=Gg(),Cj(a,b),Z(a),null;var c=zj(a);if(0!==c){b=a.callbackNode;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&c===U||Ej(a,c);if(null!==X){var d=W;W|=fj;var e=Fj();do try{Gj();break}catch(h){Hj(a,h)}while(1);ng();W=d;cj.current=e;if(S===hj)throw b=kj,Ej(a,c),xi(a,c),Z(a),b;if(null===X)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=S,T=null,d){case ti:case hj:throw Error(u(345));case ij:Cj(a,2<c?2:c);break;case ui:xi(a,c);d=a.lastSuspendedTime;
c===d&&(a.nextKnownPendingLevel=Ij(e));if(1073741823===lj&&(e=Ti+pj-$f(),10<e)){if(oj){var f=a.lastPingedTime;if(0===f||f>=c){a.lastPingedTime=c;Ej(a,c);break}}f=zj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Hd(Jj.bind(null,a),e);break}Jj(a);break;case vi:xi(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ij(e));if(oj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Ej(a,c);break}e=zj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=
d;break}1073741823!==mj?d=10*(1073741821-mj)-$f():1073741823===lj?d=0:(d=10*(1073741821-lj)-5E3,e=$f(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*bj(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=Hd(Jj.bind(null,a),d);break}Jj(a);break;case jj:if(1073741823!==lj&&null!==nj){f=lj;var g=nj;d=g.busyMinDurationMs|0;0>=d?d=0:(e=g.busyDelayMs|0,f=$f()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10<d){xi(a,c);a.timeoutHandle=
Hd(Jj.bind(null,a),d);break}}Jj(a);break;default:throw Error(u(329));}Z(a);if(a.callbackNode===b)return Bj.bind(null,a)}}return null}
function yj(a){var b=a.lastExpiredTime;b=0!==b?b:1073741823;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&b===U||Ej(a,b);if(null!==X){var c=W;W|=fj;var d=Fj();do try{Kj();break}catch(e){Hj(a,e)}while(1);ng();W=c;cj.current=d;if(S===hj)throw c=kj,Ej(a,b),xi(a,b),Z(a),c;if(null!==X)throw Error(u(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;T=null;Jj(a);Z(a)}return null}function Lj(){if(null!==tj){var a=tj;tj=null;a.forEach(function(a,c){Cj(c,a);Z(c)});gg()}}
function Mj(a,b){var c=W;W|=1;try{return a(b)}finally{W=c,W===V&&gg()}}function Nj(a,b){var c=W;W&=-2;W|=ej;try{return a(b)}finally{W=c,W===V&&gg()}}
function Ej(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Id(c));if(null!==X)for(c=X.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Df();break;case 3:eh();H(K);H(J);break;case 5:gh(d);break;case 4:eh();break;case 13:H(M);break;case 19:H(M);break;case 10:og(d)}c=c.return}T=a;X=Sg(a.current,null);U=b;S=ti;kj=null;mj=lj=1073741823;nj=null;wi=0;oj=!1}
function Hj(a,b){do{try{ng();jh.current=sh;if(mh)for(var c=N.memoizedState;null!==c;){var d=c.queue;null!==d&&(d.pending=null);c=c.next}lh=0;P=O=N=null;mh=!1;if(null===X||null===X.return)return S=hj,kj=b,X=null;a:{var e=a,f=X.return,g=X,h=b;b=U;g.effectTag|=2048;g.firstEffect=g.lastEffect=null;if(null!==h&&"object"===typeof h&&"function"===typeof h.then){var k=h;if(0===(g.mode&2)){var l=g.alternate;l?(g.updateQueue=l.updateQueue,g.memoizedState=l.memoizedState,g.expirationTime=l.expirationTime):(g.updateQueue=
null,g.memoizedState=null)}var m=0!==(M.current&1),p=f;do{var x;if(x=13===p.tag){var z=p.memoizedState;if(null!==z)x=null!==z.dehydrated?!0:!1;else{var ca=p.memoizedProps;x=void 0===ca.fallback?!1:!0!==ca.unstable_avoidThisFallback?!0:m?!1:!0}}if(x){var D=p.updateQueue;if(null===D){var t=new Set;t.add(k);p.updateQueue=t}else D.add(k);if(0===(p.mode&2)){p.effectTag|=64;g.effectTag&=-2981;if(1===g.tag)if(null===g.alternate)g.tag=17;else{var y=wg(1073741823,null);y.tag=2;xg(g,y)}g.expirationTime=1073741823;
break a}h=void 0;g=b;var A=e.pingCache;null===A?(A=e.pingCache=new Wi,h=new Set,A.set(k,h)):(h=A.get(k),void 0===h&&(h=new Set,A.set(k,h)));if(!h.has(g)){h.add(g);var q=Oj.bind(null,e,k,g);k.then(q,q)}p.effectTag|=4096;p.expirationTime=b;break a}p=p.return}while(null!==p);h=Error((pb(g.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+qb(g))}S!==
jj&&(S=ij);h=Ai(h,g);p=f;do{switch(p.tag){case 3:k=h;p.effectTag|=4096;p.expirationTime=b;var B=Xi(p,k,b);yg(p,B);break a;case 1:k=h;var w=p.type,ub=p.stateNode;if(0===(p.effectTag&64)&&("function"===typeof w.getDerivedStateFromError||null!==ub&&"function"===typeof ub.componentDidCatch&&(null===aj||!aj.has(ub)))){p.effectTag|=4096;p.expirationTime=b;var vb=$i(p,k,b);yg(p,vb);break a}}p=p.return}while(null!==p)}X=Pj(X)}catch(Xc){b=Xc;continue}break}while(1)}
function Fj(){var a=cj.current;cj.current=sh;return null===a?sh:a}function Ag(a,b){a<lj&&2<a&&(lj=a);null!==b&&a<mj&&2<a&&(mj=a,nj=b)}function Bg(a){a>wi&&(wi=a)}function Kj(){for(;null!==X;)X=Qj(X)}function Gj(){for(;null!==X&&!Uf();)X=Qj(X)}function Qj(a){var b=Rj(a.alternate,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=Pj(a));dj.current=null;return b}
function Pj(a){X=a;do{var b=X.alternate;a=X.return;if(0===(X.effectTag&2048)){b=si(b,X,U);if(1===U||1!==X.childExpirationTime){for(var c=0,d=X.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling}X.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=X.firstEffect),null!==X.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=X.firstEffect),a.lastEffect=X.lastEffect),1<X.effectTag&&(null!==
a.lastEffect?a.lastEffect.nextEffect=X:a.firstEffect=X,a.lastEffect=X))}else{b=zi(X);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=X.sibling;if(null!==b)return b;X=a}while(null!==X);S===ti&&(S=jj);return null}function Ij(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function Jj(a){var b=ag();cg(99,Sj.bind(null,a,b));return null}
function Sj(a,b){do Dj();while(null!==rj);if((W&(fj|gj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ij(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=
d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(X=T=null,U=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=W;W|=gj;dj.current=null;Dd=fd;var g=xd();if(yd(g)){if("selectionStart"in g)var h={start:g.selectionStart,end:g.selectionEnd};else a:{h=(h=g.ownerDocument)&&h.defaultView||window;var k=h.getSelection&&h.getSelection();if(k&&0!==k.rangeCount){h=k.anchorNode;var l=k.anchorOffset,
m=k.focusNode;k=k.focusOffset;try{h.nodeType,m.nodeType}catch(wb){h=null;break a}var p=0,x=-1,z=-1,ca=0,D=0,t=g,y=null;b:for(;;){for(var A;;){t!==h||0!==l&&3!==t.nodeType||(x=p+l);t!==m||0!==k&&3!==t.nodeType||(z=p+k);3===t.nodeType&&(p+=t.nodeValue.length);if(null===(A=t.firstChild))break;y=t;t=A}for(;;){if(t===g)break b;y===h&&++ca===l&&(x=p);y===m&&++D===k&&(z=p);if(null!==(A=t.nextSibling))break;t=y;y=t.parentNode}t=A}h=-1===x||-1===z?null:{start:x,end:z}}else h=null}h=h||{start:0,end:0}}else h=
null;Ed={activeElementDetached:null,focusedElem:g,selectionRange:h};fd=!1;Y=e;do try{Tj()}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=e;do try{for(g=a,h=b;null!==Y;){var q=Y.effectTag;q&16&&Rb(Y.stateNode,"");if(q&128){var B=Y.alternate;if(null!==B){var w=B.ref;null!==w&&("function"===typeof w?w(null):w.current=null)}}switch(q&1038){case 2:Pi(Y);Y.effectTag&=-3;break;case 6:Pi(Y);Y.effectTag&=-3;Si(Y.alternate,Y);break;case 1024:Y.effectTag&=-1025;break;case 1028:Y.effectTag&=
-1025;Si(Y.alternate,Y);break;case 4:Si(Y.alternate,Y);break;case 8:l=Y,Mi(g,l,h),Ni(l)}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);w=Ed;B=xd();q=w.focusedElem;h=w.selectionRange;if(B!==q&&q&&q.ownerDocument&&wd(q.ownerDocument.documentElement,q)){null!==h&&yd(q)&&(B=h.start,w=h.end,void 0===w&&(w=B),"selectionStart"in q?(q.selectionStart=B,q.selectionEnd=Math.min(w,q.value.length)):(w=(B=q.ownerDocument||document)&&B.defaultView||window,w.getSelection&&
(w=w.getSelection(),l=q.textContent.length,g=Math.min(h.start,l),h=void 0===h.end?g:Math.min(h.end,l),!w.extend&&g>h&&(l=h,h=g,g=l),l=vd(q,g),m=vd(q,h),l&&m&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==m.node||w.focusOffset!==m.offset)&&(B=B.createRange(),B.setStart(l.node,l.offset),w.removeAllRanges(),g>h?(w.addRange(B),w.extend(m.node,m.offset)):(B.setEnd(m.node,m.offset),w.addRange(B))))));B=[];for(w=q;w=w.parentNode;)1===w.nodeType&&B.push({element:w,left:w.scrollLeft,
top:w.scrollTop});"function"===typeof q.focus&&q.focus();for(q=0;q<B.length;q++)w=B[q],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}fd=!!Dd;Ed=Dd=null;a.current=c;Y=e;do try{for(q=a;null!==Y;){var ub=Y.effectTag;ub&36&&Ji(q,Y.alternate,Y);if(ub&128){B=void 0;var vb=Y.ref;if(null!==vb){var Xc=Y.stateNode;switch(Y.tag){case 5:B=Xc;break;default:B=Xc}"function"===typeof vb?vb(B):vb.current=B}}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=
null;Vf();W=f}else a.current=c;if(qj)qj=!1,rj=a,sj=b;else for(Y=e;null!==Y;)b=Y.nextEffect,Y.nextEffect=null,Y=b;b=a.firstPendingTime;0===b&&(aj=null);1073741823===b?a===vj?uj++:(uj=0,vj=a):uj=0;"function"===typeof Uj&&Uj(c.stateNode,d);Z(a);if(Yi)throw Yi=!1,a=Zi,Zi=null,a;if((W&ej)!==V)return null;gg();return null}function Tj(){for(;null!==Y;){var a=Y.effectTag;0!==(a&256)&&Gi(Y.alternate,Y);0===(a&512)||qj||(qj=!0,dg(97,function(){Dj();return null}));Y=Y.nextEffect}}
function Dj(){if(90!==sj){var a=97<sj?97:sj;sj=90;return cg(a,Vj)}}function Vj(){if(null===rj)return!1;var a=rj;rj=null;if((W&(fj|gj))!==V)throw Error(u(331));var b=W;W|=gj;for(a=a.current.firstEffect;null!==a;){try{var c=a;if(0!==(c.effectTag&512))switch(c.tag){case 0:case 11:case 15:case 22:Hi(5,c),Ii(5,c)}}catch(d){if(null===a)throw Error(u(330));Ei(a,d)}c=a.nextEffect;a.nextEffect=null;a=c}W=b;gg();return!0}
function Wj(a,b,c){b=Ai(c,b);b=Xi(a,b,1073741823);xg(a,b);a=xj(a,1073741823);null!==a&&Z(a)}function Ei(a,b){if(3===a.tag)Wj(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){Wj(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===aj||!aj.has(d))){a=Ai(b,a);a=$i(c,a,1073741823);xg(c,a);c=xj(c,1073741823);null!==c&&Z(c);break}}c=c.return}}
function Oj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);T===a&&U===c?S===vi||S===ui&&1073741823===lj&&$f()-Ti<pj?Ej(a,U):oj=!0:Aj(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,Z(a)))}function Vi(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=Gg(),b=Hg(b,a,null));a=xj(a,b);null!==a&&Z(a)}var Rj;
Rj=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||K.current)rg=!0;else{if(d<c){rg=!1;switch(b.tag){case 3:hi(b);Xh();break;case 5:fh(b);if(b.mode&4&&1!==c&&e.hidden)return b.expirationTime=b.childExpirationTime=1,null;break;case 1:L(b.type)&&Gf(b);break;case 4:dh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;e=b.type._context;I(jg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;
if(0!==d&&d>=c)return ji(a,b,c);I(M,M.current&1);b=$h(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return mi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current);if(!d)return null}return $h(a,b,c)}rg=!1}}else rg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Cf(b,J.current);qg(b,c);e=oh(null,
b,d,a,e,c);b.effectTag|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(L(d)){var f=!0;Gf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ug(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Fg(b,d,g,a);e.updater=Jg;b.stateNode=e;e._reactInternalFiber=b;Ng(b,d,a,c);b=gi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=
null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ob(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=ig(e,a);switch(f){case 0:b=di(null,b,e,a,c);break a;case 1:b=fi(null,b,e,a,c);break a;case 11:b=Zh(null,b,e,a,c);break a;case 14:b=ai(null,b,e,ig(e.type,a),d,c);break a}throw Error(u(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),fi(a,b,d,e,c);
case 3:hi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;vg(a,b);zg(b,d,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else{if(e=b.stateNode.hydrate)Ph=Jd(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Yg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),Xh();b=b.child}return b;case 5:return fh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:
null,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return dh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Xg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,
b,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(jg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=$e(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==
k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=wg(c,null),l.tag=2,xg(h,l));h.expirationTime<c&&(h.expirationTime=c);l=h.alternate;null!==l&&l.expirationTime<c&&(l.expirationTime=c);pg(h.return,c);k.expirationTime<c&&(k.expirationTime=c);break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=
g}R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,qg(b,c),e=sg(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,R(a,b,d,c),b.child;case 14:return e=b.type,f=ig(e,b.pendingProps),f=ig(e.type,f),ai(a,b,e,f,d,c);case 15:return ci(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,L(d)?(a=!0,Gf(b)):a=!1,qg(b,c),Lg(b,d,e),Ng(b,d,e,c),gi(null,
b,d,!0,a,c);case 19:return mi(a,b,c)}throw Error(u(156,b.tag));};var Uj=null,Li=null;function Yj(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Uj=function(a){try{b.onCommitFiberRoot(c,a,void 0,64===(a.current.effectTag&64))}catch(e){}};Li=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}
function Zj(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function Sh(a,b,c,d){return new Zj(a,b,c,d)}
function bi(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Xj(a){if("function"===typeof a)return bi(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===gb)return 11;if(a===jb)return 14}return 2}
function Sg(a,b){var c=a.alternate;null===c?(c=Sh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{expirationTime:b.expirationTime,
firstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}
function Ug(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)bi(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ab:return Wg(c.children,e,f,b);case fb:g=8;e|=7;break;case bb:g=8;e|=1;break;case cb:return a=Sh(12,c,b,e|8),a.elementType=cb,a.type=cb,a.expirationTime=f,a;case hb:return a=Sh(13,c,b,e),a.type=hb,a.elementType=hb,a.expirationTime=f,a;case ib:return a=Sh(19,c,b,e),a.elementType=ib,a.expirationTime=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case db:g=
10;break a;case eb:g=9;break a;case gb:g=11;break a;case jb:g=14;break a;case kb:g=16;d=null;break a;case lb:g=22;break a}throw Error(u(130,null==a?a:typeof a,""));}b=Sh(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Wg(a,b,c,d){a=Sh(7,a,d,b);a.expirationTime=c;return a}function Tg(a,b,c){a=Sh(6,a,null,b);a.expirationTime=c;return a}
function Vg(a,b,c){b=Sh(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
function ak(a,b,c){this.tag=b;this.current=null;this.containerInfo=a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}
function Aj(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function xi(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}
function yi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Cj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}
function bk(a,b,c,d){var e=b.current,f=Gg(),g=Dg.suspense;f=Hg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(dc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=Ff(c,k,h);break a}}c=h}else c=Af;null===b.context?b.context=c:b.pendingContext=c;b=wg(f,g);b.payload={element:a};d=void 0===
d?null:d;null!==d&&(b.callback=d);xg(e,b);Ig(e,f);return f}function ck(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function dk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime<b&&(a.retryTime=b)}function ek(a,b){dk(a,b);(a=a.alternate)&&dk(a,b)}
function fk(a,b,c){c=null!=c&&!0===c.hydrate;var d=new ak(a,b,c),e=Sh(3,null,null,2===b?7:1===b?3:0);d.current=e;e.stateNode=d;ug(e);a[Od]=d.current;c&&0!==b&&Jc(a,9===a.nodeType?a:a.ownerDocument);this._internalRoot=d}fk.prototype.render=function(a){bk(a,this._internalRoot,null,null)};fk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;bk(null,a,null,function(){b[Od]=null})};
function gk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function hk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new fk(a,0,b?{hydrate:!0}:void 0)}
function ik(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=ck(g);h.call(a)}}bk(b,g,a,e)}else{f=c._reactRootContainer=hk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=ck(g);k.call(a)}}Nj(function(){bk(b,g,a,e)})}return ck(g)}function jk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:$a,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
wc=function(a){if(13===a.tag){var b=hg(Gg(),150,100);Ig(a,b);ek(a,b)}};xc=function(a){13===a.tag&&(Ig(a,3),ek(a,3))};yc=function(a){if(13===a.tag){var b=Gg();b=Hg(b,a,null);Ig(a,b);ek(a,b)}};
za=function(a,b,c){switch(b){case "input":Cb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Qd(d);if(!e)throw Error(u(90));yb(d);Cb(d,e)}}}break;case "textarea":Kb(a,c);break;case "select":b=c.value,null!=b&&Hb(a,!!c.multiple,b,!1)}};Fa=Mj;
Ga=function(a,b,c,d,e){var f=W;W|=4;try{return cg(98,a.bind(null,b,c,d,e))}finally{W=f,W===V&&gg()}};Ha=function(){(W&(1|fj|gj))===V&&(Lj(),Dj())};Ia=function(a,b){var c=W;W|=2;try{return a(b)}finally{W=c,W===V&&gg()}};function kk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gk(b))throw Error(u(200));return jk(a,b,null,c)}var lk={Events:[Nc,Pd,Qd,xa,ta,Xd,function(a){jc(a,Wd)},Da,Ea,id,mc,Dj,{current:!1}]};
(function(a){var b=a.findFiberByHostInstance;return Yj(n({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=hc(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:tc,bundleType:0,version:"16.13.1",
rendererPackageName:"react-dom"});exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;exports.createPortal=kk;exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===b){if("function"===typeof a.render)throw Error(u(188));throw Error(u(268,Object.keys(a)));}a=hc(b);a=null===a?null:a.stateNode;return a};
exports.flushSync=function(a,b){if((W&(fj|gj))!==V)throw Error(u(187));var c=W;W|=1;try{return cg(99,a.bind(null,b))}finally{W=c,gg()}};exports.hydrate=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!0,c)};exports.render=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!1,c)};
exports.unmountComponentAtNode=function(a){if(!gk(a))throw Error(u(40));return a._reactRootContainer?(Nj(function(){ik(null,null,a,!1,function(){a._reactRootContainer=null;a[Od]=null})}),!0):!1};exports.unstable_batchedUpdates=Mj;exports.unstable_createPortal=function(a,b){return kk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!gk(c))throw Error(u(200));if(null==a||void 0===a._reactInternalFiber)throw Error(u(38));return ik(a,b,c,!1,d)};exports.version="16.13.1";

},{"object-assign":357,"react":380,"scheduler":385}],374:[function(require,module,exports){
(function (process){(function (){
'use strict';

function checkDCE() {
  /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
  if (
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
    typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
  ) {
    return;
  }
  if (process.env.NODE_ENV !== 'production') {
    // This branch is unreachable because this function is only called
    // in production, but the condition is true only in development.
    // Therefore if the branch is still here, dead code elimination wasn't
    // properly applied.
    // Don't change the message. React DevTools relies on it. Also make sure
    // this message doesn't occur elsewhere in this function, or it will cause
    // a false positive.
    throw new Error('^_^');
  }
  try {
    // Verify that the code above has been dead code eliminated (DCE'd).
    __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
  } catch (err) {
    // DevTools shouldn't crash React, no matter what.
    // We should still report in case we break this code.
    console.error(err);
  }
}

if (process.env.NODE_ENV === 'production') {
  // DCE check should happen before ReactDOM bundle executes so that
  // DevTools can report bad minification during injection.
  checkDCE();
  module.exports = require('./cjs/react-dom.production.min.js');
} else {
  module.exports = require('./cjs/react-dom.development.js');
}

}).call(this)}).call(this,require('_process'))
},{"./cjs/react-dom.development.js":372,"./cjs/react-dom.production.min.js":373,"_process":358}],375:[function(require,module,exports){
(function (process){(function (){
/** @license React v16.13.1
 * react-is.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';



if (process.env.NODE_ENV !== "production") {
  (function() {
'use strict';

// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
// (unstable) APIs that have been removed. Can we remove the symbols?

var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;

function isValidElementType(type) {
  return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
}

function typeOf(object) {
  if (typeof object === 'object' && object !== null) {
    var $$typeof = object.$$typeof;

    switch ($$typeof) {
      case REACT_ELEMENT_TYPE:
        var type = object.type;

        switch (type) {
          case REACT_ASYNC_MODE_TYPE:
          case REACT_CONCURRENT_MODE_TYPE:
          case REACT_FRAGMENT_TYPE:
          case REACT_PROFILER_TYPE:
          case REACT_STRICT_MODE_TYPE:
          case REACT_SUSPENSE_TYPE:
            return type;

          default:
            var $$typeofType = type && type.$$typeof;

            switch ($$typeofType) {
              case REACT_CONTEXT_TYPE:
              case REACT_FORWARD_REF_TYPE:
              case REACT_LAZY_TYPE:
              case REACT_MEMO_TYPE:
              case REACT_PROVIDER_TYPE:
                return $$typeofType;

              default:
                return $$typeof;
            }

        }

      case REACT_PORTAL_TYPE:
        return $$typeof;
    }
  }

  return undefined;
} // AsyncMode is deprecated along with isAsyncMode

var AsyncMode = REACT_ASYNC_MODE_TYPE;
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
var ContextConsumer = REACT_CONTEXT_TYPE;
var ContextProvider = REACT_PROVIDER_TYPE;
var Element = REACT_ELEMENT_TYPE;
var ForwardRef = REACT_FORWARD_REF_TYPE;
var Fragment = REACT_FRAGMENT_TYPE;
var Lazy = REACT_LAZY_TYPE;
var Memo = REACT_MEMO_TYPE;
var Portal = REACT_PORTAL_TYPE;
var Profiler = REACT_PROFILER_TYPE;
var StrictMode = REACT_STRICT_MODE_TYPE;
var Suspense = REACT_SUSPENSE_TYPE;
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated

function isAsyncMode(object) {
  {
    if (!hasWarnedAboutDeprecatedIsAsyncMode) {
      hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint

      console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
    }
  }

  return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
}
function isConcurrentMode(object) {
  return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
}
function isContextConsumer(object) {
  return typeOf(object) === REACT_CONTEXT_TYPE;
}
function isContextProvider(object) {
  return typeOf(object) === REACT_PROVIDER_TYPE;
}
function isElement(object) {
  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
function isForwardRef(object) {
  return typeOf(object) === REACT_FORWARD_REF_TYPE;
}
function isFragment(object) {
  return typeOf(object) === REACT_FRAGMENT_TYPE;
}
function isLazy(object) {
  return typeOf(object) === REACT_LAZY_TYPE;
}
function isMemo(object) {
  return typeOf(object) === REACT_MEMO_TYPE;
}
function isPortal(object) {
  return typeOf(object) === REACT_PORTAL_TYPE;
}
function isProfiler(object) {
  return typeOf(object) === REACT_PROFILER_TYPE;
}
function isStrictMode(object) {
  return typeOf(object) === REACT_STRICT_MODE_TYPE;
}
function isSuspense(object) {
  return typeOf(object) === REACT_SUSPENSE_TYPE;
}

exports.AsyncMode = AsyncMode;
exports.ConcurrentMode = ConcurrentMode;
exports.ContextConsumer = ContextConsumer;
exports.ContextProvider = ContextProvider;
exports.Element = Element;
exports.ForwardRef = ForwardRef;
exports.Fragment = Fragment;
exports.Lazy = Lazy;
exports.Memo = Memo;
exports.Portal = Portal;
exports.Profiler = Profiler;
exports.StrictMode = StrictMode;
exports.Suspense = Suspense;
exports.isAsyncMode = isAsyncMode;
exports.isConcurrentMode = isConcurrentMode;
exports.isContextConsumer = isContextConsumer;
exports.isContextProvider = isContextProvider;
exports.isElement = isElement;
exports.isForwardRef = isForwardRef;
exports.isFragment = isFragment;
exports.isLazy = isLazy;
exports.isMemo = isMemo;
exports.isPortal = isPortal;
exports.isProfiler = isProfiler;
exports.isStrictMode = isStrictMode;
exports.isSuspense = isSuspense;
exports.isValidElementType = isValidElementType;
exports.typeOf = typeOf;
  })();
}

}).call(this)}).call(this,require('_process'))
},{"_process":358}],376:[function(require,module,exports){
/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;

},{}],377:[function(require,module,exports){
(function (process){(function (){
'use strict';

if (process.env.NODE_ENV === 'production') {
  module.exports = require('./cjs/react-is.production.min.js');
} else {
  module.exports = require('./cjs/react-is.development.js');
}

}).call(this)}).call(this,require('_process'))
},{"./cjs/react-is.development.js":375,"./cjs/react-is.production.min.js":376,"_process":358}],378:[function(require,module,exports){
(function (process){(function (){
/** @license React v16.13.1
 * react.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';



if (process.env.NODE_ENV !== "production") {
  (function() {
'use strict';

var _assign = require('object-assign');
var checkPropTypes = require('prop-types/checkPropTypes');

var ReactVersion = '16.13.1';

// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
// nor polyfill, then a plain number is used for performance.
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = '@@iterator';
function getIteratorFn(maybeIterable) {
  if (maybeIterable === null || typeof maybeIterable !== 'object') {
    return null;
  }

  var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];

  if (typeof maybeIterator === 'function') {
    return maybeIterator;
  }

  return null;
}

/**
 * Keeps track of the current dispatcher.
 */
var ReactCurrentDispatcher = {
  /**
   * @internal
   * @type {ReactComponent}
   */
  current: null
};

/**
 * Keeps track of the current batch's configuration such as how long an update
 * should suspend for if it needs to.
 */
var ReactCurrentBatchConfig = {
  suspense: null
};

/**
 * Keeps track of the current owner.
 *
 * The current owner is the component who should own any components that are
 * currently being constructed.
 */
var ReactCurrentOwner = {
  /**
   * @internal
   * @type {ReactComponent}
   */
  current: null
};

var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
function describeComponentFrame (name, source, ownerName) {
  var sourceInfo = '';

  if (source) {
    var path = source.fileName;
    var fileName = path.replace(BEFORE_SLASH_RE, '');

    {
      // In DEV, include code for a common special case:
      // prefer "folder/index.js" instead of just "index.js".
      if (/^index\./.test(fileName)) {
        var match = path.match(BEFORE_SLASH_RE);

        if (match) {
          var pathBeforeSlash = match[1];

          if (pathBeforeSlash) {
            var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
            fileName = folderName + '/' + fileName;
          }
        }
      }
    }

    sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
  } else if (ownerName) {
    sourceInfo = ' (created by ' + ownerName + ')';
  }

  return '\n    in ' + (name || 'Unknown') + sourceInfo;
}

var Resolved = 1;
function refineResolvedLazyComponent(lazyComponent) {
  return lazyComponent._status === Resolved ? lazyComponent._result : null;
}

function getWrappedName(outerType, innerType, wrapperName) {
  var functionName = innerType.displayName || innerType.name || '';
  return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
}

function getComponentName(type) {
  if (type == null) {
    // Host root, text node or just invalid type.
    return null;
  }

  {
    if (typeof type.tag === 'number') {
      error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
    }
  }

  if (typeof type === 'function') {
    return type.displayName || type.name || null;
  }

  if (typeof type === 'string') {
    return type;
  }

  switch (type) {
    case REACT_FRAGMENT_TYPE:
      return 'Fragment';

    case REACT_PORTAL_TYPE:
      return 'Portal';

    case REACT_PROFILER_TYPE:
      return "Profiler";

    case REACT_STRICT_MODE_TYPE:
      return 'StrictMode';

    case REACT_SUSPENSE_TYPE:
      return 'Suspense';

    case REACT_SUSPENSE_LIST_TYPE:
      return 'SuspenseList';
  }

  if (typeof type === 'object') {
    switch (type.$$typeof) {
      case REACT_CONTEXT_TYPE:
        return 'Context.Consumer';

      case REACT_PROVIDER_TYPE:
        return 'Context.Provider';

      case REACT_FORWARD_REF_TYPE:
        return getWrappedName(type, type.render, 'ForwardRef');

      case REACT_MEMO_TYPE:
        return getComponentName(type.type);

      case REACT_BLOCK_TYPE:
        return getComponentName(type.render);

      case REACT_LAZY_TYPE:
        {
          var thenable = type;
          var resolvedThenable = refineResolvedLazyComponent(thenable);

          if (resolvedThenable) {
            return getComponentName(resolvedThenable);
          }

          break;
        }
    }
  }

  return null;
}

var ReactDebugCurrentFrame = {};
var currentlyValidatingElement = null;
function setCurrentlyValidatingElement(element) {
  {
    currentlyValidatingElement = element;
  }
}

{
  // Stack implementation injected by the current renderer.
  ReactDebugCurrentFrame.getCurrentStack = null;

  ReactDebugCurrentFrame.getStackAddendum = function () {
    var stack = ''; // Add an extra top frame while an element is being validated

    if (currentlyValidatingElement) {
      var name = getComponentName(currentlyValidatingElement.type);
      var owner = currentlyValidatingElement._owner;
      stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
    } // Delegate to the injected renderer-specific implementation


    var impl = ReactDebugCurrentFrame.getCurrentStack;

    if (impl) {
      stack += impl() || '';
    }

    return stack;
  };
}

/**
 * Used by act() to track whether you're inside an act() scope.
 */
var IsSomeRendererActing = {
  current: false
};

var ReactSharedInternals = {
  ReactCurrentDispatcher: ReactCurrentDispatcher,
  ReactCurrentBatchConfig: ReactCurrentBatchConfig,
  ReactCurrentOwner: ReactCurrentOwner,
  IsSomeRendererActing: IsSomeRendererActing,
  // Used by renderers to avoid bundling object-assign twice in UMD bundles:
  assign: _assign
};

{
  _assign(ReactSharedInternals, {
    // These should not be included in production.
    ReactDebugCurrentFrame: ReactDebugCurrentFrame,
    // Shim for React DOM 16.0.0 which still destructured (but not used) this.
    // TODO: remove in React 17.0.
    ReactComponentTreeHook: {}
  });
}

// by calls to these methods by a Babel plugin.
//
// In PROD (or in packages without access to React internals),
// they are left as they are instead.

function warn(format) {
  {
    for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
      args[_key - 1] = arguments[_key];
    }

    printWarning('warn', format, args);
  }
}
function error(format) {
  {
    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
      args[_key2 - 1] = arguments[_key2];
    }

    printWarning('error', format, args);
  }
}

function printWarning(level, format, args) {
  // When changing this logic, you might want to also
  // update consoleWithStackDev.www.js as well.
  {
    var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n    in') === 0;

    if (!hasExistingStack) {
      var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
      var stack = ReactDebugCurrentFrame.getStackAddendum();

      if (stack !== '') {
        format += '%s';
        args = args.concat([stack]);
      }
    }

    var argsWithFormat = args.map(function (item) {
      return '' + item;
    }); // Careful: RN currently depends on this prefix

    argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
    // breaks IE9: https://github.com/facebook/react/issues/13610
    // eslint-disable-next-line react-internal/no-production-logging

    Function.prototype.apply.call(console[level], console, argsWithFormat);

    try {
      // --- Welcome to debugging React ---
      // This error was thrown as a convenience so that you can use this stack
      // to find the callsite that caused this warning to fire.
      var argIndex = 0;
      var message = 'Warning: ' + format.replace(/%s/g, function () {
        return args[argIndex++];
      });
      throw new Error(message);
    } catch (x) {}
  }
}

var didWarnStateUpdateForUnmountedComponent = {};

function warnNoop(publicInstance, callerName) {
  {
    var _constructor = publicInstance.constructor;
    var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
    var warningKey = componentName + "." + callerName;

    if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
      return;
    }

    error("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.', callerName, componentName);

    didWarnStateUpdateForUnmountedComponent[warningKey] = true;
  }
}
/**
 * This is the abstract API for an update queue.
 */


var ReactNoopUpdateQueue = {
  /**
   * Checks whether or not this composite component is mounted.
   * @param {ReactClass} publicInstance The instance we want to test.
   * @return {boolean} True if mounted, false otherwise.
   * @protected
   * @final
   */
  isMounted: function (publicInstance) {
    return false;
  },

  /**
   * Forces an update. This should only be invoked when it is known with
   * certainty that we are **not** in a DOM transaction.
   *
   * You may want to call this when you know that some deeper aspect of the
   * component's state has changed but `setState` was not called.
   *
   * This will not invoke `shouldComponentUpdate`, but it will invoke
   * `componentWillUpdate` and `componentDidUpdate`.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {?function} callback Called after component is updated.
   * @param {?string} callerName name of the calling function in the public API.
   * @internal
   */
  enqueueForceUpdate: function (publicInstance, callback, callerName) {
    warnNoop(publicInstance, 'forceUpdate');
  },

  /**
   * Replaces all of the state. Always use this or `setState` to mutate state.
   * You should treat `this.state` as immutable.
   *
   * There is no guarantee that `this.state` will be immediately updated, so
   * accessing `this.state` after calling this method may return the old value.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {object} completeState Next state.
   * @param {?function} callback Called after component is updated.
   * @param {?string} callerName name of the calling function in the public API.
   * @internal
   */
  enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
    warnNoop(publicInstance, 'replaceState');
  },

  /**
   * Sets a subset of the state. This only exists because _pendingState is
   * internal. This provides a merging strategy that is not available to deep
   * properties which is confusing. TODO: Expose pendingState or don't use it
   * during the merge.
   *
   * @param {ReactClass} publicInstance The instance that should rerender.
   * @param {object} partialState Next partial state to be merged with state.
   * @param {?function} callback Called after component is updated.
   * @param {?string} Name of the calling function in the public API.
   * @internal
   */
  enqueueSetState: function (publicInstance, partialState, callback, callerName) {
    warnNoop(publicInstance, 'setState');
  }
};

var emptyObject = {};

{
  Object.freeze(emptyObject);
}
/**
 * Base class helpers for the updating state of a component.
 */


function Component(props, context, updater) {
  this.props = props;
  this.context = context; // If a component has string refs, we will assign a different object later.

  this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
  // renderer.

  this.updater = updater || ReactNoopUpdateQueue;
}

Component.prototype.isReactComponent = {};
/**
 * Sets a subset of the state. Always use this to mutate
 * state. You should treat `this.state` as immutable.
 *
 * There is no guarantee that `this.state` will be immediately updated, so
 * accessing `this.state` after calling this method may return the old value.
 *
 * There is no guarantee that calls to `setState` will run synchronously,
 * as they may eventually be batched together.  You can provide an optional
 * callback that will be executed when the call to setState is actually
 * completed.
 *
 * When a function is provided to setState, it will be called at some point in
 * the future (not synchronously). It will be called with the up to date
 * component arguments (state, props, context). These values can be different
 * from this.* because your function may be called after receiveProps but before
 * shouldComponentUpdate, and this new state, props, and context will not yet be
 * assigned to this.
 *
 * @param {object|function} partialState Next partial state or function to
 *        produce next partial state to be merged with current state.
 * @param {?function} callback Called after state is updated.
 * @final
 * @protected
 */

Component.prototype.setState = function (partialState, callback) {
  if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
    {
      throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
    }
  }

  this.updater.enqueueSetState(this, partialState, callback, 'setState');
};
/**
 * Forces an update. This should only be invoked when it is known with
 * certainty that we are **not** in a DOM transaction.
 *
 * You may want to call this when you know that some deeper aspect of the
 * component's state has changed but `setState` was not called.
 *
 * This will not invoke `shouldComponentUpdate`, but it will invoke
 * `componentWillUpdate` and `componentDidUpdate`.
 *
 * @param {?function} callback Called after update is complete.
 * @final
 * @protected
 */


Component.prototype.forceUpdate = function (callback) {
  this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
};
/**
 * Deprecated APIs. These APIs used to exist on classic React classes but since
 * we would like to deprecate them, we're not going to move them over to this
 * modern base class. Instead, we define a getter that warns if it's accessed.
 */


{
  var deprecatedAPIs = {
    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).']
  };

  var defineDeprecationWarning = function (methodName, info) {
    Object.defineProperty(Component.prototype, methodName, {
      get: function () {
        warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);

        return undefined;
      }
    });
  };

  for (var fnName in deprecatedAPIs) {
    if (deprecatedAPIs.hasOwnProperty(fnName)) {
      defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
    }
  }
}

function ComponentDummy() {}

ComponentDummy.prototype = Component.prototype;
/**
 * Convenience component with default shallow equality check for sCU.
 */

function PureComponent(props, context, updater) {
  this.props = props;
  this.context = context; // If a component has string refs, we will assign a different object later.

  this.refs = emptyObject;
  this.updater = updater || ReactNoopUpdateQueue;
}

var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.

_assign(pureComponentPrototype, Component.prototype);

pureComponentPrototype.isPureReactComponent = true;

// an immutable object with a single mutable value
function createRef() {
  var refObject = {
    current: null
  };

  {
    Object.seal(refObject);
  }

  return refObject;
}

var hasOwnProperty = Object.prototype.hasOwnProperty;
var RESERVED_PROPS = {
  key: true,
  ref: true,
  __self: true,
  __source: true
};
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;

{
  didWarnAboutStringRefs = {};
}

function hasValidRef(config) {
  {
    if (hasOwnProperty.call(config, 'ref')) {
      var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;

      if (getter && getter.isReactWarning) {
        return false;
      }
    }
  }

  return config.ref !== undefined;
}

function hasValidKey(config) {
  {
    if (hasOwnProperty.call(config, 'key')) {
      var getter = Object.getOwnPropertyDescriptor(config, 'key').get;

      if (getter && getter.isReactWarning) {
        return false;
      }
    }
  }

  return config.key !== undefined;
}

function defineKeyPropWarningGetter(props, displayName) {
  var warnAboutAccessingKey = function () {
    {
      if (!specialPropKeyWarningShown) {
        specialPropKeyWarningShown = true;

        error('%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)', displayName);
      }
    }
  };

  warnAboutAccessingKey.isReactWarning = true;
  Object.defineProperty(props, 'key', {
    get: warnAboutAccessingKey,
    configurable: true
  });
}

function defineRefPropWarningGetter(props, displayName) {
  var warnAboutAccessingRef = function () {
    {
      if (!specialPropRefWarningShown) {
        specialPropRefWarningShown = true;

        error('%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)', displayName);
      }
    }
  };

  warnAboutAccessingRef.isReactWarning = true;
  Object.defineProperty(props, 'ref', {
    get: warnAboutAccessingRef,
    configurable: true
  });
}

function warnIfStringRefCannotBeAutoConverted(config) {
  {
    if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
      var componentName = getComponentName(ReactCurrentOwner.current.type);

      if (!didWarnAboutStringRefs[componentName]) {
        error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);

        didWarnAboutStringRefs[componentName] = true;
      }
    }
  }
}
/**
 * Factory method to create a new React element. This no longer adheres to
 * the class pattern, so do not use new to call it. Also, instanceof check
 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
 * if something is a React Element.
 *
 * @param {*} type
 * @param {*} props
 * @param {*} key
 * @param {string|object} ref
 * @param {*} owner
 * @param {*} self A *temporary* helper to detect places where `this` is
 * different from the `owner` when React.createElement is called, so that we
 * can warn. We want to get rid of owner and replace string `ref`s with arrow
 * functions, and as long as `this` and owner are the same, there will be no
 * change in behavior.
 * @param {*} source An annotation object (added by a transpiler or otherwise)
 * indicating filename, line number, and/or other information.
 * @internal
 */


var ReactElement = function (type, key, ref, self, source, owner, props) {
  var element = {
    // This tag allows us to uniquely identify this as a React Element
    $$typeof: REACT_ELEMENT_TYPE,
    // Built-in properties that belong on the element
    type: type,
    key: key,
    ref: ref,
    props: props,
    // Record the component responsible for creating this element.
    _owner: owner
  };

  {
    // The validation flag is currently mutative. We put it on
    // an external backing store so that we can freeze the whole object.
    // This can be replaced with a WeakMap once they are implemented in
    // commonly used development environments.
    element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
    // the validation flag non-enumerable (where possible, which should
    // include every environment we run tests in), so the test framework
    // ignores it.

    Object.defineProperty(element._store, 'validated', {
      configurable: false,
      enumerable: false,
      writable: true,
      value: false
    }); // self and source are DEV only properties.

    Object.defineProperty(element, '_self', {
      configurable: false,
      enumerable: false,
      writable: false,
      value: self
    }); // Two elements created in two different places should be considered
    // equal for testing purposes and therefore we hide it from enumeration.

    Object.defineProperty(element, '_source', {
      configurable: false,
      enumerable: false,
      writable: false,
      value: source
    });

    if (Object.freeze) {
      Object.freeze(element.props);
      Object.freeze(element);
    }
  }

  return element;
};
/**
 * Create and return a new ReactElement of the given type.
 * See https://reactjs.org/docs/react-api.html#createelement
 */

function createElement(type, config, children) {
  var propName; // Reserved names are extracted

  var props = {};
  var key = null;
  var ref = null;
  var self = null;
  var source = null;

  if (config != null) {
    if (hasValidRef(config)) {
      ref = config.ref;

      {
        warnIfStringRefCannotBeAutoConverted(config);
      }
    }

    if (hasValidKey(config)) {
      key = '' + config.key;
    }

    self = config.__self === undefined ? null : config.__self;
    source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object

    for (propName in config) {
      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
        props[propName] = config[propName];
      }
    }
  } // Children can be more than one argument, and those are transferred onto
  // the newly allocated props object.


  var childrenLength = arguments.length - 2;

  if (childrenLength === 1) {
    props.children = children;
  } else if (childrenLength > 1) {
    var childArray = Array(childrenLength);

    for (var i = 0; i < childrenLength; i++) {
      childArray[i] = arguments[i + 2];
    }

    {
      if (Object.freeze) {
        Object.freeze(childArray);
      }
    }

    props.children = childArray;
  } // Resolve default props


  if (type && type.defaultProps) {
    var defaultProps = type.defaultProps;

    for (propName in defaultProps) {
      if (props[propName] === undefined) {
        props[propName] = defaultProps[propName];
      }
    }
  }

  {
    if (key || ref) {
      var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;

      if (key) {
        defineKeyPropWarningGetter(props, displayName);
      }

      if (ref) {
        defineRefPropWarningGetter(props, displayName);
      }
    }
  }

  return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
}
function cloneAndReplaceKey(oldElement, newKey) {
  var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
  return newElement;
}
/**
 * Clone and return a new ReactElement using element as the starting point.
 * See https://reactjs.org/docs/react-api.html#cloneelement
 */

function cloneElement(element, config, children) {
  if (!!(element === null || element === undefined)) {
    {
      throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
    }
  }

  var propName; // Original props are copied

  var props = _assign({}, element.props); // Reserved names are extracted


  var key = element.key;
  var ref = element.ref; // Self is preserved since the owner is preserved.

  var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
  // transpiler, and the original source is probably a better indicator of the
  // true owner.

  var source = element._source; // Owner will be preserved, unless ref is overridden

  var owner = element._owner;

  if (config != null) {
    if (hasValidRef(config)) {
      // Silently steal the ref from the parent.
      ref = config.ref;
      owner = ReactCurrentOwner.current;
    }

    if (hasValidKey(config)) {
      key = '' + config.key;
    } // Remaining properties override existing props


    var defaultProps;

    if (element.type && element.type.defaultProps) {
      defaultProps = element.type.defaultProps;
    }

    for (propName in config) {
      if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
        if (config[propName] === undefined && defaultProps !== undefined) {
          // Resolve default props
          props[propName] = defaultProps[propName];
        } else {
          props[propName] = config[propName];
        }
      }
    }
  } // Children can be more than one argument, and those are transferred onto
  // the newly allocated props object.


  var childrenLength = arguments.length - 2;

  if (childrenLength === 1) {
    props.children = children;
  } else if (childrenLength > 1) {
    var childArray = Array(childrenLength);

    for (var i = 0; i < childrenLength; i++) {
      childArray[i] = arguments[i + 2];
    }

    props.children = childArray;
  }

  return ReactElement(element.type, key, ref, self, source, owner, props);
}
/**
 * Verifies the object is a ReactElement.
 * See https://reactjs.org/docs/react-api.html#isvalidelement
 * @param {?object} object
 * @return {boolean} True if `object` is a ReactElement.
 * @final
 */

function isValidElement(object) {
  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}

var SEPARATOR = '.';
var SUBSEPARATOR = ':';
/**
 * Escape and wrap key so it is safe to use as a reactid
 *
 * @param {string} key to be escaped.
 * @return {string} the escaped key.
 */

function escape(key) {
  var escapeRegex = /[=:]/g;
  var escaperLookup = {
    '=': '=0',
    ':': '=2'
  };
  var escapedString = ('' + key).replace(escapeRegex, function (match) {
    return escaperLookup[match];
  });
  return '$' + escapedString;
}
/**
 * TODO: Test that a single child and an array with one item have the same key
 * pattern.
 */


var didWarnAboutMaps = false;
var userProvidedKeyEscapeRegex = /\/+/g;

function escapeUserProvidedKey(text) {
  return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
}

var POOL_SIZE = 10;
var traverseContextPool = [];

function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
  if (traverseContextPool.length) {
    var traverseContext = traverseContextPool.pop();
    traverseContext.result = mapResult;
    traverseContext.keyPrefix = keyPrefix;
    traverseContext.func = mapFunction;
    traverseContext.context = mapContext;
    traverseContext.count = 0;
    return traverseContext;
  } else {
    return {
      result: mapResult,
      keyPrefix: keyPrefix,
      func: mapFunction,
      context: mapContext,
      count: 0
    };
  }
}

function releaseTraverseContext(traverseContext) {
  traverseContext.result = null;
  traverseContext.keyPrefix = null;
  traverseContext.func = null;
  traverseContext.context = null;
  traverseContext.count = 0;

  if (traverseContextPool.length < POOL_SIZE) {
    traverseContextPool.push(traverseContext);
  }
}
/**
 * @param {?*} children Children tree container.
 * @param {!string} nameSoFar Name of the key path so far.
 * @param {!function} callback Callback to invoke with each child found.
 * @param {?*} traverseContext Used to pass information throughout the traversal
 * process.
 * @return {!number} The number of children in this subtree.
 */


function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
  var type = typeof children;

  if (type === 'undefined' || type === 'boolean') {
    // All of the above are perceived as null.
    children = null;
  }

  var invokeCallback = false;

  if (children === null) {
    invokeCallback = true;
  } else {
    switch (type) {
      case 'string':
      case 'number':
        invokeCallback = true;
        break;

      case 'object':
        switch (children.$$typeof) {
          case REACT_ELEMENT_TYPE:
          case REACT_PORTAL_TYPE:
            invokeCallback = true;
        }

    }
  }

  if (invokeCallback) {
    callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array
    // so that it's consistent if the number of children grows.
    nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
    return 1;
  }

  var child;
  var nextName;
  var subtreeCount = 0; // Count of children found in the current subtree.

  var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;

  if (Array.isArray(children)) {
    for (var i = 0; i < children.length; i++) {
      child = children[i];
      nextName = nextNamePrefix + getComponentKey(child, i);
      subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
    }
  } else {
    var iteratorFn = getIteratorFn(children);

    if (typeof iteratorFn === 'function') {

      {
        // Warn about using Maps as children
        if (iteratorFn === children.entries) {
          if (!didWarnAboutMaps) {
            warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');
          }

          didWarnAboutMaps = true;
        }
      }

      var iterator = iteratorFn.call(children);
      var step;
      var ii = 0;

      while (!(step = iterator.next()).done) {
        child = step.value;
        nextName = nextNamePrefix + getComponentKey(child, ii++);
        subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
      }
    } else if (type === 'object') {
      var addendum = '';

      {
        addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
      }

      var childrenString = '' + children;

      {
        {
          throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum );
        }
      }
    }
  }

  return subtreeCount;
}
/**
 * Traverses children that are typically specified as `props.children`, but
 * might also be specified through attributes:
 *
 * - `traverseAllChildren(this.props.children, ...)`
 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
 *
 * The `traverseContext` is an optional argument that is passed through the
 * entire traversal. It can be used to store accumulations or anything else that
 * the callback might find relevant.
 *
 * @param {?*} children Children tree object.
 * @param {!function} callback To invoke upon traversing each child.
 * @param {?*} traverseContext Context for traversal.
 * @return {!number} The number of children in this subtree.
 */


function traverseAllChildren(children, callback, traverseContext) {
  if (children == null) {
    return 0;
  }

  return traverseAllChildrenImpl(children, '', callback, traverseContext);
}
/**
 * Generate a key string that identifies a component within a set.
 *
 * @param {*} component A component that could contain a manual key.
 * @param {number} index Index that is used if a manual key is not provided.
 * @return {string}
 */


function getComponentKey(component, index) {
  // Do some typechecking here since we call this blindly. We want to ensure
  // that we don't block potential future ES APIs.
  if (typeof component === 'object' && component !== null && component.key != null) {
    // Explicit key
    return escape(component.key);
  } // Implicit key determined by the index in the set


  return index.toString(36);
}

function forEachSingleChild(bookKeeping, child, name) {
  var func = bookKeeping.func,
      context = bookKeeping.context;
  func.call(context, child, bookKeeping.count++);
}
/**
 * Iterates through children that are typically specified as `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
 *
 * The provided forEachFunc(child, index) will be called for each
 * leaf child.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} forEachFunc
 * @param {*} forEachContext Context for forEachContext.
 */


function forEachChildren(children, forEachFunc, forEachContext) {
  if (children == null) {
    return children;
  }

  var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
  traverseAllChildren(children, forEachSingleChild, traverseContext);
  releaseTraverseContext(traverseContext);
}

function mapSingleChildIntoContext(bookKeeping, child, childKey) {
  var result = bookKeeping.result,
      keyPrefix = bookKeeping.keyPrefix,
      func = bookKeeping.func,
      context = bookKeeping.context;
  var mappedChild = func.call(context, child, bookKeeping.count++);

  if (Array.isArray(mappedChild)) {
    mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
      return c;
    });
  } else if (mappedChild != null) {
    if (isValidElement(mappedChild)) {
      mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
      // traverseAllChildren used to do for objects as children
      keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
    }

    result.push(mappedChild);
  }
}

function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
  var escapedPrefix = '';

  if (prefix != null) {
    escapedPrefix = escapeUserProvidedKey(prefix) + '/';
  }

  var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
  traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
  releaseTraverseContext(traverseContext);
}
/**
 * Maps children that are typically specified as `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenmap
 *
 * The provided mapFunction(child, key, index) will be called for each
 * leaf child.
 *
 * @param {?*} children Children tree container.
 * @param {function(*, int)} func The map function.
 * @param {*} context Context for mapFunction.
 * @return {object} Object containing the ordered map of results.
 */


function mapChildren(children, func, context) {
  if (children == null) {
    return children;
  }

  var result = [];
  mapIntoWithKeyPrefixInternal(children, result, null, func, context);
  return result;
}
/**
 * Count the number of children that are typically specified as
 * `props.children`.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrencount
 *
 * @param {?*} children Children tree container.
 * @return {number} The number of children.
 */


function countChildren(children) {
  return traverseAllChildren(children, function () {
    return null;
  }, null);
}
/**
 * Flatten a children object (typically specified as `props.children`) and
 * return an array with appropriately re-keyed children.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
 */


function toArray(children) {
  var result = [];
  mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
    return child;
  });
  return result;
}
/**
 * Returns the first child in a collection of children and verifies that there
 * is only one child in the collection.
 *
 * See https://reactjs.org/docs/react-api.html#reactchildrenonly
 *
 * The current implementation of this function assumes that a single child gets
 * passed without a wrapper, but the purpose of this helper function is to
 * abstract away the particular structure of children.
 *
 * @param {?object} children Child collection structure.
 * @return {ReactElement} The first and only `ReactElement` contained in the
 * structure.
 */


function onlyChild(children) {
  if (!isValidElement(children)) {
    {
      throw Error( "React.Children.only expected to receive a single React element child." );
    }
  }

  return children;
}

function createContext(defaultValue, calculateChangedBits) {
  if (calculateChangedBits === undefined) {
    calculateChangedBits = null;
  } else {
    {
      if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
        error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
      }
    }
  }

  var context = {
    $$typeof: REACT_CONTEXT_TYPE,
    _calculateChangedBits: calculateChangedBits,
    // As a workaround to support multiple concurrent renderers, we categorize
    // some renderers as primary and others as secondary. We only expect
    // there to be two concurrent renderers at most: React Native (primary) and
    // Fabric (secondary); React DOM (primary) and React ART (secondary).
    // Secondary renderers store their context values on separate fields.
    _currentValue: defaultValue,
    _currentValue2: defaultValue,
    // Used to track how many concurrent renderers this context currently
    // supports within in a single renderer. Such as parallel server rendering.
    _threadCount: 0,
    // These are circular
    Provider: null,
    Consumer: null
  };
  context.Provider = {
    $$typeof: REACT_PROVIDER_TYPE,
    _context: context
  };
  var hasWarnedAboutUsingNestedContextConsumers = false;
  var hasWarnedAboutUsingConsumerProvider = false;

  {
    // A separate object, but proxies back to the original context object for
    // backwards compatibility. It has a different $$typeof, so we can properly
    // warn for the incorrect usage of Context as a Consumer.
    var Consumer = {
      $$typeof: REACT_CONTEXT_TYPE,
      _context: context,
      _calculateChangedBits: context._calculateChangedBits
    }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here

    Object.defineProperties(Consumer, {
      Provider: {
        get: function () {
          if (!hasWarnedAboutUsingConsumerProvider) {
            hasWarnedAboutUsingConsumerProvider = true;

            error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
          }

          return context.Provider;
        },
        set: function (_Provider) {
          context.Provider = _Provider;
        }
      },
      _currentValue: {
        get: function () {
          return context._currentValue;
        },
        set: function (_currentValue) {
          context._currentValue = _currentValue;
        }
      },
      _currentValue2: {
        get: function () {
          return context._currentValue2;
        },
        set: function (_currentValue2) {
          context._currentValue2 = _currentValue2;
        }
      },
      _threadCount: {
        get: function () {
          return context._threadCount;
        },
        set: function (_threadCount) {
          context._threadCount = _threadCount;
        }
      },
      Consumer: {
        get: function () {
          if (!hasWarnedAboutUsingNestedContextConsumers) {
            hasWarnedAboutUsingNestedContextConsumers = true;

            error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
          }

          return context.Consumer;
        }
      }
    }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty

    context.Consumer = Consumer;
  }

  {
    context._currentRenderer = null;
    context._currentRenderer2 = null;
  }

  return context;
}

function lazy(ctor) {
  var lazyType = {
    $$typeof: REACT_LAZY_TYPE,
    _ctor: ctor,
    // React uses these fields to store the result.
    _status: -1,
    _result: null
  };

  {
    // In production, this would just set it on the object.
    var defaultProps;
    var propTypes;
    Object.defineProperties(lazyType, {
      defaultProps: {
        configurable: true,
        get: function () {
          return defaultProps;
        },
        set: function (newDefaultProps) {
          error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');

          defaultProps = newDefaultProps; // Match production behavior more closely:

          Object.defineProperty(lazyType, 'defaultProps', {
            enumerable: true
          });
        }
      },
      propTypes: {
        configurable: true,
        get: function () {
          return propTypes;
        },
        set: function (newPropTypes) {
          error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');

          propTypes = newPropTypes; // Match production behavior more closely:

          Object.defineProperty(lazyType, 'propTypes', {
            enumerable: true
          });
        }
      }
    });
  }

  return lazyType;
}

function forwardRef(render) {
  {
    if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
      error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
    } else if (typeof render !== 'function') {
      error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
    } else {
      if (render.length !== 0 && render.length !== 2) {
        error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
      }
    }

    if (render != null) {
      if (render.defaultProps != null || render.propTypes != null) {
        error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
      }
    }
  }

  return {
    $$typeof: REACT_FORWARD_REF_TYPE,
    render: render
  };
}

function isValidElementType(type) {
  return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
}

function memo(type, compare) {
  {
    if (!isValidElementType(type)) {
      error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
    }
  }

  return {
    $$typeof: REACT_MEMO_TYPE,
    type: type,
    compare: compare === undefined ? null : compare
  };
}

function resolveDispatcher() {
  var dispatcher = ReactCurrentDispatcher.current;

  if (!(dispatcher !== null)) {
    {
      throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
    }
  }

  return dispatcher;
}

function useContext(Context, unstable_observedBits) {
  var dispatcher = resolveDispatcher();

  {
    if (unstable_observedBits !== undefined) {
      error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '');
    } // TODO: add a more generic warning for invalid values.


    if (Context._context !== undefined) {
      var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
      // and nobody should be using this in existing code.

      if (realContext.Consumer === Context) {
        error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
      } else if (realContext.Provider === Context) {
        error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
      }
    }
  }

  return dispatcher.useContext(Context, unstable_observedBits);
}
function useState(initialState) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useState(initialState);
}
function useReducer(reducer, initialArg, init) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useReducer(reducer, initialArg, init);
}
function useRef(initialValue) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useRef(initialValue);
}
function useEffect(create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useEffect(create, deps);
}
function useLayoutEffect(create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useLayoutEffect(create, deps);
}
function useCallback(callback, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useCallback(callback, deps);
}
function useMemo(create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useMemo(create, deps);
}
function useImperativeHandle(ref, create, deps) {
  var dispatcher = resolveDispatcher();
  return dispatcher.useImperativeHandle(ref, create, deps);
}
function useDebugValue(value, formatterFn) {
  {
    var dispatcher = resolveDispatcher();
    return dispatcher.useDebugValue(value, formatterFn);
  }
}

var propTypesMisspellWarningShown;

{
  propTypesMisspellWarningShown = false;
}

function getDeclarationErrorAddendum() {
  if (ReactCurrentOwner.current) {
    var name = getComponentName(ReactCurrentOwner.current.type);

    if (name) {
      return '\n\nCheck the render method of `' + name + '`.';
    }
  }

  return '';
}

function getSourceInfoErrorAddendum(source) {
  if (source !== undefined) {
    var fileName = source.fileName.replace(/^.*[\\\/]/, '');
    var lineNumber = source.lineNumber;
    return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
  }

  return '';
}

function getSourceInfoErrorAddendumForProps(elementProps) {
  if (elementProps !== null && elementProps !== undefined) {
    return getSourceInfoErrorAddendum(elementProps.__source);
  }

  return '';
}
/**
 * Warn if there's no key explicitly set on dynamic arrays of children or
 * object keys are not valid. This allows us to keep track of children between
 * updates.
 */


var ownerHasKeyUseWarning = {};

function getCurrentComponentErrorInfo(parentType) {
  var info = getDeclarationErrorAddendum();

  if (!info) {
    var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;

    if (parentName) {
      info = "\n\nCheck the top-level render call using <" + parentName + ">.";
    }
  }

  return info;
}
/**
 * Warn if the element doesn't have an explicit key assigned to it.
 * This element is in an array. The array could grow and shrink or be
 * reordered. All children that haven't already been validated are required to
 * have a "key" property assigned to it. Error statuses are cached so a warning
 * will only be shown once.
 *
 * @internal
 * @param {ReactElement} element Element that requires a key.
 * @param {*} parentType element's parent's type.
 */


function validateExplicitKey(element, parentType) {
  if (!element._store || element._store.validated || element.key != null) {
    return;
  }

  element._store.validated = true;
  var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);

  if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
    return;
  }

  ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
  // property, it may be the creator of the child that's responsible for
  // assigning it a key.

  var childOwner = '';

  if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
    // Give the component that originally created this child.
    childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
  }

  setCurrentlyValidatingElement(element);

  {
    error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
  }

  setCurrentlyValidatingElement(null);
}
/**
 * Ensure that every element either is passed in a static location, in an
 * array with an explicit keys property defined, or in an object literal
 * with valid key property.
 *
 * @internal
 * @param {ReactNode} node Statically passed child of any type.
 * @param {*} parentType node's parent's type.
 */


function validateChildKeys(node, parentType) {
  if (typeof node !== 'object') {
    return;
  }

  if (Array.isArray(node)) {
    for (var i = 0; i < node.length; i++) {
      var child = node[i];

      if (isValidElement(child)) {
        validateExplicitKey(child, parentType);
      }
    }
  } else if (isValidElement(node)) {
    // This element was passed in a valid location.
    if (node._store) {
      node._store.validated = true;
    }
  } else if (node) {
    var iteratorFn = getIteratorFn(node);

    if (typeof iteratorFn === 'function') {
      // Entry iterators used to provide implicit keys,
      // but now we print a separate warning for them later.
      if (iteratorFn !== node.entries) {
        var iterator = iteratorFn.call(node);
        var step;

        while (!(step = iterator.next()).done) {
          if (isValidElement(step.value)) {
            validateExplicitKey(step.value, parentType);
          }
        }
      }
    }
  }
}
/**
 * Given an element, validate that its props follow the propTypes definition,
 * provided by the type.
 *
 * @param {ReactElement} element
 */


function validatePropTypes(element) {
  {
    var type = element.type;

    if (type === null || type === undefined || typeof type === 'string') {
      return;
    }

    var name = getComponentName(type);
    var propTypes;

    if (typeof type === 'function') {
      propTypes = type.propTypes;
    } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
    // Inner props are checked in the reconciler.
    type.$$typeof === REACT_MEMO_TYPE)) {
      propTypes = type.propTypes;
    } else {
      return;
    }

    if (propTypes) {
      setCurrentlyValidatingElement(element);
      checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
      setCurrentlyValidatingElement(null);
    } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
      propTypesMisspellWarningShown = true;

      error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
    }

    if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
      error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
    }
  }
}
/**
 * Given a fragment, validate that it can only be provided with fragment props
 * @param {ReactElement} fragment
 */


function validateFragmentProps(fragment) {
  {
    setCurrentlyValidatingElement(fragment);
    var keys = Object.keys(fragment.props);

    for (var i = 0; i < keys.length; i++) {
      var key = keys[i];

      if (key !== 'children' && key !== 'key') {
        error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);

        break;
      }
    }

    if (fragment.ref !== null) {
      error('Invalid attribute `ref` supplied to `React.Fragment`.');
    }

    setCurrentlyValidatingElement(null);
  }
}
function createElementWithValidation(type, props, children) {
  var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
  // succeed and there will likely be errors in render.

  if (!validType) {
    var info = '';

    if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
      info += ' 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 sourceInfo = getSourceInfoErrorAddendumForProps(props);

    if (sourceInfo) {
      info += sourceInfo;
    } else {
      info += getDeclarationErrorAddendum();
    }

    var typeString;

    if (type === null) {
      typeString = 'null';
    } else if (Array.isArray(type)) {
      typeString = 'array';
    } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
      typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
      info = ' Did you accidentally export a JSX literal instead of a component?';
    } else {
      typeString = typeof type;
    }

    {
      error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
    }
  }

  var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
  // TODO: Drop this when these are no longer allowed as the type argument.

  if (element == null) {
    return element;
  } // Skip key warning if the type isn't valid since our key validation logic
  // doesn't expect a non-string/function type and can throw confusing errors.
  // We don't want exception behavior to differ between dev and prod.
  // (Rendering will throw with a helpful message and as soon as the type is
  // fixed, the key warnings will appear.)


  if (validType) {
    for (var i = 2; i < arguments.length; i++) {
      validateChildKeys(arguments[i], type);
    }
  }

  if (type === REACT_FRAGMENT_TYPE) {
    validateFragmentProps(element);
  } else {
    validatePropTypes(element);
  }

  return element;
}
var didWarnAboutDeprecatedCreateFactory = false;
function createFactoryWithValidation(type) {
  var validatedFactory = createElementWithValidation.bind(null, type);
  validatedFactory.type = type;

  {
    if (!didWarnAboutDeprecatedCreateFactory) {
      didWarnAboutDeprecatedCreateFactory = true;

      warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
    } // Legacy hook: remove it


    Object.defineProperty(validatedFactory, 'type', {
      enumerable: false,
      get: function () {
        warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');

        Object.defineProperty(this, 'type', {
          value: type
        });
        return type;
      }
    });
  }

  return validatedFactory;
}
function cloneElementWithValidation(element, props, children) {
  var newElement = cloneElement.apply(this, arguments);

  for (var i = 2; i < arguments.length; i++) {
    validateChildKeys(arguments[i], newElement.type);
  }

  validatePropTypes(newElement);
  return newElement;
}

{

  try {
    var frozenObject = Object.freeze({});
    var testMap = new Map([[frozenObject, null]]);
    var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
    // https://github.com/rollup/rollup/issues/1771
    // TODO: we can remove these if Rollup fixes the bug.

    testMap.set(0, 0);
    testSet.add(0);
  } catch (e) {
  }
}

var createElement$1 =  createElementWithValidation ;
var cloneElement$1 =  cloneElementWithValidation ;
var createFactory =  createFactoryWithValidation ;
var Children = {
  map: mapChildren,
  forEach: forEachChildren,
  count: countChildren,
  toArray: toArray,
  only: onlyChild
};

exports.Children = Children;
exports.Component = Component;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.PureComponent = PureComponent;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
exports.cloneElement = cloneElement$1;
exports.createContext = createContext;
exports.createElement = createElement$1;
exports.createFactory = createFactory;
exports.createRef = createRef;
exports.forwardRef = forwardRef;
exports.isValidElement = isValidElement;
exports.lazy = lazy;
exports.memo = memo;
exports.useCallback = useCallback;
exports.useContext = useContext;
exports.useDebugValue = useDebugValue;
exports.useEffect = useEffect;
exports.useImperativeHandle = useImperativeHandle;
exports.useLayoutEffect = useLayoutEffect;
exports.useMemo = useMemo;
exports.useReducer = useReducer;
exports.useRef = useRef;
exports.useState = useState;
exports.version = ReactVersion;
  })();
}

}).call(this)}).call(this,require('_process'))
},{"_process":358,"object-assign":357,"prop-types/checkPropTypes":367}],379:[function(require,module,exports){
/** @license React v16.13.1
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';var l=require("object-assign"),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,z=n?Symbol.for("react.memo"):60115,A=n?Symbol.for("react.lazy"):
60116,B="function"===typeof Symbol&&Symbol.iterator;function C(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,"setState")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
function G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}var I=H.prototype=new G;I.constructor=H;l(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
function M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return{$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}}
function N(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return"object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return{result:a,keyPrefix:b,func:c,context:e,count:0}}
function S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a)}
function T(a,b,c,e){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,""===b?"."+U(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e)}else if(null===a||"object"!==typeof a?f=null:(f=B&&a[B]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),k=
0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if("object"===d)throw c=""+a,Error(C(31,"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return g}function V(a,b,c){return null==a?0:T(a,"",b,c)}function U(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++)}
function aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+c)),e.push(a))}function X(a,b,c,e,d){var g="";null!=c&&(g=(""+c).replace(P,"$&/")+"/");b=R(b,g,e,d);V(a,aa,b);S(b)}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a}
var ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:l};exports.Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}};
exports.Component=F;exports.Fragment=r;exports.Profiler=u;exports.PureComponent=H;exports.StrictMode=t;exports.Suspense=y;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba;
exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=l({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f}return{$$typeof:p,type:a.type,
key:d,ref:g,props:e,_owner:k}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:x,render:a}};exports.isValidElement=O;
exports.lazy=function(a){return{$$typeof:A,_ctor:a,_status:-1,_result:null}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return Z().useCallback(a,b)};exports.useContext=function(a,b){return Z().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return Z().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)};
exports.useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return Z().useMemo(a,b)};exports.useReducer=function(a,b,c){return Z().useReducer(a,b,c)};exports.useRef=function(a){return Z().useRef(a)};exports.useState=function(a){return Z().useState(a)};exports.version="16.13.1";

},{"object-assign":357}],380:[function(require,module,exports){
(function (process){(function (){
'use strict';

if (process.env.NODE_ENV === 'production') {
  module.exports = require('./cjs/react.production.min.js');
} else {
  module.exports = require('./cjs/react.development.js');
}

}).call(this)}).call(this,require('_process'))
},{"./cjs/react.development.js":378,"./cjs/react.production.min.js":379,"_process":358}],381:[function(require,module,exports){
(function (process){(function (){
/** @license React v0.19.1
 * scheduler-tracing.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';



if (process.env.NODE_ENV !== "production") {
  (function() {
'use strict';

var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.

var interactionIDCounter = 0;
var threadIDCounter = 0; // Set of currently traced interactions.
// Interactions "stack"–
// Meaning that newly traced interactions are appended to the previously active set.
// When an interaction goes out of scope, the previous set (if any) is restored.

exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end.

exports.__subscriberRef = null;

{
  exports.__interactionsRef = {
    current: new Set()
  };
  exports.__subscriberRef = {
    current: null
  };
}
function unstable_clear(callback) {

  var prevInteractions = exports.__interactionsRef.current;
  exports.__interactionsRef.current = new Set();

  try {
    return callback();
  } finally {
    exports.__interactionsRef.current = prevInteractions;
  }
}
function unstable_getCurrent() {
  {
    return exports.__interactionsRef.current;
  }
}
function unstable_getThreadID() {
  return ++threadIDCounter;
}
function unstable_trace(name, timestamp, callback) {
  var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;

  var interaction = {
    __count: 1,
    id: interactionIDCounter++,
    name: name,
    timestamp: timestamp
  };
  var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.
  // To do that, clone the current interactions.
  // The previous set will be restored upon completion.

  var interactions = new Set(prevInteractions);
  interactions.add(interaction);
  exports.__interactionsRef.current = interactions;
  var subscriber = exports.__subscriberRef.current;
  var returnValue;

  try {
    if (subscriber !== null) {
      subscriber.onInteractionTraced(interaction);
    }
  } finally {
    try {
      if (subscriber !== null) {
        subscriber.onWorkStarted(interactions, threadID);
      }
    } finally {
      try {
        returnValue = callback();
      } finally {
        exports.__interactionsRef.current = prevInteractions;

        try {
          if (subscriber !== null) {
            subscriber.onWorkStopped(interactions, threadID);
          }
        } finally {
          interaction.__count--; // If no async work was scheduled for this interaction,
          // Notify subscribers that it's completed.

          if (subscriber !== null && interaction.__count === 0) {
            subscriber.onInteractionScheduledWorkCompleted(interaction);
          }
        }
      }
    }
  }

  return returnValue;
}
function unstable_wrap(callback) {
  var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;

  var wrappedInteractions = exports.__interactionsRef.current;
  var subscriber = exports.__subscriberRef.current;

  if (subscriber !== null) {
    subscriber.onWorkScheduled(wrappedInteractions, threadID);
  } // Update the pending async work count for the current interactions.
  // Update after calling subscribers in case of error.


  wrappedInteractions.forEach(function (interaction) {
    interaction.__count++;
  });
  var hasRun = false;

  function wrapped() {
    var prevInteractions = exports.__interactionsRef.current;
    exports.__interactionsRef.current = wrappedInteractions;
    subscriber = exports.__subscriberRef.current;

    try {
      var returnValue;

      try {
        if (subscriber !== null) {
          subscriber.onWorkStarted(wrappedInteractions, threadID);
        }
      } finally {
        try {
          returnValue = callback.apply(undefined, arguments);
        } finally {
          exports.__interactionsRef.current = prevInteractions;

          if (subscriber !== null) {
            subscriber.onWorkStopped(wrappedInteractions, threadID);
          }
        }
      }

      return returnValue;
    } finally {
      if (!hasRun) {
        // We only expect a wrapped function to be executed once,
        // But in the event that it's executed more than once–
        // Only decrement the outstanding interaction counts once.
        hasRun = true; // Update pending async counts for all wrapped interactions.
        // If this was the last scheduled async work for any of them,
        // Mark them as completed.

        wrappedInteractions.forEach(function (interaction) {
          interaction.__count--;

          if (subscriber !== null && interaction.__count === 0) {
            subscriber.onInteractionScheduledWorkCompleted(interaction);
          }
        });
      }
    }
  }

  wrapped.cancel = function cancel() {
    subscriber = exports.__subscriberRef.current;

    try {
      if (subscriber !== null) {
        subscriber.onWorkCanceled(wrappedInteractions, threadID);
      }
    } finally {
      // Update pending async counts for all wrapped interactions.
      // If this was the last scheduled async work for any of them,
      // Mark them as completed.
      wrappedInteractions.forEach(function (interaction) {
        interaction.__count--;

        if (subscriber && interaction.__count === 0) {
          subscriber.onInteractionScheduledWorkCompleted(interaction);
        }
      });
    }
  };

  return wrapped;
}

var subscribers = null;

{
  subscribers = new Set();
}

function unstable_subscribe(subscriber) {
  {
    subscribers.add(subscriber);

    if (subscribers.size === 1) {
      exports.__subscriberRef.current = {
        onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
        onInteractionTraced: onInteractionTraced,
        onWorkCanceled: onWorkCanceled,
        onWorkScheduled: onWorkScheduled,
        onWorkStarted: onWorkStarted,
        onWorkStopped: onWorkStopped
      };
    }
  }
}
function unstable_unsubscribe(subscriber) {
  {
    subscribers.delete(subscriber);

    if (subscribers.size === 0) {
      exports.__subscriberRef.current = null;
    }
  }
}

function onInteractionTraced(interaction) {
  var didCatchError = false;
  var caughtError = null;
  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onInteractionTraced(interaction);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onInteractionScheduledWorkCompleted(interaction) {
  var didCatchError = false;
  var caughtError = null;
  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onInteractionScheduledWorkCompleted(interaction);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onWorkScheduled(interactions, threadID) {
  var didCatchError = false;
  var caughtError = null;
  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onWorkScheduled(interactions, threadID);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onWorkStarted(interactions, threadID) {
  var didCatchError = false;
  var caughtError = null;
  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onWorkStarted(interactions, threadID);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onWorkStopped(interactions, threadID) {
  var didCatchError = false;
  var caughtError = null;
  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onWorkStopped(interactions, threadID);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

function onWorkCanceled(interactions, threadID) {
  var didCatchError = false;
  var caughtError = null;
  subscribers.forEach(function (subscriber) {
    try {
      subscriber.onWorkCanceled(interactions, threadID);
    } catch (error) {
      if (!didCatchError) {
        didCatchError = true;
        caughtError = error;
      }
    }
  });

  if (didCatchError) {
    throw caughtError;
  }
}

exports.unstable_clear = unstable_clear;
exports.unstable_getCurrent = unstable_getCurrent;
exports.unstable_getThreadID = unstable_getThreadID;
exports.unstable_subscribe = unstable_subscribe;
exports.unstable_trace = unstable_trace;
exports.unstable_unsubscribe = unstable_unsubscribe;
exports.unstable_wrap = unstable_wrap;
  })();
}

}).call(this)}).call(this,require('_process'))
},{"_process":358}],382:[function(require,module,exports){
/** @license React v0.19.1
 * scheduler-tracing.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';var b=0;exports.__interactionsRef=null;exports.__subscriberRef=null;exports.unstable_clear=function(a){return a()};exports.unstable_getCurrent=function(){return null};exports.unstable_getThreadID=function(){return++b};exports.unstable_subscribe=function(){};exports.unstable_trace=function(a,d,c){return c()};exports.unstable_unsubscribe=function(){};exports.unstable_wrap=function(a){return a};

},{}],383:[function(require,module,exports){
(function (process){(function (){
/** @license React v0.19.1
 * scheduler.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';



if (process.env.NODE_ENV !== "production") {
  (function() {
'use strict';

var enableSchedulerDebugging = false;
var enableProfiling = true;

var requestHostCallback;
var requestHostTimeout;
var cancelHostTimeout;
var shouldYieldToHost;
var requestPaint;

if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive
// implementation using setTimeout.
typeof window === 'undefined' || // Check if MessageChannel is supported, too.
typeof MessageChannel !== 'function') {
  // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
  // fallback to a naive implementation.
  var _callback = null;
  var _timeoutID = null;

  var _flushCallback = function () {
    if (_callback !== null) {
      try {
        var currentTime = exports.unstable_now();
        var hasRemainingTime = true;

        _callback(hasRemainingTime, currentTime);

        _callback = null;
      } catch (e) {
        setTimeout(_flushCallback, 0);
        throw e;
      }
    }
  };

  var initialTime = Date.now();

  exports.unstable_now = function () {
    return Date.now() - initialTime;
  };

  requestHostCallback = function (cb) {
    if (_callback !== null) {
      // Protect against re-entrancy.
      setTimeout(requestHostCallback, 0, cb);
    } else {
      _callback = cb;
      setTimeout(_flushCallback, 0);
    }
  };

  requestHostTimeout = function (cb, ms) {
    _timeoutID = setTimeout(cb, ms);
  };

  cancelHostTimeout = function () {
    clearTimeout(_timeoutID);
  };

  shouldYieldToHost = function () {
    return false;
  };

  requestPaint = exports.unstable_forceFrameRate = function () {};
} else {
  // Capture local references to native APIs, in case a polyfill overrides them.
  var performance = window.performance;
  var _Date = window.Date;
  var _setTimeout = window.setTimeout;
  var _clearTimeout = window.clearTimeout;

  if (typeof console !== 'undefined') {
    // TODO: Scheduler no longer requires these methods to be polyfilled. But
    // maybe we want to continue warning if they don't exist, to preserve the
    // option to rely on it in the future?
    var requestAnimationFrame = window.requestAnimationFrame;
    var cancelAnimationFrame = window.cancelAnimationFrame; // TODO: Remove fb.me link

    if (typeof requestAnimationFrame !== 'function') {
      // Using console['error'] to evade Babel and ESLint
      console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
    }

    if (typeof cancelAnimationFrame !== 'function') {
      // Using console['error'] to evade Babel and ESLint
      console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://fb.me/react-polyfills');
    }
  }

  if (typeof performance === 'object' && typeof performance.now === 'function') {
    exports.unstable_now = function () {
      return performance.now();
    };
  } else {
    var _initialTime = _Date.now();

    exports.unstable_now = function () {
      return _Date.now() - _initialTime;
    };
  }

  var isMessageLoopRunning = false;
  var scheduledHostCallback = null;
  var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
  // thread, like user events. By default, it yields multiple times per frame.
  // It does not attempt to align with frame boundaries, since most tasks don't
  // need to be frame aligned; for those that do, use requestAnimationFrame.

  var yieldInterval = 5;
  var deadline = 0; // TODO: Make this configurable

  {
    // `isInputPending` is not available. Since we have no way of knowing if
    // there's pending input, always yield at the end of the frame.
    shouldYieldToHost = function () {
      return exports.unstable_now() >= deadline;
    }; // Since we yield every frame regardless, `requestPaint` has no effect.


    requestPaint = function () {};
  }

  exports.unstable_forceFrameRate = function (fps) {
    if (fps < 0 || fps > 125) {
      // Using console['error'] to evade Babel and ESLint
      console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing framerates higher than 125 fps is not unsupported');
      return;
    }

    if (fps > 0) {
      yieldInterval = Math.floor(1000 / fps);
    } else {
      // reset the framerate
      yieldInterval = 5;
    }
  };

  var performWorkUntilDeadline = function () {
    if (scheduledHostCallback !== null) {
      var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
      // cycle. This means there's always time remaining at the beginning of
      // the message event.

      deadline = currentTime + yieldInterval;
      var hasTimeRemaining = true;

      try {
        var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);

        if (!hasMoreWork) {
          isMessageLoopRunning = false;
          scheduledHostCallback = null;
        } else {
          // If there's more work, schedule the next message event at the end
          // of the preceding one.
          port.postMessage(null);
        }
      } catch (error) {
        // If a scheduler task throws, exit the current browser task so the
        // error can be observed.
        port.postMessage(null);
        throw error;
      }
    } else {
      isMessageLoopRunning = false;
    } // Yielding to the browser will give it a chance to paint, so we can
  };

  var channel = new MessageChannel();
  var port = channel.port2;
  channel.port1.onmessage = performWorkUntilDeadline;

  requestHostCallback = function (callback) {
    scheduledHostCallback = callback;

    if (!isMessageLoopRunning) {
      isMessageLoopRunning = true;
      port.postMessage(null);
    }
  };

  requestHostTimeout = function (callback, ms) {
    taskTimeoutID = _setTimeout(function () {
      callback(exports.unstable_now());
    }, ms);
  };

  cancelHostTimeout = function () {
    _clearTimeout(taskTimeoutID);

    taskTimeoutID = -1;
  };
}

function push(heap, node) {
  var index = heap.length;
  heap.push(node);
  siftUp(heap, node, index);
}
function peek(heap) {
  var first = heap[0];
  return first === undefined ? null : first;
}
function pop(heap) {
  var first = heap[0];

  if (first !== undefined) {
    var last = heap.pop();

    if (last !== first) {
      heap[0] = last;
      siftDown(heap, last, 0);
    }

    return first;
  } else {
    return null;
  }
}

function siftUp(heap, node, i) {
  var index = i;

  while (true) {
    var parentIndex = index - 1 >>> 1;
    var parent = heap[parentIndex];

    if (parent !== undefined && compare(parent, node) > 0) {
      // The parent is larger. Swap positions.
      heap[parentIndex] = node;
      heap[index] = parent;
      index = parentIndex;
    } else {
      // The parent is smaller. Exit.
      return;
    }
  }
}

function siftDown(heap, node, i) {
  var index = i;
  var length = heap.length;

  while (index < length) {
    var leftIndex = (index + 1) * 2 - 1;
    var left = heap[leftIndex];
    var rightIndex = leftIndex + 1;
    var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.

    if (left !== undefined && compare(left, node) < 0) {
      if (right !== undefined && compare(right, left) < 0) {
        heap[index] = right;
        heap[rightIndex] = node;
        index = rightIndex;
      } else {
        heap[index] = left;
        heap[leftIndex] = node;
        index = leftIndex;
      }
    } else if (right !== undefined && compare(right, node) < 0) {
      heap[index] = right;
      heap[rightIndex] = node;
      index = rightIndex;
    } else {
      // Neither child is smaller. Exit.
      return;
    }
  }
}

function compare(a, b) {
  // Compare sort index first, then task id.
  var diff = a.sortIndex - b.sortIndex;
  return diff !== 0 ? diff : a.id - b.id;
}

// TODO: Use symbols?
var NoPriority = 0;
var ImmediatePriority = 1;
var UserBlockingPriority = 2;
var NormalPriority = 3;
var LowPriority = 4;
var IdlePriority = 5;

var runIdCounter = 0;
var mainThreadIdCounter = 0;
var profilingStateSize = 4;
var sharedProfilingBuffer =  // $FlowFixMe Flow doesn't know about SharedArrayBuffer
typeof SharedArrayBuffer === 'function' ? new SharedArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : // $FlowFixMe Flow doesn't know about ArrayBuffer
typeof ArrayBuffer === 'function' ? new ArrayBuffer(profilingStateSize * Int32Array.BYTES_PER_ELEMENT) : null // Don't crash the init path on IE9
;
var profilingState =  sharedProfilingBuffer !== null ? new Int32Array(sharedProfilingBuffer) : []; // We can't read this but it helps save bytes for null checks

var PRIORITY = 0;
var CURRENT_TASK_ID = 1;
var CURRENT_RUN_ID = 2;
var QUEUE_SIZE = 3;

{
  profilingState[PRIORITY] = NoPriority; // This is maintained with a counter, because the size of the priority queue
  // array might include canceled tasks.

  profilingState[QUEUE_SIZE] = 0;
  profilingState[CURRENT_TASK_ID] = 0;
} // Bytes per element is 4


var INITIAL_EVENT_LOG_SIZE = 131072;
var MAX_EVENT_LOG_SIZE = 524288; // Equivalent to 2 megabytes

var eventLogSize = 0;
var eventLogBuffer = null;
var eventLog = null;
var eventLogIndex = 0;
var TaskStartEvent = 1;
var TaskCompleteEvent = 2;
var TaskErrorEvent = 3;
var TaskCancelEvent = 4;
var TaskRunEvent = 5;
var TaskYieldEvent = 6;
var SchedulerSuspendEvent = 7;
var SchedulerResumeEvent = 8;

function logEvent(entries) {
  if (eventLog !== null) {
    var offset = eventLogIndex;
    eventLogIndex += entries.length;

    if (eventLogIndex + 1 > eventLogSize) {
      eventLogSize *= 2;

      if (eventLogSize > MAX_EVENT_LOG_SIZE) {
        // Using console['error'] to evade Babel and ESLint
        console['error']("Scheduler Profiling: Event log exceeded maximum size. Don't " + 'forget to call `stopLoggingProfilingEvents()`.');
        stopLoggingProfilingEvents();
        return;
      }

      var newEventLog = new Int32Array(eventLogSize * 4);
      newEventLog.set(eventLog);
      eventLogBuffer = newEventLog.buffer;
      eventLog = newEventLog;
    }

    eventLog.set(entries, offset);
  }
}

function startLoggingProfilingEvents() {
  eventLogSize = INITIAL_EVENT_LOG_SIZE;
  eventLogBuffer = new ArrayBuffer(eventLogSize * 4);
  eventLog = new Int32Array(eventLogBuffer);
  eventLogIndex = 0;
}
function stopLoggingProfilingEvents() {
  var buffer = eventLogBuffer;
  eventLogSize = 0;
  eventLogBuffer = null;
  eventLog = null;
  eventLogIndex = 0;
  return buffer;
}
function markTaskStart(task, ms) {
  {
    profilingState[QUEUE_SIZE]++;

    if (eventLog !== null) {
      // performance.now returns a float, representing milliseconds. When the
      // event is logged, it's coerced to an int. Convert to microseconds to
      // maintain extra degrees of precision.
      logEvent([TaskStartEvent, ms * 1000, task.id, task.priorityLevel]);
    }
  }
}
function markTaskCompleted(task, ms) {
  {
    profilingState[PRIORITY] = NoPriority;
    profilingState[CURRENT_TASK_ID] = 0;
    profilingState[QUEUE_SIZE]--;

    if (eventLog !== null) {
      logEvent([TaskCompleteEvent, ms * 1000, task.id]);
    }
  }
}
function markTaskCanceled(task, ms) {
  {
    profilingState[QUEUE_SIZE]--;

    if (eventLog !== null) {
      logEvent([TaskCancelEvent, ms * 1000, task.id]);
    }
  }
}
function markTaskErrored(task, ms) {
  {
    profilingState[PRIORITY] = NoPriority;
    profilingState[CURRENT_TASK_ID] = 0;
    profilingState[QUEUE_SIZE]--;

    if (eventLog !== null) {
      logEvent([TaskErrorEvent, ms * 1000, task.id]);
    }
  }
}
function markTaskRun(task, ms) {
  {
    runIdCounter++;
    profilingState[PRIORITY] = task.priorityLevel;
    profilingState[CURRENT_TASK_ID] = task.id;
    profilingState[CURRENT_RUN_ID] = runIdCounter;

    if (eventLog !== null) {
      logEvent([TaskRunEvent, ms * 1000, task.id, runIdCounter]);
    }
  }
}
function markTaskYield(task, ms) {
  {
    profilingState[PRIORITY] = NoPriority;
    profilingState[CURRENT_TASK_ID] = 0;
    profilingState[CURRENT_RUN_ID] = 0;

    if (eventLog !== null) {
      logEvent([TaskYieldEvent, ms * 1000, task.id, runIdCounter]);
    }
  }
}
function markSchedulerSuspended(ms) {
  {
    mainThreadIdCounter++;

    if (eventLog !== null) {
      logEvent([SchedulerSuspendEvent, ms * 1000, mainThreadIdCounter]);
    }
  }
}
function markSchedulerUnsuspended(ms) {
  {
    if (eventLog !== null) {
      logEvent([SchedulerResumeEvent, ms * 1000, mainThreadIdCounter]);
    }
  }
}

/* eslint-disable no-var */
// Math.pow(2, 30) - 1
// 0b111111111111111111111111111111

var maxSigned31BitInt = 1073741823; // Times out immediately

var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out

var USER_BLOCKING_PRIORITY = 250;
var NORMAL_PRIORITY_TIMEOUT = 5000;
var LOW_PRIORITY_TIMEOUT = 10000; // Never times out

var IDLE_PRIORITY = maxSigned31BitInt; // Tasks are stored on a min heap

var taskQueue = [];
var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.

var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
var currentTask = null;
var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.

var isPerformingWork = false;
var isHostCallbackScheduled = false;
var isHostTimeoutScheduled = false;

function advanceTimers(currentTime) {
  // Check for tasks that are no longer delayed and add them to the queue.
  var timer = peek(timerQueue);

  while (timer !== null) {
    if (timer.callback === null) {
      // Timer was cancelled.
      pop(timerQueue);
    } else if (timer.startTime <= currentTime) {
      // Timer fired. Transfer to the task queue.
      pop(timerQueue);
      timer.sortIndex = timer.expirationTime;
      push(taskQueue, timer);

      {
        markTaskStart(timer, currentTime);
        timer.isQueued = true;
      }
    } else {
      // Remaining timers are pending.
      return;
    }

    timer = peek(timerQueue);
  }
}

function handleTimeout(currentTime) {
  isHostTimeoutScheduled = false;
  advanceTimers(currentTime);

  if (!isHostCallbackScheduled) {
    if (peek(taskQueue) !== null) {
      isHostCallbackScheduled = true;
      requestHostCallback(flushWork);
    } else {
      var firstTimer = peek(timerQueue);

      if (firstTimer !== null) {
        requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
      }
    }
  }
}

function flushWork(hasTimeRemaining, initialTime) {
  {
    markSchedulerUnsuspended(initialTime);
  } // We'll need a host callback the next time work is scheduled.


  isHostCallbackScheduled = false;

  if (isHostTimeoutScheduled) {
    // We scheduled a timeout but it's no longer needed. Cancel it.
    isHostTimeoutScheduled = false;
    cancelHostTimeout();
  }

  isPerformingWork = true;
  var previousPriorityLevel = currentPriorityLevel;

  try {
    if (enableProfiling) {
      try {
        return workLoop(hasTimeRemaining, initialTime);
      } catch (error) {
        if (currentTask !== null) {
          var currentTime = exports.unstable_now();
          markTaskErrored(currentTask, currentTime);
          currentTask.isQueued = false;
        }

        throw error;
      }
    } else {
      // No catch in prod codepath.
      return workLoop(hasTimeRemaining, initialTime);
    }
  } finally {
    currentTask = null;
    currentPriorityLevel = previousPriorityLevel;
    isPerformingWork = false;

    {
      var _currentTime = exports.unstable_now();

      markSchedulerSuspended(_currentTime);
    }
  }
}

function workLoop(hasTimeRemaining, initialTime) {
  var currentTime = initialTime;
  advanceTimers(currentTime);
  currentTask = peek(taskQueue);

  while (currentTask !== null && !(enableSchedulerDebugging )) {
    if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
      // This currentTask hasn't expired, and we've reached the deadline.
      break;
    }

    var callback = currentTask.callback;

    if (callback !== null) {
      currentTask.callback = null;
      currentPriorityLevel = currentTask.priorityLevel;
      var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
      markTaskRun(currentTask, currentTime);
      var continuationCallback = callback(didUserCallbackTimeout);
      currentTime = exports.unstable_now();

      if (typeof continuationCallback === 'function') {
        currentTask.callback = continuationCallback;
        markTaskYield(currentTask, currentTime);
      } else {
        {
          markTaskCompleted(currentTask, currentTime);
          currentTask.isQueued = false;
        }

        if (currentTask === peek(taskQueue)) {
          pop(taskQueue);
        }
      }

      advanceTimers(currentTime);
    } else {
      pop(taskQueue);
    }

    currentTask = peek(taskQueue);
  } // Return whether there's additional work


  if (currentTask !== null) {
    return true;
  } else {
    var firstTimer = peek(timerQueue);

    if (firstTimer !== null) {
      requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
    }

    return false;
  }
}

function unstable_runWithPriority(priorityLevel, eventHandler) {
  switch (priorityLevel) {
    case ImmediatePriority:
    case UserBlockingPriority:
    case NormalPriority:
    case LowPriority:
    case IdlePriority:
      break;

    default:
      priorityLevel = NormalPriority;
  }

  var previousPriorityLevel = currentPriorityLevel;
  currentPriorityLevel = priorityLevel;

  try {
    return eventHandler();
  } finally {
    currentPriorityLevel = previousPriorityLevel;
  }
}

function unstable_next(eventHandler) {
  var priorityLevel;

  switch (currentPriorityLevel) {
    case ImmediatePriority:
    case UserBlockingPriority:
    case NormalPriority:
      // Shift down to normal priority
      priorityLevel = NormalPriority;
      break;

    default:
      // Anything lower than normal priority should remain at the current level.
      priorityLevel = currentPriorityLevel;
      break;
  }

  var previousPriorityLevel = currentPriorityLevel;
  currentPriorityLevel = priorityLevel;

  try {
    return eventHandler();
  } finally {
    currentPriorityLevel = previousPriorityLevel;
  }
}

function unstable_wrapCallback(callback) {
  var parentPriorityLevel = currentPriorityLevel;
  return function () {
    // This is a fork of runWithPriority, inlined for performance.
    var previousPriorityLevel = currentPriorityLevel;
    currentPriorityLevel = parentPriorityLevel;

    try {
      return callback.apply(this, arguments);
    } finally {
      currentPriorityLevel = previousPriorityLevel;
    }
  };
}

function timeoutForPriorityLevel(priorityLevel) {
  switch (priorityLevel) {
    case ImmediatePriority:
      return IMMEDIATE_PRIORITY_TIMEOUT;

    case UserBlockingPriority:
      return USER_BLOCKING_PRIORITY;

    case IdlePriority:
      return IDLE_PRIORITY;

    case LowPriority:
      return LOW_PRIORITY_TIMEOUT;

    case NormalPriority:
    default:
      return NORMAL_PRIORITY_TIMEOUT;
  }
}

function unstable_scheduleCallback(priorityLevel, callback, options) {
  var currentTime = exports.unstable_now();
  var startTime;
  var timeout;

  if (typeof options === 'object' && options !== null) {
    var delay = options.delay;

    if (typeof delay === 'number' && delay > 0) {
      startTime = currentTime + delay;
    } else {
      startTime = currentTime;
    }

    timeout = typeof options.timeout === 'number' ? options.timeout : timeoutForPriorityLevel(priorityLevel);
  } else {
    timeout = timeoutForPriorityLevel(priorityLevel);
    startTime = currentTime;
  }

  var expirationTime = startTime + timeout;
  var newTask = {
    id: taskIdCounter++,
    callback: callback,
    priorityLevel: priorityLevel,
    startTime: startTime,
    expirationTime: expirationTime,
    sortIndex: -1
  };

  {
    newTask.isQueued = false;
  }

  if (startTime > currentTime) {
    // This is a delayed task.
    newTask.sortIndex = startTime;
    push(timerQueue, newTask);

    if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
      // All tasks are delayed, and this is the task with the earliest delay.
      if (isHostTimeoutScheduled) {
        // Cancel an existing timeout.
        cancelHostTimeout();
      } else {
        isHostTimeoutScheduled = true;
      } // Schedule a timeout.


      requestHostTimeout(handleTimeout, startTime - currentTime);
    }
  } else {
    newTask.sortIndex = expirationTime;
    push(taskQueue, newTask);

    {
      markTaskStart(newTask, currentTime);
      newTask.isQueued = true;
    } // Schedule a host callback, if needed. If we're already performing work,
    // wait until the next time we yield.


    if (!isHostCallbackScheduled && !isPerformingWork) {
      isHostCallbackScheduled = true;
      requestHostCallback(flushWork);
    }
  }

  return newTask;
}

function unstable_pauseExecution() {
}

function unstable_continueExecution() {

  if (!isHostCallbackScheduled && !isPerformingWork) {
    isHostCallbackScheduled = true;
    requestHostCallback(flushWork);
  }
}

function unstable_getFirstCallbackNode() {
  return peek(taskQueue);
}

function unstable_cancelCallback(task) {
  {
    if (task.isQueued) {
      var currentTime = exports.unstable_now();
      markTaskCanceled(task, currentTime);
      task.isQueued = false;
    }
  } // Null out the callback to indicate the task has been canceled. (Can't
  // remove from the queue because you can't remove arbitrary nodes from an
  // array based heap, only the first one.)


  task.callback = null;
}

function unstable_getCurrentPriorityLevel() {
  return currentPriorityLevel;
}

function unstable_shouldYield() {
  var currentTime = exports.unstable_now();
  advanceTimers(currentTime);
  var firstTask = peek(taskQueue);
  return firstTask !== currentTask && currentTask !== null && firstTask !== null && firstTask.callback !== null && firstTask.startTime <= currentTime && firstTask.expirationTime < currentTask.expirationTime || shouldYieldToHost();
}

var unstable_requestPaint = requestPaint;
var unstable_Profiling =  {
  startLoggingProfilingEvents: startLoggingProfilingEvents,
  stopLoggingProfilingEvents: stopLoggingProfilingEvents,
  sharedProfilingBuffer: sharedProfilingBuffer
} ;

exports.unstable_IdlePriority = IdlePriority;
exports.unstable_ImmediatePriority = ImmediatePriority;
exports.unstable_LowPriority = LowPriority;
exports.unstable_NormalPriority = NormalPriority;
exports.unstable_Profiling = unstable_Profiling;
exports.unstable_UserBlockingPriority = UserBlockingPriority;
exports.unstable_cancelCallback = unstable_cancelCallback;
exports.unstable_continueExecution = unstable_continueExecution;
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
exports.unstable_next = unstable_next;
exports.unstable_pauseExecution = unstable_pauseExecution;
exports.unstable_requestPaint = unstable_requestPaint;
exports.unstable_runWithPriority = unstable_runWithPriority;
exports.unstable_scheduleCallback = unstable_scheduleCallback;
exports.unstable_shouldYield = unstable_shouldYield;
exports.unstable_wrapCallback = unstable_wrapCallback;
  })();
}

}).call(this)}).call(this,require('_process'))
},{"_process":358}],384:[function(require,module,exports){
/** @license React v0.19.1
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

'use strict';var f,g,h,k,l;
if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,
y=window.setTimeout,z=window.clearTimeout;if("undefined"!==typeof console){var A=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&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 A&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===
typeof w&&"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):F=0<a?Math.floor(1E3/a):5};var H=new MessageChannel,I=H.port2;H.port1.onmessage=
function(){if(null!==D){var a=exports.unstable_now();G=a+F;try{D(!0,a)?I.postMessage(null):(C=!1,D=null)}catch(b){throw I.postMessage(null),b;}}else C=!1};f=function(a){D=a;C||(C=!0,I.postMessage(null))};g=function(a,b){E=y(function(){a(exports.unstable_now())},b)};h=function(){z(E);E=-1}}function J(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<K(e,b))a[d]=b,a[c]=e,c=d;else break a}}function L(a){a=a[0];return void 0===a?null:a}
function M(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;
function V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}
function X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}
function Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};
exports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=Z;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}};
exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:Y(a)}else c=Y(a),e=d;c=e+c;a={id:P++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};
exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<Q.expirationTime||k()};exports.unstable_wrapCallback=function(a){var b=R;return function(){var c=R;R=b;try{return a.apply(this,arguments)}finally{R=c}}};

},{}],385:[function(require,module,exports){
(function (process){(function (){
'use strict';

if (process.env.NODE_ENV === 'production') {
  module.exports = require('./cjs/scheduler.production.min.js');
} else {
  module.exports = require('./cjs/scheduler.development.js');
}

}).call(this)}).call(this,require('_process'))
},{"./cjs/scheduler.development.js":383,"./cjs/scheduler.production.min.js":384,"_process":358}],386:[function(require,module,exports){
(function (process){(function (){
'use strict';

if (process.env.NODE_ENV === 'production') {
  module.exports = require('./cjs/scheduler-tracing.production.min.js');
} else {
  module.exports = require('./cjs/scheduler-tracing.development.js');
}

}).call(this)}).call(this,require('_process'))
},{"./cjs/scheduler-tracing.development.js":381,"./cjs/scheduler-tracing.production.min.js":382,"_process":358}],387:[function(require,module,exports){
/*! For license information please see shifty.js.LICENSE.txt */
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("shifty",[],n):"object"==typeof exports?exports.shifty=n():t.shifty=n()}(self,(function(){return function(){"use strict";var t={720:function(t,n,e){e.r(n),e.d(n,{Scene:function(){return Xt},Tweenable:function(){return _t},interpolate:function(){return Wt},processTweens:function(){return ft},setBezierFunction:function(){return Yt},tween:function(){return yt},unsetBezierFunction:function(){return Zt}});var r={};e.r(r),e.d(r,{bounce:function(){return D},bouncePast:function(){return q},easeFrom:function(){return B},easeFromTo:function(){return Q},easeInBack:function(){return T},easeInCirc:function(){return j},easeInCubic:function(){return c},easeInExpo:function(){return w},easeInOutBack:function(){return F},easeInOutCirc:function(){return P},easeInOutCubic:function(){return l},easeInOutExpo:function(){return S},easeInOutQuad:function(){return s},easeInOutQuart:function(){return v},easeInOutQuint:function(){return d},easeInOutSine:function(){return b},easeInQuad:function(){return o},easeInQuart:function(){return h},easeInQuint:function(){return _},easeInSine:function(){return m},easeOutBack:function(){return E},easeOutBounce:function(){return M},easeOutCirc:function(){return k},easeOutCubic:function(){return f},easeOutExpo:function(){return O},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return y},easeOutSine:function(){return g},easeTo:function(){return N},elastic:function(){return x},linear:function(){return u},swingFrom:function(){return I},swingFromTo:function(){return A},swingTo:function(){return C}});var i={};e.r(i),e.d(i,{afterTween:function(){return Nt},beforeTween:function(){return Bt},doesApply:function(){return qt},tweenCreated:function(){return Qt}});var u=function(t){return t},o=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},s=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},f=function(t){return Math.pow(t-1,3)+1},l=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},h=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},v=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},_=function(t){return Math.pow(t,5)},y=function(t){return Math.pow(t-1,5)+1},d=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},m=function(t){return 1-Math.cos(t*(Math.PI/2))},g=function(t){return Math.sin(t*(Math.PI/2))},b=function(t){return-.5*(Math.cos(Math.PI*t)-1)},w=function(t){return 0===t?0:Math.pow(2,10*(t-1))},O=function(t){return 1===t?1:1-Math.pow(2,-10*t)},S=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},j=function(t){return-(Math.sqrt(1-t*t)-1)},k=function(t){return Math.sqrt(1-Math.pow(t-1,2))},P=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},T=function(t){var n=1.70158;return t*t*((n+1)*t-n)},E=function(t){var n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},F=function(t){var n=1.70158;return(t/=.5)<1?t*t*((1+(n*=1.525))*t-n)*.5:.5*((t-=2)*t*((1+(n*=1.525))*t+n)+2)},x=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},A=function(t){var n=1.70158;return(t/=.5)<1?t*t*((1+(n*=1.525))*t-n)*.5:.5*((t-=2)*t*((1+(n*=1.525))*t+n)+2)},I=function(t){var n=1.70158;return t*t*((n+1)*t-n)},C=function(t){var n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},D=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},q=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},Q=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},B=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function R(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function z(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function U(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function V(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?U(Object(e),!0).forEach((function(n){W(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):U(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function W(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var $,G,H,J="linear",K="undefined"!=typeof window?window:e.g,X="afterTween",Y="afterTweenEnd",Z="beforeTween",tt="tweenCreated",nt="function",et="string",rt=K.requestAnimationFrame||K.webkitRequestAnimationFrame||K.oRequestAnimationFrame||K.msRequestAnimationFrame||K.mozCancelRequestAnimationFrame&&K.mozRequestAnimationFrame||setTimeout,it=function(){},ut=null,ot=null,at=V({},r),st=function(t,n,e,r,i,u,o){var a,s,c,f=t<u?0:(t-u)/i,l=!1;for(var h in o&&o.call&&(l=!0,a=o(f)),n)l||(a=((s=o[h]).call?s:at[s])(f)),c=e[h],n[h]=c+(r[h]-c)*a;return n},ct=function(t,n){var e=t._timestamp,r=t._currentState,i=t._delay;if(!(n<e+i)){var u=t._duration,o=t._targetState,a=e+i+u,s=n>a?a:n,c=s>=a,f=u-(a-s),l=t._filters.length>0;if(c)return t._render(o,t._data,f),t.stop(!0);l&&t._applyFilter(Z),s<e+i?e=u=s=1:e+=i,st(s,r,t._originalState,o,u,e,t._easing),l&&t._applyFilter(X),t._render(r,t._data,f)}},ft=function(){for(var t,n=_t.now(),e=ut;e;)t=e._next,ct(e,n),e=t},lt=Date.now||function(){return+new Date},ht=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:J,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=L(n);if(at[n])return at[n];if(r===et||r===nt)for(var i in t)e[i]=n;else for(var u in t)e[u]=n[u]||J;return e},pt=function(t){t===ut?(ut=t._next)?ut._previous=null:ot=null:t===ot?(ot=t._previous)?ot._next=null:ut=null:(G=t._previous,H=t._next,G._next=H,H._previous=G),t._previous=t._next=null},vt="function"==typeof Promise?Promise:null,_t=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;R(this,t),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._resolve=null,this._reject=null,this._currentState=n||{},this._originalState={},this._targetState={},this._start=it,this._render=it,this._promiseCtor=vt,e&&this.setConfig(e)}var n,e;return n=t,(e=[{key:"_applyFilter",value:function(t){for(var n=this._filters.length;n>0;n--){var e=this._filters[n-n][t];e&&e(this)}}},{key:"tween",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!n&&this._config||this.setConfig(n),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._config;for(var r in n)e[r]=n[r];var i=e.promise,u=void 0===i?this._promiseCtor:i,o=e.start,a=void 0===o?it:o,s=e.finish,c=e.render,f=void 0===c?this._config.step||it:c,l=e.step,h=void 0===l?it:l;this._data=e.data||e.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=n.delay||0,this._start=a,this._render=f||h,this._duration=e.duration||500,this._promiseCtor=u,s&&(this._resolve=s);var p=n.from,v=n.to,_=void 0===v?{}:v,y=this._currentState,d=this._originalState,m=this._targetState;for(var g in p)y[g]=p[g];var b=!1;for(var w in y){var O=y[w];b||L(O)!==et||(b=!0),d[w]=O,m[w]=_.hasOwnProperty(w)?_[w]:O}if(this._easing=ht(this._currentState,e.easing,this._easing),this._filters.length=0,b){for(var S in t.filters)t.filters[S].doesApply(this)&&this._filters.push(t.filters[S]);this._applyFilter(tt)}return this}},{key:"then",value:function(t,n){var e=this;return this._promise=new this._promiseCtor((function(t,n){e._resolve=t,e._reject=n})),this._promise.then(t,n)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"get",value:function(){return V({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,pt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=n-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ut?(ut=this,ot=this):(this._previous=ot,ot._next=this,ot=this),this)}},{key:"seek",value:function(n){n=Math.max(n,0);var e=t.now();return this._timestamp+n===0||(this._timestamp=e-n,ct(this,e)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,pt(this);var n=this._filters.length>0;t&&(n&&this._applyFilter(Z),st(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),n&&(this._applyFilter(X),this._applyFilter(Y))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null;var e=this._currentState,r=this._originalState,i=this._targetState;for(var u in e)r[u]=i[u]=e[u];return this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this._currentState,e=this._data,r=this._isPlaying;return r?(this._reject&&this._reject({data:e,state:n,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"setScheduleFunction",value:function(n){t.setScheduleFunction(n)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=V({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&z(n.prototype,e),t}();function yt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new _t;return n.tween(t),n.tweenable=n,n}W(_t,"now",(function(){return $})),_t.setScheduleFunction=function(t){return rt=t},_t.formulas=at,_t.filters={},function t(){$=lt(),rt.call(K,t,16.666666666666668),ft()}();var dt,mt,gt=/(\d|-|\.)/,bt=/([^\-0-9.]+)/g,wt=/[0-9.-]+/g,Ot=(dt=wt.source,mt=/,\s*/.source,new RegExp("rgb\\(".concat(dt).concat(mt).concat(dt).concat(mt).concat(dt,"\\)"),"g")),St=/^.*\(/,jt=/#([0-9]|[a-f]){3,6}/gi,kt="VAL",Pt=function(t,n){return t.map((function(t,e){return"_".concat(n,"_").concat(e)}))};function Mt(t){return parseInt(t,16)}var Tt=function(t){return"rgb(".concat((n=t,3===(n=n.replace(/#/,"")).length&&(n=(n=n.split(""))[0]+n[0]+n[1]+n[1]+n[2]+n[2]),[Mt(n.substr(0,2)),Mt(n.substr(2,2)),Mt(n.substr(4,2))]).join(","),")");var n},Et=function(t,n,e){var r=n.match(t),i=n.replace(t,kt);return r&&r.forEach((function(t){return i=i.replace(kt,e(t))})),i},Ft=function(t){for(var n in t){var e=t[n];"string"==typeof e&&e.match(jt)&&(t[n]=Et(jt,e,Tt))}},xt=function(t){var n=t.match(wt).map(Math.floor),e=t.match(St)[0];return"".concat(e).concat(n.join(","),")")},At=function(t){return t.match(wt)},It=function(t,n){var e={};return n.forEach((function(n){e[n]=t[n],delete t[n]})),e},Ct=function(t,n){return n.map((function(n){return t[n]}))},Dt=function(t,n){return n.forEach((function(n){return t=t.replace(kt,+n.toFixed(4))})),t},qt=function(t){for(var n in t._currentState)if("string"==typeof t._currentState[n])return!0;return!1};function Qt(t){var n=t._currentState;[n,t._originalState,t._targetState].forEach(Ft),t._tokenData=function(t){var n,e,r={};for(var i in t){var u=t[i];"string"==typeof u&&(r[i]={formatString:(n=u,e=void 0,e=n.match(bt),e?(1===e.length||n.charAt(0).match(gt))&&e.unshift(""):e=["",""],e.join(kt)),chunkNames:Pt(At(u),i)})}return r}(n)}function Bt(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,u=t._tokenData;!function(t,n){var e=function(e){var r=n[e].chunkNames,i=t[e];if("string"==typeof i){var u=i.split(" "),o=u[u.length-1];r.forEach((function(n,e){return t[n]=u[e]||o}))}else r.forEach((function(n){return t[n]=i}));delete t[e]};for(var r in n)e(r)}(i,u),[n,e,r].forEach((function(t){return function(t,n){var e=function(e){At(t[e]).forEach((function(r,i){return t[n[e].chunkNames[i]]=+r})),delete t[e]};for(var r in n)e(r)}(t,u)}))}function Nt(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,u=t._tokenData;[n,e,r].forEach((function(t){return function(t,n){for(var e in n){var r=n[e],i=r.chunkNames,u=r.formatString,o=Dt(u,Ct(It(t,i),i));t[e]=Et(Ot,o,xt)}}(t,u)})),function(t,n){for(var e in n){var r=n[e].chunkNames,i=t[r[0]];t[e]="string"==typeof i?r.map((function(n){var e=t[n];return delete t[n],e})).join(" "):i}}(i,u)}function Rt(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function zt(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Rt(Object(e),!0).forEach((function(n){Lt(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Rt(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function Lt(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var Ut=new _t,Vt=_t.filters,Wt=function(t,n,e,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,u=zt({},t),o=ht(t,r);for(var a in Ut._filters.length=0,Ut.set({}),Ut._currentState=u,Ut._originalState=t,Ut._targetState=n,Ut._easing=o,Vt)Vt[a].doesApply(Ut)&&Ut._filters.push(Vt[a]);Ut._applyFilter("tweenCreated"),Ut._applyFilter("beforeTween");var s=st(e,u,t,n,1,i,o);return Ut._applyFilter("afterTween"),s};function $t(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function Gt(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Ht(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jt(t,n){var e=n.get(t);if(!e)throw new TypeError("attempted to get private field on non-instance");return e.get?e.get.call(t):e.value}var Kt=new WeakMap,Xt=function(){function t(){Gt(this,t),Kt.set(this,{writable:!0,value:[]});for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];e.forEach(this.add.bind(this))}var n,e;return n=t,(e=[{key:"add",value:function(t){return Jt(this,Kt).push(t),t}},{key:"remove",value:function(t){var n=Jt(this,Kt).indexOf(t);return~n&&Jt(this,Kt).splice(n,1),t}},{key:"empty",value:function(){return this.tweenables.map(this.remove.bind(this))}},{key:"isPlaying",value:function(){return Jt(this,Kt).some((function(t){return t.isPlaying()}))}},{key:"play",value:function(){return Jt(this,Kt).forEach((function(t){return t.tween()})),this}},{key:"pause",value:function(){return Jt(this,Kt).forEach((function(t){return t.pause()})),this}},{key:"resume",value:function(){return Jt(this,Kt).forEach((function(t){return t.resume()})),this}},{key:"stop",value:function(t){return Jt(this,Kt).forEach((function(n){return n.stop(t)})),this}},{key:"tweenables",get:function(){return function(t){if(Array.isArray(t))return $t(t)}(t=Jt(this,Kt))||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return $t(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?$t(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var t}},{key:"promises",get:function(){return Jt(this,Kt).map((function(t){return t.then()}))}}])&&Ht(n.prototype,e),t}();var Yt=function(t,n,e,r,i){var u=function(t,n,e,r){return function(i){return f=0,l=0,h=0,p=function(t){return((f*t+l)*t+h)*t},v=function(t){return(3*f*t+2*l)*t+h},_=function(t){return t>=0?t:0-t},f=1-(h=3*(u=t))-(l=3*(e-u)-h),a=1-(c=3*(o=n))-(s=3*(r-o)-c),function(t){return((a*t+s)*t+c)*t}(function(t,n){var e,r,i,u,o,a;for(i=t,a=0;a<8;a++){if(u=p(i)-t,_(u)<n)return i;if(o=v(i),_(o)<1e-6)break;i-=u/o}if((i=t)<(e=0))return e;if(i>(r=1))return r;for(;e<r;){if(u=p(i),_(u-t)<n)return i;t>u?e=i:r=i,i=.5*(r-e)+e}return i}(i,function(t){return 1/(200*t)}(1)));var u,o,a,s,c,f,l,h,p,v,_}}(n,e,r,i);return u.displayName=t,u.x1=n,u.y1=e,u.x2=r,u.y2=i,_t.formulas[t]=u},Zt=function(t){return delete _t.formulas[t]};_t.filters.token=i}},n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}return e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e(720)}()}));

},{}],388:[function(require,module,exports){
(function (global){(function (){
/**
 * simplebar-react - v2.2.1
 * React component for SimpleBar
 * https://grsmto.github.io/simplebar/
 *
 * Made by Adrien Denat
 * Under MIT License
 */

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],e):(t=t||self).SimpleBar=e(t.React,t.PropTypes)}(this,(function(t,e){"use strict";var r="default"in t?t.default:t;function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}e=e&&e.hasOwnProperty("default")?e.default:e;var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,e){return t(e={exports:{}},e.exports),e.exports}var l,u,f,h="object",p=function(t){return t&&t.Math==Math&&t},d=p(typeof globalThis==h&&globalThis)||p(typeof window==h&&window)||p(typeof self==h&&self)||p(typeof a==h&&a)||Function("return this")(),v=function(t){try{return!!t()}catch(t){return!0}},g=!v((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),b={}.propertyIsEnumerable,y=Object.getOwnPropertyDescriptor,m={f:y&&!b.call({1:2},1)?function(t){var e=y(this,t);return!!e&&e.enumerable}:b},x=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},E={}.toString,w=function(t){return E.call(t).slice(8,-1)},O="".split,_=v((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==w(t)?O.call(t,""):Object(t)}:Object,S=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},k=function(t){return _(S(t))},A=function(t){return"object"==typeof t?null!==t:"function"==typeof t},j=function(t,e){if(!A(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!A(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!A(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!A(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},L={}.hasOwnProperty,M=function(t,e){return L.call(t,e)},T=d.document,R=A(T)&&A(T.createElement),N=function(t){return R?T.createElement(t):{}},W=!g&&!v((function(){return 7!=Object.defineProperty(N("div"),"a",{get:function(){return 7}}).a})),z=Object.getOwnPropertyDescriptor,C={f:g?z:function(t,e){if(t=k(t),e=j(e,!0),W)try{return z(t,e)}catch(t){}if(M(t,e))return x(!m.f.call(t,e),t[e])}},P=function(t){if(!A(t))throw TypeError(String(t)+" is not an object");return t},I=Object.defineProperty,D={f:g?I:function(t,e,r){if(P(t),e=j(e,!0),P(r),W)try{return I(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},V=g?function(t,e,r){return D.f(t,e,x(1,r))}:function(t,e,r){return t[e]=r,t},F=function(t,e){try{V(d,t,e)}catch(r){d[t]=e}return e},B=c((function(t){var e=d["__core-js_shared__"]||F("__core-js_shared__",{});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),H=B("native-function-to-string",Function.toString),q=d.WeakMap,$="function"==typeof q&&/native code/.test(H.call(q)),X=0,Y=Math.random(),G=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++X+Y).toString(36)},U=B("keys"),Q=function(t){return U[t]||(U[t]=G(t))},K={},J=d.WeakMap;if($){var Z=new J,tt=Z.get,et=Z.has,rt=Z.set;l=function(t,e){return rt.call(Z,t,e),e},u=function(t){return tt.call(Z,t)||{}},f=function(t){return et.call(Z,t)}}else{var nt=Q("state");K[nt]=!0,l=function(t,e){return V(t,nt,e),e},u=function(t){return M(t,nt)?t[nt]:{}},f=function(t){return M(t,nt)}}var it={set:l,get:u,has:f,enforce:function(t){return f(t)?u(t):l(t,{})},getterFor:function(t){return function(e){var r;if(!A(e)||(r=u(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},ot=c((function(t){var e=it.get,r=it.enforce,n=String(H).split("toString");B("inspectSource",(function(t){return H.call(t)})),(t.exports=function(t,e,i,o){var s=!!o&&!!o.unsafe,a=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof e||M(i,"name")||V(i,"name",e),r(i).source=n.join("string"==typeof e?e:"")),t!==d?(s?!c&&t[e]&&(a=!0):delete t[e],a?t[e]=i:V(t,e,i)):a?t[e]=i:F(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||H.call(this)}))})),st=d,at=function(t){return"function"==typeof t?t:void 0},ct=function(t,e){return arguments.length<2?at(st[t])||at(d[t]):st[t]&&st[t][e]||d[t]&&d[t][e]},lt=Math.ceil,ut=Math.floor,ft=function(t){return isNaN(t=+t)?0:(t>0?ut:lt)(t)},ht=Math.min,pt=function(t){return t>0?ht(ft(t),9007199254740991):0},dt=Math.max,vt=Math.min,gt=function(t){return function(e,r,n){var i,o=k(e),s=pt(o.length),a=function(t,e){var r=ft(t);return r<0?dt(r+e,0):vt(r,e)}(n,s);if(t&&r!=r){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},bt={includes:gt(!0),indexOf:gt(!1)}.indexOf,yt=function(t,e){var r,n=k(t),i=0,o=[];for(r in n)!M(K,r)&&M(n,r)&&o.push(r);for(;e.length>i;)M(n,r=e[i++])&&(~bt(o,r)||o.push(r));return o},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xt=mt.concat("length","prototype"),Et={f:Object.getOwnPropertyNames||function(t){return yt(t,xt)}},wt={f:Object.getOwnPropertySymbols},Ot=ct("Reflect","ownKeys")||function(t){var e=Et.f(P(t)),r=wt.f;return r?e.concat(r(t)):e},_t=function(t,e){for(var r=Ot(e),n=D.f,i=C.f,o=0;o<r.length;o++){var s=r[o];M(t,s)||n(t,s,i(e,s))}},St=/#|\.prototype\./,kt=function(t,e){var r=jt[At(t)];return r==Mt||r!=Lt&&("function"==typeof e?v(e):!!e)},At=kt.normalize=function(t){return String(t).replace(St,".").toLowerCase()},jt=kt.data={},Lt=kt.NATIVE="N",Mt=kt.POLYFILL="P",Tt=kt,Rt=C.f,Nt=function(t,e){var r,n,i,o,s,a=t.target,c=t.global,l=t.stat;if(r=c?d:l?d[a]||F(a,{}):(d[a]||{}).prototype)for(n in e){if(o=e[n],i=t.noTargetGet?(s=Rt(r,n))&&s.value:r[n],!Tt(c?n:a+(l?".":"#")+n,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;_t(o,i)}(t.sham||i&&i.sham)&&V(o,"sham",!0),ot(r,n,o,t)}},Wt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},zt=function(t,e,r){if(Wt(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}},Ct=function(t){return Object(S(t))},Pt=Array.isArray||function(t){return"Array"==w(t)},It=!!Object.getOwnPropertySymbols&&!v((function(){return!String(Symbol())})),Dt=d.Symbol,Vt=B("wks"),Ft=function(t){return Vt[t]||(Vt[t]=It&&Dt[t]||(It?Dt:G)("Symbol."+t))},Bt=Ft("species"),Ht=function(t,e){var r;return Pt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Pt(r.prototype)?A(r)&&null===(r=r[Bt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},qt=[].push,$t=function(t){var e=1==t,r=2==t,n=3==t,i=4==t,o=6==t,s=5==t||o;return function(a,c,l,u){for(var f,h,p=Ct(a),d=_(p),v=zt(c,l,3),g=pt(d.length),b=0,y=u||Ht,m=e?y(a,g):r?y(a,0):void 0;g>b;b++)if((s||b in d)&&(h=v(f=d[b],b,p),t))if(e)m[b]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return b;case 2:qt.call(m,f)}else if(i)return!1;return o?-1:n||i?i:m}},Xt={forEach:$t(0),map:$t(1),filter:$t(2),some:$t(3),every:$t(4),find:$t(5),findIndex:$t(6)},Yt=Ft("species"),Gt=Xt.filter;Nt({target:"Array",proto:!0,forced:!function(t){return!v((function(){var e=[];return(e.constructor={})[Yt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("filter")},{filter:function(t){return Gt(this,t,arguments.length>1?arguments[1]:void 0)}});var Ut=function(t,e){var r=[][t];return!r||!v((function(){r.call(null,e||function(){throw 1},1)}))},Qt=Xt.forEach,Kt=Ut("forEach")?function(t){return Qt(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach;Nt({target:"Array",proto:!0,forced:[].forEach!=Kt},{forEach:Kt});var Jt=Object.keys||function(t){return yt(t,mt)},Zt=g?Object.defineProperties:function(t,e){P(t);for(var r,n=Jt(e),i=n.length,o=0;i>o;)D.f(t,r=n[o++],e[r]);return t},te=ct("document","documentElement"),ee=Q("IE_PROTO"),re=function(){},ne=function(){var t,e=N("iframe"),r=mt.length;for(e.style.display="none",te.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),ne=t.F;r--;)delete ne.prototype[mt[r]];return ne()},ie=Object.create||function(t,e){var r;return null!==t?(re.prototype=P(t),r=new re,re.prototype=null,r[ee]=t):r=ne(),void 0===e?r:Zt(r,e)};K[ee]=!0;var oe=Ft("unscopables"),se=Array.prototype;null==se[oe]&&V(se,oe,ie(null));var ae,ce,le,ue=function(t){se[oe][t]=!0},fe={},he=!v((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),pe=Q("IE_PROTO"),de=Object.prototype,ve=he?Object.getPrototypeOf:function(t){return t=Ct(t),M(t,pe)?t[pe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?de:null},ge=Ft("iterator"),be=!1;[].keys&&("next"in(le=[].keys())?(ce=ve(ve(le)))!==Object.prototype&&(ae=ce):be=!0),null==ae&&(ae={}),M(ae,ge)||V(ae,ge,(function(){return this}));var ye={IteratorPrototype:ae,BUGGY_SAFARI_ITERATORS:be},me=D.f,xe=Ft("toStringTag"),Ee=function(t,e,r){t&&!M(t=r?t:t.prototype,xe)&&me(t,xe,{configurable:!0,value:e})},we=ye.IteratorPrototype,Oe=function(){return this},_e=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return P(r),function(t){if(!A(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Se=ye.IteratorPrototype,ke=ye.BUGGY_SAFARI_ITERATORS,Ae=Ft("iterator"),je=function(){return this},Le=function(t,e,r,n,i,o,s){!function(t,e,r){var n=e+" Iterator";t.prototype=ie(we,{next:x(1,r)}),Ee(t,n,!1),fe[n]=Oe}(r,e,n);var a,c,l,u=function(t){if(t===i&&v)return v;if(!ke&&t in p)return p[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",h=!1,p=t.prototype,d=p[Ae]||p["@@iterator"]||i&&p[i],v=!ke&&d||u(i),g="Array"==e&&p.entries||d;if(g&&(a=ve(g.call(new t)),Se!==Object.prototype&&a.next&&(ve(a)!==Se&&(_e?_e(a,Se):"function"!=typeof a[Ae]&&V(a,Ae,je)),Ee(a,f,!0))),"values"==i&&d&&"values"!==d.name&&(h=!0,v=function(){return d.call(this)}),p[Ae]!==v&&V(p,Ae,v),fe[e]=v,i)if(c={values:u("values"),keys:o?v:u("keys"),entries:u("entries")},s)for(l in c)!ke&&!h&&l in p||ot(p,l,c[l]);else Nt({target:e,proto:!0,forced:ke||h},c);return c},Me=it.set,Te=it.getterFor("Array Iterator"),Re=Le(Array,"Array",(function(t,e){Me(this,{type:"Array Iterator",target:k(t),index:0,kind:e})}),(function(){var t=Te(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");fe.Arguments=fe.Array,ue("keys"),ue("values"),ue("entries");var Ne=Object.assign,We=!Ne||v((function(){var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=Ne({},t)[r]||"abcdefghijklmnopqrst"!=Jt(Ne({},e)).join("")}))?function(t,e){for(var r=Ct(t),n=arguments.length,i=1,o=wt.f,s=m.f;n>i;)for(var a,c=_(arguments[i++]),l=o?Jt(c).concat(o(c)):Jt(c),u=l.length,f=0;u>f;)a=l[f++],g&&!s.call(c,a)||(r[a]=c[a]);return r}:Ne;Nt({target:"Object",stat:!0,forced:Object.assign!==We},{assign:We});var ze=Ft("toStringTag"),Ce="Arguments"==w(function(){return arguments}()),Pe=function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),ze))?r:Ce?w(e):"Object"==(n=w(e))&&"function"==typeof e.callee?"Arguments":n},Ie={};Ie[Ft("toStringTag")]="z";var De="[object z]"!==String(Ie)?function(){return"[object "+Pe(this)+"]"}:Ie.toString,Ve=Object.prototype;De!==Ve.toString&&ot(Ve,"toString",De,{unsafe:!0});var Fe="\t\n\v\f\r                　\u2028\u2029\ufeff",Be="["+Fe+"]",He=RegExp("^"+Be+Be+"*"),qe=RegExp(Be+Be+"*$"),$e=function(t){return function(e){var r=String(S(e));return 1&t&&(r=r.replace(He,"")),2&t&&(r=r.replace(qe,"")),r}},Xe={start:$e(1),end:$e(2),trim:$e(3)}.trim,Ye=d.parseInt,Ge=/^[+-]?0[Xx]/,Ue=8!==Ye(Fe+"08")||22!==Ye(Fe+"0x16")?function(t,e){var r=Xe(String(t));return Ye(r,e>>>0||(Ge.test(r)?16:10))}:Ye;Nt({global:!0,forced:parseInt!=Ue},{parseInt:Ue});var Qe=function(t){return function(e,r){var n,i,o=String(S(e)),s=ft(r),a=o.length;return s<0||s>=a?t?"":void 0:(n=o.charCodeAt(s))<55296||n>56319||s+1===a||(i=o.charCodeAt(s+1))<56320||i>57343?t?o.charAt(s):n:t?o.slice(s,s+2):i-56320+(n-55296<<10)+65536}},Ke={codeAt:Qe(!1),charAt:Qe(!0)},Je=Ke.charAt,Ze=it.set,tr=it.getterFor("String Iterator");Le(String,"String",(function(t){Ze(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=tr(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Je(r,n),e.index+=t.length,{value:t,done:!1})}));var er=function(t,e,r){for(var n in e)ot(t,n,e[n],r);return t},rr=!v((function(){return Object.isExtensible(Object.preventExtensions({}))})),nr=c((function(t){var e=D.f,r=G("meta"),n=0,i=Object.isExtensible||function(){return!0},o=function(t){e(t,r,{value:{objectID:"O"+ ++n,weakData:{}}})},s=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!A(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!M(t,r)){if(!i(t))return"F";if(!e)return"E";o(t)}return t[r].objectID},getWeakData:function(t,e){if(!M(t,r)){if(!i(t))return!0;if(!e)return!1;o(t)}return t[r].weakData},onFreeze:function(t){return rr&&s.REQUIRED&&i(t)&&!M(t,r)&&o(t),t}};K[r]=!0})),ir=(nr.REQUIRED,nr.fastKey,nr.getWeakData,nr.onFreeze,Ft("iterator")),or=Array.prototype,sr=Ft("iterator"),ar=function(t,e,r,n){try{return n?e(P(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&P(i.call(t)),e}},cr=c((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,r,n,i,o){var s,a,c,l,u,f,h,p=zt(r,n,i?2:1);if(o)s=t;else{if("function"!=typeof(a=function(t){if(null!=t)return t[sr]||t["@@iterator"]||fe[Pe(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(h=a)&&(fe.Array===h||or[ir]===h)){for(c=0,l=pt(t.length);l>c;c++)if((u=i?p(P(f=t[c])[0],f[1]):p(t[c]))&&u instanceof e)return u;return new e(!1)}s=a.call(t)}for(;!(f=s.next()).done;)if((u=ar(s,p,f.value,i))&&u instanceof e)return u;return new e(!1)}).stop=function(t){return new e(!0,t)}})),lr=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},ur=Ft("iterator"),fr=!1;try{var hr=0,pr={next:function(){return{done:!!hr++}},return:function(){fr=!0}};pr[ur]=function(){return this},Array.from(pr,(function(){throw 2}))}catch(t){}var dr=function(t,e,r,n,i){var o=d[t],s=o&&o.prototype,a=o,c=n?"set":"add",l={},u=function(t){var e=s[t];ot(s,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!A(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return i&&!A(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!A(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(Tt(t,"function"!=typeof o||!(i||s.forEach&&!v((function(){(new o).entries().next()})))))a=r.getConstructor(e,t,n,c),nr.REQUIRED=!0;else if(Tt(t,!0)){var f=new a,h=f[c](i?{}:-0,1)!=f,p=v((function(){f.has(1)})),g=function(t,e){if(!e&&!fr)return!1;var r=!1;try{var n={};n[ur]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new o(t)})),b=!i&&v((function(){for(var t=new o,e=5;e--;)t[c](e,e);return!t.has(-0)}));g||((a=e((function(e,r){lr(e,a,t);var i=function(t,e,r){var n,i;return _e&&"function"==typeof(n=e.constructor)&&n!==r&&A(i=n.prototype)&&i!==r.prototype&&_e(t,i),t}(new o,e,a);return null!=r&&cr(r,i[c],i,n),i}))).prototype=s,s.constructor=a),(p||b)&&(u("delete"),u("has"),n&&u("get")),(b||h)&&u(c),i&&s.clear&&delete s.clear}return l[t]=a,Nt({global:!0,forced:a!=o},l),Ee(a,t),i||r.setStrong(a,t,n),a},vr=nr.getWeakData,gr=it.set,br=it.getterFor,yr=Xt.find,mr=Xt.findIndex,xr=0,Er=function(t){return t.frozen||(t.frozen=new wr)},wr=function(){this.entries=[]},Or=function(t,e){return yr(t.entries,(function(t){return t[0]===e}))};wr.prototype={get:function(t){var e=Or(this,t);if(e)return e[1]},has:function(t){return!!Or(this,t)},set:function(t,e){var r=Or(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=mr(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}};var _r={getConstructor:function(t,e,r,n){var i=t((function(t,o){lr(t,i,e),gr(t,{type:e,id:xr++,frozen:void 0}),null!=o&&cr(o,t[n],t,r)})),o=br(e),s=function(t,e,r){var n=o(t),i=vr(P(e),!0);return!0===i?Er(n).set(e,r):i[n.id]=r,t};return er(i.prototype,{delete:function(t){var e=o(this);if(!A(t))return!1;var r=vr(t);return!0===r?Er(e).delete(t):r&&M(r,e.id)&&delete r[e.id]},has:function(t){var e=o(this);if(!A(t))return!1;var r=vr(t);return!0===r?Er(e).has(t):r&&M(r,e.id)}}),er(i.prototype,r?{get:function(t){var e=o(this);if(A(t)){var r=vr(t);return!0===r?Er(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},Sr=(c((function(t){var e,r=it.enforce,n=!d.ActiveXObject&&"ActiveXObject"in d,i=Object.isExtensible,o=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},s=t.exports=dr("WeakMap",o,_r,!0,!0);if($&&n){e=_r.getConstructor(o,"WeakMap",!0),nr.REQUIRED=!0;var a=s.prototype,c=a.delete,l=a.has,u=a.get,f=a.set;er(a,{delete:function(t){if(A(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),c.call(this,t)||n.frozen.delete(t)}return c.call(this,t)},has:function(t){if(A(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),l.call(this,t)||n.frozen.has(t)}return l.call(this,t)},get:function(t){if(A(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),l.call(this,t)?u.call(this,t):n.frozen.get(t)}return u.call(this,t)},set:function(t,n){if(A(t)&&!i(t)){var o=r(this);o.frozen||(o.frozen=new e),l.call(this,t)?f.call(this,t,n):o.frozen.set(t,n)}else f.call(this,t,n);return this}})}})),{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),kr=Ft("iterator"),Ar=Ft("toStringTag"),jr=Re.values;for(var Lr in Sr){var Mr=d[Lr],Tr=Mr&&Mr.prototype;if(Tr){if(Tr[kr]!==jr)try{V(Tr,kr,jr)}catch(t){Tr[kr]=jr}if(Tr[Ar]||V(Tr,Ar,Lr),Sr[Lr])for(var Rr in Re)if(Tr[Rr]!==Re[Rr])try{V(Tr,Rr,Re[Rr])}catch(t){Tr[Rr]=Re[Rr]}}}var Nr="Expected a function",Wr=NaN,zr="[object Symbol]",Cr=/^\s+|\s+$/g,Pr=/^[-+]0x[0-9a-f]+$/i,Ir=/^0b[01]+$/i,Dr=/^0o[0-7]+$/i,Vr=parseInt,Fr="object"==typeof a&&a&&a.Object===Object&&a,Br="object"==typeof self&&self&&self.Object===Object&&self,Hr=Fr||Br||Function("return this")(),qr=Object.prototype.toString,$r=Math.max,Xr=Math.min,Yr=function(){return Hr.Date.now()};function Gr(t,e,r){var n,i,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Nr);function p(e){var r=n,o=i;return n=i=void 0,l=e,s=t.apply(o,r)}function d(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=Yr();if(d(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?Xr(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&n?p(t):(n=i=void 0,s)}function b(){var t=Yr(),r=d(t);if(n=arguments,i=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?p(t):s}(c);if(f)return a=setTimeout(v,e),p(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=Qr(e)||0,Ur(r)&&(u=!!r.leading,o=(f="maxWait"in r)?$r(Qr(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=i=a=void 0},b.flush=function(){return void 0===a?s:g(Yr())},b}function Ur(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Qr(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&qr.call(t)==zr}(t))return Wr;if(Ur(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ur(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Cr,"");var r=Ir.test(t);return r||Dr.test(t)?Vr(t.slice(2),r?2:8):Pr.test(t)?Wr:+t}var Kr=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new TypeError(Nr);return Ur(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Gr(t,e,{leading:n,maxWait:e,trailing:i})},Jr="Expected a function",Zr=NaN,tn="[object Symbol]",en=/^\s+|\s+$/g,rn=/^[-+]0x[0-9a-f]+$/i,nn=/^0b[01]+$/i,on=/^0o[0-7]+$/i,sn=parseInt,an="object"==typeof a&&a&&a.Object===Object&&a,cn="object"==typeof self&&self&&self.Object===Object&&self,ln=an||cn||Function("return this")(),un=Object.prototype.toString,fn=Math.max,hn=Math.min,pn=function(){return ln.Date.now()};function dn(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function vn(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&un.call(t)==tn}(t))return Zr;if(dn(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=dn(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(en,"");var r=nn.test(t);return r||on.test(t)?sn(t.slice(2),r?2:8):rn.test(t)?Zr:+t}var gn=function(t,e,r){var n,i,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Jr);function p(e){var r=n,o=i;return n=i=void 0,l=e,s=t.apply(o,r)}function d(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=pn();if(d(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?hn(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&n?p(t):(n=i=void 0,s)}function b(){var t=pn(),r=d(t);if(n=arguments,i=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?p(t):s}(c);if(f)return a=setTimeout(v,e),p(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=vn(e)||0,dn(r)&&(u=!!r.leading,o=(f="maxWait"in r)?fn(vn(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=i=a=void 0},b.flush=function(){return void 0===a?s:g(pn())},b},bn="Expected a function",yn="__lodash_hash_undefined__",mn="[object Function]",xn="[object GeneratorFunction]",En=/^\[object .+?Constructor\]$/,wn="object"==typeof a&&a&&a.Object===Object&&a,On="object"==typeof self&&self&&self.Object===Object&&self,_n=wn||On||Function("return this")();var Sn=Array.prototype,kn=Function.prototype,An=Object.prototype,jn=_n["__core-js_shared__"],Ln=function(){var t=/[^.]+$/.exec(jn&&jn.keys&&jn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Mn=kn.toString,Tn=An.hasOwnProperty,Rn=An.toString,Nn=RegExp("^"+Mn.call(Tn).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wn=Sn.splice,zn=Hn(_n,"Map"),Cn=Hn(Object,"create");function Pn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function In(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Dn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Vn(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function Fn(t){return!(!$n(t)||(e=t,Ln&&Ln in e))&&(function(t){var e=$n(t)?Rn.call(t):"";return e==mn||e==xn}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?Nn:En).test(function(t){if(null!=t){try{return Mn.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Bn(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function Hn(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Fn(r)?r:void 0}function qn(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(bn);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(qn.Cache||Dn),r}function $n(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}Pn.prototype.clear=function(){this.__data__=Cn?Cn(null):{}},Pn.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Pn.prototype.get=function(t){var e=this.__data__;if(Cn){var r=e[t];return r===yn?void 0:r}return Tn.call(e,t)?e[t]:void 0},Pn.prototype.has=function(t){var e=this.__data__;return Cn?void 0!==e[t]:Tn.call(e,t)},Pn.prototype.set=function(t,e){return this.__data__[t]=Cn&&void 0===e?yn:e,this},In.prototype.clear=function(){this.__data__=[]},In.prototype.delete=function(t){var e=this.__data__,r=Vn(e,t);return!(r<0)&&(r==e.length-1?e.pop():Wn.call(e,r,1),!0)},In.prototype.get=function(t){var e=this.__data__,r=Vn(e,t);return r<0?void 0:e[r][1]},In.prototype.has=function(t){return Vn(this.__data__,t)>-1},In.prototype.set=function(t,e){var r=this.__data__,n=Vn(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Dn.prototype.clear=function(){this.__data__={hash:new Pn,map:new(zn||In),string:new Pn}},Dn.prototype.delete=function(t){return Bn(this,t).delete(t)},Dn.prototype.get=function(t){return Bn(this,t).get(t)},Dn.prototype.has=function(t){return Bn(this,t).has(t)},Dn.prototype.set=function(t,e){return Bn(this,t).set(t,e),this},qn.Cache=Dn;var Xn=qn,Yn=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var r=-1;return t.some((function(t,n){return t[0]===e&&(r=n,!0)})),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var r=t(this.__entries__,e),n=this.__entries__[r];return n&&n[1]},e.prototype.set=function(e,r){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=r:this.__entries__.push([e,r])},e.prototype.delete=function(e){var r=this.__entries__,n=t(r,e);~n&&r.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var r=0,n=this.__entries__;r<n.length;r++){var i=n[r];t.call(e,i[1],i[0])}},e}()}(),Gn="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Un="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Qn="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Un):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Kn=2;var Jn=20,Zn=["top","right","bottom","left","width","height","size","weight"],ti="undefined"!=typeof MutationObserver,ei=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var r=!1,n=!1,i=0;function o(){r&&(r=!1,t()),n&&a()}function s(){Qn(o)}function a(){var t=Date.now();if(r){if(t-i<Kn)return;n=!0}else r=!0,n=!1,setTimeout(s,e);i=t}return a}(this.refresh.bind(this),Jn)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,r=e.indexOf(t);~r&&e.splice(r,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){Gn&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ti?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Gn&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,r=void 0===e?"":e;Zn.some((function(t){return!!~r.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),ri=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},ni=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Un},ii=ui(0,0,0,0);function oi(t){return parseFloat(t)||0}function si(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce((function(e,r){return e+oi(t["border-"+r+"-width"])}),0)}function ai(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return ii;var n=ni(t).getComputedStyle(t),i=function(t){for(var e={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var i=n[r],o=t["padding-"+i];e[i]=oi(o)}return e}(n),o=i.left+i.right,s=i.top+i.bottom,a=oi(n.width),c=oi(n.height);if("border-box"===n.boxSizing&&(Math.round(a+o)!==e&&(a-=si(n,"left","right")+o),Math.round(c+s)!==r&&(c-=si(n,"top","bottom")+s)),!function(t){return t===ni(t).document.documentElement}(t)){var l=Math.round(a+o)-e,u=Math.round(c+s)-r;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return ui(i.left,i.top,a,c)}var ci="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof ni(t).SVGGraphicsElement}:function(t){return t instanceof ni(t).SVGElement&&"function"==typeof t.getBBox};function li(t){return Gn?ci(t)?function(t){var e=t.getBBox();return ui(0,0,e.width,e.height)}(t):ai(t):ii}function ui(t,e,r,n){return{x:t,y:e,width:r,height:n}}var fi=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ui(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=li(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),hi=function(t,e){var r,n,i,o,s,a,c,l=(n=(r=e).x,i=r.y,o=r.width,s=r.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),ri(c,{x:n,y:i,width:o,height:s,top:i,right:n+o,bottom:s+i,left:n}),c);ri(this,{target:t,contentRect:l})},pi=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new Yn,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof ni(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new fi(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof ni(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new hi(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),di="undefined"!=typeof WeakMap?new WeakMap:new Yn,vi=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=ei.getInstance(),n=new pi(e,r,this);di.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){vi.prototype[t]=function(){var e;return(e=di.get(this))[t].apply(e,arguments)}}));var gi=void 0!==Un.ResizeObserver?Un.ResizeObserver:vi,bi=!("undefined"==typeof window||!window.document||!window.document.createElement),yi=function(t){return function(e,r,n,i){Wt(r);var o=Ct(e),s=_(o),a=pt(o.length),c=t?a-1:0,l=t?-1:1;if(n<2)for(;;){if(c in s){i=s[c],c+=l;break}if(c+=l,t?c<0:a<=c)throw TypeError("Reduce of empty array with no initial value")}for(;t?c>=0:a>c;c+=l)c in s&&(i=r(i,s[c],c,o));return i}},mi={left:yi(!1),right:yi(!0)}.left;Nt({target:"Array",proto:!0,forced:Ut("reduce")},{reduce:function(t){return mi(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var xi=D.f,Ei=Function.prototype,wi=Ei.toString,Oi=/^\s*function ([^ (]*)/;!g||"name"in Ei||xi(Ei,"name",{configurable:!0,get:function(){try{return wi.call(this).match(Oi)[1]}catch(t){return""}}});var _i,Si,ki=function(){var t=P(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Ai=RegExp.prototype.exec,ji=String.prototype.replace,Li=Ai,Mi=(_i=/a/,Si=/b*/g,Ai.call(_i,"a"),Ai.call(Si,"a"),0!==_i.lastIndex||0!==Si.lastIndex),Ti=void 0!==/()??/.exec("")[1];(Mi||Ti)&&(Li=function(t){var e,r,n,i,o=this;return Ti&&(r=new RegExp("^"+o.source+"$(?!\\s)",ki.call(o))),Mi&&(e=o.lastIndex),n=Ai.call(o,t),Mi&&n&&(o.lastIndex=o.global?n.index+n[0].length:e),Ti&&n&&n.length>1&&ji.call(n[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(n[i]=void 0)})),n});var Ri=Li;Nt({target:"RegExp",proto:!0,forced:/./.exec!==Ri},{exec:Ri});var Ni=Ft("species"),Wi=!v((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),zi=!v((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),Ci=function(t,e,r,n){var i=Ft(t),o=!v((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),s=o&&!v((function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[Ni]=function(){return r}),r[i](""),!e}));if(!o||!s||"replace"===t&&!Wi||"split"===t&&!zi){var a=/./[i],c=r(i,""[t],(function(t,e,r,n,i){return e.exec===Ri?o&&!i?{done:!0,value:a.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}})),l=c[0],u=c[1];ot(String.prototype,t,l),ot(RegExp.prototype,i,2==e?function(t,e){return u.call(t,this,e)}:function(t){return u.call(t,this)}),n&&V(RegExp.prototype[i],"sham",!0)}},Pi=Ke.charAt,Ii=function(t,e,r){return e+(r?Pi(t,e).length:1)},Di=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==w(t))throw TypeError("RegExp#exec called on incompatible receiver");return Ri.call(t,e)};Ci("match",1,(function(t,e,r){return[function(e){var r=S(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var i=P(t),o=String(this);if(!i.global)return Di(i,o);var s=i.unicode;i.lastIndex=0;for(var a,c=[],l=0;null!==(a=Di(i,o));){var u=String(a[0]);c[l]=u,""===u&&(i.lastIndex=Ii(o,pt(i.lastIndex),s)),l++}return 0===l?null:c}]}));var Vi=Math.max,Fi=Math.min,Bi=Math.floor,Hi=/\$([$&'`]|\d\d?|<[^>]*>)/g,qi=/\$([$&'`]|\d\d?)/g;Ci("replace",2,(function(t,e,r){return[function(r,n){var i=S(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,n):e.call(String(i),r,n)},function(t,i){var o=r(e,t,this,i);if(o.done)return o.value;var s=P(t),a=String(this),c="function"==typeof i;c||(i=String(i));var l=s.global;if(l){var u=s.unicode;s.lastIndex=0}for(var f=[];;){var h=Di(s,a);if(null===h)break;if(f.push(h),!l)break;""===String(h[0])&&(s.lastIndex=Ii(a,pt(s.lastIndex),u))}for(var p,d="",v=0,g=0;g<f.length;g++){h=f[g];for(var b=String(h[0]),y=Vi(Fi(ft(h.index),a.length),0),m=[],x=1;x<h.length;x++)m.push(void 0===(p=h[x])?p:String(p));var E=h.groups;if(c){var w=[b].concat(m,y,a);void 0!==E&&w.push(E);var O=String(i.apply(void 0,w))}else O=n(b,a,y,m,E,i);y>=v&&(d+=a.slice(v,y)+O,v=y+b.length)}return d+a.slice(v)}];function n(t,r,n,i,o,s){var a=n+t.length,c=i.length,l=qi;return void 0!==o&&(o=Ct(o),l=Hi),e.call(s,l,(function(e,s){var l;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(a);case"<":l=o[s.slice(1,-1)];break;default:var u=+s;if(0===u)return e;if(u>c){var f=Bi(u/10);return 0===f?e:f<=c?void 0===i[f-1]?s.charAt(1):i[f-1]+s.charAt(1):e}l=i[u-1]}return void 0===l?"":l}))}}));var $i=null,Xi=null;function Yi(){if(null===$i){if("undefined"==typeof document)return $i=0;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var r=e.getBoundingClientRect().right;t.removeChild(e),$i=r}return $i}function Gi(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function Ui(t){return t&&t.ownerDocument?t.ownerDocument:document}bi&&window.addEventListener("resize",(function(){Xi!==window.devicePixelRatio&&(Xi=window.devicePixelRatio,$i=null)}));var Qi=function(){function t(e,r){var n=this;this.onScroll=function(){var t=Gi(n.el);n.scrollXTicking||(t.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(t.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0)},this.scrollX=function(){n.axis.x.isOverflowing&&(n.showScrollbar("x"),n.positionScrollbar("x")),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&(n.showScrollbar("y"),n.positionScrollbar("y")),n.scrollYTicking=!1},this.onMouseEnter=function(){n.showScrollbar("x"),n.showScrollbar("y")},this.onMouseMove=function(t){n.mouseX=t.clientX,n.mouseY=t.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this.onWindowResize=function(){n.scrollbarWidth=n.getScrollbarWidth(),n.hideNativeScrollbar()},this.hideScrollbars=function(){n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.track.rect)||(n.axis.y.scrollbar.el.classList.remove(n.classNames.visible),n.axis.y.isVisible=!1),n.isWithinBounds(n.axis.x.track.rect)||(n.axis.x.scrollbar.el.classList.remove(n.classNames.visible),n.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,r;n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(e=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(r=n.isWithinBounds(n.axis.y.track.rect)),(e||r)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(t,"x"):n.onTrackClick(t,"x")),r&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(t,"y"):n.onTrackClick(t,"y"))))},this.drag=function(e){var r=n.axis[n.draggedAxis].track,i=r.rect[n.axis[n.draggedAxis].sizeAttr],o=n.axis[n.draggedAxis].scrollbar,s=n.contentWrapperEl[n.axis[n.draggedAxis].scrollSizeAttr],a=parseInt(n.elStyles[n.axis[n.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var c=(("y"===n.draggedAxis?e.pageY:e.pageX)-r.rect[n.axis[n.draggedAxis].offsetAttr]-n.axis[n.draggedAxis].dragOffset)/(i-o.size)*(s-a);"x"===n.draggedAxis&&(c=n.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c-(i+o.size):c,c=n.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-c:c),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=c},this.onEndDrag=function(t){var e=Ui(n.el),r=Gi(n.el);t.preventDefault(),t.stopPropagation(),n.el.classList.remove(n.classNames.dragging),e.removeEventListener("mousemove",n.drag,!0),e.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=r.setTimeout((function(){e.removeEventListener("click",n.preventClick,!0),e.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},r),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=Kr(this.recalculate.bind(this),64),this.onMouseMove=Kr(this.onMouseMove.bind(this),64),this.hideScrollbars=gn(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=gn(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=Xn(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var r=e.firstElementChild;document.body.appendChild(r);var n=r.firstElementChild;r.scrollLeft=0;var i=t.getOffset(r),o=t.getOffset(n);r.scrollLeft=999;var s=t.getOffset(n);return{isRtlScrollingInverted:i.left!==o.left&&o.left-s.left!=0,isRtlScrollbarInverted:i.left!==o.left}},t.getOffset=function(t){var e=t.getBoundingClientRect(),r=Ui(t),n=Gi(t);return{top:e.top+(n.pageYOffset||r.documentElement.scrollTop),left:e.left+(n.pageXOffset||r.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),bi&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),r=document.createElement("div");e.classList.add(this.classNames.track),r.classList.add(this.classNames.scrollbar),e.appendChild(r),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var t=this,e=Gi(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize);var r=!1,n=e.ResizeObserver||gi;this.resizeObserver=new n((function(){r&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame((function(){r=!0})),this.mutationObserver=new e.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var t=Gi(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1||e>0,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var a=this.contentEl.scrollHeight,c=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=n?(e||c)+"px":"auto",this.placeholderEl.style.height=a+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=0!==e&&c>e,this.axis.y.isOverflowing=a>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&c>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&a>l-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,r=this.contentEl[this.axis[t].scrollSizeAttr],n=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=n/r;return e=Math.max(~~(i*n),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],n=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=(s="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s)/(r-i),c=~~((n-o.size)*a);c="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c+(n-o.size):c,o.el.style.transform="x"===e?"translate3d("+c+"px, 0, 0)":"translate3d(0, "+c+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,r=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var r=Ui(this.el),n=Gi(this.el),i=this.axis[e].scrollbar,o="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=o-i.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),r.addEventListener("mousemove",this.drag,!0),r.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(r.addEventListener("click",this.preventClick,!0),r.addEventListener("dblclick",this.preventClick,!0)):(n.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(t,e){var r=this;if(void 0===e&&(e="y"),this.options.clickOnTrack){var n=Gi(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();var i=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],o=parseInt(this.elStyles[this.axis[e].sizeAttr],10),s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=("y"===e?this.mouseY-i:this.mouseX-i)<0?-1:1,c=-1===a?s-o:s+o;!function t(){var i,o;-1===a?s>c&&(s-=40,r.contentWrapperEl.scrollTo(((i={})[r.axis[e].offsetAttr]=s,i)),n.requestAnimationFrame(t)):s<c&&(s+=40,r.contentWrapperEl.scrollTo(((o={})[r.axis[e].offsetAttr]=s,o)),n.requestAnimationFrame(t))}()}},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Yi()}catch(t){return Yi()}},e.removeListeners=function(){var t=this,e=Gi(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver.disconnect(),this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return r.call(t,e)}))[0]},t}();Qi.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},Qi.instances=new WeakMap;var Ki=r.forwardRef((function(e,a){var c,l=e.children,u=e.scrollableNodeProps,f=void 0===u?{}:u,h=s(e,["children","scrollableNodeProps"]),p=t.useRef(),d=t.useRef(),v=t.useRef(),g={},b={},y=[];return Object.keys(h).forEach((function(t){Object.prototype.hasOwnProperty.call(Qi.defaultOptions,t)?g[t]=h[t]:t.match(/data-simplebar-(.+)/)&&"data-simplebar-direction"!==t?y.push({name:t,value:h[t]}):b[t]=h[t]})),y.length&&console.warn("simplebar-react: this way of passing options is deprecated. Pass it like normal props instead:\n        'data-simplebar-auto-hide=\"false\"' —> 'autoHide=\"false\"'\n      "),t.useEffect((function(){var t;return p=f.ref||p,d.current&&(c=new Qi(d.current,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(r,!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(t=y,Array.prototype.reduce.call(t,(function(t,e){var r=e.name.match(/data-simplebar-(.+)/);if(r){var n=r[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[n]=!0;break;case"false":t[n]=!1;break;case void 0:t[n]=!0;break;default:t[n]=e.value}}return t}),{})),{},g,{},p&&{scrollableNode:p.current},{},v.current&&{contentNode:v.current})),a&&(a.current=c)),function(){c.unMount(),c=null}}),[]),r.createElement("div",i({ref:d,"data-simplebar":!0},b),r.createElement("div",{className:"simplebar-wrapper"},r.createElement("div",{className:"simplebar-height-auto-observer-wrapper"},r.createElement("div",{className:"simplebar-height-auto-observer"})),r.createElement("div",{className:"simplebar-mask"},r.createElement("div",{className:"simplebar-offset"},"function"==typeof l?l({scrollableNodeRef:p,contentNodeRef:v}):r.createElement("div",i({},f,{className:"simplebar-content-wrapper".concat(f.className?" ".concat(f.className):"")}),r.createElement("div",{className:"simplebar-content"},l)))),r.createElement("div",{className:"simplebar-placeholder"})),r.createElement("div",{className:"simplebar-track simplebar-horizontal"},r.createElement("div",{className:"simplebar-scrollbar"})),r.createElement("div",{className:"simplebar-track simplebar-vertical"},r.createElement("div",{className:"simplebar-scrollbar"})))}));return Ki.displayName="SimpleBar",Ki.propTypes={children:e.oneOfType([e.node,e.func]),scrollableNodeProps:e.object},Ki}));

}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"prop-types":370,"react":380}],389:[function(require,module,exports){
(function (global){(function (){
/**
 * SimpleBar.js - v5.2.1
 * Scrollbars, simpler.
 * https://grsmto.github.io/simplebar/
 *
 * Made by Adrien Denat from a fork by Jonathan Nicol
 * Under MIT License
 */

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).SimpleBar=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r,n,i,o="object",s=function(t){return t&&t.Math==Math&&t},a=s(typeof globalThis==o&&globalThis)||s(typeof window==o&&window)||s(typeof self==o&&self)||s(typeof t==o&&t)||Function("return this")(),c=function(t){try{return!!t()}catch(t){return!0}},l=!c((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),u={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,h={f:f&&!u.call({1:2},1)?function(t){var e=f(this,t);return!!e&&e.enumerable}:u},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p={}.toString,v=function(t){return p.call(t).slice(8,-1)},g="".split,y=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==v(t)?g.call(t,""):Object(t)}:Object,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return y(b(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},E=function(t,e){if(!x(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!x(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,O=function(t,e){return w.call(t,e)},_=a.document,S=x(_)&&x(_.createElement),A=function(t){return S?_.createElement(t):{}},k=!l&&!c((function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a})),L=Object.getOwnPropertyDescriptor,M={f:l?L:function(t,e){if(t=m(t),e=E(e,!0),k)try{return L(t,e)}catch(t){}if(O(t,e))return d(!h.f.call(t,e),t[e])}},T=function(t){if(!x(t))throw TypeError(String(t)+" is not an object");return t},j=Object.defineProperty,R={f:l?j:function(t,e,r){if(T(t),e=E(e,!0),T(r),k)try{return j(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},W=l?function(t,e,r){return R.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},z=function(t,e){try{W(a,t,e)}catch(r){a[t]=e}return e},C=e((function(t){var e=a["__core-js_shared__"]||z("__core-js_shared__",{});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),N=C("native-function-to-string",Function.toString),I=a.WeakMap,D="function"==typeof I&&/native code/.test(N.call(I)),P=0,V=Math.random(),F=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++P+V).toString(36)},B=C("keys"),H=function(t){return B[t]||(B[t]=F(t))},q={},$=a.WeakMap;if(D){var X=new $,Y=X.get,G=X.has,U=X.set;r=function(t,e){return U.call(X,t,e),e},n=function(t){return Y.call(X,t)||{}},i=function(t){return G.call(X,t)}}else{var Q=H("state");q[Q]=!0,r=function(t,e){return W(t,Q,e),e},n=function(t){return O(t,Q)?t[Q]:{}},i=function(t){return O(t,Q)}}var K={set:r,get:n,has:i,enforce:function(t){return i(t)?n(t):r(t,{})},getterFor:function(t){return function(e){var r;if(!x(e)||(r=n(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},J=e((function(t){var e=K.get,r=K.enforce,n=String(N).split("toString");C("inspectSource",(function(t){return N.call(t)})),(t.exports=function(t,e,i,o){var s=!!o&&!!o.unsafe,c=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof i&&("string"!=typeof e||O(i,"name")||W(i,"name",e),r(i).source=n.join("string"==typeof e?e:"")),t!==a?(s?!l&&t[e]&&(c=!0):delete t[e],c?t[e]=i:W(t,e,i)):c?t[e]=i:z(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||N.call(this)}))})),Z=a,tt=function(t){return"function"==typeof t?t:void 0},et=function(t,e){return arguments.length<2?tt(Z[t])||tt(a[t]):Z[t]&&Z[t][e]||a[t]&&a[t][e]},rt=Math.ceil,nt=Math.floor,it=function(t){return isNaN(t=+t)?0:(t>0?nt:rt)(t)},ot=Math.min,st=function(t){return t>0?ot(it(t),9007199254740991):0},at=Math.max,ct=Math.min,lt=function(t){return function(e,r,n){var i,o=m(e),s=st(o.length),a=function(t,e){var r=it(t);return r<0?at(r+e,0):ct(r,e)}(n,s);if(t&&r!=r){for(;s>a;)if((i=o[a++])!=i)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},ut={includes:lt(!0),indexOf:lt(!1)}.indexOf,ft=function(t,e){var r,n=m(t),i=0,o=[];for(r in n)!O(q,r)&&O(n,r)&&o.push(r);for(;e.length>i;)O(n,r=e[i++])&&(~ut(o,r)||o.push(r));return o},ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dt=ht.concat("length","prototype"),pt={f:Object.getOwnPropertyNames||function(t){return ft(t,dt)}},vt={f:Object.getOwnPropertySymbols},gt=et("Reflect","ownKeys")||function(t){var e=pt.f(T(t)),r=vt.f;return r?e.concat(r(t)):e},yt=function(t,e){for(var r=gt(e),n=R.f,i=M.f,o=0;o<r.length;o++){var s=r[o];O(t,s)||n(t,s,i(e,s))}},bt=/#|\.prototype\./,mt=function(t,e){var r=Et[xt(t)];return r==Ot||r!=wt&&("function"==typeof e?c(e):!!e)},xt=mt.normalize=function(t){return String(t).replace(bt,".").toLowerCase()},Et=mt.data={},wt=mt.NATIVE="N",Ot=mt.POLYFILL="P",_t=mt,St=M.f,At=function(t,e){var r,n,i,o,s,c=t.target,l=t.global,u=t.stat;if(r=l?a:u?a[c]||z(c,{}):(a[c]||{}).prototype)for(n in e){if(o=e[n],i=t.noTargetGet?(s=St(r,n))&&s.value:r[n],!_t(l?n:c+(u?".":"#")+n,t.forced)&&void 0!==i){if(typeof o==typeof i)continue;yt(o,i)}(t.sham||i&&i.sham)&&W(o,"sham",!0),J(r,n,o,t)}},kt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Lt=function(t,e,r){if(kt(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}},Mt=function(t){return Object(b(t))},Tt=Array.isArray||function(t){return"Array"==v(t)},jt=!!Object.getOwnPropertySymbols&&!c((function(){return!String(Symbol())})),Rt=a.Symbol,Wt=C("wks"),zt=function(t){return Wt[t]||(Wt[t]=jt&&Rt[t]||(jt?Rt:F)("Symbol."+t))},Ct=zt("species"),Nt=function(t,e){var r;return Tt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Tt(r.prototype)?x(r)&&null===(r=r[Ct])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},It=[].push,Dt=function(t){var e=1==t,r=2==t,n=3==t,i=4==t,o=6==t,s=5==t||o;return function(a,c,l,u){for(var f,h,d=Mt(a),p=y(d),v=Lt(c,l,3),g=st(p.length),b=0,m=u||Nt,x=e?m(a,g):r?m(a,0):void 0;g>b;b++)if((s||b in p)&&(h=v(f=p[b],b,d),t))if(e)x[b]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return b;case 2:It.call(x,f)}else if(i)return!1;return o?-1:n||i?i:x}},Pt={forEach:Dt(0),map:Dt(1),filter:Dt(2),some:Dt(3),every:Dt(4),find:Dt(5),findIndex:Dt(6)},Vt=function(t,e){var r=[][t];return!r||!c((function(){r.call(null,e||function(){throw 1},1)}))},Ft=Pt.forEach,Bt=Vt("forEach")?function(t){return Ft(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach;At({target:"Array",proto:!0,forced:[].forEach!=Bt},{forEach:Bt});var Ht={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var qt in Ht){var $t=a[qt],Xt=$t&&$t.prototype;if(Xt&&Xt.forEach!==Bt)try{W(Xt,"forEach",Bt)}catch(t){Xt.forEach=Bt}}var Yt=!("undefined"==typeof window||!window.document||!window.document.createElement),Gt=zt("species"),Ut=Pt.filter;At({target:"Array",proto:!0,forced:!function(t){return!c((function(){var e=[];return(e.constructor={})[Gt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("filter")},{filter:function(t){return Ut(this,t,arguments.length>1?arguments[1]:void 0)}});var Qt=Object.keys||function(t){return ft(t,ht)},Kt=l?Object.defineProperties:function(t,e){T(t);for(var r,n=Qt(e),i=n.length,o=0;i>o;)R.f(t,r=n[o++],e[r]);return t},Jt=et("document","documentElement"),Zt=H("IE_PROTO"),te=function(){},ee=function(){var t,e=A("iframe"),r=ht.length;for(e.style.display="none",Jt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),ee=t.F;r--;)delete ee.prototype[ht[r]];return ee()},re=Object.create||function(t,e){var r;return null!==t?(te.prototype=T(t),r=new te,te.prototype=null,r[Zt]=t):r=ee(),void 0===e?r:Kt(r,e)};q[Zt]=!0;var ne=zt("unscopables"),ie=Array.prototype;null==ie[ne]&&W(ie,ne,re(null));var oe,se,ae,ce=function(t){ie[ne][t]=!0},le={},ue=!c((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),fe=H("IE_PROTO"),he=Object.prototype,de=ue?Object.getPrototypeOf:function(t){return t=Mt(t),O(t,fe)?t[fe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?he:null},pe=zt("iterator"),ve=!1;[].keys&&("next"in(ae=[].keys())?(se=de(de(ae)))!==Object.prototype&&(oe=se):ve=!0),null==oe&&(oe={}),O(oe,pe)||W(oe,pe,(function(){return this}));var ge={IteratorPrototype:oe,BUGGY_SAFARI_ITERATORS:ve},ye=R.f,be=zt("toStringTag"),me=function(t,e,r){t&&!O(t=r?t:t.prototype,be)&&ye(t,be,{configurable:!0,value:e})},xe=ge.IteratorPrototype,Ee=function(){return this},we=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return T(r),function(t){if(!x(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Oe=ge.IteratorPrototype,_e=ge.BUGGY_SAFARI_ITERATORS,Se=zt("iterator"),Ae=function(){return this},ke=function(t,e,r,n,i,o,s){!function(t,e,r){var n=e+" Iterator";t.prototype=re(xe,{next:d(1,r)}),me(t,n,!1),le[n]=Ee}(r,e,n);var a,c,l,u=function(t){if(t===i&&g)return g;if(!_e&&t in p)return p[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",h=!1,p=t.prototype,v=p[Se]||p["@@iterator"]||i&&p[i],g=!_e&&v||u(i),y="Array"==e&&p.entries||v;if(y&&(a=de(y.call(new t)),Oe!==Object.prototype&&a.next&&(de(a)!==Oe&&(we?we(a,Oe):"function"!=typeof a[Se]&&W(a,Se,Ae)),me(a,f,!0))),"values"==i&&v&&"values"!==v.name&&(h=!0,g=function(){return v.call(this)}),p[Se]!==g&&W(p,Se,g),le[e]=g,i)if(c={values:u("values"),keys:o?g:u("keys"),entries:u("entries")},s)for(l in c)!_e&&!h&&l in p||J(p,l,c[l]);else At({target:e,proto:!0,forced:_e||h},c);return c},Le=K.set,Me=K.getterFor("Array Iterator"),Te=ke(Array,"Array",(function(t,e){Le(this,{type:"Array Iterator",target:m(t),index:0,kind:e})}),(function(){var t=Me(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");le.Arguments=le.Array,ce("keys"),ce("values"),ce("entries");var je=Object.assign,Re=!je||c((function(){var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=je({},t)[r]||"abcdefghijklmnopqrst"!=Qt(je({},e)).join("")}))?function(t,e){for(var r=Mt(t),n=arguments.length,i=1,o=vt.f,s=h.f;n>i;)for(var a,c=y(arguments[i++]),u=o?Qt(c).concat(o(c)):Qt(c),f=u.length,d=0;f>d;)a=u[d++],l&&!s.call(c,a)||(r[a]=c[a]);return r}:je;At({target:"Object",stat:!0,forced:Object.assign!==Re},{assign:Re});var We=zt("toStringTag"),ze="Arguments"==v(function(){return arguments}()),Ce=function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),We))?r:ze?v(e):"Object"==(n=v(e))&&"function"==typeof e.callee?"Arguments":n},Ne={};Ne[zt("toStringTag")]="z";var Ie="[object z]"!==String(Ne)?function(){return"[object "+Ce(this)+"]"}:Ne.toString,De=Object.prototype;Ie!==De.toString&&J(De,"toString",Ie,{unsafe:!0});var Pe="\t\n\v\f\r                　\u2028\u2029\ufeff",Ve="["+Pe+"]",Fe=RegExp("^"+Ve+Ve+"*"),Be=RegExp(Ve+Ve+"*$"),He=function(t){return function(e){var r=String(b(e));return 1&t&&(r=r.replace(Fe,"")),2&t&&(r=r.replace(Be,"")),r}},qe={start:He(1),end:He(2),trim:He(3)}.trim,$e=a.parseInt,Xe=/^[+-]?0[Xx]/,Ye=8!==$e(Pe+"08")||22!==$e(Pe+"0x16")?function(t,e){var r=qe(String(t));return $e(r,e>>>0||(Xe.test(r)?16:10))}:$e;At({global:!0,forced:parseInt!=Ye},{parseInt:Ye});var Ge=function(t){return function(e,r){var n,i,o=String(b(e)),s=it(r),a=o.length;return s<0||s>=a?t?"":void 0:(n=o.charCodeAt(s))<55296||n>56319||s+1===a||(i=o.charCodeAt(s+1))<56320||i>57343?t?o.charAt(s):n:t?o.slice(s,s+2):i-56320+(n-55296<<10)+65536}},Ue={codeAt:Ge(!1),charAt:Ge(!0)},Qe=Ue.charAt,Ke=K.set,Je=K.getterFor("String Iterator");ke(String,"String",(function(t){Ke(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Je(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Qe(r,n),e.index+=t.length,{value:t,done:!1})}));var Ze=function(t,e,r){for(var n in e)J(t,n,e[n],r);return t},tr=!c((function(){return Object.isExtensible(Object.preventExtensions({}))})),er=e((function(t){var e=R.f,r=F("meta"),n=0,i=Object.isExtensible||function(){return!0},o=function(t){e(t,r,{value:{objectID:"O"+ ++n,weakData:{}}})},s=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!x(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!O(t,r)){if(!i(t))return"F";if(!e)return"E";o(t)}return t[r].objectID},getWeakData:function(t,e){if(!O(t,r)){if(!i(t))return!0;if(!e)return!1;o(t)}return t[r].weakData},onFreeze:function(t){return tr&&s.REQUIRED&&i(t)&&!O(t,r)&&o(t),t}};q[r]=!0})),rr=(er.REQUIRED,er.fastKey,er.getWeakData,er.onFreeze,zt("iterator")),nr=Array.prototype,ir=zt("iterator"),or=function(t,e,r,n){try{return n?e(T(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&T(i.call(t)),e}},sr=e((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,r,n,i,o){var s,a,c,l,u,f,h,d=Lt(r,n,i?2:1);if(o)s=t;else{if("function"!=typeof(a=function(t){if(null!=t)return t[ir]||t["@@iterator"]||le[Ce(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(h=a)&&(le.Array===h||nr[rr]===h)){for(c=0,l=st(t.length);l>c;c++)if((u=i?d(T(f=t[c])[0],f[1]):d(t[c]))&&u instanceof e)return u;return new e(!1)}s=a.call(t)}for(;!(f=s.next()).done;)if((u=or(s,d,f.value,i))&&u instanceof e)return u;return new e(!1)}).stop=function(t){return new e(!0,t)}})),ar=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},cr=zt("iterator"),lr=!1;try{var ur=0,fr={next:function(){return{done:!!ur++}},return:function(){lr=!0}};fr[cr]=function(){return this},Array.from(fr,(function(){throw 2}))}catch(t){}var hr=function(t,e,r,n,i){var o=a[t],s=o&&o.prototype,l=o,u=n?"set":"add",f={},h=function(t){var e=s[t];J(s,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(i&&!x(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return i&&!x(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(i&&!x(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(_t(t,"function"!=typeof o||!(i||s.forEach&&!c((function(){(new o).entries().next()})))))l=r.getConstructor(e,t,n,u),er.REQUIRED=!0;else if(_t(t,!0)){var d=new l,p=d[u](i?{}:-0,1)!=d,v=c((function(){d.has(1)})),g=function(t,e){if(!e&&!lr)return!1;var r=!1;try{var n={};n[cr]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new o(t)})),y=!i&&c((function(){for(var t=new o,e=5;e--;)t[u](e,e);return!t.has(-0)}));g||((l=e((function(e,r){ar(e,l,t);var i=function(t,e,r){var n,i;return we&&"function"==typeof(n=e.constructor)&&n!==r&&x(i=n.prototype)&&i!==r.prototype&&we(t,i),t}(new o,e,l);return null!=r&&sr(r,i[u],i,n),i}))).prototype=s,s.constructor=l),(v||y)&&(h("delete"),h("has"),n&&h("get")),(y||p)&&h(u),i&&s.clear&&delete s.clear}return f[t]=l,At({global:!0,forced:l!=o},f),me(l,t),i||r.setStrong(l,t,n),l},dr=er.getWeakData,pr=K.set,vr=K.getterFor,gr=Pt.find,yr=Pt.findIndex,br=0,mr=function(t){return t.frozen||(t.frozen=new xr)},xr=function(){this.entries=[]},Er=function(t,e){return gr(t.entries,(function(t){return t[0]===e}))};xr.prototype={get:function(t){var e=Er(this,t);if(e)return e[1]},has:function(t){return!!Er(this,t)},set:function(t,e){var r=Er(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=yr(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}};var wr={getConstructor:function(t,e,r,n){var i=t((function(t,o){ar(t,i,e),pr(t,{type:e,id:br++,frozen:void 0}),null!=o&&sr(o,t[n],t,r)})),o=vr(e),s=function(t,e,r){var n=o(t),i=dr(T(e),!0);return!0===i?mr(n).set(e,r):i[n.id]=r,t};return Ze(i.prototype,{delete:function(t){var e=o(this);if(!x(t))return!1;var r=dr(t);return!0===r?mr(e).delete(t):r&&O(r,e.id)&&delete r[e.id]},has:function(t){var e=o(this);if(!x(t))return!1;var r=dr(t);return!0===r?mr(e).has(t):r&&O(r,e.id)}}),Ze(i.prototype,r?{get:function(t){var e=o(this);if(x(t)){var r=dr(t);return!0===r?mr(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),i}},Or=(e((function(t){var e,r=K.enforce,n=!a.ActiveXObject&&"ActiveXObject"in a,i=Object.isExtensible,o=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},s=t.exports=hr("WeakMap",o,wr,!0,!0);if(D&&n){e=wr.getConstructor(o,"WeakMap",!0),er.REQUIRED=!0;var c=s.prototype,l=c.delete,u=c.has,f=c.get,h=c.set;Ze(c,{delete:function(t){if(x(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),l.call(this,t)||n.frozen.delete(t)}return l.call(this,t)},has:function(t){if(x(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),u.call(this,t)||n.frozen.has(t)}return u.call(this,t)},get:function(t){if(x(t)&&!i(t)){var n=r(this);return n.frozen||(n.frozen=new e),u.call(this,t)?f.call(this,t):n.frozen.get(t)}return f.call(this,t)},set:function(t,n){if(x(t)&&!i(t)){var o=r(this);o.frozen||(o.frozen=new e),u.call(this,t)?h.call(this,t,n):o.frozen.set(t,n)}else h.call(this,t,n);return this}})}})),zt("iterator")),_r=zt("toStringTag"),Sr=Te.values;for(var Ar in Ht){var kr=a[Ar],Lr=kr&&kr.prototype;if(Lr){if(Lr[Or]!==Sr)try{W(Lr,Or,Sr)}catch(t){Lr[Or]=Sr}if(Lr[_r]||W(Lr,_r,Ar),Ht[Ar])for(var Mr in Te)if(Lr[Mr]!==Te[Mr])try{W(Lr,Mr,Te[Mr])}catch(t){Lr[Mr]=Te[Mr]}}}var Tr="Expected a function",jr=NaN,Rr="[object Symbol]",Wr=/^\s+|\s+$/g,zr=/^[-+]0x[0-9a-f]+$/i,Cr=/^0b[01]+$/i,Nr=/^0o[0-7]+$/i,Ir=parseInt,Dr="object"==typeof t&&t&&t.Object===Object&&t,Pr="object"==typeof self&&self&&self.Object===Object&&self,Vr=Dr||Pr||Function("return this")(),Fr=Object.prototype.toString,Br=Math.max,Hr=Math.min,qr=function(){return Vr.Date.now()};function $r(t,e,r){var n,i,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Tr);function d(e){var r=n,o=i;return n=i=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=qr();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?Hr(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&n?d(t):(n=i=void 0,s)}function y(){var t=qr(),r=p(t);if(n=arguments,i=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=Yr(e)||0,Xr(r)&&(u=!!r.leading,o=(f="maxWait"in r)?Br(Yr(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=i=a=void 0},y.flush=function(){return void 0===a?s:g(qr())},y}function Xr(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Yr(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&Fr.call(t)==Rr}(t))return jr;if(Xr(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Xr(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Wr,"");var r=Cr.test(t);return r||Nr.test(t)?Ir(t.slice(2),r?2:8):zr.test(t)?jr:+t}var Gr=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new TypeError(Tr);return Xr(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),$r(t,e,{leading:n,maxWait:e,trailing:i})},Ur="Expected a function",Qr=NaN,Kr="[object Symbol]",Jr=/^\s+|\s+$/g,Zr=/^[-+]0x[0-9a-f]+$/i,tn=/^0b[01]+$/i,en=/^0o[0-7]+$/i,rn=parseInt,nn="object"==typeof t&&t&&t.Object===Object&&t,on="object"==typeof self&&self&&self.Object===Object&&self,sn=nn||on||Function("return this")(),an=Object.prototype.toString,cn=Math.max,ln=Math.min,un=function(){return sn.Date.now()};function fn(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function hn(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&an.call(t)==Kr}(t))return Qr;if(fn(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=fn(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Jr,"");var r=tn.test(t);return r||en.test(t)?rn(t.slice(2),r?2:8):Zr.test(t)?Qr:+t}var dn=function(t,e,r){var n,i,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Ur);function d(e){var r=n,o=i;return n=i=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=un();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?ln(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&n?d(t):(n=i=void 0,s)}function y(){var t=un(),r=p(t);if(n=arguments,i=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=hn(e)||0,fn(r)&&(u=!!r.leading,o=(f="maxWait"in r)?cn(hn(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),y.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=c=i=a=void 0},y.flush=function(){return void 0===a?s:g(un())},y},pn="Expected a function",vn="__lodash_hash_undefined__",gn="[object Function]",yn="[object GeneratorFunction]",bn=/^\[object .+?Constructor\]$/,mn="object"==typeof t&&t&&t.Object===Object&&t,xn="object"==typeof self&&self&&self.Object===Object&&self,En=mn||xn||Function("return this")();var wn=Array.prototype,On=Function.prototype,_n=Object.prototype,Sn=En["__core-js_shared__"],An=function(){var t=/[^.]+$/.exec(Sn&&Sn.keys&&Sn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),kn=On.toString,Ln=_n.hasOwnProperty,Mn=_n.toString,Tn=RegExp("^"+kn.call(Ln).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jn=wn.splice,Rn=Vn(En,"Map"),Wn=Vn(Object,"create");function zn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Cn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Nn(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function In(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function Dn(t){return!(!Bn(t)||(e=t,An&&An in e))&&(function(t){var e=Bn(t)?Mn.call(t):"";return e==gn||e==yn}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?Tn:bn).test(function(t){if(null!=t){try{return kn.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Pn(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function Vn(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Dn(r)?r:void 0}function Fn(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(pn);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s),s};return r.cache=new(Fn.Cache||Nn),r}function Bn(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}zn.prototype.clear=function(){this.__data__=Wn?Wn(null):{}},zn.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},zn.prototype.get=function(t){var e=this.__data__;if(Wn){var r=e[t];return r===vn?void 0:r}return Ln.call(e,t)?e[t]:void 0},zn.prototype.has=function(t){var e=this.__data__;return Wn?void 0!==e[t]:Ln.call(e,t)},zn.prototype.set=function(t,e){return this.__data__[t]=Wn&&void 0===e?vn:e,this},Cn.prototype.clear=function(){this.__data__=[]},Cn.prototype.delete=function(t){var e=this.__data__,r=In(e,t);return!(r<0)&&(r==e.length-1?e.pop():jn.call(e,r,1),!0)},Cn.prototype.get=function(t){var e=this.__data__,r=In(e,t);return r<0?void 0:e[r][1]},Cn.prototype.has=function(t){return In(this.__data__,t)>-1},Cn.prototype.set=function(t,e){var r=this.__data__,n=In(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},Nn.prototype.clear=function(){this.__data__={hash:new zn,map:new(Rn||Cn),string:new zn}},Nn.prototype.delete=function(t){return Pn(this,t).delete(t)},Nn.prototype.get=function(t){return Pn(this,t).get(t)},Nn.prototype.has=function(t){return Pn(this,t).has(t)},Nn.prototype.set=function(t,e){return Pn(this,t).set(t,e),this},Fn.Cache=Nn;var Hn=Fn,qn=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var r=-1;return t.some((function(t,n){return t[0]===e&&(r=n,!0)})),r}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var r=t(this.__entries__,e),n=this.__entries__[r];return n&&n[1]},e.prototype.set=function(e,r){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=r:this.__entries__.push([e,r])},e.prototype.delete=function(e){var r=this.__entries__,n=t(r,e);~n&&r.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var r=0,n=this.__entries__;r<n.length;r++){var i=n[r];t.call(e,i[1],i[0])}},e}()}(),$n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Xn="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Yn="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Xn):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Gn=2;var Un=20,Qn=["top","right","bottom","left","width","height","size","weight"],Kn="undefined"!=typeof MutationObserver,Jn=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var r=!1,n=!1,i=0;function o(){r&&(r=!1,t()),n&&a()}function s(){Yn(o)}function a(){var t=Date.now();if(r){if(t-i<Gn)return;n=!0}else r=!0,n=!1,setTimeout(s,e);i=t}return a}(this.refresh.bind(this),Un)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,r=e.indexOf(t);~r&&e.splice(r,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){$n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Kn?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){$n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,r=void 0===e?"":e;Qn.some((function(t){return!!~r.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Zn=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},ti=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Xn},ei=ai(0,0,0,0);function ri(t){return parseFloat(t)||0}function ni(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce((function(e,r){return e+ri(t["border-"+r+"-width"])}),0)}function ii(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return ei;var n=ti(t).getComputedStyle(t),i=function(t){for(var e={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var i=n[r],o=t["padding-"+i];e[i]=ri(o)}return e}(n),o=i.left+i.right,s=i.top+i.bottom,a=ri(n.width),c=ri(n.height);if("border-box"===n.boxSizing&&(Math.round(a+o)!==e&&(a-=ni(n,"left","right")+o),Math.round(c+s)!==r&&(c-=ni(n,"top","bottom")+s)),!function(t){return t===ti(t).document.documentElement}(t)){var l=Math.round(a+o)-e,u=Math.round(c+s)-r;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return ai(i.left,i.top,a,c)}var oi="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof ti(t).SVGGraphicsElement}:function(t){return t instanceof ti(t).SVGElement&&"function"==typeof t.getBBox};function si(t){return $n?oi(t)?function(t){var e=t.getBBox();return ai(0,0,e.width,e.height)}(t):ii(t):ei}function ai(t,e,r,n){return{x:t,y:e,width:r,height:n}}var ci=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ai(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=si(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),li=function(t,e){var r,n,i,o,s,a,c,l=(n=(r=e).x,i=r.y,o=r.width,s=r.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),Zn(c,{x:n,y:i,width:o,height:s,top:i,right:n+o,bottom:s+i,left:n}),c);Zn(this,{target:t,contentRect:l})},ui=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new qn,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof ti(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new ci(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof ti(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new li(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),fi="undefined"!=typeof WeakMap?new WeakMap:new qn,hi=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=Jn.getInstance(),n=new ui(e,r,this);fi.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){hi.prototype[t]=function(){var e;return(e=fi.get(this))[t].apply(e,arguments)}}));var di=void 0!==Xn.ResizeObserver?Xn.ResizeObserver:hi,pi=null,vi=null;function gi(){if(null===pi){if("undefined"==typeof document)return pi=0;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var r=e.getBoundingClientRect().right;t.removeChild(e),pi=r}return pi}Yt&&window.addEventListener("resize",(function(){vi!==window.devicePixelRatio&&(vi=window.devicePixelRatio,pi=null)}));var yi=function(t){return function(e,r,n,i){kt(r);var o=Mt(e),s=y(o),a=st(o.length),c=t?a-1:0,l=t?-1:1;if(n<2)for(;;){if(c in s){i=s[c],c+=l;break}if(c+=l,t?c<0:a<=c)throw TypeError("Reduce of empty array with no initial value")}for(;t?c>=0:a>c;c+=l)c in s&&(i=r(i,s[c],c,o));return i}},bi={left:yi(!1),right:yi(!0)}.left;At({target:"Array",proto:!0,forced:Vt("reduce")},{reduce:function(t){return bi(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var mi=R.f,xi=Function.prototype,Ei=xi.toString,wi=/^\s*function ([^ (]*)/;!l||"name"in xi||mi(xi,"name",{configurable:!0,get:function(){try{return Ei.call(this).match(wi)[1]}catch(t){return""}}});var Oi,_i,Si=function(){var t=T(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Ai=RegExp.prototype.exec,ki=String.prototype.replace,Li=Ai,Mi=(Oi=/a/,_i=/b*/g,Ai.call(Oi,"a"),Ai.call(_i,"a"),0!==Oi.lastIndex||0!==_i.lastIndex),Ti=void 0!==/()??/.exec("")[1];(Mi||Ti)&&(Li=function(t){var e,r,n,i,o=this;return Ti&&(r=new RegExp("^"+o.source+"$(?!\\s)",Si.call(o))),Mi&&(e=o.lastIndex),n=Ai.call(o,t),Mi&&n&&(o.lastIndex=o.global?n.index+n[0].length:e),Ti&&n&&n.length>1&&ki.call(n[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(n[i]=void 0)})),n});var ji=Li;At({target:"RegExp",proto:!0,forced:/./.exec!==ji},{exec:ji});var Ri=zt("species"),Wi=!c((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),zi=!c((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),Ci=function(t,e,r,n){var i=zt(t),o=!c((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),s=o&&!c((function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[Ri]=function(){return r}),r[i](""),!e}));if(!o||!s||"replace"===t&&!Wi||"split"===t&&!zi){var a=/./[i],l=r(i,""[t],(function(t,e,r,n,i){return e.exec===ji?o&&!i?{done:!0,value:a.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}})),u=l[0],f=l[1];J(String.prototype,t,u),J(RegExp.prototype,i,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}),n&&W(RegExp.prototype[i],"sham",!0)}},Ni=Ue.charAt,Ii=function(t,e,r){return e+(r?Ni(t,e).length:1)},Di=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==v(t))throw TypeError("RegExp#exec called on incompatible receiver");return ji.call(t,e)};Ci("match",1,(function(t,e,r){return[function(e){var r=b(this),n=null==e?void 0:e[t];return void 0!==n?n.call(e,r):new RegExp(e)[t](String(r))},function(t){var n=r(e,t,this);if(n.done)return n.value;var i=T(t),o=String(this);if(!i.global)return Di(i,o);var s=i.unicode;i.lastIndex=0;for(var a,c=[],l=0;null!==(a=Di(i,o));){var u=String(a[0]);c[l]=u,""===u&&(i.lastIndex=Ii(o,st(i.lastIndex),s)),l++}return 0===l?null:c}]}));var Pi=Math.max,Vi=Math.min,Fi=Math.floor,Bi=/\$([$&'`]|\d\d?|<[^>]*>)/g,Hi=/\$([$&'`]|\d\d?)/g;Ci("replace",2,(function(t,e,r){return[function(r,n){var i=b(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,i,n):e.call(String(i),r,n)},function(t,i){var o=r(e,t,this,i);if(o.done)return o.value;var s=T(t),a=String(this),c="function"==typeof i;c||(i=String(i));var l=s.global;if(l){var u=s.unicode;s.lastIndex=0}for(var f=[];;){var h=Di(s,a);if(null===h)break;if(f.push(h),!l)break;""===String(h[0])&&(s.lastIndex=Ii(a,st(s.lastIndex),u))}for(var d,p="",v=0,g=0;g<f.length;g++){h=f[g];for(var y=String(h[0]),b=Pi(Vi(it(h.index),a.length),0),m=[],x=1;x<h.length;x++)m.push(void 0===(d=h[x])?d:String(d));var E=h.groups;if(c){var w=[y].concat(m,b,a);void 0!==E&&w.push(E);var O=String(i.apply(void 0,w))}else O=n(y,a,b,m,E,i);b>=v&&(p+=a.slice(v,b)+O,v=b+y.length)}return p+a.slice(v)}];function n(t,r,n,i,o,s){var a=n+t.length,c=i.length,l=Hi;return void 0!==o&&(o=Mt(o),l=Bi),e.call(s,l,(function(e,s){var l;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,n);case"'":return r.slice(a);case"<":l=o[s.slice(1,-1)];break;default:var u=+s;if(0===u)return e;if(u>c){var f=Fi(u/10);return 0===f?e:f<=c?void 0===i[f-1]?s.charAt(1):i[f-1]+s.charAt(1):e}l=i[u-1]}return void 0===l?"":l}))}}));var qi=function(t){return Array.prototype.reduce.call(t,(function(t,e){var r=e.name.match(/data-simplebar-(.+)/);if(r){var n=r[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[n]=!0;break;case"false":t[n]=!1;break;case void 0:t[n]=!0;break;default:t[n]=e.value}}return t}),{})};function $i(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function Xi(t){return t&&t.ownerDocument?t.ownerDocument:document}var Yi=function(){function t(e,r){var n=this;this.onScroll=function(){var t=$i(n.el);n.scrollXTicking||(t.requestAnimationFrame(n.scrollX),n.scrollXTicking=!0),n.scrollYTicking||(t.requestAnimationFrame(n.scrollY),n.scrollYTicking=!0)},this.scrollX=function(){n.axis.x.isOverflowing&&(n.showScrollbar("x"),n.positionScrollbar("x")),n.scrollXTicking=!1},this.scrollY=function(){n.axis.y.isOverflowing&&(n.showScrollbar("y"),n.positionScrollbar("y")),n.scrollYTicking=!1},this.onMouseEnter=function(){n.showScrollbar("x"),n.showScrollbar("y")},this.onMouseMove=function(t){n.mouseX=t.clientX,n.mouseY=t.clientY,(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseMoveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseMoveForAxis("y")},this.onMouseLeave=function(){n.onMouseMove.cancel(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&n.onMouseLeaveForAxis("x"),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&n.onMouseLeaveForAxis("y"),n.mouseX=-1,n.mouseY=-1},this.onWindowResize=function(){n.scrollbarWidth=n.getScrollbarWidth(),n.hideNativeScrollbar()},this.hideScrollbars=function(){n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.track.rect)||(n.axis.y.scrollbar.el.classList.remove(n.classNames.visible),n.axis.y.isVisible=!1),n.isWithinBounds(n.axis.x.track.rect)||(n.axis.x.scrollbar.el.classList.remove(n.classNames.visible),n.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,r;n.axis.x.track.rect=n.axis.x.track.el.getBoundingClientRect(),n.axis.y.track.rect=n.axis.y.track.el.getBoundingClientRect(),(n.axis.x.isOverflowing||n.axis.x.forceVisible)&&(e=n.isWithinBounds(n.axis.x.track.rect)),(n.axis.y.isOverflowing||n.axis.y.forceVisible)&&(r=n.isWithinBounds(n.axis.y.track.rect)),(e||r)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(n.axis.x.scrollbar.rect=n.axis.x.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.x.scrollbar.rect)?n.onDragStart(t,"x"):n.onTrackClick(t,"x")),r&&(n.axis.y.scrollbar.rect=n.axis.y.scrollbar.el.getBoundingClientRect(),n.isWithinBounds(n.axis.y.scrollbar.rect)?n.onDragStart(t,"y"):n.onTrackClick(t,"y"))))},this.drag=function(e){var r=n.axis[n.draggedAxis].track,i=r.rect[n.axis[n.draggedAxis].sizeAttr],o=n.axis[n.draggedAxis].scrollbar,s=n.contentWrapperEl[n.axis[n.draggedAxis].scrollSizeAttr],a=parseInt(n.elStyles[n.axis[n.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var c=(("y"===n.draggedAxis?e.pageY:e.pageX)-r.rect[n.axis[n.draggedAxis].offsetAttr]-n.axis[n.draggedAxis].dragOffset)/(i-o.size)*(s-a);"x"===n.draggedAxis&&(c=n.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c-(i+o.size):c,c=n.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-c:c),n.contentWrapperEl[n.axis[n.draggedAxis].scrollOffsetAttr]=c},this.onEndDrag=function(t){var e=Xi(n.el),r=$i(n.el);t.preventDefault(),t.stopPropagation(),n.el.classList.remove(n.classNames.dragging),e.removeEventListener("mousemove",n.drag,!0),e.removeEventListener("mouseup",n.onEndDrag,!0),n.removePreventClickId=r.setTimeout((function(){e.removeEventListener("click",n.preventClick,!0),e.removeEventListener("dblclick",n.preventClick,!0),n.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},r),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=Gr(this.recalculate.bind(this),64),this.onMouseMove=Gr(this.onMouseMove.bind(this),64),this.hideScrollbars=dn(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=dn(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=Hn(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var r=e.firstElementChild;document.body.appendChild(r);var n=r.firstElementChild;r.scrollLeft=0;var i=t.getOffset(r),o=t.getOffset(n);r.scrollLeft=999;var s=t.getOffset(n);return{isRtlScrollingInverted:i.left!==o.left&&o.left-s.left!=0,isRtlScrollbarInverted:i.left!==o.left}},t.getOffset=function(t){var e=t.getBoundingClientRect(),r=Xi(t),n=$i(t);return{top:e.top+(n.pageYOffset||r.documentElement.scrollTop),left:e.left+(n.pageXOffset||r.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),Yt&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),r=document.createElement("div");e.classList.add(this.classNames.track),r.classList.add(this.classNames.scrollbar),e.appendChild(r),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var t=this,e=$i(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize);var r=!1,n=e.ResizeObserver||di;this.resizeObserver=new n((function(){r&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame((function(){r=!0})),this.mutationObserver=new e.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var t=$i(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1||e>0,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var a=this.contentEl.scrollHeight,c=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=n?(e||c)+"px":"auto",this.placeholderEl.style.height=a+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=0!==e&&c>e,this.axis.y.isOverflowing=a>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&c>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&a>l-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,r=this.contentEl[this.axis[t].scrollSizeAttr],n=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=n/r;return e=Math.max(~~(i*n),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],n=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=(s="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s)/(r-i),c=~~((n-o.size)*a);c="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c+(n-o.size):c,o.el.style.transform="x"===e?"translate3d("+c+"px, 0, 0)":"translate3d(0, "+c+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,r=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var r=Xi(this.el),n=$i(this.el),i=this.axis[e].scrollbar,o="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=o-i.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),r.addEventListener("mousemove",this.drag,!0),r.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(r.addEventListener("click",this.preventClick,!0),r.addEventListener("dblclick",this.preventClick,!0)):(n.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(t,e){var r=this;if(void 0===e&&(e="y"),this.options.clickOnTrack){var n=$i(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();var i=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],o=parseInt(this.elStyles[this.axis[e].sizeAttr],10),s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=("y"===e?this.mouseY-i:this.mouseX-i)<0?-1:1,c=-1===a?s-o:s+o;!function t(){var i,o;-1===a?s>c&&(s-=40,r.contentWrapperEl.scrollTo(((i={})[r.axis[e].offsetAttr]=s,i)),n.requestAnimationFrame(t)):s<c&&(s+=40,r.contentWrapperEl.scrollTo(((o={})[r.axis[e].offsetAttr]=s,o)),n.requestAnimationFrame(t))}()}},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:gi()}catch(t){return gi()}},e.removeListeners=function(){var t=this,e=$i(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver.disconnect(),this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return r.call(t,e)}))[0]},t}();return Yi.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},Yi.instances=new WeakMap,Yi.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Yi.instances.has(t)||new Yi(t,qi(t.attributes))}))},Yi.removeObserver=function(){this.globalObserver.disconnect()},Yi.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(Yi.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},Yi.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!Yi.instances.has(t)&&new Yi(t,qi(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||Yi.instances.has(t)||new Yi(t,qi(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&(t.hasAttribute('[data-simplebar="init"]')?Yi.instances.has(t)&&Yi.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){Yi.instances.has(t)&&Yi.instances.get(t).unMount()})))}))}))},Yi.getOptions=qi,Yt&&Yi.initHtmlApi(),Yi}));

}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}]},{},[1]);
