text: (this["webpackJsonp@brightcove/sharepoint-connector"]=this["webpackJsonp@brightcove/sharepoint-connector"]||[]).push([[0],{10:function(e,t,n){"use strict";n.d(t,"SortOrder",(function(){return l}));var r=n(440);n.d(t,"ConnectorContext",(function(){return r.a}));var o=n(429);n.d(t,"mapBCVideoToMVideo",(function(){return o.a})),n.d(t,"mapMVideoToBCVideo",(function(){return o.b}));var a=n(430);n.o(a,"PlaylistSortField")&&n.d(t,"PlaylistSortField",(function(){return a.PlaylistSortField})),n.o(a,"SearchTarget")&&n.d(t,"SearchTarget",(function(){return a.SearchTarget})),n.o(a,"UserRole")&&n.d(t,"UserRole",(function(){return a.UserRole})),n.o(a,"VideoSortField")&&n.d(t,"VideoSortField",(function(){return a.VideoSortField})),n.o(a,"getDefaultPlaylistSearchParameters")&&n.d(t,"getDefaultPlaylistSearchParameters",(function(){return a.getDefaultPlaylistSearchParameters})),n.o(a,"getDefaultVideoSearchParameters")&&n.d(t,"getDefaultVideoSearchParameters",(function(){return a.getDefaultVideoSearchParameters}));var i=n(431);n.o(i,"PlaylistSortField")&&n.d(t,"PlaylistSortField",(function(){return i.PlaylistSortField})),n.o(i,"SearchTarget")&&n.d(t,"SearchTarget",(function(){return i.SearchTarget})),n.o(i,"UserRole")&&n.d(t,"UserRole",(function(){return i.UserRole})),n.o(i,"VideoSortField")&&n.d(t,"VideoSortField",(function(){return i.VideoSortField})),n.o(i,"getDefaultPlaylistSearchParameters")&&n.d(t,"getDefaultPlaylistSearchParameters",(function(){return i.getDefaultPlaylistSearchParameters})),n.o(i,"getDefaultVideoSearchParameters")&&n.d(t,"getDefaultVideoSearchParameters",(function(){return i.getDefaultVideoSearchParameters}));var s=n(432);n.d(t,"PlaylistSortField",(function(){return s.a})),n.d(t,"getDefaultPlaylistSearchParameters",(function(){return s.b}));var c=n(433);n.d(t,"UserRole",(function(){return c.a}));var l,u=n(434);n.d(t,"SearchTarget",(function(){return u.a})),n.d(t,"VideoSortField",(function(){return u.b})),n.d(t,"getDefaultVideoSearchParameters",(function(){return u.c})),function(e){e.Ascending="ascending",e.Descending="descending"}(l||(l={}))},1020:function(e,t,n){},1053:function(e,t,n){},1054:function(e,t,n){},1055:function(e,t,n){},1056:function(e,t,n){},1058:function(e,t,n){},1059:function(e,t,n){},1060:function(e,t,n){},1061:function(e,t,n){},1062:function(e,t,n){},1063:function(e,t,n){},1064:function(e,t,n){},1065:function(e,t,n){},1070:function(e,t,n){},1071:function(e,t,n){"use strict";n.r(t);n(457),n(659);var r,o,a,i,s=n(0),c=n(39),l=n(8),u=n(9),p=n(13),d=n(12),h=n(14),f=n(3),m=n(19),y=n(50),g=n(441),v=n.n(g),b=n(4),P=n(1),w=n.n(P),E=n(5),x=n(41),O=n(1076),C=n(6),S=function(e){var t=e.availableAccounts,n=e.selectedAccountId,r=e.onChange,o=e.disabled,a=e.className,i=Object(s.useState)(!0),c=Object(x.a)(i,2),l=c[0],u=c[1];Object(s.useEffect)((function(){if(u(!0),!n&&t&&t.length>0){var e=t[0];r&&r(e)}u(!1)}),[l]);return l?s.createElement(O.a,{className:a,componentClass:"select",disabled:!0},s.createElement("option",null,"Loading Accounts...")):!t||t.length<=0?s.createElement(O.a,{className:a,componentClass:"select",disabled:!0},s.createElement("option",null,"There are no available accounts.")):s.createElement(O.a,{className:a,componentClass:"select",placeholder:"Select an account...",value:n,onChange:function(e){var n=e.target,o=Object(C.find)(t,(function(e){return e.accountId===n.value}));o&&r&&r(o)},disabled:o||!1},t.map((function(e,t){return s.createElement("option",{key:t,value:e.accountId},e.title)})))},_=n(445),k=n.n(_),j=n(34),T=n(32),I=function(e){function t(){var e,n;Object(l.a)(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(n=Object(p.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(o))))._cb=void 0,n}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){this._cb=new k.a("#".concat(this.props.id||"copyToClipboard"))}},{key:"componentWillUnmount",value:function(){this._cb&&this._cb.destroy()}},{key:"render",value:function(){var e=this.props.id||"copyToClipboard";return s.createElement("div",{id:e,className:"btn btn-success btn-sm pull-right","data-clipboard-target":"#embedCode",style:{margin:"2px"},onClick:function(){return null}},s.createElement(j.a,{icon:T.d})," Copy to Clipboard")}}]),t}(s.Component),A=n(1072),F=n(446),N=n.n(F),U=function(e){function t(){return Object(l.a)(this,t),Object(p.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(u.a)(t,[{key:"renderDateTime",value:function(e,t){return s.createElement("div",{className:"input-group"},s.createElement("input",Object.assign({className:"form-control"},e)),s.createElement("div",{className:"input-group-btn"},s.createElement(A.a,{onClick:t,disabled:e.disabled},"\xa0",s.createElement("i",{className:"glyphicon glyphicon-calendar"}))))}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.placeholder,r=e.onChange,o=e.disabled;return s.createElement(N.a,{value:t,onChange:r,timeFormat:!1,renderInput:this.renderDateTime,inputProps:{placeholder:n,disabled:o}})}}]),t}(s.Component),D=(r=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isLoadingFolders:!0,allFolders:[]},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.loadFolders();case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"componentDidUpdate",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props.accountId,n=this.state,r=n.isLoadingFolders,o=n.currentAccountId,!r){e.next=4;break}return e.abrupt("return");case 4:if(!t||t===o){e.next=7;break}return e.next=7,this.loadFolders();case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"loadFolders",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.connectorContext,r=t.accountId){e.next=3;break}return e.abrupt("return");case 3:return this.setState({isLoadingFolders:!0}),e.next=6,n.bcApiGateway.foldersApi.getFolders(r);case 6:o=e.sent,this.setState({isLoadingFolders:!1,allFolders:Object(C.orderBy)(o,["name"]),currentAccountId:r});case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"handleFieldChange",value:function(e){var t=this.props.onChange,n=this.state.allFolders,r=e.target,o=Object(C.find)(n,(function(e){return e.id===r.value}));t&&t(o)}},{key:"render",value:function(){var e=this.props,t=e.accountId,n=e.className,r=e.placeholder,o=e.selectedFolderId,a=this.state,i=a.isLoadingFolders,c=a.allFolders;return t?i?s.createElement(O.a,{className:n,componentClass:"select",disabled:!0},s.createElement("option",null,"Loading Folders...")):s.createElement(O.a,{className:n,componentClass:"select",placeholder:r,value:o,onChange:this.handleFieldChange},s.createElement("option",{value:""},"- No Folder -"),c.map((function(e,t){return s.createElement("option",{key:t,value:e.id},e.name)}))):s.createElement(O.a,{className:n,componentClass:"select",disabled:!0},s.createElement("option",null,"Please select an account..."))}}]),t}(s.Component),Object(f.a)(r.prototype,"loadFolders",[b.a],Object.getOwnPropertyDescriptor(r.prototype,"loadFolders"),r.prototype),Object(f.a)(r.prototype,"handleFieldChange",[b.a],Object.getOwnPropertyDescriptor(r.prototype,"handleFieldChange"),r.prototype),r),M=(o=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isLoadingGroups:!0,allGroups:[]},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.connectorContext,e.next=3,t.spApiGateway.spGroups.getSiteGroups();case 3:n=e.sent,this.setState({isLoadingGroups:!1,allGroups:n});case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"handleFieldChange",value:function(e){this.props.onChange&&this.props.onChange(e)}},{key:"render",value:function(){return this.state.isLoadingGroups?s.createElement("div",null,"Loading Groups..."):s.createElement(O.a,{componentClass:"select",placeholder:"Select a group...",value:this.props.value,onChange:this.handleFieldChange},s.createElement("option",{value:""}),this.state.allGroups.map((function(e,t){return s.createElement("option",{key:t,value:e.title},e.title)})))}}]),t}(s.Component),Object(f.a)(o.prototype,"handleFieldChange",[b.a],Object.getOwnPropertyDescriptor(o.prototype,"handleFieldChange"),o.prototype),o),V=(a=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isLoadingIngestProfiles:!0,allIngestProfiles:[]},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.props.accountId&&this.getIngestProfiles(this.props);case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"UNSAFE_componentWillReceiveProps",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.accountId,r=this.state.allIngestProfiles,!n||t.accountId===this.props.accountId||0!==r.length){e.next=5;break}return e.next=5,this.getIngestProfiles(t);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getIngestProfiles",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r,o,a,i,s,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.accountId,r=t.bcApiGateway,o=t.onChange,a=r.ingestProfilesApi,n){e.next=4;break}return e.abrupt("return");case 4:return this.setState({isLoadingIngestProfiles:!0}),e.next=7,a.getDefaultProfile(n);case 7:return i=e.sent,e.next=10,a.getAllIngestProfiles(n);case 10:s=e.sent,c=void 0,s&&s.length>0&&(i&&(c=Object(C.find)(s,{id:i.id})),c||(c=s[0]),c&&o&&o(c)),this.setState({isLoadingIngestProfiles:!1,selectedIngestProfile:c});case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handlePlayerChange",value:function(e){var t=this.props.onChange,n=this.state.allIngestProfiles,r=e.target,o=Object(C.find)(n,{id:r.value});o&&t&&t(o)}},{key:"render",value:function(){var e=this.props,t=e.placeholder,n=e.className,r=e.accountId,o=e.selectedIngestProfileId,a=this.state,i=a.isLoadingIngestProfiles,c=a.allIngestProfiles,l=a.defaultIngestProfile;if(!r)return s.createElement(O.a,{className:n,componentClass:"select",disabled:!0},s.createElement("option",null,"Please select an account..."));if(i)return s.createElement(O.a,{className:n,componentClass:"select",disabled:!0},s.createElement("option",null,"Loading Ingest Profiles..."));var u=t;u||(u="Select an ingest profile...");var p=o;return!p&&l&&(p=l.id),s.createElement(O.a,{className:n,componentClass:"select",placeholder:u,value:p,onChange:this.handlePlayerChange},c.map((function(e,t){return s.createElement("option",{key:t,value:e.id},e.name)})))}}]),t}(s.Component),Object(f.a)(a.prototype,"getIngestProfiles",[b.a],Object.getOwnPropertyDescriptor(a.prototype,"getIngestProfiles"),a.prototype),Object(f.a)(a.prototype,"handlePlayerChange",[b.a],Object.getOwnPropertyDescriptor(a.prototype,"handlePlayerChange"),a.prototype),function(e){var t=e.loadingMessage;return t||(t="Loading Brightcove Video Connector for SharePoint..."),s.createElement("div",{className:"loading-progress"},s.createElement("div",{className:"loading-progress-content"},s.createElement("div",{className:"loading-logo"},s.createElement("img",{src:"images/brightcove-logo-vertical-grey.png",alt:"logo"})),s.createElement("div",{className:"loading-progress-bar",role:"progressbar"},s.createElement("div",{className:"progressContainer"},s.createElement("div",{className:"primaryProgress"}))),s.createElement("div",{className:"loading-progress-message"},t)))}),L=function(e){var t=e.accountId,n=e.retrieveAllPlayers,r=e.playerFilter,o=e.playerType,a=e.defaultPlayerId,i=e.selectedPlayerId,c=e.onChange,l=e.placeholder,u=e.className,p=Object(s.useState)(!0),d=Object(x.a)(p,2),h=d[0],f=d[1],m=Object(s.useState)([]),y=Object(x.a)(m,2),g=y[0],v=y[1],b=Object(s.useState)([]),P=Object(x.a)(b,2),S=P[0],_=P[1],k=Object(s.useState)(),j=Object(x.a)(k,2)[1],T=function(e){var t=e;if(r&&r.length>0){var n=r.toLowerCase();t=Object(C.filter)(t,(function(e){return!!(e.name&&e.name.toLowerCase().indexOf(n)>-1)}))}t=Object(C.filter)(t,(function(e){var t=!1;if(Object(C.get)(e,"branches.master.configuration.playlist")&&(t=!0),!t){var n=Object(C.get)(e,"branches.master.configuration.plugins");if(n)Object(C.filter)(n,{registry_id:"@brightcove/videojs-bc-playlist-ui"}).length>0&&(t=!0)}return("Video"!==o||!t)&&!("Playlist"===o&&!t)}));var s=(t=Object(C.orderBy)(t,["name"])).findIndex((function(e){return"default"===e.id}));if(s>0){var l=t.splice(s,1);t.splice(0,0,l[0])}var u=void 0;return t&&t.length>0&&((u=Object(C.find)(t,{id:a||i||"default"}))||(u=t[0]),u&&u.id!==i&&c&&c(u)),{filteredPlayers:t,selectedPlayer:u}},I=function(){var e=Object(E.a)(w.a.mark((function e(){var r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return f(!0),e.next=5,n(t);case 5:r=e.sent,o=T(r),v(r),_(o.filteredPlayers),j(o.selectedPlayer),f(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if(Object(s.useEffect)((function(){!h&&g||I()}),[t,h]),Object(s.useEffect)((function(){var e=T(g);_(e.filteredPlayers)}),[r]),!t)return s.createElement(O.a,{className:u,componentClass:"select",disabled:!0,style:{width:"100%"}},s.createElement("option",null,"Please select an account..."));if(h)return s.createElement(O.a,{className:u,componentClass:"select",disabled:!0,style:{width:"100%"}},s.createElement("option",null,"Loading Players..."));if((!S||S.length<=0)&&r&&r.length>0)return s.createElement(O.a,{className:u,componentClass:"select",disabled:!0,style:{width:"100%"}},s.createElement("option",null,"All players were filtered out"));if(!S||S.length<=0)return s.createElement(O.a,{className:u,componentClass:"select",disabled:!0,style:{width:"100%"}},s.createElement("option",null,"There are no players available for this content."));var A=l;A||(A="Select a player...");var F=i;return F||(F="default"),s.createElement(O.a,{className:u,componentClass:"select",placeholder:A,value:F,onChange:function(e){var t=e.target,n=Object(C.find)(g,{id:t.value});j(n),n&&c&&c(n)},style:{width:"100%"}},S.map((function(e,t){return s.createElement("option",{key:t,value:e.id},e.name)})))},B=function(e){function t(){return Object(l.a)(this,t),Object(p.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(u.a)(t,[{key:"render",value:function(){var e=this.props.loadingText||"Loading...";return s.createElement("div",{style:{textAlign:"center"}},s.createElement(j.a,{icon:T.g,spin:!0,size:"2x"}),s.createElement("br",null),s.createElement("span",null,e))}}]),t}(s.Component),R=n(18);!function(e){e.Part="Part",e.Mini="Mini",e.Full="Full"}(i||(i={}));var W,Q,G,z=n(108),H=n(17),q=n.n(H),$=(W=function(e){function t(){var e,n;Object(l.a)(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(n=Object(p.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(o))))._scriptElement=void 0,n._embedElement=void 0,n}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.embedCodeOverride;if(this._embedElement&&e){var t=document.createRange();t.selectNodeContents(this._embedElement),t.deleteContents(),this._embedElement.appendChild(t.createContextualFragment(e))}if(this._scriptElement&&this._scriptElement.parentElement){var n=this._scriptElement.parentElement,r=document.createElement("script");r.src=this._scriptElement.src,n.removeChild(this._scriptElement),n.appendChild(r)}}},{key:"renderIFrameFixed",value:function(){var e=this.props,t=e.accountId,n=e.experienceId,r=e.renderMode,o=e.overrideExperienceVideos,a=e.experienceOverrideMode,i=e.experienceOverrideModeIds,c=new q.a("https://players.brightcove.net/".concat(t,"/experience_").concat(n,"/index.html"));if(c.addQuery("usage","cms:sharepoint:".concat(this.props.sharepointVersion,":").concat(this.props.connectorVersion,":experienceiframe")),o)switch(a){case je.Playlist:i&&(c.addQuery("videoIds",""),c.addQuery("playlistId",i.join(",")));break;default:i&&(c.addQuery("videoIds",i.join(",")),c.addQuery("playlistId",""))}var l=c.toString().replace(/%2C/g,",");return"Embed"===r?s.createElement("div",{style:{display:"block",position:"relative",width:"640px",height:"640px"}},s.createElement("iframe",{title:"Embed",style:{width:"100%",height:"100%",top:"0px",bottom:"0px",right:"0px",left:"0px",border:"none",marginLeft:"auto",marginRight:"auto",position:"absolute"},src:l,allowFullScreen:!0,webkitallowfullscreen:"",mozallowfullscreen:""})):s.createElement("iframe",{title:"Full",style:{width:"100%",height:"100%",top:"0px",bottom:"0px",right:"0px",left:"0px",border:"none",marginLeft:"auto",marginRight:"auto",position:"absolute"},src:l,allowFullScreen:!0,webkitallowfullscreen:"",mozallowfullscreen:""})}},{key:"renderJavaScriptFixed",value:function(){var e=this,t=this.props,n=t.accountId,r=t.experienceId,o=t.overrideExperienceVideos,a=t.experienceOverrideMode,i=t.experienceOverrideModeIds,c="https://players.brightcove.net/".concat(n,"/experience_").concat(r,"/live.js"),l={"data-experience":r,"data-usage":"cms:sharepoint:".concat(this.props.sharepointVersion,":").concat(this.props.connectorVersion,":experiencejavascript")};if(o)switch(a){case je.Playlist:i&&(l["data-video-ids"]="",l["data-playlist-id"]=i.join(","));break;default:case je.Videos:i&&(l["data-video-ids"]=i.join(","),l["data-playlist-id"]="")}return s.createElement(s.Fragment,null,s.createElement("div",l),s.createElement("script",{ref:function(t){return e._scriptElement=t},src:c}))}},{key:"renderJavaScriptResponsive",value:function(){var e=this,t=this.props,n=t.accountId,r=t.experienceId,o=t.overrideExperienceVideos,a=t.experienceOverrideMode,i=t.experienceOverrideModeIds,c="https://players.brightcove.net/".concat(n,"/experience_").concat(r,"/live.js"),l={"data-experience":r,"data-usage":"cms:sharepoint:".concat(this.props.sharepointVersion,":").concat(this.props.connectorVersion,":experiencejavascript")};if(o)switch(a){case je.Playlist:i&&(l["data-video-ids"]="",l["data-playlist-id"]=i.join(","));break;default:case je.Videos:i&&(l["data-video-ids"]=i.join(","),l["data-playlist-id"]="")}return s.createElement(s.Fragment,null,s.createElement("div",l),s.createElement("script",{ref:function(t){return e._scriptElement=t},src:c}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.embedType,r=t.sizing,o=t.embedCodeOverride;if(o&&o.length>0){var a={__html:o};return s.createElement("div",{ref:function(t){return e._embedElement=t},dangerouslySetInnerHTML:a})}switch(n){case"Standard":return this.renderIFrameFixed();case"Advanced":switch(r){case"Fixed":return this.renderJavaScriptFixed();case"Responsive":return this.renderJavaScriptResponsive();default:throw new Error("Unknown or unsupported embed sizing.")}default:throw new Error("Unknown or supported embed type.")}}}]),t}(s.Component),Object(f.a)(W.prototype,"renderIFrameFixed",[b.a],Object.getOwnPropertyDescriptor(W.prototype,"renderIFrameFixed"),W.prototype),Object(f.a)(W.prototype,"renderJavaScriptFixed",[b.a],Object.getOwnPropertyDescriptor(W.prototype,"renderJavaScriptFixed"),W.prototype),Object(f.a)(W.prototype,"renderJavaScriptResponsive",[b.a],Object.getOwnPropertyDescriptor(W.prototype,"renderJavaScriptResponsive"),W.prototype),W),J=n(1077),K=n(1078),X=n(1075),Y=n(10),Z=(Q=function(e){function t(){return Object(l.a)(this,t),Object(p.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(u.a)(t,[{key:"handleSearchTermsChange",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.props,r=n.searchParameters,o=n.onSearchParametersChanged,r.searchTerms=t.target.value,o(r,"searchTerms");case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleSearchTargetChanged",value:function(e){var t=this.props,n=t.searchParameters,r=t.onSearchParametersChanged;n.searchTarget=e,r(n)}},{key:"handleSelectedFolderChange",value:function(e){var t=this.props,n=t.searchParameters,r=t.onSearchParametersChanged;n.folderId=e?e.id:"",r(n)}},{key:"handleSearchLimitChange",value:function(e){var t=this.props,n=t.searchParameters,r=t.onSearchParametersChanged;e.target.value?n.searchLimit=parseInt(e.target.value,10)||void 0:n.searchLimit=void 0,r(n)}},{key:"handleSortFieldChanged",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.props,r=n.searchParameters,o=n.onSearchParametersChanged,r.sortField=t,o(r);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleSortOrderChanged",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.props,r=n.searchParameters,o=n.onSearchParametersChanged,r.sortOrder=t,o(r);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.props,n=t.accountId,r=t.connectorContext,o=t.searchParameters,a=t.onSearchForVideos,i=t.showSearchTarget,c=t.labelClass,l=t.controlClass,u=t.formControlClass,p=o.searchTerms,d=o.searchTarget,h=o.sortField,f=o.sortOrder,m=void 0===i||!0===i;return s.createElement(s.Fragment,null,m&&s.createElement("div",{className:"row"},s.createElement("div",{className:"form-group col-md-5"},s.createElement("label",null,"Search"),s.createElement("div",null,s.createElement("div",{className:"input-group"},s.createElement("input",{type:"search",placeholder:"Search",className:"form-control ".concat(u),value:p,onKeyPress:function(e){return"Enter"===e.key&&a(n,o)},onChange:this.handleSearchTermsChange}),s.createElement("div",{className:"input-group-btn"},s.createElement(A.a,{onClick:function(){return a(n,o)}},"\xa0",s.createElement("i",{className:"glyphicon glyphicon-search"})))))),s.createElement("div",{className:"col-md-1"}),s.createElement("div",{className:"form-group col-md-6"},s.createElement("label",null,"Target"),s.createElement("div",null,s.createElement("div",{className:"input-group"},s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:d===Y.SearchTarget.SharePoint,onChange:function(){return e.handleSearchTargetChanged(Y.SearchTarget.SharePoint)}}),"SharePoint only"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:d===Y.SearchTarget.VideoCloud,onChange:function(){return e.handleSearchTargetChanged(Y.SearchTarget.VideoCloud)}}),"Video Cloud only"))))),!m&&s.createElement("div",{className:"form-group"},s.createElement("label",{className:c},"Available Videos:"),s.createElement("div",{className:l},s.createElement("div",{className:"input-group"},s.createElement("input",{type:"search",placeholder:"Video Filter",className:"form-control ".concat(u),value:p,onKeyPress:function(e){return"Enter"===e.key&&a(n,o)},onChange:this.handleSearchTermsChange}),s.createElement("div",{className:"input-group-btn"},s.createElement(A.a,{bsSize:u&&u.indexOf("input-sm")>-1?"small":void 0,onClick:function(){return a(n,o)}},"\xa0",s.createElement("i",{className:"glyphicon glyphicon-search"})))))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:c},"Folder: "),s.createElement("div",{className:l},s.createElement(D,{accountId:n,className:u,connectorContext:r,selectedFolderId:o.folderId,onChange:this.handleSelectedFolderChange}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:c},"Limit: "),s.createElement("div",{className:l},s.createElement("input",{type:"number",value:o.searchLimit,onChange:this.handleSearchLimitChange}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:c},"Sort results by: "),s.createElement("div",{className:l},s.createElement("div",{className:"input-group"},s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:h===Y.VideoSortField.Name,onChange:function(){return e.handleSortFieldChanged(Y.VideoSortField.Name)}}),"display name"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:h===Y.VideoSortField.UpdatedDate,onChange:function(){return e.handleSortFieldChanged(Y.VideoSortField.UpdatedDate)}}),"updated date"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:h===Y.VideoSortField.CreationDate,onChange:function(){return e.handleSortFieldChanged(Y.VideoSortField.CreationDate)}}),"creation date"),s.createElement("br",null),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:h===Y.VideoSortField.StartDate,onChange:function(){return e.handleSortFieldChanged(Y.VideoSortField.StartDate)}}),"start date"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:h===Y.VideoSortField.TotalPlays,onChange:function(){return e.handleSortFieldChanged(Y.VideoSortField.TotalPlays)}}),"total plays")))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:c},"Order: "),s.createElement("div",{className:l},s.createElement("div",{className:"input-group"},s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:f===Y.SortOrder.Ascending,onChange:function(){return e.handleSortOrderChanged(Y.SortOrder.Ascending)}}),"ascending"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:f===Y.SortOrder.Descending,onChange:function(){return e.handleSortOrderChanged(Y.SortOrder.Descending)}}),"descending")))))}}]),t}(s.Component),Object(f.a)(Q.prototype,"handleSearchTermsChange",[b.a],Object.getOwnPropertyDescriptor(Q.prototype,"handleSearchTermsChange"),Q.prototype),Object(f.a)(Q.prototype,"handleSearchTargetChanged",[b.a],Object.getOwnPropertyDescriptor(Q.prototype,"handleSearchTargetChanged"),Q.prototype),Object(f.a)(Q.prototype,"handleSelectedFolderChange",[b.a],Object.getOwnPropertyDescriptor(Q.prototype,"handleSelectedFolderChange"),Q.prototype),Object(f.a)(Q.prototype,"handleSearchLimitChange",[b.a],Object.getOwnPropertyDescriptor(Q.prototype,"handleSearchLimitChange"),Q.prototype),Object(f.a)(Q.prototype,"handleSortFieldChanged",[b.a],Object.getOwnPropertyDescriptor(Q.prototype,"handleSortFieldChanged"),Q.prototype),Object(f.a)(Q.prototype,"handleSortOrderChanged",[b.a],Object.getOwnPropertyDescriptor(Q.prototype,"handleSortOrderChanged"),Q.prototype),Q),ee=(n(1020),n(86));function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ne,re=(G=function(e){function t(){var e,n;Object(l.a)(this,t);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return(n=Object(p.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(o))))._scriptElement=void 0,n._embedElement=void 0,n}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=this.props.embedCodeOverride;if(this._embedElement&&e){var t=document.createRange();return t.selectNodeContents(this._embedElement),t.deleteContents(),void this._embedElement.appendChild(t.createContextualFragment(e))}if(this._scriptElement&&this._scriptElement.parentElement){var n=this._scriptElement.parentElement,r=document.createElement("script");r.src=this._scriptElement.src,n.removeChild(this._scriptElement),n.appendChild(r)}}},{key:"getVideoProps",value:function(){var e=this.props,t=e.accountId,n=e.mode,r=e.modeId,o=e.playerWidth,a=e.playerHeight,i=e.autoplay,s=e.muted,c=this.props,l=c.playerId,u=c.units;l=l||"default",u=u||"px";var p={};switch(n){case"Playlist":p["data-playlist-id"]=r;break;case"Video":p["data-video-id"]=r;break;default:throw new Error("Unsupported mode: ".concat(n))}switch(p=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(n,!0).forEach((function(t){Object(ee.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},p,{"data-account":t,"data-player":l,"data-embed":"default","data-usage":"cms:sharepoint:".concat(this.props.sharepointVersion,":").concat(this.props.connectorVersion,":javascript"),className:"video-js",controls:!0,style:{width:o?"".concat(o).concat(u):void 0,height:a?"".concat(a).concat(u):void 0,position:"relative",top:"0px",bottom:"0px",right:"0px",left:"0px"}}),!0===i&&(p.autoPlay=i),!0===s&&(p.muted=s),n){case"Playlist":break;case"Video":p.style.position="absolute";break;default:throw new Error("Unsupported mode: ".concat(n))}return p}},{key:"renderIFrameFixed",value:function(){var e=this.props,t=e.accountId,n=e.mode,r=e.modeId,o=e.playerWidth,a=e.playerHeight,i=e.autoplay,c=e.muted,l=e.renderMode,u=this.props,p=u.playerId,d=u.units;if(p=p||"default",d=d||"px",!o||!a)return s.createElement(s.Fragment,null,"Please enter correct values for width/height");var h=new q.a("".concat(window.location.protocol,"//players.brightcove.net/").concat(t,"/").concat(p,"_default/index.html"));switch(n){case"Video":h.addQuery("videoId",r);break;case"Playlist":h.addQuery("playlistId",r);break;default:throw new Error("Unknown Video Mode")}h.addQuery("usage","cms:sharepoint:".concat(this.props.sharepointVersion,":").concat(this.props.connectorVersion,":iframe")),!0===i&&h.addQuery("autoplay"),!0===c&&h.addQuery("muted");var f=h.toString(),m={display:"block",position:"relative"};o&&(m.width="".concat(o).concat(d)),a&&(m.height="".concat(a).concat(d));var y={width:"100%",height:"100%",position:"absolute",top:"0px",bottom:"0px",right:"0px",left:"0px"};return"Playlist"===n||"Video"===n&&"Embed"===l?s.createElement("div",{style:m},s.createElement("iframe",{title:n,src:f,style:y,allowFullScreen:!0,webkitallowfullscreen:"",mozallowfullscreen:""})):s.createElement("iframe",{title:n,src:f,style:y,allowFullScreen:!0,webkitallowfullscreen:"",mozallowfullscreen:""})}},{key:"renderIFrameResponsive",value:function(){var e=this.props,t=e.accountId,n=e.mode,r=e.modeId,o=e.playerWidth,a=e.playerHeight,i=e.autoplay,c=e.muted,l=this.props,u=l.playerId,p=l.units;if(u=u||"default",p=p||"px",!o||!a)return s.createElement(s.Fragment,null,"Please enter correct values for width/height");var d=new q.a("".concat(window.location.protocol,"//players.brightcove.net/").concat(t,"/").concat(u,"_default/index.html"));switch(n){case"Video":d.addQuery("videoId",r);break;case"Playlist":d.addQuery("playlistId",r);break;default:throw new Error("Unknown Video Mode")}d.addQuery("usage","cms:sharepoint:".concat(this.props.sharepointVersion,":").concat(this.props.connectorVersion,":iframe")),!0===i&&d.addQuery("autoplay"),!0===c&&d.addQuery("muted");var h=d.toString(),f={display:"block",position:"relative"};o&&(f.width="".concat(o).concat(p)),a&&(f.height="".concat(a).concat(p));return s.createElement("div",{style:f},s.createElement("iframe",{title:"responsive",src:h,style:{width:"100%",height:"100%",position:"absolute",top:"0px",bottom:"0px",right:"0px",left:"0px"},allowFullScreen:!0,webkitallowfullscreen:"",mozallowfullscreen:""}))}},{key:"renderJavaScriptFixed",value:function(){var e=this,t=this.props,n=t.accountId,r=t.mode,o=t.playerWidth,a=t.playerHeight,i=t.playerNumThumbnails,c=this.props,l=c.playerId,u=c.units;if(l=l||"default",u=u||"px",!o||!a)return s.createElement(s.Fragment,null,"Please enter correct values for width/height");var p=Math.round((parseFloat(o)-4*(i||1))/(i||1)),d=Math.round(p*parseFloat(a||"0")/parseFloat(o||"0")),h=void 0;a&&o&&(h=parseFloat(a)/parseFloat(o)*100);var f="//players.brightcove.net/".concat(n,"/").concat(l,"_default/index.min.js"),m=this.getVideoProps(),y=s.createElement("style",{type:"text/css"}," ","\n.vjs-playlist {\n    width: ".concat(o).concat(u,";\n    height: calc(").concat(d).concat(u," + 16px);\n    text-align: center;\n    overflow-x: scroll;\n    overflow-y: hidden;\n    white-space: nowrap;\n    margin: 0;\n    padding: 0;\n}\n.vjs-playlist-title-container {\n    color: #FFFFFF;\n    /*display: none;*/\n    opacity: 1;\n    font-size: 0.7em;\n    font-family: sans-serif;\n    font-weight: bold;\n}\n.vjs-playlist-now-playing-text {\n    color: #FFFFFF;\n    /*display: none;*\n    opacity: 1;\n    font-size: 0.7em;\n    font-family: sans-serif;\n    font-weight: bold;\n}\n.vjs-up-next-text {\n    color: #FFFFFF;\n    /*display: none;*/\n    opacity: 1;\n    font-family: sans-serif;\n    font-weight: bold;\n    text-align: right;\n}\n.vjs-playlist-duration {\n    color: #FFFFFF;\n    /*display: none;*/\n    opacity: 1;\n    font-family: sans-serif;\n    font-weight: bold;\n}\n.vjs-mouse.vjs-playlist {\n    background-color: #000000;\n}\nli.vjs-playlist-item {\n    background-color: #000000;\n    height: ").concat(d).concat(u,";\n    width: ").concat(p).concat(u,";\n    display: inline-block;\n    border: 2px solid #000000;\n    padding: 0;\n    margin: 0;\n    cursor: pointer;\n    vertical-align: middle;\n}\nli.vjs-playlist-item:hover {\n    border-color: #FFFFFF;\n}")),g={display:"block",position:"relative",width:"".concat(o).concat(u)};return g.height="Playlist"===r?"calc(".concat(a).concat(u," + ").concat(d).concat(u," + 16px)"):"".concat(a).concat(u),s.createElement(s.Fragment,null,"Playlist"===r&&y,s.createElement("div",{style:g},"Playlist"===r&&s.createElement(s.Fragment,null,s.createElement("video",m),s.createElement("script",{ref:function(t){return e._scriptElement=t},src:f}),s.createElement("ol",{className:"vjs-playlist vjs-csspointerevents vjs-mouse"})),"Video"===r&&s.createElement("div",{style:{paddingTop:h?"".concat(h,"%"):void 0}},s.createElement("video",m),s.createElement("script",{ref:function(t){return e._scriptElement=t},src:f}))))}},{key:"renderJavaScriptResponsive",value:function(){var e,t=this,n=this.props,r=n.accountId,o=n.playerWidth,a=n.playerHeight,i=n.bypassPlayerPadding,c=n.mode,l=n.renderMode,u=this.props,p=u.playerId,d=u.units;if(p=p||"default",d=d||"px","Playlist"===c&&!0===i)e=0;else{if(!o||!a)return s.createElement(s.Fragment,null,"Please enter correct values for width/height");a&&o&&(e=parseFloat(a)/parseFloat(o)*100)}var h="//players.brightcove.net/".concat(r,"/").concat(p,"_default/index.min.js"),f=this.getVideoProps();f.style.width="100%",f.style.height="100%";var m={};return m="Embed"!==l?{display:"block",position:"relative"}:{display:"block",position:"relative",minWidth:"0px",maxWidth:"".concat(o).concat(d)},"Video"===c&&"Embed"===l?s.createElement("div",{style:{display:"block",position:"relative",paddingTop:e?"".concat(e,"%"):void 0}},s.createElement("video",f),s.createElement("script",{ref:function(e){return t._scriptElement=e},src:h})):s.createElement("div",{style:m},s.createElement("div",{style:{paddingTop:e?"".concat(e,"%"):void 0}},s.createElement("video",f),s.createElement("script",{ref:function(e){return t._scriptElement=e},src:h})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.embedType,r=t.sizing,o=t.embedCodeOverride;if(o&&o.length>0){var a={__html:o};return s.createElement("div",{ref:function(t){return e._embedElement=t},dangerouslySetInnerHTML:a})}switch(n){case"Standard":switch(r){case"Fixed":return this.renderIFrameFixed();case"Responsive":return this.renderIFrameResponsive();default:throw new Error("Unknown or unsupported embed sizing.")}case"Advanced":switch(r){case"Fixed":return this.renderJavaScriptFixed();case"Responsive":return this.renderJavaScriptResponsive();default:throw new Error("Unknown or unsupported embed sizing.")}default:throw new Error("Unknown or supported embed type.")}}}]),t}(s.Component),Object(f.a)(G.prototype,"getVideoProps",[b.a],Object.getOwnPropertyDescriptor(G.prototype,"getVideoProps"),G.prototype),G);function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(n,!0).forEach((function(t){Object(ee.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}!function(e){e.Widescreen="16:9",e.Standard="4:3",e.Custom="Custom"}(ne||(ne={}));var ie,se,ce=function(e){var t=e.playerType,n=e.retrieveAllPlayers,r=e.defaultPlayerId,o=e.labelClass,a=e.controlClass,i=e.formControlClass,c=e.showEmbedCustomizations,l=e.showAdvancedEmbedCustomizations,u=e.bcPlayerProps,p=e.showUnitsCustomizations,d=e.onPlayerPropsChanged,h=e.whClass,f=Object(s.useState)(""),m=Object(x.a)(f,2),y=m[0],g=m[1],v=function(e,t,n){var r=n;if(!t)return"";switch(e){case ne.Widescreen:r=Math.round(9/16*parseFloat(t)).toString();break;case ne.Standard:r=Math.round(.75*parseFloat(t)).toString()}return r},b=function(e){u.embedType=e.target.value,"Standard"===u.embedType&&(u.sizing="Fixed"),u.sizing=!1===l?"Responsive":"Fixed",d(ae({},u))},P=function(e){u.sizing=e.target.value,d(ae({},u))};h||(h="col-md-6");var w=!0;return"Video"===t?w="Standard"!==u.embedType:"Advanced"===u.embedType&&(w=!1),s.createElement(s.Fragment,null,s.createElement("div",{className:"form-group"},s.createElement("label",{className:o},"Options"),s.createElement("div",{className:a},s.createElement("div",{className:"input-group ".concat(i)},s.createElement("label",{className:"checkbox-inline ".concat(i)},s.createElement("input",{type:"checkbox",checked:u.autoplay,onChange:function(e){d(ae({},u,{autoplay:e.target.checked}))}}),"Autoplay"),s.createElement("label",{className:"checkbox-inline ".concat(i)},s.createElement("input",{type:"checkbox",checked:u.muted,onChange:function(e){d(ae({},u,{muted:e.target.checked}))}}),"Muted")))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:o},"Player Filter:"),s.createElement("div",{className:a},s.createElement("div",{className:"input-group"},s.createElement("input",{type:"search",placeholder:"Search",className:"form-control input-sm",value:y,onChange:function(e){return t=e.target.value,void g(t);var t}}),s.createElement("div",{className:"input-group-btn searchButton"},s.createElement(A.a,{bsSize:"small"},"\xa0",s.createElement("i",{className:"glyphicon glyphicon-search"})))))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:o},"Player:"),s.createElement("div",{className:a},s.createElement(L,{className:"input-sm",accountId:u.accountId,retrieveAllPlayers:n,playerType:t,playerFilter:y,defaultPlayerId:r,selectedPlayerId:u.playerId,onChange:function(e){d(ae({},u,{playerId:e.id}))}}))),!0===c&&s.createElement(s.Fragment,null,s.createElement("div",{className:"form-group"},s.createElement("label",{className:o},"Embed Type"),s.createElement("div",{className:a},s.createElement("div",{className:"input-group ".concat(i)},s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",name:"embedType",value:"Standard",checked:"Standard"===u.embedType,onChange:b})," iFrame"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",name:"embedType",value:"Advanced",checked:"Advanced"===u.embedType,onChange:b})," JavaScript")))),!0===l&&s.createElement(s.Fragment,null,"Playlist"===t&&s.createElement("div",{className:"form-group"},s.createElement("label",{className:o},"Number of Thumbnails"),s.createElement("div",{className:a},s.createElement("input",{className:"form-control ".concat(i),type:"number",placeholder:"auto",disabled:"Advanced"!==u.embedType,value:u.playerNumThumbnails,onChange:function(e){e.target.value?u.playerNumThumbnails=parseInt(e.target.value,10):u.playerNumThumbnails=void 0,d(ae({},u))}}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:o},"Sizing"),s.createElement("div",{className:a},s.createElement("div",{className:"input-group ".concat(i)},s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",name:"sizing",value:"Fixed",disabled:!1,checked:"Fixed"===u.sizing,onChange:P})," Fixed"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",name:"sizing",value:"Responsive",disabled:!w,checked:"Responsive"===u.sizing,onChange:P})," Responsive")))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:o},"Aspect Ratio"),s.createElement("div",{className:a},s.createElement("select",{className:"form-control ".concat(i),value:u.aspectRatio,onChange:function(e){var t=u.playerWidth,n=u.playerHeight;u.aspectRatio=e.target.value,u.aspectRatio!==ne.Custom?u.playerHeight=v(u.aspectRatio,t,n):u.playerHeight="",d(ae({},u))}},s.createElement("option",null,"16:9"),s.createElement("option",null,"4:3"),s.createElement("option",null,"Custom")))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:o},"WxH"),s.createElement("div",{className:a},s.createElement("div",{className:"form-group ".concat(i," ").concat(h)},s.createElement("label",{className:o,style:{paddingTop:"0"}},"Player Width"),s.createElement("div",{className:a},s.createElement("div",{className:"input-group"},s.createElement("input",{className:"form-control ".concat(i),type:"number",placeholder:"auto",value:u.playerWidth,onChange:function(e){u.playerWidth=e.target.value||"",u.aspectRatio!==ne.Custom?u.playerHeight=v(u.aspectRatio||ne.Widescreen,u.playerWidth,u.playerHeight):u.playerHeight=void 0,d(ae({},u))}}),s.createElement("span",{className:"input-group-addon"},u.units||"px")))),s.createElement("div",{className:"form-group ".concat(i," ").concat(h)},s.createElement("label",{className:o,style:{paddingTop:"0"}},"Player Height"),s.createElement("div",{className:a},s.createElement("div",{className:"input-group"},s.createElement("input",{className:"form-control ".concat(i),type:"number",placeholder:"auto",value:u.playerHeight,disabled:u.aspectRatio!==ne.Custom,onChange:function(e){u.playerHeight=e.target.value||"",d(ae({},u))}}),s.createElement("span",{className:"input-group-addon"},u.units||"px"))))))),p&&s.createElement("div",{className:"form-group"},s.createElement("label",{className:o},"Units"),s.createElement("div",{className:a},s.createElement("select",{className:"form-control ".concat(i),value:u.units,onChange:function(e){u.units=e.target.value,d(ae({},u))}},s.createElement("option",null,"px"),s.createElement("option",null,"em"))))))},le=function(){function e(){Object(l.a)(this,e)}return Object(u.a)(e,null,[{key:"getDefaultBrightcovePlayerProps",value:function(){return{connectorVersion:"4.1.4",autoplay:!1,muted:!1,embedType:"Advanced",sizing:"Responsive",playerNumThumbnails:5,aspectRatio:ne.Widescreen,playerWidth:"640",playerHeight:"360",units:"px"}}},{key:"getDefaultBrightcovePlaylistProps",value:function(){return{mode:"Playlist",connectorVersion:"4.1.4",autoplay:!1,muted:!1,embedType:"Standard",sizing:"Fixed",playerNumThumbnails:5,aspectRatio:ne.Widescreen,playerWidth:"640",playerHeight:"360",units:"px"}}},{key:"getBrightcovePlayerPropsFromQueryString",value:function(){var t=q()().query(!0),n=e.getDefaultBrightcovePlayerProps();switch(n.accountId=t.accountId,t.part){case"playlist":n.mode="Playlist";break;case"video":default:n.mode="Video"}var r=document.body,o=document.documentElement;return n.playerWidth="".concat(Math.max(r.scrollWidth,r.offsetWidth,o.clientWidth,o.scrollWidth,o.offsetWidth)),n.playerId=t.playerId||"default",n.modeId=t.modeId,n.sharepointVersion=t.SPProductNumber,"true"===t.autoplay&&(n.autoplay=!0),"true"===t.muted&&(n.muted=!0),"Standard"===t.embedType||"Advanced"===t.embedType?n.embedType=t.embedType:n.embedType="Advanced","Fixed"===t.sizing||"Responsive"===t.sizing?n.sizing=t.sizing:n.sizing="Responsive",n}},{key:"augmentCurrentUriWithPlayerProps",value:function(e){var t=q()();return t.setQuery("accountId",e.accountId||""),t.setQuery("playerId",e.playerId||"default"),t.setQuery("modeId",e.modeId||""),t.setQuery("autoplay",!0===e.autoplay?"true":"false"),t.setQuery("muted",!0===e.muted?"true":"false"),e.embedType&&t.setQuery("embedType",e.embedType),e.sizing&&t.setQuery("sizing",e.sizing),t.toString()}}]),e}(),ue=(ie=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={searchParameters:Object(Y.getDefaultVideoSearchParameters)(),isLoadingVideos:!1,showEmbedModal:!1,defaultVideoPlayerId:""},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props,n=t.accountId,r=t.connectorContext,(o=Object(C.find)(r.availableAccounts,(function(e){return e.accountId===n})))&&this.setState({defaultVideoPlayerId:o.defaultVideoPlayerId}),this.searchForVideos(this.props.accountId,this.state.searchParameters);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"UNSAFE_componentWillUpdate",value:function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.accountId!==this.props.accountId&&this.searchForVideos(t.accountId,this.state.searchParameters);case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"searchForVideos",value:function(){var e=Object(E.a)(w.a.mark((function e(t,n){var r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.connectorContext,t){e.next=3;break}return e.abrupt("return");case 3:this.setState({isLoadingVideos:!0}),e.t0=n.searchTarget,e.next=e.t0===Y.SearchTarget.VideoCloud?7:11;break;case 7:return e.next=9,r.searchForBrightcoveVideos(t,n);case 9:return o=e.sent,e.abrupt("break",12);case 11:return e.abrupt("return");case 12:this.setState({isLoadingVideos:!1,videos:o});case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleAccountChange",value:function(e){var t=this.props,n=t.accountId,r=t.onAccountChange;n!==e.accountId&&r&&r(e.accountId)}},{key:"handleEmbedPlayerPropsChanged",value:function(e){this.setState({embedPlayerProps:e})}},{key:"handleSearchParametersChanged",value:function(e,t){this.setState({searchParameters:e}),"searchTerms"!==t&&this.searchForVideos(this.props.accountId,e)}},{key:"showEmbedModal",value:function(e,t){var n=this.props.accountId,r=le.getDefaultBrightcovePlayerProps();r.mode="Video",r.accountId=n,r.playerId=this.state.defaultVideoPlayerId,r.modeId=e,r.sharepointVersion=this.props.connectorContext.spAddinContext.SPProductNumber,this.setState({showEmbedModal:!0,embedVideoTitle:t,embedPlayerProps:r})}},{key:"hideEmbedModal",value:function(){this.setState({showEmbedModal:!1,embedVideoTitle:void 0,embedPlayerProps:void 0})}},{key:"renderVideoCell",value:function(e,t){var n=this,r=this.props.accountId,o="/".concat(r,"/manage-videos/").concat(t.videoId,"/edit"),a=Object(C.filter)(t.tags,(function(e){return!Object(C.startsWith)(e,"bcsp-")}));return s.createElement("div",{className:"result"},s.createElement("img",{className:"resultImage col-md-2",src:t.thumbnailUrl,alt:""}),s.createElement("div",{className:"col-md-7"},s.createElement("div",null,s.createElement(m.b,{to:o},t.name)),t.shortDescription&&s.createElement("div",{className:"short-description"},t.shortDescription),!t.complete&&s.createElement("div",{className:"form-group"},s.createElement("div",{className:"alert alert-warning small",style:{padding:"5px"},role:"alert"},"This video is still processing on the Video Cloud. Renditions may not be available. This might also be a Live event with no thumbnail image.")),s.createElement("div",null,a.map((function(e,t){return s.createElement(A.a,{key:t,bsSize:"xs",bsStyle:"success"},e)})))),s.createElement("div",{className:"col-md-3 text-center"},s.createElement("div",null,s.createElement(m.b,{to:o},"Edit Video")),s.createElement("div",{className:"video-id"},"Video Id: ",t.videoId),s.createElement("div",null,s.createElement(A.a,{bsStyle:"success",bsSize:"small",style:{width:"90px"},onClick:function(){return n.showEmbedModal(t.videoId,t.name)}},"Embed"))))}},{key:"render",value:function(){var e=this.props,t=e.accountId,n=e.connectorContext,r=this.state,o=r.isLoadingVideos,a=r.searchParameters,c=r.videos,l=r.defaultVideoPlayerId,u=r.showEmbedModal,p=r.embedVideoTitle,d=r.embedPlayerProps;return s.createElement(s.Fragment,null,s.createElement("ol",{className:"breadcrumb"},s.createElement("li",null,s.createElement(m.b,{to:"/"},"Brightcove Management")),s.createElement("li",{className:"active"},"Manage Videos")),s.createElement("div",{className:"search form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-md-3 control-label"},"Select Account:"),s.createElement("div",{className:"col-md-9"},s.createElement(S,{availableAccounts:n.availableAccounts,selectedAccountId:t,onChange:this.handleAccountChange})))),s.createElement("div",{className:"search form-horizontal"},s.createElement(Z,{accountId:t,connectorContext:n,showSearchTarget:!1,labelClass:"col-md-3 control-label",controlClass:"col-md-9",searchParameters:a,onSearchParametersChanged:this.handleSearchParametersChanged,onSearchForVideos:this.searchForVideos}),o&&s.createElement(B,{loadingText:"Loading Videos..."}),!o&&c&&s.createElement(R.BootstrapTable,{data:c,striped:!0,bordered:!1,pagination:c.length>10,options:{paginationPosition:"bottom"}},s.createElement(R.TableHeaderColumn,{dataField:"videoId",isKey:!0,dataFormat:this.renderVideoCell},"Results")),s.createElement(X.a,{className:"embed",show:u,onHide:this.hideEmbedModal,bsSize:"large"},s.createElement(X.a.Header,{closeButton:!0},s.createElement(X.a.Title,null,"Embed Video")),s.createElement(X.a.Body,null,d&&s.createElement(Xe,{layoutMode:i.Full,bcPlayerProps:d,videoTitle:p||"",defaultVideoPlayerId:l,doesEmbedHelperExist:n.doesEmbedHelperExist,spAddinContext:n.spAddinContext,spApiGateway:n.spApiGateway,showUploadWebPartButton:!1,retrieveAllPlayers:n.retrieveAllPlayers,onPlayerPropsChanged:this.handleEmbedPlayerPropsChanged})),s.createElement(X.a.Footer,null))))}}]),t}(s.Component),Object(f.a)(ie.prototype,"UNSAFE_componentWillMount",[b.a],Object.getOwnPropertyDescriptor(ie.prototype,"UNSAFE_componentWillMount"),ie.prototype),Object(f.a)(ie.prototype,"UNSAFE_componentWillUpdate",[b.a],Object.getOwnPropertyDescriptor(ie.prototype,"UNSAFE_componentWillUpdate"),ie.prototype),Object(f.a)(ie.prototype,"searchForVideos",[b.a],Object.getOwnPropertyDescriptor(ie.prototype,"searchForVideos"),ie.prototype),Object(f.a)(ie.prototype,"handleAccountChange",[b.a],Object.getOwnPropertyDescriptor(ie.prototype,"handleAccountChange"),ie.prototype),Object(f.a)(ie.prototype,"handleEmbedPlayerPropsChanged",[b.a],Object.getOwnPropertyDescriptor(ie.prototype,"handleEmbedPlayerPropsChanged"),ie.prototype),Object(f.a)(ie.prototype,"handleSearchParametersChanged",[b.a],Object.getOwnPropertyDescriptor(ie.prototype,"handleSearchParametersChanged"),ie.prototype),Object(f.a)(ie.prototype,"showEmbedModal",[b.a],Object.getOwnPropertyDescriptor(ie.prototype,"showEmbedModal"),ie.prototype),Object(f.a)(ie.prototype,"hideEmbedModal",[b.a],Object.getOwnPropertyDescriptor(ie.prototype,"hideEmbedModal"),ie.prototype),Object(f.a)(ie.prototype,"renderVideoCell",[b.a],Object.getOwnPropertyDescriptor(ie.prototype,"renderVideoCell"),ie.prototype),ie),pe=n(109);n(1053);function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(n,!0).forEach((function(t){Object(ee.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fe,me,ye=(se=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).previewData=void 0,r.previewIFrame=void 0,r.state={showCaptureOverlay:!1,capturePosterChecked:!0,captureThumbnailChecked:!0},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){this.previewData=this.renderPreview()}},{key:"cancelCapture",value:function(){this.setState({showCaptureOverlay:!1,capturePosterChecked:!0,captureThumbnailChecked:!0,snapshotDataUrl:void 0,snapshotBlob:void 0,savingCaptureStatus:void 0})}},{key:"completeCapture",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i,s,c,l,u,p,d,h,f,m,y;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.accountId,r=t.videoId,o=t.onCaptureComplete,a=t.bcApiGateway,i=this.state,s=i.capturePosterChecked,c=i.captureThumbnailChecked,l=i.snapshotDataUrl,u=i.snapshotBlob,a){e.next=4;break}return e.abrupt("return");case 4:if(h=a.dynamicIngestApi,!s){e.next=13;break}return this.setState({savingCaptureStatus:"Uploading new Poster Image..."}),e.next=9,h.getUploadUrls(n,r,"CapturePoster.png");case 9:return f=e.sent,p=f.api_request_url,e.next=13,fetch(f.signed_url,{method:"PUT",credentials:"omit",headers:{"Content-Type":""},body:u});case 13:if(!c){e.next=21;break}return this.setState({savingCaptureStatus:"Uploading new Thumbnail..."}),e.next=17,h.getUploadUrls(n,r,"CaptureThumbnail.png");case 17:return m=e.sent,d=m.api_request_url,e.next=21,fetch(m.signed_url,{method:"PUT",credentials:"omit",headers:{"Content-Type":""},body:u});case 21:if(!s&&!c){e.next=26;break}return this.setState({savingCaptureStatus:"Performing image ingest request..."}),e.next=25,h.addCustomImages(n,r,p,d);case 25:o&&l&&(y={snapshotDataUrl:l},s&&(y.posterUrl=p),c&&(y.thumbnailUrl=d),o(y));case 26:this.setState({showCaptureOverlay:!1,capturePosterChecked:!0,captureThumbnailChecked:!0,snapshotDataUrl:void 0,snapshotBlob:void 0,savingCaptureStatus:void 0});case 27:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"handleCapturePosterChanged",value:function(e){var t=e.target;this.setState({capturePosterChecked:t.checked})}},{key:"handleCaptureThumbnailChanged",value:function(e){var t=e.target;this.setState({captureThumbnailChecked:t.checked})}},{key:"captureSnapshot",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a=this;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.previewIFrame&&this.previewIFrame.contentDocument){e.next=2;break}return e.abrupt("return");case 2:if(t=this.previewIFrame.contentDocument.getElementById("bcPlayerPreview")){e.next=5;break}return e.abrupt("return");case 5:n=t.querySelector("video"),(r=document.createElement("canvas")).width=n.videoWidth||n.clientWidth,r.height=n.videoHeight||n.clientHeight,(o=r.getContext("2d"))&&(o.drawImage(n,0,0,r.width,r.height),this.setState({snapshotDataUrl:r.toDataURL()}),r.toBlob((function(e){e&&a.setState({showCaptureOverlay:!0,snapshotBlob:e})})));case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"renderPreview",value:function(){var e=this.props,t=e.accountId,n=e.videoId,r=e.playerId,o=e.style;return z.renderToStaticMarkup(s.createElement("div",{id:"bcPreview","data-vjs-player":!0,style:{width:"100%",height:o&&o.height||"initial"}},s.createElement("video",{id:"bcPlayerPreview",className:"video-js","data-video-id":n,"data-account":t,"data-player":r||"default","data-embed":"default",controls:!0}),s.createElement("script",{src:"//players.brightcove.net/".concat(t,"/").concat(r||"default","_default/index.min.js")}),s.createElement("style",{dangerouslySetInnerHTML:{__html:"\n            body { margin: 0; overflow: hidden; }\n          "}})))}},{key:"renderCaptureOverlay",value:function(){if(this.previewIFrame){var e=this.state,t=e.capturePosterChecked,n=e.captureThumbnailChecked,r=e.snapshotDataUrl,o=e.savingCaptureStatus;return s.createElement("div",{id:"capture-overlay",className:"",style:{top:this.previewIFrame.offsetTop,left:this.previewIFrame.clientLeft,width:this.previewIFrame.offsetWidth,height:this.previewIFrame.offsetHeight}},s.createElement(s.Fragment,null,!o&&s.createElement(s.Fragment,null,s.createElement("section",{className:"headers"},s.createElement("h2",null,"To capture a poster and/or thumbnail, select the appropriate checkbox."),s.createElement("h2",null,"Images are not to scale.")),s.createElement("section",{className:"previews row"},s.createElement("div",{className:"col-md-2"}),s.createElement("div",{className:"capture-preview col-md-4",id:"poster-preview"},s.createElement("img",{src:r,alt:""}),s.createElement("div",{className:"checkbox"},s.createElement("input",{type:"checkbox",checked:t,onChange:this.handleCapturePosterChanged}),"Poster")),s.createElement("div",{className:"capture-preview col-md-4",id:"thumbnail-preview"},s.createElement("img",{src:r,alt:""}),s.createElement("div",{className:"checkbox"},s.createElement("input",{type:"checkbox",checked:n,onChange:this.handleCaptureThumbnailChanged}),"Thumbnail")),s.createElement("div",{className:"col-md-2"})),s.createElement("section",{className:"buttons"},s.createElement(A.a,{bsStyle:"default",style:{marginRight:"5px",width:"75px"},onClick:this.cancelCapture},"Cancel"),s.createElement(A.a,{bsStyle:"primary",style:{marginRight:"5px",width:"75px"},onClick:this.completeCapture},"Save"))),o&&s.createElement("section",{className:"headers"},o)))}}},{key:"render",value:function(){var e=this,t=this.props,n=t.showToolbar,r=t.style,o=this.state.showCaptureOverlay;return s.createElement("div",null,void 0===n||!0===n&&s.createElement("div",{className:"clearfix",style:{background:"black",padding:"5px"}},s.createElement(A.a,{className:"pull-right",bsStyle:"success",onClick:this.captureSnapshot,disabled:o},s.createElement(j.a,{icon:T.b}),"\xa0Capture")),s.createElement("iframe",{ref:function(t){return e.previewIFrame=t},title:"preview",style:he({},r,{display:"block",border:"none"}),sandbox:"allow-same-origin allow-scripts",srcDoc:this.previewData}),!0===o&&this.renderCaptureOverlay())}}]),t}(s.Component),Object(f.a)(se.prototype,"cancelCapture",[b.a],Object.getOwnPropertyDescriptor(se.prototype,"cancelCapture"),se.prototype),Object(f.a)(se.prototype,"completeCapture",[b.a],Object.getOwnPropertyDescriptor(se.prototype,"completeCapture"),se.prototype),Object(f.a)(se.prototype,"handleCapturePosterChanged",[b.a],Object.getOwnPropertyDescriptor(se.prototype,"handleCapturePosterChanged"),se.prototype),Object(f.a)(se.prototype,"handleCaptureThumbnailChanged",[b.a],Object.getOwnPropertyDescriptor(se.prototype,"handleCaptureThumbnailChanged"),se.prototype),Object(f.a)(se.prototype,"captureSnapshot",[b.a],Object.getOwnPropertyDescriptor(se.prototype,"captureSnapshot"),se.prototype),Object(f.a)(se.prototype,"renderPreview",[b.a],Object.getOwnPropertyDescriptor(se.prototype,"renderPreview"),se.prototype),Object(f.a)(se.prototype,"renderCaptureOverlay",[b.a],Object.getOwnPropertyDescriptor(se.prototype,"renderCaptureOverlay"),se.prototype),se),ge=(n(1054),fe=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isLoadingVideo:!0,isSavingVideo:!1,savingVideoStatus:"",showBrightcoveProcessingModal:!1},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getVideo();case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getVideo",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.accountId,r=t.videoId){e.next=4;break}return window.location.hash="#/".concat(n,"/manage-videos"),e.abrupt("return");case 4:return this.setState({isLoadingVideo:!0}),e.next=7,this.getBrightcoveVideo(r);case 7:o=e.sent,this.setState({isLoadingVideo:!1,video:Object(C.cloneDeep)(o.video),originalVideo:o.video,bcVideo:o.bcVideo,customFields:o.customFields});case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getBrightcoveVideo",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r,o,a,i,s,c,l;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.props,r=n.accountId,o=n.connectorContext,a=o.bcApiGateway,i=a.videosApi,e.next=5,i.getVideoById(r,t);case 5:return s=e.sent,c=Object(Y.mapBCVideoToMVideo)(s),e.next=9,i.getCustomFields(r);case 9:return l=e.sent,e.abrupt("return",{bcVideo:s,video:c,customFields:l.custom_fields});case 11:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"addVideoTextTrack",value:function(e){var t=this.state.video;t&&(t.textTracks||(t.textTracks=[]),t.textTracks.push(e),this.setState({video:t}))}},{key:"removeVideoTextTrack",value:function(e){var t=this.state.video;if(t&&t.textTracks){var n=t.textTracks.indexOf(e);if(n<0)return;t.textTracks.splice(n,1),this.setState({video:t})}}},{key:"setVideoTextTrackAsDefault",value:function(e,t){var n=this.state.video;n&&n.textTracks&&(n.textTracks.forEach((function(n){n.default=!(n!==e||!t)})),this.setState({video:n}))}},{key:"handleCaptureCompleted",value:function(){this.setState({showBrightcoveProcessingModal:!0})}},{key:"updateVideo",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i,s,c,l,u,p,d,h,f,m,y,g,v,b,P,E,x,O,S,_,k,j,T,I,A,F,N,U,D;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.accountId,r=t.videoId,o=t.connectorContext,a=o.bcApiGateway,i=this.state,s=i.video,c=i.bcVideo,l=i.newPosterImage,u=i.newThumbnailImage,s&&c&&n&&r){e.next=5;break}return e.abrupt("return");case 5:if(this.setState({isSavingVideo:!0}),!(p=Object(Y.mapMVideoToBCVideo)(s,Object(C.filter)(c.tags,(function(e){return Object(C.startsWith)(e,"bcsp-")})))).text_tracks||Object(C.isEqual)(p.text_tracks,c.text_tracks)){e.next=29;break}for(d=[],h=!0,f=!1,m=void 0,e.prev=12,y=p.text_tracks[Symbol.iterator]();!(h=(g=y.next()).done);h=!0)v=g.value,d.push(Object(C.pick)(v,["id","account_id","srclang","label","kind","mime_type","asset_id","in_band_metadata_track_dispatch_type","default"]));e.next=20;break;case 16:e.prev=16,e.t0=e.catch(12),f=!0,m=e.t0;case 20:e.prev=20,e.prev=21,h||null==y.return||y.return();case 23:if(e.prev=23,!f){e.next=26;break}throw m;case 26:return e.finish(23);case 27:return e.finish(20);case 28:p.text_tracks=d;case 29:return b=a.dynamicIngestApi,P=a.videosApi,this.setState({savingVideoStatus:"Updating Brightcove Video..."}),e.next=34,P.updateVideo(n,r,p);case 34:if(E=e.sent,x=Object(Y.mapBCVideoToMVideo)(E),O=Object(C.filter)(s.textTracks,(function(e){return!e.id})),!((S=Object(C.filter)(O,(function(e){return!!e.file}))).length>0)){e.next=71;break}this.setState({savingVideoStatus:"Uploading new text tracks..."}),_=!0,k=!1,j=void 0,e.prev=43,T=S[Symbol.iterator]();case 45:if(_=(I=T.next()).done){e.next=57;break}if(!(A=I.value).file){e.next=54;break}return e.next=50,b.getUploadUrls(n,r);case 50:return F=e.sent,e.next=53,fetch(F.signed_url,{method:"PUT",credentials:"omit",headers:{"Content-Type":""},body:A.file});case 53:A.src=F.api_request_url;case 54:_=!0,e.next=45;break;case 57:e.next=63;break;case 59:e.prev=59,e.t1=e.catch(43),k=!0,j=e.t1;case 63:e.prev=63,e.prev=64,_||null==T.return||T.return();case 66:if(e.prev=66,!k){e.next=69;break}throw j;case 69:return e.finish(66);case 70:return e.finish(63);case 71:if(!(O.length>0)){e.next=75;break}return this.setState({savingVideoStatus:"Performing text track ingest request..."}),e.next=75,a.dynamicIngestApi.addTextTracks(n,r,O);case 75:if(N={posterUrl:void 0,thumbnailUrl:void 0},!l){e.next=84;break}return this.setState({savingVideoStatus:"Uploading new Poster Image..."}),e.next=80,b.getUploadUrls(n,r,l.name);case 80:return U=e.sent,N.posterUrl=U.api_request_url,e.next=84,fetch(U.signed_url,{method:"PUT",credentials:"omit",headers:{"Content-Type":""},body:l});case 84:if(!u){e.next=92;break}return this.setState({savingVideoStatus:"Uploading new Thumbnail..."}),e.next=88,b.getUploadUrls(n,r,u.name);case 88:return D=e.sent,N.thumbnailUrl=D.api_request_url,e.next=92,fetch(D.signed_url,{method:"PUT",credentials:"omit",headers:{"Content-Type":""},body:u});case 92:if(!l&&!u){e.next=96;break}return this.setState({savingVideoStatus:"Performing image ingest request..."}),e.next=96,a.dynamicIngestApi.addCustomImages(n,r,N.posterUrl,N.thumbnailUrl);case 96:(l||u||O&&O.length>0)&&this.setState({showBrightcoveProcessingModal:!0}),this.setState({isSavingVideo:!1,video:Object(C.cloneDeep)(x),originalVideo:x,bcVideo:E,newPosterImage:void 0,newThumbnailImage:void 0,savingVideoStatus:""});case 98:case"end":return e.stop()}}),e,this,[[12,16,20,28],[21,,23,27],[43,59,63,71],[64,,66,70]])})));return function(){return e.apply(this,arguments)}}()},{key:"handleSelectChange",value:function(e){var t=this.state.video;if(t){var n=e.target,r=n.value,o=n.name;Object(C.set)(t,o,r),this.setState({video:t})}}},{key:"handleDateChange",value:function(e,t){var n=this.state.video;if(n){var r=t;r?Object(C.set)(n,e,r.toDate()):Object(C.set)(n,e,null),this.setState({video:n})}}},{key:"handleTextAreaChange",value:function(e){var t=this.state.video;if(t){var n=e.target,r=n.value,o=n.name;Object(C.set)(t,o,r),this.setState({video:t})}}},{key:"handleInputChange",value:function(e){var t=this.state.video;if(t){var n=e.target,r="checkbox"===n.type?n.checked:n.value,o=n.name;switch(o){case"tags":t.tags=r.toString().split(",").map((function(e){return e.trim()}));break;default:Object(C.set)(t,o,r)}this.setState({video:t})}}},{key:"handleDropPosterImage",value:function(e){1===e.length&&this.setState({newPosterImage:e[0]})}},{key:"handleDropThumbnail",value:function(e){1===e.length&&this.setState({newThumbnailImage:e[0]})}},{key:"hideBrightcoveProcessingModal",value:function(){this.setState({showBrightcoveProcessingModal:!1})}},{key:"render",value:function(){var e=this,t=this.props,n=t.accountId,r=t.videoId,o=t.connectorContext,a=this.state,i=a.isLoadingVideo,c=a.isSavingVideo,l=a.savingVideoStatus,u=a.video,p=a.originalVideo,d=a.customFields,h=a.newPosterImage,f=a.newThumbnailImage,g=a.showBrightcoveProcessingModal;if(c)return s.createElement(s.Fragment,null,s.createElement(B,{loadingText:l||"Saving Video..."}));if(i||!u||!p)return s.createElement(B,{loadingText:"Loading Video..."});var v,b,P="col-md-3 control-label",w=!!r&&Object(C.isEqual)(u,p)&&!h&&!f,E=[];if(u.name||E.push("The name of the video is required."),d){var x=!0,O=!1,_=void 0;try{for(var k,j=d[Symbol.iterator]();!(x=(k=j.next()).done);x=!0){var T=k.value;!0!==T.required||u.customFields[T.id]&&0!==u.customFields[T.id].length||E.push("The '".concat(T.display_name,"' custom field is marked as required and a value must be provided."))}}catch(I){O=!0,_=I}finally{try{x||null==j.return||j.return()}finally{if(O)throw _}}}return s.createElement(s.Fragment,null,s.createElement("ol",{className:"breadcrumb"},s.createElement("li",null,s.createElement(m.b,{to:"/"},"Brightcove Management")),s.createElement("li",null,s.createElement(m.b,{to:"/".concat(n,"/manage-videos")},"Manage Videos")),s.createElement("li",null,s.createElement(m.b,{to:"/".concat(n,"/manage-videos")},"Account ",n)),s.createElement("li",{className:"active"},"Video ",r)),s.createElement("div",{className:"form-horizontal"},!u.complete&&s.createElement("div",{className:"form-group"},s.createElement("div",{className:"alert alert-warning",role:"alert"},"This video is still processing on the Video Cloud. Renditions may not be available. This might also be a Live event with no thumbnail image.")),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Select Account")," ",s.createElement("div",{className:"col-md-9"},s.createElement(S,{availableAccounts:o.availableAccounts,selectedAccountId:n,disabled:!0}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Reference ID"),s.createElement("div",{className:"col-md-9"},s.createElement("input",{className:"form-control",disabled:!0,value:u.referenceId}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:"".concat(P," required")},"Name"),s.createElement("div",{className:"col-md-9"},s.createElement("input",{className:"form-control validate",type:"text",placeholder:"The name of the video",name:"name",value:u.name,onChange:this.handleInputChange}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Short Description"),s.createElement("div",{className:"col-md-9"},s.createElement("input",{className:"form-control",type:"text",placeholder:"Short description here...",name:"shortDescription",value:u.shortDescription,onChange:this.handleInputChange}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Long Description"),s.createElement("div",{className:"col-md-9"},s.createElement("textarea",{className:"form-control",placeholder:"Long description here...",name:"longDescription",value:u.longDescription,onChange:this.handleTextAreaChange}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Is Active"),s.createElement("div",{className:"col-md-9"},s.createElement("select",{className:"form-control",name:"state",value:u.state,onChange:this.handleSelectChange},s.createElement("option",{value:"ACTIVE"},"Active"),s.createElement("option",{value:"INACTIVE"},"Inactive")))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Related Link URL"),s.createElement("div",{className:"col-md-9"},s.createElement("input",{className:"form-control",type:"text",name:"relatedLinkUrl",value:u.relatedLinkUrl,onChange:this.handleInputChange}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Related Link Text"),s.createElement("div",{className:"col-md-9"},s.createElement("input",{className:"form-control",type:"text",name:"relatedLinkText",value:u.relatedLinkText,onChange:this.handleInputChange}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Start Availability Date"),s.createElement("div",{className:"col-md-9"},s.createElement(U,{value:u.startAvailabilityDate,name:"startAvailabilityDate",onChange:function(t){return e.handleDateChange("startAvailabilityDate",t)}}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"End Availability Date"),s.createElement("div",{className:"col-md-9"},s.createElement(U,{value:u.endAvailabilityDate,name:"endAvailabilityDate",onChange:function(t){return e.handleDateChange("endAvailabilityDate",t)}}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Economics"),s.createElement("div",{className:"col-md-9"},s.createElement("select",{className:"form-control",name:"economics",value:u.economics,onChange:this.handleSelectChange},s.createElement("option",{value:"FREE"},"Free"),s.createElement("option",{value:"AD_SUPPORTED"},"Ad Supported")))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P}," Brightcove Tags (comma-separated)"),s.createElement("div",{className:"col-md-9"},s.createElement("input",{className:"form-control",value:u.tags.join(", "),name:"tags",onChange:this.handleInputChange})))),s.createElement("br",null),d&&s.createElement(s.Fragment,null,s.createElement("h4",null,s.createElement("strong",null,"Custom Fields")),s.createElement("hr",null),s.createElement("div",{className:"form-horizontal"},d.map((function(t){return s.createElement("div",{className:"form-group",key:t.id},s.createElement("label",{className:"".concat(P).concat(t.required?" required":"")},t.display_name),s.createElement("div",{className:"col-md-9"},"string"===t.type&&s.createElement("input",{className:"form-control",required:t.required,value:u.customFields[t.id]||"",name:"customFields.".concat(t.id),onChange:e.handleInputChange}),"enum"===t.type&&s.createElement("select",{className:"form-control",required:t.required,value:u.customFields[t.id]||"",name:"customFields.".concat(t.id),onChange:e.handleSelectChange},s.createElement("option",{value:""}),t.enum_values.map((function(e,t){return s.createElement("option",{key:t},e)}))),s.createElement("small",{className:"form-text text-muted"},t.description)))}))),s.createElement("br",null)),s.createElement(Oe,{video:u,onAddTextTrack:this.addVideoTextTrack,onRemoveTextTrack:this.removeVideoTextTrack,onDefaultTextTrackChanged:this.setVideoTextTrackAsDefault}),s.createElement("h4",null,s.createElement("strong",null,"Image Details")),s.createElement("hr",null),s.createElement("div",{className:"form-group"},s.createElement(ye,{accountId:n,videoId:u.videoId,style:{width:"100%",height:"400px"},showToolbar:!0,bcApiGateway:o.bcApiGateway,onCaptureComplete:this.handleCaptureCompleted})),s.createElement("div",{className:"form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Poster"),s.createElement("div",{className:"col-md-9"},s.createElement("img",{className:"col-md-12",src:u.videoStillUrl,alt:""}),u.videoStillUrl&&s.createElement(pe.a,{ref:function(e){v=e},onDrop:this.handleDropPosterImage,disableClick:!0,multiple:!1,accept:"image/jpeg, image/png"},(function(){return s.createElement("div",{style:{textAlign:"right"}},s.createElement(A.a,{bsStyle:h?"success":"primary",bsSize:"small",onClick:function(){v&&v.open()},style:{marginTop:"10px"}},h?h.name:"Upload a new poster image"))})))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:P},"Thumbnail"),s.createElement("div",{className:"col-md-9"},s.createElement("img",{style:{paddingLeft:"15px",paddingRight:"15px"},src:u.thumbnailUrl,alt:""}),u.thumbnailUrl&&s.createElement(pe.a,{ref:function(e){b=e},onDrop:this.handleDropThumbnail,disableClick:!0,multiple:!1,accept:"image/jpeg, image/png"},(function(){return s.createElement("div",{style:{textAlign:"right"}},s.createElement(A.a,{bsStyle:f?"success":"primary",bsSize:"small",onClick:function(){b&&b.open()},style:{marginTop:"10px"}},f?f.name:"Upload a new thumbnail"))}))))),s.createElement("hr",null),s.createElement("div",{className:"clearfix",style:{paddingBottom:"5px"}},s.createElement("div",{className:"pull-right"},s.createElement(A.a,{className:"btn-space",bsStyle:w?"default":"primary",disabled:w||E.length>0,onClick:this.updateVideo},"Update on Video Cloud"),s.createElement(m.b,{className:"btn btn-default btn-space",to:"/".concat(n,"/manage-videos")},"Cancel"))),E.length>0&&E.map((function(e,t){return s.createElement("div",{key:t,className:"form-group"},s.createElement("div",{className:"alert alert-danger",role:"alert"},e))})),s.createElement(y.a,{when:!w,message:"There are unsaved changes. Are you sure you wish to leave?"}),s.createElement(X.a,{className:"embed",show:!0===g,onHide:this.hideBrightcoveProcessingModal},s.createElement(X.a.Header,{closeButton:!0},s.createElement(X.a.Title,null,"Uploaded content is processing...")),s.createElement(X.a.Body,null,s.createElement("p",null,"The update that you just performed included text tracks and/or custom poster or thumbnail images."),s.createElement("p",null,"These files have been submitted to Brightcove for ingest and may take a while to process. The changes to these items may not be reflected immediately, however, will update once processing of these items has completed.")),s.createElement(X.a.Footer,null,s.createElement(A.a,{onClick:this.hideBrightcoveProcessingModal,bsStyle:"primary"},"Ok"))))}}]),t}(s.Component),Object(f.a)(fe.prototype,"componentDidMount",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"componentDidMount"),fe.prototype),Object(f.a)(fe.prototype,"getVideo",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"getVideo"),fe.prototype),Object(f.a)(fe.prototype,"getBrightcoveVideo",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"getBrightcoveVideo"),fe.prototype),Object(f.a)(fe.prototype,"addVideoTextTrack",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"addVideoTextTrack"),fe.prototype),Object(f.a)(fe.prototype,"removeVideoTextTrack",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"removeVideoTextTrack"),fe.prototype),Object(f.a)(fe.prototype,"setVideoTextTrackAsDefault",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"setVideoTextTrackAsDefault"),fe.prototype),Object(f.a)(fe.prototype,"handleCaptureCompleted",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"handleCaptureCompleted"),fe.prototype),Object(f.a)(fe.prototype,"updateVideo",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"updateVideo"),fe.prototype),Object(f.a)(fe.prototype,"handleSelectChange",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"handleSelectChange"),fe.prototype),Object(f.a)(fe.prototype,"handleDateChange",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"handleDateChange"),fe.prototype),Object(f.a)(fe.prototype,"handleTextAreaChange",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"handleTextAreaChange"),fe.prototype),Object(f.a)(fe.prototype,"handleInputChange",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"handleInputChange"),fe.prototype),Object(f.a)(fe.prototype,"handleDropPosterImage",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"handleDropPosterImage"),fe.prototype),Object(f.a)(fe.prototype,"handleDropThumbnail",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"handleDropThumbnail"),fe.prototype),Object(f.a)(fe.prototype,"hideBrightcoveProcessingModal",[b.a],Object.getOwnPropertyDescriptor(fe.prototype,"hideBrightcoveProcessingModal"),fe.prototype),fe),ve=n(54);!function(e){e.None="None",e.FileUpload="FileUpload",e.UrlUpload="UrlUpload",e.RemoteUrl="RemoteUrl"}(me||(me={}));var be,Pe,we=["ar","ar-AE","ar-BH","ar-DZ","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-TN","ar-YE","be","be-BY","bg","bg-BG","ca","ca-ES","cs","cs-CZ","da","da-DK","de","de-AT","de-CH","de-DE","de-LU","el","el-CY","el-GR","en","en-AU","en-CA","en-GB","en-IE","en-IN","en-MT","en-NZ","en-PH","en-SG","en-US","en-ZA","es","es-AR","es-BO","es-CL","es-CO","es-CR","es-DO","es-EC","es-ES","es-GT","es-HN","es-MX","es-NI","es-PA","es-PE","es-PR","es-PY","es-SV","es-US","es-UY","es-VE","et","et-EE","fi","fi-FI","fr","fr-BE","fr-CA","fr-CH","fr-FR","fr-LU","ga","ga-IE","he","he-IL","hi-IN","hr","hr-HR","hu","hu-HU","id","id-ID","is","is-IS","it","it-CH","it-IT","ja","ja-JP","ja-JP-u-ca-japanese-x-lvariant-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mk","mk-MK","ms","ms-MY","mt","mt-MT","nl","nl-BE","nl-NL","nn-NO","no","no-NO","pl","pl-PL","pt","pt-BR","pt-PT","ro","ro-RO","ru","ru-RU","sk","sk-SK","sl","sl-SI","sq","sq-AL","sr","sr-BA","sr-CS","sr-Latn","sr-Latn-BA","sr-Latn-ME","sr-Latn-RS","sr-ME","sr-RS","sv","sv-SE","th","th-TH","th-TH-u-nu-thai-x-lvariant-TH","tr","tr-TR","uk","uk-UA","vi","vi-VN","zh","zh-CN","zh-HK","zh-SG","zh-TW"],Ee={src:"",srclang:"en-US",label:"",kind:ve.BCVideoTextTrackKind.Captions,mime_type:"text/vtt"},xe=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www\.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w\-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[.!/\\\w]*))?)/,Oe=(be=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={activeTextTrack:Object(C.cloneDeep)(Ee),textTrackAddMode:me.FileUpload,isFetchingUrlUpload:!1,uploadUrlResultText:""},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"fetchUrlUpload",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state,n=t.uploadUrl,r=t.activeTextTrack,n){e.next=3;break}return e.abrupt("return");case 3:return this.setState({isFetchingUrlUpload:!0}),o="File Retrieved",e.prev=5,e.next=8,fetch(n,{method:"GET",mode:"no-cors",cache:"no-cache",credentials:"same-origin"});case 8:return a=e.sent,e.next=11,a.arrayBuffer();case 11:r.file=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(5),o="An Error occurred: ".concat(e.t0);case 17:this.setState({isFetchingUrlUpload:!1,uploadUrlResultText:o});case 18:case"end":return e.stop()}}),e,this,[[5,14]])})));return function(){return e.apply(this,arguments)}}()},{key:"validateAddTextTrack",value:function(){var e=this.state,t=e.textTrackAddMode,n=e.activeTextTrack;switch(t){case me.None:break;case me.FileUpload:case me.UrlUpload:if(!n.file)return!1;break;case me.RemoteUrl:if(!n.src)return!1;if(!n.src.match(xe))return!1;break;default:return!1}return!0}},{key:"validateUrlUpload",value:function(){var e=this.state.uploadUrl;return!(!e||!e.match(xe))}},{key:"handleTextTrackAddModeChange",value:function(e){var t=this.state.activeTextTrack,n=e.target.value;t.src="",t.file=void 0,this.setState({textTrackAddMode:n,activeTextTrack:t,isFetchingUrlUpload:!1,uploadUrl:"",uploadUrlResultText:""})}},{key:"handleFileUpload",value:function(e){if(e.target.files){var t=new FileReader,n=this.state.activeTextTrack,r=this;t.onload=function(){var e=this.result;Object(C.isArrayBuffer)(e)&&(n.file=e,r.setState({activeTextTrack:n}))},t.readAsArrayBuffer(e.target.files[0]),e.target.value=""}}},{key:"handleUploadUrlChange",value:function(e){var t=e.target.value;this.setState({uploadUrl:t})}},{key:"handleSrcChange",value:function(e){var t=this.state.activeTextTrack;t.src=e.target.value,this.setState({activeTextTrack:t})}},{key:"handleSrcLangChange",value:function(e){var t=this.state.activeTextTrack;t.srclang=e.target.value,this.setState({activeTextTrack:t})}},{key:"handleLabelChange",value:function(e){var t=this.state.activeTextTrack;t.label=e.target.value,this.setState({activeTextTrack:t})}},{key:"handleKindChange",value:function(e){var t=this.state.activeTextTrack;t.kind=e.target.value,this.setState({activeTextTrack:t})}},{key:"handleAddTextTrack",value:function(){var e=this.props.onAddTextTrack,t=this.state.activeTextTrack;e&&e(t),this.setState({activeTextTrack:Object(C.cloneDeep)(Ee),isFetchingUrlUpload:!1,uploadUrl:"",uploadUrlResultText:""})}},{key:"handleRemoveTextTrack",value:function(e){var t=this.props.onRemoveTextTrack;t&&t(e)}},{key:"handleDefaultTextTrackChange",value:function(e,t){var n=this.props.onDefaultTextTrackChanged;n&&n(e,t.target.checked)}},{key:"render",value:function(){var e=this,t=this.props.video,n=this.state,r=n.textTrackAddMode,o=n.activeTextTrack,a=n.isFetchingUrlUpload,i=n.uploadUrlResultText,c=this.validateAddTextTrack(),l=this.validateUrlUpload();return s.createElement(s.Fragment,null,s.createElement("h4",null,s.createElement("strong",null,"Text Track Fields")),s.createElement("hr",null),s.createElement("div",{className:"form-horizontal"},s.createElement("div",{className:"form-group col-md-12"},s.createElement("input",{className:"radio-inline",type:"radio",name:"texttrackfiletype",value:me.None,checked:r===me.None,onChange:this.handleTextTrackAddModeChange})," ","None",s.createElement("input",{className:"radio-inline",type:"radio",name:"texttrackfiletype",value:me.FileUpload,checked:r===me.FileUpload,onChange:this.handleTextTrackAddModeChange})," ","File Upload",s.createElement("input",{className:"radio-inline",type:"radio",name:"texttrackfiletype",value:me.UrlUpload,checked:r===me.UrlUpload,onChange:this.handleTextTrackAddModeChange})," ","Url Upload",s.createElement("input",{className:"radio-inline",type:"radio",name:"texttrackfiletype",value:me.RemoteUrl,checked:r===me.RemoteUrl,onChange:this.handleTextTrackAddModeChange})," ","Remote Url"),r===me.None&&s.createElement("div",null),r===me.FileUpload&&s.createElement("div",{className:"form-group col-md-12"},s.createElement("input",{type:"file",accept:".vtt",onChange:this.handleFileUpload}),o&&o.file&&s.createElement("div",{style:{fontSize:"smaller"}},"File Uploaded")),r===me.UrlUpload&&s.createElement("div",{className:"form-group col-md-12 row"},a&&s.createElement(B,{loadingText:"Retrieving Remote Text Track"}),!a&&s.createElement("div",{className:"col-md-10"},s.createElement("input",{className:"form-control",placeholder:"Add URL",onChange:this.handleUploadUrlChange}),o&&o.file&&s.createElement("div",{style:{fontSize:"smaller"}},i)),s.createElement("div",{className:"col-md-2"},s.createElement(A.a,{bsStyle:l?"primary":"default",disabled:!l,onClick:this.fetchUrlUpload},"Upload"))),r===me.RemoteUrl&&s.createElement("div",{className:"form-group col-md-12"},s.createElement("input",{className:"form-control",type:"url",placeholder:"Add URL",value:o.src,onChange:this.handleSrcChange})),s.createElement("table",{className:"table table-striped"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("td",null,s.createElement("label",{className:"required"},"Language")),s.createElement("td",null,s.createElement("label",null,"Label")),s.createElement("td",null,s.createElement("label",{className:""},"Kind")))),s.createElement("tbody",null,s.createElement("tr",null,s.createElement("td",null,s.createElement("select",{className:"form-control",value:o.srclang,onChange:this.handleSrcLangChange},we.map((function(e,t){return s.createElement("option",{key:t},e)})))),s.createElement("td",null,s.createElement("input",{className:"form-control",type:"text",value:o.label,onChange:this.handleLabelChange})),s.createElement("td",null,s.createElement("select",{className:"form-control",value:o.kind,onChange:this.handleKindChange},s.createElement("option",null,"captions"),s.createElement("option",null,"subtitles"),s.createElement("option",null,"descriptions"),s.createElement("option",null,"chapters"),s.createElement("option",null,"metadata"))))),s.createElement("tfoot",null,s.createElement("tr",null,s.createElement("td",null,s.createElement(A.a,{bsStyle:c?"primary":"default",onClick:this.handleAddTextTrack,disabled:!c},"Add"))))),t.textTracks&&s.createElement("table",{className:"table table-striped"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("td",null,"Label"),s.createElement("td",null,"Language"),s.createElement("td",null,"Kind"),s.createElement("td",null,"Default"),s.createElement("td",{style:{width:"100px"}}))),s.createElement("tbody",null,t.textTracks.map((function(t,n){return s.createElement("tr",{key:n},s.createElement("td",null,t.label),s.createElement("td",null,t.srclang),s.createElement("td",null,t.kind),s.createElement("td",{className:"text-center",style:{width:"50px"}},s.createElement("div",{className:"checkbox"},s.createElement("label",null,s.createElement("input",{type:"checkbox",checked:!0===t.default,onChange:function(n){return e.handleDefaultTextTrackChange(t,n)}})))),s.createElement("td",null,s.createElement(A.a,{bsStyle:"link",onClick:function(){return e.handleRemoveTextTrack(t)}},"Remove")))}))))))}}]),t}(s.Component),Object(f.a)(be.prototype,"fetchUrlUpload",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"fetchUrlUpload"),be.prototype),Object(f.a)(be.prototype,"validateAddTextTrack",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"validateAddTextTrack"),be.prototype),Object(f.a)(be.prototype,"validateUrlUpload",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"validateUrlUpload"),be.prototype),Object(f.a)(be.prototype,"handleTextTrackAddModeChange",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleTextTrackAddModeChange"),be.prototype),Object(f.a)(be.prototype,"handleFileUpload",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleFileUpload"),be.prototype),Object(f.a)(be.prototype,"handleUploadUrlChange",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleUploadUrlChange"),be.prototype),Object(f.a)(be.prototype,"handleSrcChange",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleSrcChange"),be.prototype),Object(f.a)(be.prototype,"handleSrcLangChange",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleSrcLangChange"),be.prototype),Object(f.a)(be.prototype,"handleLabelChange",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleLabelChange"),be.prototype),Object(f.a)(be.prototype,"handleKindChange",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleKindChange"),be.prototype),Object(f.a)(be.prototype,"handleAddTextTrack",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleAddTextTrack"),be.prototype),Object(f.a)(be.prototype,"handleRemoveTextTrack",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleRemoveTextTrack"),be.prototype),Object(f.a)(be.prototype,"handleDefaultTextTrackChange",[b.a],Object.getOwnPropertyDescriptor(be.prototype,"handleDefaultTextTrackChange"),be.prototype),be),Ce=(n(1055),function(e){var t=Object(s.useState)(!1),n=Object(x.a)(t,1)[0],r=Object(s.useState)(!0),o=Object(x.a)(r,2),a=o[0],c=o[1],l=Object(s.useState)(!1),u=Object(x.a)(l,2),p=u[0],d=u[1],h=Object(s.useState)(Object(Y.getDefaultPlaylistSearchParameters)()),f=Object(x.a)(h,2),y=f[0],g=f[1],v=Object(s.useState)(""),b=Object(x.a)(v,2),P=b[0],O=b[1],_=Object(s.useState)([]),k=Object(x.a)(_,2),I=k[0],F=k[1],N=Object(s.useState)(),U=Object(x.a)(N,2),D=U[0],M=U[1],V=Object(s.useState)(le.getDefaultBrightcovePlaylistProps()),L=Object(x.a)(V,2),W=L[0],Q=L[1],G=e.accountId,z=e.connectorContext,H=e.onAccountChange,q=z.bcApiGateway,$=function(){var e=Object(E.a)(w.a.mark((function e(t,n){var r,o,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return c(!0),r=q.playlistsApi,o=z.getBCPlaylistSearchParams(n),e.next=7,r.getPlaylists(t,o);case 7:a=e.sent,F(a),c(!1);case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),J=function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g(t),e.next=3,$(G,t);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();Object(s.useEffect)((function(){var e=Object(C.find)(z.availableAccounts,(function(e){return e.accountId===G}));e&&O(e.defaultPlaylistPlayerId),$(G,y)}),[G,y]);return n?s.createElement(B,{loadingText:"Creating New Playlist..."}):s.createElement(s.Fragment,null,s.createElement("ol",{className:"breadcrumb"},s.createElement("li",null,s.createElement(m.b,{to:"/"},"Brightcove Management")),s.createElement("li",{className:"active"},"Manage Playlists")),s.createElement("div",{className:"search form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-md-3 control-label"},"Select Account:")," ",s.createElement("div",{className:"col-md-9"},s.createElement(S,{availableAccounts:z.availableAccounts,selectedAccountId:G,onChange:function(e){G!==e.accountId&&H&&H(e.accountId)}})))),s.createElement("div",{className:"search form-horizontal"},G&&s.createElement(s.Fragment,null,s.createElement(Ie,{accountId:G,labelClass:"col-md-3 control-label",controlClass:"col-md-9",searchParameters:y,onSearchParametersChanged:J,onSearchForPlaylists:$}),a&&s.createElement(B,{loadingText:"Loading Playlists..."}),!a&&I&&s.createElement(s.Fragment,null,s.createElement(R.BootstrapTable,{data:I,striped:!0,bordered:!1},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:function(e,t){var n="/".concat(G,"/manage-playlists/").concat(t.id,"/edit");return s.createElement(s.Fragment,null,s.createElement(m.b,{to:n},t.name),s.createElement("br",null),t.video_ids&&t.video_ids.length>0&&s.createElement(s.Fragment,null,s.createElement("div",{style:{fontSize:"small"}},"Video IDs in list: "),s.createElement("div",{style:{fontSize:"xx-small"}},t.video_ids.map((function(e,t){return s.createElement("span",{key:t,style:{paddingLeft:"5px",float:"left"}},e)})))),(!t.video_ids||0===t.video_ids.length)&&t.type===ve.BCPlaylistType.Manual&&s.createElement("i",null,"This playlist does not contain any videos."),(!t.video_ids||0===t.video_ids.length)&&t.type!==ve.BCPlaylistType.Manual&&s.createElement("i",null,"This playlist is a Smart Playlist"))},dataSort:!0},"Name"),s.createElement(R.TableHeaderColumn,{dataField:"description",dataSort:!0},"Short Description"),s.createElement(R.TableHeaderColumn,{dataField:"type",dataSort:!0,dataFormat:function(e){return e===ve.BCPlaylistType.Manual?"Manual Playlist":"Smart Playlist"}},"Type"),s.createElement(R.TableHeaderColumn,{dataField:"id",dataSort:!0,isKey:!0},"ID"),s.createElement(R.TableHeaderColumn,{width:"90",dataFormat:function(e,t){var n="/".concat(G,"/manage-playlists/").concat(t.id,"/edit");return s.createElement("div",{className:"result text-center"},s.createElement("div",null,s.createElement(m.b,{className:"btn btn-link",style:{width:"70px"},to:n},"Edit")),s.createElement("div",null,s.createElement(A.a,{bsStyle:"success",style:{width:"70px"},bsSize:"small",onClick:function(){return e=t.id,n=t.name,W.accountId=G,W.playerId=P,W.modeId=e,W.sharepointVersion=z.spAddinContext.SPProductNumber,M(n),Q(W),void d(!0);var e,n}},"Embed")))}},"Edit Link")),s.createElement("hr",null),s.createElement(m.b,{className:"btn btn-default btn-lg",to:"/".concat(G,"/manage-playlists/new")},s.createElement(j.a,{icon:T.f}),"\xa0Add New Playlist"),s.createElement("hr",null)),s.createElement(X.a,{className:"embed",show:p,onHide:function(){M(void 0),Q(le.getDefaultBrightcovePlaylistProps()),d(!1)},bsSize:"large"},s.createElement(X.a.Header,{closeButton:!0},s.createElement(X.a.Title,null,"Embed Playlist")),s.createElement(X.a.Body,null,W&&s.createElement(Ke,{layoutMode:i.Full,bcPlayerProps:W,playlistTitle:D||"",defaultPlaylistPlayerId:P,doesEmbedHelperExist:z.doesEmbedHelperExist,spAddinContext:z.spAddinContext,spApiGateway:z.spApiGateway,showUploadWebPartButton:!1,retrieveAllPlayers:z.retrieveAllPlayers,onPlayerPropsChanged:function(e){Q(e)}})),s.createElement(X.a.Footer,null)))))}),Se=(n(1056),{name:"New Playlist",description:"",favorite:!1,id:"",reference_id:"",type:ve.BCPlaylistType.Manual,video_ids:[],search:"",account_id:""}),_e=(Pe=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isLoadingPlaylist:!0,isSavingPlaylist:!1,playlistType:"Manual",isLoadingAvailableVideos:!1,availableVideosSearchTerms:"",availableVideos:[],selectedAvailableVideos:[],isLoadingPlaylistVideos:!1,playlistVideos:[],selectedPlaylistVideos:[],playlist:Object(C.cloneDeep)(Se),originalPlaylist:Object(C.cloneDeep)(Se),showDeleteModal:!1},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.bcApiGateway,r=t.accountId,!(o=t.playlistId)){e.next=9;break}return a=n.playlistsApi,e.next=5,a.getPlaylistById(r,o);case 5:i=e.sent,this.setState({isLoadingPlaylist:!1,playlist:Object(C.cloneDeep)(i),originalPlaylist:i}),e.next=10;break;case 9:this.setState({isLoadingPlaylist:!1});case 10:this.getAvailableVideos(),this.getVideosInPlaylist();case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getAvailableVideos",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.bcApiGateway,r=t.accountId,o=this.state.availableVideosSearchTerms,this.setState({isLoadingAvailableVideos:!0}),a=n.videosApi,e.next=6,a.getVideos(r,{limit:1e3,sort:"name",q:o});case 6:i=e.sent,this.setState({isLoadingAvailableVideos:!1,availableVideos:i,selectedAvailableVideos:[]});case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getVideosInPlaylist",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.bcApiGateway,r=t.accountId,o=t.playlistId){e.next=3;break}return e.abrupt("return");case 3:return this.setState({isLoadingPlaylistVideos:!0}),a=n.playlistsApi,e.next=7,a.getVideosInPlaylist(r,o);case 7:i=e.sent,this.setState({isLoadingPlaylistVideos:!1,playlistVideos:i,selectedPlaylistVideos:[]});case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"toggleSelectAvailableVideo",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.state.selectedAvailableVideos,(r=Object(C.find)(n,(function(e){return e.id===t.id})))?Object(C.pull)(n,r):n.push(t),this.setState({selectedAvailableVideos:n});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"toggleSelectPlaylistVideo",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.state.selectedPlaylistVideos,(r=Object(C.find)(n,(function(e){return e.id===t.id})))?Object(C.pull)(n,r):n.push(t),this.setState({selectedPlaylistVideos:n});case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"addSelectedAvailableVideos",value:function(){var e=this.state,t=e.playlist,n=e.playlistVideos,r=e.selectedAvailableVideos,o=!0,a=!1,i=void 0;try{for(var s,c=r[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var l=s.value;n.push(l)}}catch(u){a=!0,i=u}finally{try{o||null==c.return||c.return()}finally{if(a)throw i}}t.video_ids=Object(C.map)(n,"id"),this.setState({playlist:t,playlistVideos:n,selectedAvailableVideos:[],selectedPlaylistVideos:[]})}},{key:"removeSelectedPlaylistVideos",value:function(){var e=this.state,t=e.playlist,n=e.selectedPlaylistVideos,r=this.state.playlistVideos;r=Object(C.pullAllWith)(r,n,(function(e,t){return e.id===t.id})),t.video_ids=Object(C.map)(r,"id"),this.setState({playlist:t,playlistVideos:r,selectedAvailableVideos:[],selectedPlaylistVideos:[]})}},{key:"moveSelectedPlaylistVideoUp",value:function(){var e=this.state,t=e.playlist,n=e.playlistVideos,r=e.selectedPlaylistVideos;if(1===r.length){var o=Object(C.findIndex)(n,{id:r[0].id});if(0!==o){var a=Object(C.pullAt)(n,o);n.splice(o-1,0,a[0]),t.video_ids=Object(C.map)(n,"id"),this.setState({playlist:t,playlistVideos:n})}}}},{key:"moveSelectedPlaylistVideoDown",value:function(){var e=this.state,t=e.playlist,n=e.playlistVideos,r=e.selectedPlaylistVideos;if(1===r.length){var o=Object(C.findIndex)(n,{id:r[0].id});if(o!==n.length-1){var a=Object(C.pullAt)(n,o);n.splice(o+1,0,a[0]),t.video_ids=Object(C.map)(n,"id"),this.setState({playlist:t,playlistVideos:n})}}}},{key:"parseSearchField",value:function(){var e=this.state.playlist,t=/(\+?)tags:(.*)/g;if(!e.search||!e.search.match(t))return{tagsType:"any",tags:""};var n=t.exec(e.search);return n?{tagsType:"+"===n[1]?"all":"any",tags:n[2]}:{tagsType:"any",tags:""}}},{key:"populateSearchField",value:function(e,t){var n=this.state.playlist,r=this.parseSearchField();null!==e&&(r.tagsType=e),null!==t&&(r.tags=t),"all"===r.tagsType?n.search="+tags:".concat(r.tags):n.search="tags:".concat(r.tags),this.setState({playlist:n})}},{key:"previewSmartPlaylistVideos",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.bcApiGateway,r=t.accountId,o=this.parseSearchField(),this.setState({isLoadingPlaylistVideos:!0,playlistVideos:[]}),a=n.videosApi,e.next=6,a.getVideos(r,{limit:30,sort:"name",q:"".concat(o.tags?"+":"","tags:").concat(o.tags)});case 6:i=e.sent,this.setState({isLoadingPlaylistVideos:!1,playlistVideos:i});case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"showDeleteModal",value:function(){this.setState({showDeleteModal:!0})}},{key:"deleteCancel",value:function(){this.setState({showDeleteModal:!1})}},{key:"deleteConfirm",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.bcApiGateway,r=t.accountId,o=t.playlistId){e.next=3;break}return e.abrupt("return");case 3:return this.setState({isSavingPlaylist:!0}),a=n.playlistsApi,e.next=7,a.deletePlaylist(r,o);case 7:window.location.hash="#/".concat(r,"/manage-playlists");case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"handleInputChange",value:function(e){var t=this.state.playlist,n=e.target,r="checkbox"===n.type?n.checked:n.value,o=n.name;"limit"===o?t.limit=parseInt(r.toString(),10):t[o]=r,this.setState({playlist:t})}},{key:"handlePlaylistTypeChange",value:function(e){var t=this.state,n=t.playlist,r=t.originalPlaylist;switch(e.target.value){case"Manual":n.type=ve.BCPlaylistType.Manual;break;case"Smart":r.type!==ve.BCPlaylistType.Manual?n.type=r.type:n.type=ve.BCPlaylistType.ActivatedDateNewestFirst;break;default:n.type=e.target.value}this.setState({playlist:n})}},{key:"handleAvailableVideosSearchTermsChange",value:function(e){this.setState({availableVideosSearchTerms:e.target.value})}},{key:"createOrUpdatePlaylist",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.bcApiGateway,r=t.accountId,o=t.playlistId,a=this.state.playlist,this.setState({isSavingPlaylist:!0}),i=n.playlistsApi,o){e.next=9;break}return e.next=7,i.createPlaylist(r,a);case 7:e.next=11;break;case 9:return e.next=11,i.updatePlaylist(r,o,a);case 11:window.location.hash="#/".concat(r,"/manage-playlists");case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.props,n=t.playlistId,r=t.accountId,o=this.state,a=o.isSavingPlaylist,i=o.isLoadingPlaylist,c=o.playlist,l=o.originalPlaylist,u=o.availableVideosSearchTerms,p=o.availableVideos,d=o.selectedAvailableVideos,h=o.playlistVideos,f=o.selectedPlaylistVideos;if(a)return s.createElement(B,{loadingText:"Saving Playlist..."});if(i)return s.createElement(B,{loadingText:"Loading Playlist..."});var g=c.type&&"EXPLICIT"===c.type.toString()?"Manual":"Smart",v=!!n&&Object(C.isEqual)(c,l),b=Object(C.differenceWith)(p,c.video_ids||[],(function(e,t){return e.id===t})),P=d.length>0,w=f.length>0;return s.createElement(s.Fragment,null,s.createElement("ol",{className:"breadcrumb"},s.createElement("li",null,s.createElement(m.b,{to:"/"},"Brightcove Management")),s.createElement("li",null,s.createElement(m.b,{to:"/".concat(r,"/manage-playlists")},"Manage Playlists")),s.createElement("li",null,s.createElement(m.b,{to:"/".concat(r,"/manage-playlists")},"Account ",r)),s.createElement("li",{className:"active"},"Playlist ",n)),s.createElement("div",null,s.createElement("label",null,"Name: "),s.createElement("input",{name:"name",type:"text",className:"form-control",value:c.name,onChange:this.handleInputChange}),s.createElement("label",null,"Description: "),s.createElement("input",{name:"description",type:"text",id:"txtDescription",className:"form-control",value:c.description||"",onChange:this.handleInputChange}),s.createElement("label",null,"Type: "),s.createElement("select",{className:"form-control",value:g,onChange:this.handlePlaylistTypeChange},s.createElement("option",null,"Manual"),s.createElement("option",null,"Smart")),s.createElement("hr",null),c.type&&"EXPLICIT"===c.type.toString()&&s.createElement(s.Fragment,null,s.createElement("div",{className:"heading"},"Manual Playlist Settings"),s.createElement("div",{className:"row"},s.createElement("div",{className:"availableVideoSearch col-md-5"},s.createElement("label",null,"Available Videos"),s.createElement("div",{className:"input-group"},s.createElement("input",{type:"search",placeholder:"Search",className:"form-control",value:u,onKeyPress:function(t){return"Enter"===t.key&&e.getAvailableVideos()},onChange:this.handleAvailableVideosSearchTermsChange}),s.createElement("div",{className:"input-group-btn searchButton"},s.createElement(A.a,{onClick:this.getAvailableVideos},"\xa0",s.createElement("i",{className:"glyphicon glyphicon-search"}))))),s.createElement("div",{className:"col-md-2"}),s.createElement("div",{className:"playlistOrder col-md-5"},s.createElement("label",null,"Videos in this Playlist"),s.createElement("br",null),s.createElement("span",{style:{paddingRight:"5px"}},"Move Video"),s.createElement("div",{className:"buttons btn-group btn-group-sm"},s.createElement(A.a,{disabled:1!==f.length,onClick:this.moveSelectedPlaylistVideoUp},"Up"),s.createElement(A.a,{disabled:1!==f.length,onClick:this.moveSelectedPlaylistVideoDown},"Down")))),s.createElement("div",{className:"row"},s.createElement("div",{className:"col-md-5"},s.createElement("div",{className:"availableVideos col-md-12"},b.map((function(t){var n=!!Object(C.find)(d,(function(e){return e.id===t.id}))?"video videoSelected row":"video row",r=Object(C.get)(t,"images.thumbnail.src");return s.createElement("div",{key:t.id,className:n,onClick:function(){return e.toggleSelectAvailableVideo(t)}},s.createElement("img",{className:"resultImage col-md-6",src:r,alt:""}),s.createElement("div",{className:"title col-md-6"},s.createElement("div",null,t.name),s.createElement("div",null,"video id: ",t.id)))})))),s.createElement("div",{className:"overButtons col-md-2"},s.createElement(A.a,{disabled:!P,onClick:this.addSelectedAvailableVideos},">>"," "),s.createElement("br",null),s.createElement(A.a,{disabled:!w,onClick:this.removeSelectedPlaylistVideos},"<<"," ")),s.createElement("div",{className:"col-md-5"},s.createElement("div",{className:"playlistVideos container col-md-12"},h.map((function(t){var n=!!Object(C.find)(f,(function(e){return e.id===t.id}))?"video videoSelected row":"video row",r=Object(C.get)(t,"images.thumbnail.src");return s.createElement("div",{key:t.id,className:n,onClick:function(){return e.toggleSelectPlaylistVideo(t)}},s.createElement("img",{className:"resultImage col-md-6",src:r,alt:""}),s.createElement("div",{className:"title col-md-6"},s.createElement("div",null,t.name),s.createElement("div",null,"video id: ",t.id)))})))))),c.type&&"EXPLICIT"!==c.type.toString()&&s.createElement(s.Fragment,null,s.createElement("div",{className:"heading"},"Smart Playlist Settings"),s.createElement("div",{className:"settingsText"},"Videos will be automatically added to this Playlist based on the following settings:"),s.createElement("div",{className:"row"},s.createElement("div",{className:"col-md-12"},s.createElement("label",null,"Tags:"),s.createElement("select",{className:"form-control",value:this.parseSearchField().tagsType,onChange:function(t){e.populateSearchField("any"===t.target.value?"any":"all",null)}},s.createElement("option",{value:"any"},"Contain one or more"),s.createElement("option",{value:"all"},"Contain all")),s.createElement("br",null),s.createElement("label",{style:{fontWeight:"normal"}},"of the following:"),s.createElement("input",{type:"text",className:"form-control",value:this.parseSearchField().tags,onChange:function(t){return e.populateSearchField(null,t.target.value)}}),s.createElement("br",null),s.createElement("label",null,"Order:"),s.createElement("select",{className:"form-control",value:c.type,onChange:this.handlePlaylistTypeChange},s.createElement("option",{value:"ACTIVATED_OLDEST_TO_NEWEST"},"Activated Date (Oldest First)"),s.createElement("option",{value:"ACTIVATED_NEWEST_TO_OLDEST"},"Activated Date (Newest First)"),s.createElement("option",{value:"ALPHABETICAL"},"Video Name (A-Z)"),s.createElement("option",{value:"PLAYS_TOTAL"},"Total Plays"),s.createElement("option",{value:"PLAYS_TRAILING_WEEK"},"Trailing Week Plays"),s.createElement("option",{value:"START_DATE_OLDEST_TO_NEWEST"},"Start Date (Oldest First)"),s.createElement("option",{value:"START_DATE_NEWEST_TO_OLDEST"},"Start Date (Newest First)")),s.createElement("br",null),s.createElement("label",null,"Limit to: "),s.createElement("input",{name:"limit",type:"text",style:{width:"50px"},className:"form-control",value:c.limit,onChange:this.handleInputChange})),s.createElement(A.a,{className:"pull-right",onClick:this.previewSmartPlaylistVideos},"Preview")),s.createElement("div",{className:"row"},s.createElement("div",{className:"col-md-12"},s.createElement("label",null,"Videos in this Playlist: "),s.createElement("br",null),s.createElement("div",{className:"availableVideos container col-md-12"},h.map((function(e){var t=Object(C.get)(e,"images.thumbnail.src");return s.createElement("div",{key:e.id,className:"video row"},s.createElement("img",{className:"resultImage col-md-5",src:t,alt:""}),s.createElement("div",{className:"title col-md-7"},s.createElement("div",null,e.name),s.createElement("div",null,"video id: ",e.id)))}))))))),s.createElement("hr",null),s.createElement("div",{className:"pull-right"},s.createElement(A.a,{className:"btn-space",bsStyle:v?"default":"primary",disabled:v,onClick:this.createOrUpdatePlaylist},n?"Save":"Create"),s.createElement(A.a,{className:"btn-space",bsStyle:"warning",disabled:!n,onClick:this.showDeleteModal},"Delete Playlist"),s.createElement(m.b,{className:"btn btn-default btn-space",to:"/".concat(r,"/manage-playlists")},"Cancel")),s.createElement(X.a,{show:this.state.showDeleteModal,onHide:this.deleteCancel},s.createElement(X.a.Header,{closeButton:!0},s.createElement(X.a.Title,null,"Confirm Playlist Deletion")),s.createElement(X.a.Body,null,s.createElement("h5",null,"This playlist will be permanently deleted. Are you sure you want to proceed?")),s.createElement(X.a.Footer,null,s.createElement(A.a,{onClick:this.deleteConfirm,bsStyle:"danger"},"Delete Playlist"),s.createElement(A.a,{onClick:this.deleteCancel},"Cancel"))),s.createElement(y.a,{when:!v,message:"There are unsaved changes. Are you sure you wish to leave?"}))}}]),t}(s.Component),Object(f.a)(Pe.prototype,"getAvailableVideos",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"getAvailableVideos"),Pe.prototype),Object(f.a)(Pe.prototype,"getVideosInPlaylist",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"getVideosInPlaylist"),Pe.prototype),Object(f.a)(Pe.prototype,"toggleSelectAvailableVideo",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"toggleSelectAvailableVideo"),Pe.prototype),Object(f.a)(Pe.prototype,"toggleSelectPlaylistVideo",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"toggleSelectPlaylistVideo"),Pe.prototype),Object(f.a)(Pe.prototype,"addSelectedAvailableVideos",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"addSelectedAvailableVideos"),Pe.prototype),Object(f.a)(Pe.prototype,"removeSelectedPlaylistVideos",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"removeSelectedPlaylistVideos"),Pe.prototype),Object(f.a)(Pe.prototype,"moveSelectedPlaylistVideoUp",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"moveSelectedPlaylistVideoUp"),Pe.prototype),Object(f.a)(Pe.prototype,"moveSelectedPlaylistVideoDown",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"moveSelectedPlaylistVideoDown"),Pe.prototype),Object(f.a)(Pe.prototype,"parseSearchField",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"parseSearchField"),Pe.prototype),Object(f.a)(Pe.prototype,"populateSearchField",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"populateSearchField"),Pe.prototype),Object(f.a)(Pe.prototype,"previewSmartPlaylistVideos",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"previewSmartPlaylistVideos"),Pe.prototype),Object(f.a)(Pe.prototype,"showDeleteModal",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"showDeleteModal"),Pe.prototype),Object(f.a)(Pe.prototype,"deleteCancel",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"deleteCancel"),Pe.prototype),Object(f.a)(Pe.prototype,"deleteConfirm",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"deleteConfirm"),Pe.prototype),Object(f.a)(Pe.prototype,"handleInputChange",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"handleInputChange"),Pe.prototype),Object(f.a)(Pe.prototype,"handlePlaylistTypeChange",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"handlePlaylistTypeChange"),Pe.prototype),Object(f.a)(Pe.prototype,"handleAvailableVideosSearchTermsChange",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"handleAvailableVideosSearchTermsChange"),Pe.prototype),Object(f.a)(Pe.prototype,"createOrUpdatePlaylist",[b.a],Object.getOwnPropertyDescriptor(Pe.prototype,"createOrUpdatePlaylist"),Pe.prototype),Pe);var ke,je,Te,Ie=function(e){var t=e.accountId,n=e.searchParameters,r=e.onSearchForPlaylists,o=e.onSearchParametersChanged,a=e.labelClass,i=e.controlClass,c=e.formControlClass,l=Object(s.useState)(n.searchTerms),u=Object(x.a)(l,2),p=u[0],d=u[1],h=n.sortField,f=n.sortOrder,m=function(e,t){var n=Object(s.useState)(e),r=Object(x.a)(n,2),o=r[0],a=r[1];return Object(s.useEffect)((function(){var n=setTimeout((function(){a(e)}),t);return function(){clearTimeout(n)}}),[e,t]),o}(p,500);Object(s.useEffect)((function(){n.searchTerms=m,o(n,"searchTerms")}),[m]);var y=function(e){n.sortField=e,o(n)},g=function(e){n.sortOrder=e,o(n)};return s.createElement(s.Fragment,null,s.createElement("div",{className:"form-group"},s.createElement("label",{className:a},"Available Playlists:"),s.createElement("div",{className:i},s.createElement("div",{className:"input-group"},s.createElement("input",{type:"search",placeholder:"Playlist Filter",className:"form-control ".concat(c),value:p,onKeyPress:function(e){return"Enter"===e.key&&d(p)},onChange:function(e){return d(e.target.value)}}),s.createElement("div",{className:"input-group-btn"},s.createElement(A.a,{bsSize:"input-xs"===c?"small":void 0,onClick:function(){return r(t,n)}},"\xa0",s.createElement("i",{className:"glyphicon glyphicon-search"})))))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:a},"Sort results by: "),s.createElement("div",{className:i},s.createElement("div",{className:"input-group"},s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:h===Y.PlaylistSortField.DisplayName,onChange:function(){return y(Y.PlaylistSortField.DisplayName)}}),"display name"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:h===Y.PlaylistSortField.ModifiedDate,onChange:function(){return y(Y.PlaylistSortField.ModifiedDate)}}),"modified date")))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:a},"Order: "),s.createElement("div",{className:i},s.createElement("div",{className:"input-group"},s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:f===Y.SortOrder.Ascending,onChange:function(){return g(Y.SortOrder.Ascending)}}),"ascending"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",checked:f===Y.SortOrder.Descending,onChange:function(){return g(Y.SortOrder.Descending)}}),"descending")))))},Ae=(ke=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isLoading:!1,playlistSearchParameters:Object(Y.getDefaultPlaylistSearchParameters)(),playlists:[],videoSearchParameters:Object(Y.getDefaultVideoSearchParameters)(),videos:[]},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=this.props.bcExperienceProps).overrideExperienceVideos&&this.loadOverrideItems(t.experienceOverrideMode||je.Videos);case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"searchForVideos",value:function(){var e=Object(E.a)(w.a.mark((function e(t,n){var r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.connectorContext,o=r.bcApiGateway.videosApi,t){e.next=4;break}return e.abrupt("return");case 4:return this.setState({isLoading:!0}),e.next=7,r.getBCVideoSearchParams(n);case 7:return a=e.sent,e.next=10,o.getVideos(t,a);case 10:i=e.sent,n.folderId&&(i=Object(C.filter)(i,{folder_id:n.folderId})),this.setState({isLoading:!1,videos:i});case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"searchForPlaylists",value:function(){var e=Object(E.a)(w.a.mark((function e(t,n){var r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.props.connectorContext,o=r.bcApiGateway.playlistsApi,t){e.next=4;break}return e.abrupt("return");case 4:return this.setState({isLoading:!0}),e.next=7,r.getBCPlaylistSearchParams(n);case 7:return a=e.sent,e.next=10,o.getPlaylists(t,a);case 10:i=e.sent,this.setState({isLoading:!1,playlists:i});case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleEmbedTypeChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged;n.embedType=e.target.value,"Standard"===n.embedType&&(n.sizing="Fixed"),"Advanced"===n.embedType&&(n.overrideExperienceVideos=!1),r(n)}},{key:"handleSizingChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged;n.sizing=e.target.value,r(n)}},{key:"handleOverrideWidthChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged;n.overrideWidth=e.target.checked,r(n)}},{key:"handlePlayerWidthChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged;n.playerWidth=e.target.value,r(n)}},{key:"handleOverrideHeightChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged;n.overrideHeight=e.target.checked,r(n)}},{key:"handlePlayerHeightChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged;n.playerHeight=e.target.value,r(n)}},{key:"handlePlayerUnitsChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged;n.playerUnits=e.target.value,r(n)}},{key:"handleOverrideExperienceVideosChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged;n.overrideExperienceVideos=e.target.checked,n.experienceOverrideMode=n.experienceOverrideMode||je.Videos,e.target.checked&&this.handleExperienceOverrideModeChange(n.experienceOverrideMode),r(n)}},{key:"loadOverrideItems",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t,e.next=e.t0===je.Playlist?3:e.t0===je.Videos?6:9;break;case 3:return n=this.state.playlistSearchParameters,this.searchForPlaylists(this.props.accountId,n),e.abrupt("break",10);case 6:return r=this.state.videoSearchParameters,this.searchForVideos(this.props.accountId,r),e.abrupt("break",10);case 9:throw new Error("Unknown or unsupported experience override mode.");case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleExperienceOverrideModeChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged,o=e;this.loadOverrideItems(o),n.experienceOverrideMode=o,n.experienceOverrideModeIds=[],r(n)}},{key:"handleVideoSearchParametersChanged",value:function(e,t){this.setState({videoSearchParameters:e}),"searchTerms"!==t&&this.searchForVideos(this.props.accountId,e)}},{key:"handlePlaylistSearchParametersChanged",value:function(e,t){this.setState({playlistSearchParameters:e}),"searchTerms"!==t&&this.searchForPlaylists(this.props.accountId,e)}},{key:"handlePlaylistSelected",value:function(e,t){var n=this.props,r=n.bcExperienceProps,o=n.onExperiencePropsChanged;r.experienceOverrideModeIds=t?[e.id]:[],o(r)}},{key:"handleAllVideosSelected",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged,o=this.state.videos;return n.experienceOverrideModeIds=e?Object(C.map)(o,"id"):[],r(n),!0}},{key:"handleVideoSelected",value:function(e,t){var n=this.props,r=n.bcExperienceProps,o=n.onExperiencePropsChanged;r.experienceOverrideModeIds=Object(C.without)(r.experienceOverrideModeIds,e.id),t&&r.experienceOverrideModeIds.push(e.id),o(r)}},{key:"renderPlaylistNameCell",value:function(e,t){var n=this.props.bcExperienceProps;return s.createElement("div",{className:"row"},s.createElement("div",{className:"col-xs-12"},s.createElement(m.b,{className:"small",to:"/".concat(n.accountId,"/manage-playlists/").concat(t.id,"/edit"),target:"_blank"},t.name),s.createElement("div",{className:"small"},t.id)))}},{key:"renderVideoNameCell",value:function(e,t){var n=this.props.bcExperienceProps;return s.createElement("div",{className:"row"},t.images&&t.images.thumbnail&&s.createElement("img",{className:"col-xs-2",src:t.images.thumbnail.src,alt:""}),s.createElement("div",{className:"col-xs-10"},s.createElement(m.b,{className:"small",to:"/".concat(n.accountId,"/manage-videos/").concat(t.id,"/edit"),target:"_blank"},t.name),s.createElement("div",{className:"small"},t.id)))}},{key:"render",value:function(){var e=this.props,t=e.connectorContext,n=e.accountId,r=e.labelClass,o=e.controlClass,a=e.formControlClass,i=e.bcExperienceProps,c=e.showEmbedCustomizations,l=e.showAdvancedEmbedCustomizations,u=e.disableOverrideForJavaScriptEmbeds,p=this.state,d=p.isLoading,h=p.videoSearchParameters,f=p.playlistSearchParameters,m=p.videos,y=p.playlists,g={mode:"radio",clickToSelect:!0,className:"info",onSelect:this.handlePlaylistSelected,selected:i.experienceOverrideModeIds},v={mode:"checkbox",clickToSelect:!0,className:"info",onSelect:this.handleVideoSelected,onSelectAll:this.handleAllVideosSelected,selected:i.experienceOverrideModeIds};return s.createElement(s.Fragment,null,!0===c&&s.createElement(s.Fragment,null,s.createElement("div",{className:"form-group"},s.createElement("label",{className:r},"Embed Type"),s.createElement("div",{className:o},s.createElement("div",{className:"input-group ".concat(a)},s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",name:"embedType",value:"Standard",checked:"Standard"===i.embedType,onChange:this.handleEmbedTypeChange})," iFrame"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",name:"embedType",value:"Advanced",checked:"Advanced"===i.embedType,onChange:this.handleEmbedTypeChange})," JavaScript")))),!0===l&&s.createElement(s.Fragment,null,s.createElement("div",{className:"form-group"},s.createElement("label",{className:r},"Sizing"),s.createElement("div",{className:o},s.createElement("div",{className:"input-group ".concat(a)},s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",name:"sizing",value:"Fixed",checked:"Fixed"===i.sizing,onChange:this.handleSizingChange})," Fixed"),s.createElement("label",{className:"radio-inline"},s.createElement("input",{type:"radio",name:"sizing",value:"Responsive",disabled:"Standard"===i.embedType,checked:"Responsive"===i.sizing,onChange:this.handleSizingChange})," ","Responsive")))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:r},"Layout Width"),s.createElement("div",{className:o},s.createElement("div",{className:"form-row"},s.createElement("div",{className:"col-xs-4"},s.createElement("div",{className:"input-group"},s.createElement("input",{className:"form-control ".concat(a),type:"number",placeholder:"auto",value:i.playerWidth,disabled:!i.overrideWidth||"Advanced"===i.embedType&&"Responsive"===i.sizing,onChange:this.handlePlayerWidthChange}),s.createElement("span",{className:"input-group-addon"},"px")))))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:r},"Layout Height"),s.createElement("div",{className:o},s.createElement("div",{className:"form-row"},s.createElement("div",{className:"col-xs-4"},s.createElement("div",{className:"input-group"},s.createElement("input",{className:"form-control ".concat(a),type:"number",placeholder:"auto",value:i.playerHeight,disabled:!i.overrideHeight||"Advanced"===i.embedType&&"Responsive"===i.sizing,onChange:this.handlePlayerHeightChange}),s.createElement("span",{className:"input-group-addon"},"px")))))))),(u&&"Standard"===i.embedType||!u)&&s.createElement("div",{className:"form-group"},s.createElement("label",{className:r},"Override Experience Videos"),s.createElement("div",{className:o},s.createElement("input",{className:"form-check-input",type:"checkbox",checked:i.overrideExperienceVideos,onChange:this.handleOverrideExperienceVideosChange}),"\xa0Check here if you would like to override the experience-defined videos with a custom video or playlist selection.")),i.overrideExperienceVideos&&s.createElement(J.a,{id:"OverrideExperienceVideosTabs",activeKey:i.experienceOverrideMode,onSelect:this.handleExperienceOverrideModeChange,style:{paddingBottom:"5px"}},s.createElement(K.a,{eventKey:je.Videos,title:"Videos"},s.createElement(Z,{accountId:n,connectorContext:t,showSearchTarget:!1,labelClass:r,controlClass:o,searchParameters:h,onSearchParametersChanged:this.handleVideoSearchParametersChanged,onSearchForVideos:this.searchForVideos}),d&&n&&s.createElement(B,{loadingText:"Loading Videos..."}),!d&&n&&s.createElement("div",{className:"well"},s.createElement(R.BootstrapTable,{data:m,striped:!0,bordered:!1,selectRow:v,height:"250"},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:this.renderVideoNameCell,formatExtraData:{accountId:n}},"Videos"),s.createElement(R.TableHeaderColumn,{dataField:"id",isKey:!0,hidden:!0},"ID")),s.createElement("hr",null))),s.createElement(K.a,{eventKey:je.Playlist,title:"Playlist"},s.createElement(Ie,{accountId:n,labelClass:r,controlClass:o,searchParameters:f,onSearchParametersChanged:this.handlePlaylistSearchParametersChanged,onSearchForPlaylists:this.searchForPlaylists}),d&&n&&s.createElement(B,{loadingText:"Loading Playlists..."}),!d&&n&&s.createElement("div",{className:"well"},s.createElement(R.BootstrapTable,{data:y,striped:!0,bordered:!1,selectRow:g,height:"250"},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:this.renderPlaylistNameCell,formatExtraData:{accountId:n}},"Playlist"),s.createElement(R.TableHeaderColumn,{dataField:"id",isKey:!0,hidden:!0},"ID")),s.createElement("hr",null)))))}}]),t}(s.Component),Object(f.a)(ke.prototype,"searchForVideos",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"searchForVideos"),ke.prototype),Object(f.a)(ke.prototype,"searchForPlaylists",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"searchForPlaylists"),ke.prototype),Object(f.a)(ke.prototype,"handleEmbedTypeChange",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handleEmbedTypeChange"),ke.prototype),Object(f.a)(ke.prototype,"handleSizingChange",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handleSizingChange"),ke.prototype),Object(f.a)(ke.prototype,"handleOverrideWidthChange",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handleOverrideWidthChange"),ke.prototype),Object(f.a)(ke.prototype,"handlePlayerWidthChange",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handlePlayerWidthChange"),ke.prototype),Object(f.a)(ke.prototype,"handleOverrideHeightChange",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handleOverrideHeightChange"),ke.prototype),Object(f.a)(ke.prototype,"handlePlayerHeightChange",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handlePlayerHeightChange"),ke.prototype),Object(f.a)(ke.prototype,"handlePlayerUnitsChange",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handlePlayerUnitsChange"),ke.prototype),Object(f.a)(ke.prototype,"handleOverrideExperienceVideosChange",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handleOverrideExperienceVideosChange"),ke.prototype),Object(f.a)(ke.prototype,"loadOverrideItems",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"loadOverrideItems"),ke.prototype),Object(f.a)(ke.prototype,"handleExperienceOverrideModeChange",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handleExperienceOverrideModeChange"),ke.prototype),Object(f.a)(ke.prototype,"handleVideoSearchParametersChanged",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handleVideoSearchParametersChanged"),ke.prototype),Object(f.a)(ke.prototype,"handlePlaylistSearchParametersChanged",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handlePlaylistSearchParametersChanged"),ke.prototype),Object(f.a)(ke.prototype,"handlePlaylistSelected",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handlePlaylistSelected"),ke.prototype),Object(f.a)(ke.prototype,"handleAllVideosSelected",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handleAllVideosSelected"),ke.prototype),Object(f.a)(ke.prototype,"handleVideoSelected",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"handleVideoSelected"),ke.prototype),Object(f.a)(ke.prototype,"renderPlaylistNameCell",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"renderPlaylistNameCell"),ke.prototype),Object(f.a)(ke.prototype,"renderVideoNameCell",[b.a],Object.getOwnPropertyDescriptor(ke.prototype,"renderVideoNameCell"),ke.prototype),ke),Fe=function(){function e(){Object(l.a)(this,e)}return Object(u.a)(e,null,[{key:"getDefaultBrightcoveExperienceProps",value:function(){return{connectorVersion:"4.1.4",embedType:"Advanced",sizing:"Responsive",overrideWidth:!0,playerWidth:"640",overrideHeight:!0,playerHeight:"640",playerUnits:Te.Pixels,overrideExperienceVideos:!1,experienceOverrideMode:je.Videos}}},{key:"getBrightcoveExperiencePropsFromQueryString",value:function(){var e=q()().query(!0),t={accountId:e.accountId,experienceId:e.experienceId,sharepointVersion:e.SPProductNumber,connectorVersion:"4.1.4",embedType:"Standard",sizing:"Responsive",overrideWidth:!0,playerWidth:"100",playerUnits:Te.Pct,overrideHeight:!1,overrideExperienceVideos:"true"===e.overrideExperienceVideos};if("Standard"===e.embedType||"Advanced"===e.embedType?t.embedType=e.embedType:t.embedType="Advanced","Fixed"===e.sizing||"Responsive"===e.sizing?t.sizing=e.sizing:t.sizing="Responsive",e.experienceOverrideMode)switch(e.experienceOverrideMode){case"0":t.experienceOverrideMode=je.Videos;break;case"1":t.experienceOverrideMode=je.Playlist;break;default:t.experienceOverrideMode=je.Videos}return e.experienceOverrideModeIds&&(t.experienceOverrideModeIds=e.experienceOverrideModeIds.split(",").map((function(e){return e.trim()}))),t}},{key:"augmentCurrentUriWithExperienceProps",value:function(e){var t=q()();if(t.setQuery("accountId",e.accountId||""),t.setQuery("experienceId",e.experienceId||""),t.setQuery("overrideExperienceVideos",!0===e.overrideExperienceVideos?"true":"false"),e.experienceOverrideMode)switch(e.experienceOverrideMode){case je.Videos:t.setQuery("experienceOverrideMode","0");break;case je.Playlist:t.setQuery("experienceOverrideMode","1");break;default:t.setQuery("experienceOverrideMode","0")}return e.embedType&&t.setQuery("embedType",e.embedType),e.sizing&&t.setQuery("sizing",e.sizing),e.experienceOverrideModeIds&&t.setQuery("experienceOverrideModeIds",e.experienceOverrideModeIds.join(",")),t.toString()}}]),e}();!function(e){e.Videos="Videos",e.Playlist="Playlist"}(je||(je={})),function(e){e.Pixels="px",e.Em="em",e.Pct="%"}(Te||(Te={}));var Ne,Ue,De,Me,Ve,Le,Be,Re,We,Qe,Ge,ze=n(45),He=n(87),qe=n(48),$e=n.n(qe),Je=(Ne=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isWebPartUploading:!1},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"handleExperiencePropsChanged",value:function(e){var t=this.props.onExperiencePropsChanged;e.embedCodeOverride=void 0,t&&t(e)}},{key:"handleEmbedCodeChange",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.onExperiencePropsChanged;n.embedCodeOverride=e.target.value,r&&r(n)}},{key:"addWebPartToPage",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.bcExperienceProps,r=t.connectorContext,o=r.spApiGateway,a=n.embedCodeOverride||this.generateExperienceEmbedCode(),e.next=5,o.spEmbedUtil.insertContentEditorWebPart(r.spAddinContext.Referrer,"Brightcove Experience","Brightcove Web Part to embed an experience onto a web part page.",a||"An error occurred.");case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getWebPartTitle",value:function(){var e=this.props,t=e.bcExperienceProps,n=e.experience,r="Brightcove Experience WebPart";if(!n||!t.accountId)return r;if(n.name){var o="javascript";"Standard"===t.embedType&&(o="iframe"),r="".concat(n.name,"-").concat(t.accountId,"-").concat(n.id,"-").concat(o)}return r}},{key:"uploadWebPartToGallery",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i,s,c,l,u,p;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.bcExperienceProps,r=t.connectorContext,o=t.experience,a=r.spApiGateway,i=r.spAddinContext,a&&i&&o&&n.accountId){e.next=4;break}return e.abrupt("return");case 4:return this.setState({isWebPartUploading:!0}),s=n.embedCodeOverride||this.generateExperienceEmbedCode(),c=this.getWebPartTitle(),l=ze.b.generateScriptEditorWebPart(c,"Adds a Brightcove Experience Embed onto classic and modern pages.",s||"An error occurred."),e.prev=8,u=$e()(),p="BrightcoveExperience-".concat(u.format("YYYY-MM-DD"),"-").concat(u.format("hh-mm-ss"),".webpart"),e.next=13,a.spEmbedUtil.uploadWebPartToGallery(l||"An error occurred.",p,"Brightcove Experiences");case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(8);case 17:ze.d.closeParentDialog(!0);case 18:case"end":return e.stop()}}),e,this,[[8,15]])})));return function(){return e.apply(this,arguments)}}()},{key:"downloadScriptEditorWebPart",value:function(){var e=this.props,t=e.bcExperienceProps;if(e.experience&&t.accountId){var n=t.embedCodeOverride||this.generateExperienceEmbedCode(),r=this.getWebPartTitle(),o=ze.b.generateScriptEditorWebPart(r,"Adds a Brightcove Experience Embed onto classic and modern pages.",n||"An error occurred."),a=$e()(),i="BrightcoveExperience-".concat(a.format("YYYY-MM-DD"),"-").concat(a.format("hh-mm-ss"),".webpart");He.saveAs(new Blob([o],{type:"text/plain;charset=utf-8"}),i)}}},{key:"generateExperienceEmbedCode",value:function(){var e=this.props,t=e.bcExperienceProps,n=e.experience;if(t.accountId&&n)return z.renderToStaticMarkup(s.createElement($,Object.assign({},t,{accountId:t.accountId,experienceId:n.id,experience:n}))).replace(/&amp;/g,"&").replace(/%3A/g,":")}},{key:"renderMini",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.connectorContext,o=t.showUploadWebPartButton,a=t.labelClass,i=t.controlClass,c=this.state.isWebPartUploading;if(n.accountId)return s.createElement(s.Fragment,null,s.createElement(Ae,{accountId:n.accountId,connectorContext:r,showEmbedCustomizations:!0,showAdvancedEmbedCustomizations:!1,disableOverrideForJavaScriptEmbeds:!1,labelClass:a,controlClass:i,formControlClass:"input-sm",bcExperienceProps:n,onExperiencePropsChanged:this.handleExperiencePropsChanged}),s.createElement("div",{className:"form-group"},s.createElement("label",{className:a},"Brightcove Snippet (Paste to Script Editor web part or publishing zone):"),s.createElement("div",{className:i},s.createElement("textarea",{id:"embedCode",style:{width:"100%",height:"85px",wordBreak:"break-all"},value:e,spellCheck:!1,onChange:this.handleEmbedCodeChange}),s.createElement(I,null),s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},onClick:this.downloadScriptEditorWebPart},s.createElement(j.a,{icon:T.e})," Download Web Part"),c&&s.createElement(B,{loadingText:"Uploading..."}),!0===o&&!c&&s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},disabled:!r.doesEmbedHelperExist,onClick:this.uploadWebPartToGallery,title:r.doesEmbedHelperExist?"":"Unable to upload web part as the Brightcove Embed Helper is not installed."},s.createElement(j.a,{icon:T.h})," Upload Web Part to Gallery"))))}},{key:"renderPart",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.connectorContext,o=t.labelClass,a=t.controlClass;if(n.accountId)return s.createElement(s.Fragment,null,s.createElement(Ae,{accountId:n.accountId,connectorContext:r,showEmbedCustomizations:!0,showAdvancedEmbedCustomizations:!1,disableOverrideForJavaScriptEmbeds:!0,labelClass:o,controlClass:a,formControlClass:"input-sm",bcExperienceProps:n,onExperiencePropsChanged:this.handleExperiencePropsChanged}),s.createElement("div",{className:"col-xs-12",style:{padding:"0"}},s.createElement("label",null,"Brightcove Snippet (Edit to customize Experience embed code)")),s.createElement("div",{className:"col-xs-12",style:{padding:"0"}},s.createElement("textarea",{id:"embedCode",style:{width:"100%",height:"85px",wordBreak:"break-all"},value:e,spellCheck:!1,onChange:this.handleEmbedCodeChange}),s.createElement(I,null)))}},{key:"renderFull",value:function(e){var t=this.props,n=t.bcExperienceProps,r=t.connectorContext;if(n.accountId)return s.createElement(s.Fragment,null,s.createElement("div",{className:"row"},s.createElement("div",{className:"col-md-6"},s.createElement("h4",null,"Copy Code"),s.createElement("div",null,"Copy the appropriate code below and paste it into your web page or app."),s.createElement("textarea",{id:"embedCode",style:{width:"100%",height:"85px",wordBreak:"break-all"},value:e,spellCheck:!1,onChange:this.handleEmbedCodeChange}),s.createElement(I,null),s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},onClick:this.downloadScriptEditorWebPart},s.createElement(j.a,{icon:T.e})," Download Web Part")),s.createElement("div",{className:"col-md-6"},s.createElement(Ae,{accountId:n.accountId,connectorContext:r,bcExperienceProps:n,showEmbedCustomizations:!0,showAdvancedEmbedCustomizations:!1,disableOverrideForJavaScriptEmbeds:!1,onExperiencePropsChanged:this.handleExperiencePropsChanged}))))}},{key:"render",value:function(){var e=this,t=this.props,n=t.bcExperienceProps,r=t.layoutMode,o=t.experience,a=t.labelClass,i=t.controlClass,c=t.hideExperienceName;if(!o)return s.createElement("div",{className:"text-center"},s.createElement("i",null,"An experience has not been selected. Please select an experience above to obtain the embed code."));if(!n.accountId)return s.createElement("div",{className:"text-center"},s.createElement("i",null,"An account has not been selected. Please select an account above."));var l="https://players.brightcove.net/".concat(n.accountId,"/experience_").concat(o.id,"/share.html"),u=n.embedCodeOverride||this.generateExperienceEmbedCode(),p="Responsive";return o.width&&(p="Fixed width of ".concat(o.width,"px")),o.height&&(p+=" and height of ".concat(o.height,"px")),s.createElement(s.Fragment,null,!0!==c&&s.createElement("div",{className:"form-group"},s.createElement("label",{className:a},"Experience Name"),s.createElement("div",{className:i},o.name)),"Full"===r&&s.createElement("div",{className:"form-group"},s.createElement("div",null,s.createElement("iframe",{title:"Full",style:{width:"100%",height:"400px"},src:o.previewUrl}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:a},"Shareable URL"),s.createElement("div",{className:i},s.createElement("a",{href:l,target:"_blank",rel:"noopener noreferrer"},l))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:a},"Experience-defined Layout Size"),s.createElement("div",{className:i},p)),function(){switch(r){case"Mini":return e.renderMini(u);case"Part":return e.renderPart(u);default:return e.renderFull(u)}}())}}]),t}(s.Component),Object(f.a)(Ne.prototype,"handleExperiencePropsChanged",[b.a],Object.getOwnPropertyDescriptor(Ne.prototype,"handleExperiencePropsChanged"),Ne.prototype),Object(f.a)(Ne.prototype,"handleEmbedCodeChange",[b.a],Object.getOwnPropertyDescriptor(Ne.prototype,"handleEmbedCodeChange"),Ne.prototype),Object(f.a)(Ne.prototype,"addWebPartToPage",[b.a],Object.getOwnPropertyDescriptor(Ne.prototype,"addWebPartToPage"),Ne.prototype),Object(f.a)(Ne.prototype,"uploadWebPartToGallery",[b.a],Object.getOwnPropertyDescriptor(Ne.prototype,"uploadWebPartToGallery"),Ne.prototype),Object(f.a)(Ne.prototype,"downloadScriptEditorWebPart",[b.a],Object.getOwnPropertyDescriptor(Ne.prototype,"downloadScriptEditorWebPart"),Ne.prototype),Ne),Ke=(Ue=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isWebPartUploading:!1},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"handlePlayerPropsChanged",value:function(e){var t=this.props.onPlayerPropsChanged;e.embedCodeOverride=void 0,t&&t(e)}},{key:"handleEmbedCodeChange",value:function(e){var t=this.props,n=t.onPlayerPropsChanged,r=t.bcPlayerProps;r.embedCodeOverride=e.target.value,n&&n(r)}},{key:"addWebPartToPage",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.bcPlayerProps,r=t.spApiGateway,o=t.spAddinContext,r&&o){e.next=3;break}return e.abrupt("return");case 3:return a=n.embedCodeOverride||this.generatePlaylistEmbedCode(),e.next=6,r.spEmbedUtil.insertContentEditorWebPart(o.Referrer,"Brightcove Playlist WebPart","Brightcove Web Part to embed an playlist onto a web part page.",a||"An error occurred.");case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getWebPartTitle",value:function(){var e=this.props,t=e.bcPlayerProps,n=e.playlistTitle,r="Brightcove Playlist WebPart";if(n){var o="javascript";"Standard"===t.embedType&&(o="iframe"),r="".concat(n,"-").concat(t.accountId,"-").concat(t.playerId,"-").concat(t.modeId,"-").concat(o)}return r}},{key:"uploadWebPartToGallery",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i,s,c,l;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.bcPlayerProps,r=t.spApiGateway,o=t.spAddinContext,r&&o){e.next=3;break}return e.abrupt("return");case 3:return this.setState({isWebPartUploading:!0}),a=n.embedCodeOverride||this.generatePlaylistEmbedCode(),i=this.getWebPartTitle(),s=ze.b.generateScriptEditorWebPart(i,"Adds a Brightcove Playlist Embed onto classic and modern pages.",a||"An error occurred."),e.prev=7,c=$e()(),l="BrightcovePlaylist-".concat(c.format("YYYY-MM-DD"),"-").concat(c.format("hh-mm-ss"),".webpart"),e.next=12,r.spEmbedUtil.uploadWebPartToGallery(s,l,"Brightcove Playlists");case 12:e.next=16;break;case 14:e.prev=14,e.t0=e.catch(7);case 16:ze.d.closeParentDialog(!0);case 17:case"end":return e.stop()}}),e,this,[[7,14]])})));return function(){return e.apply(this,arguments)}}()},{key:"downloadScriptEditorWebPart",value:function(){var e=this.props.bcPlayerProps.embedCodeOverride||this.generatePlaylistEmbedCode(),t=this.getWebPartTitle(),n=ze.b.generateScriptEditorWebPart(t,"Adds a Brightcove Playlist Embed onto classic and modern pages.",e||"An error occurred."),r=$e()(),o="BrightcovePlaylist-".concat(r.format("YYYY-MM-DD"),"-").concat(r.format("hh-mm-ss"),".webpart");He.saveAs(new Blob([n],{type:"text/plain;charset=utf-8"}),o)}},{key:"generatePlaylistEmbedCode",value:function(){var e=this.props.bcPlayerProps;return z.renderToStaticMarkup(s.createElement(re,Object.assign({},e,{mode:"Playlist"}))).replace(/&amp;/g,"&").replace(/%3A/g,":")}},{key:"renderMini",value:function(e,t){var n=this.props,r=n.bcPlayerProps,o=n.defaultPlaylistPlayerId,a=n.retrieveAllPlayers,i=n.showUploadWebPartButton,c=n.doesEmbedHelperExist,l=this.state.isWebPartUploading;return r.renderMode="Embed",s.createElement(s.Fragment,null,s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-xs-3 control-label small"},"Preview in browser"),s.createElement("div",{className:"col-xs-9 word-wrap"},s.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},e))),s.createElement(ce,{retrieveAllPlayers:a,defaultPlayerId:o,playerType:"Playlist",renderMode:"Embed",labelClass:"col-xs-3 control-label small",controlClass:"col-xs-9",formControlClass:"input-sm small",whClass:"col-xs-6",showEmbedCustomizations:!0,showAdvancedEmbedCustomizations:!0,bcPlayerProps:r,onPlayerPropsChanged:this.handlePlayerPropsChanged}),s.createElement("div",{className:"col-xs-12 small"},s.createElement("div",null,"Brightcove Snippet (Paste to Script Editor web part or publishing zone):"),s.createElement("textarea",{id:"embedCode",style:{width:"100%",height:"70px",wordBreak:"break-all"},value:t,spellCheck:!1,onChange:this.handleEmbedCodeChange}),s.createElement(I,null),s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},onClick:this.downloadScriptEditorWebPart},s.createElement(j.a,{icon:T.e})," Download Web Part"),l&&s.createElement(B,{loadingText:"Uploading..."}),!0===i&&!l&&s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},disabled:!c,onClick:this.uploadWebPartToGallery,title:c?"":"Unable to upload web part as the Brightcove Embed Helper is not installed."},s.createElement(j.a,{icon:T.h})," Upload Web Part to Gallery")),s.createElement("div",{className:"col-xs-12 small",style:{paddingTop:"5px"}},s.createElement(A.a,{className:"pull-right",bsSize:"small",onClick:function(){return ze.d.closeParentDialog(!1)}},"Close Dialog")))}},{key:"renderPart",value:function(e,t){var n=this.props,r=n.bcPlayerProps,o=n.defaultPlaylistPlayerId,a=n.retrieveAllPlayers;return r.renderMode="Part",s.createElement(s.Fragment,null,s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-xs-3 control-label small"},"Preview in browser"),s.createElement("div",{className:"col-xs-9 word-wrap"},s.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},e))),s.createElement(ce,{retrieveAllPlayers:a,defaultPlayerId:o,playerType:"Playlist",renderMode:"Part",labelClass:"col-xs-3 control-label small",controlClass:"col-xs-9",formControlClass:"input-sm small",whClass:"col-xs-6",showEmbedCustomizations:!0,showAdvancedEmbedCustomizations:!0,bcPlayerProps:r,onPlayerPropsChanged:this.handlePlayerPropsChanged}),s.createElement("div",{className:"col-xs-12",style:{padding:"0"}},s.createElement("label",null,"Brightcove Snippet (Edit to customize Playlist embed code)")),s.createElement("div",{className:"col-xs-12",style:{padding:"0"}},s.createElement("textarea",{id:"embedCode",style:{width:"100%",height:"70px",wordBreak:"break-all"},value:t,spellCheck:!1,onChange:this.handleEmbedCodeChange}),s.createElement(I,null)))}},{key:"renderFull",value:function(e,t){var n=this.props,r=n.bcPlayerProps,o=n.defaultPlaylistPlayerId,a=n.retrieveAllPlayers;return r.renderMode="Full",s.createElement(s.Fragment,null,s.createElement("div",{className:"row"},s.createElement("div",{className:"form-group"},s.createElement("div",null,s.createElement("iframe",{title:"player embed",style:{width:"100%",height:"400px"},src:"//players.brightcove.net/".concat(r.accountId,"/").concat(r.playerId?r.playerId:"default","_default/index.html?playlistId=").concat(r.modeId)}))),s.createElement("div",{className:"form-group"},s.createElement("label",null,"Preview in browser"),s.createElement("div",null,s.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},e)))),s.createElement("div",{className:"row"},s.createElement("div",{className:"col-md-6"},s.createElement("h4",null,"Copy Code"),s.createElement("div",null,"Copy the appropriate code below and paste it into your web page or app."),s.createElement("textarea",{id:"embedCode",style:{width:"100%",height:"300px",wordBreak:"break-all"},value:t,spellCheck:!1,onChange:this.handleEmbedCodeChange}),s.createElement(I,null),s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},onClick:this.downloadScriptEditorWebPart},s.createElement(j.a,{icon:T.e})," Download Web Part")),s.createElement("div",{className:"col-md-6"},"Change Player Size",s.createElement("br",null),s.createElement("br",null),s.createElement(ce,{retrieveAllPlayers:a,defaultPlayerId:o,playerType:"Playlist",renderMode:"Full",bcPlayerProps:r,showEmbedCustomizations:!0,showAdvancedEmbedCustomizations:!0,onPlayerPropsChanged:this.handlePlayerPropsChanged}))))}},{key:"render",value:function(){var e=this,t=this.props,n=t.bcPlayerProps,r=t.layoutMode,o="https://players.brightcove.net/".concat(n.accountId,"/").concat(n.playerId,"_default/index.html?playlistId=").concat(n.modeId),a=n.embedCodeOverride||this.generatePlaylistEmbedCode();return s.createElement(s.Fragment,null,function(){switch(r){case"Mini":return e.renderMini(o,a);case"Part":return e.renderPart(o,a);default:return e.renderFull(o,a)}}())}}]),t}(s.Component),Object(f.a)(Ue.prototype,"handlePlayerPropsChanged",[b.a],Object.getOwnPropertyDescriptor(Ue.prototype,"handlePlayerPropsChanged"),Ue.prototype),Object(f.a)(Ue.prototype,"handleEmbedCodeChange",[b.a],Object.getOwnPropertyDescriptor(Ue.prototype,"handleEmbedCodeChange"),Ue.prototype),Object(f.a)(Ue.prototype,"addWebPartToPage",[b.a],Object.getOwnPropertyDescriptor(Ue.prototype,"addWebPartToPage"),Ue.prototype),Object(f.a)(Ue.prototype,"uploadWebPartToGallery",[b.a],Object.getOwnPropertyDescriptor(Ue.prototype,"uploadWebPartToGallery"),Ue.prototype),Object(f.a)(Ue.prototype,"downloadScriptEditorWebPart",[b.a],Object.getOwnPropertyDescriptor(Ue.prototype,"downloadScriptEditorWebPart"),Ue.prototype),Ue),Xe=(De=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isWebPartUploading:!1},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"handlePlayerPropsChanged",value:function(e){var t=this.props.onPlayerPropsChanged;e.embedCodeOverride=void 0,t&&t(e)}},{key:"handleEmbedCodeChange",value:function(e){var t=this.props,n=t.onPlayerPropsChanged,r=t.bcPlayerProps;r.embedCodeOverride=e.target.value,n&&n(r)}},{key:"addWebPartToPage",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.bcPlayerProps,r=t.spApiGateway,o=t.spAddinContext,r&&o){e.next=3;break}return e.abrupt("return");case 3:return a=n.embedCodeOverride||this.generateVideoEmbedCode(),e.next=6,r.spEmbedUtil.insertContentEditorWebPart(o.Referrer,"Brightcove Video WebPart","Brightcove Web Part to embed a video onto a web part page.",a||"An error occurred.");case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"takeSnapshot",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=window.document.getElementById("bcEmbedPreview")){e.next=3;break}return e.abrupt("return");case 3:n=t.querySelector("video"),(r=document.createElement("canvas")).width=n.clientWidth,r.height=n.clientHeight,(o=r.getContext("2d"))&&(o.drawImage(n,0,0,r.width,r.height),r.toBlob((function(e){e&&He.saveAs(e,"imageData.png")})));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getWebPartTitle",value:function(){var e=this.props,t=e.bcPlayerProps,n=e.videoTitle,r="Brightcove Video WebPart";if(n){var o="javascript";"Standard"===t.embedType&&(o="iframe"),r="".concat(n,"-").concat(t.accountId,"-").concat(t.playerId,"-").concat(t.modeId,"-").concat(o)}return r}},{key:"uploadWebPartToGallery",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i,s,c,l;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.bcPlayerProps,r=t.spApiGateway,o=t.spAddinContext,r&&o){e.next=3;break}return e.abrupt("return");case 3:return this.setState({isWebPartUploading:!0}),a=n.embedCodeOverride||this.generateVideoEmbedCode(),i=this.getWebPartTitle(),s=ze.b.generateScriptEditorWebPart(i,"Adds a Brightcove Video Embed onto classic and modern pages.",a||"An error occurred."),e.prev=7,c=$e()(),l="BrightcoveVideo-".concat(c.format("YYYY-MM-DD"),"-").concat(c.format("hh-mm-ss"),".webpart"),e.next=12,r.spEmbedUtil.uploadWebPartToGallery(s,l,"Brightcove Videos");case 12:e.next=16;break;case 14:e.prev=14,e.t0=e.catch(7);case 16:ze.d.closeParentDialog(!0);case 17:case"end":return e.stop()}}),e,this,[[7,14]])})));return function(){return e.apply(this,arguments)}}()},{key:"downloadScriptEditorWebPart",value:function(){var e=this.props.bcPlayerProps.embedCodeOverride||this.generateVideoEmbedCode(),t=this.getWebPartTitle(),n=ze.b.generateScriptEditorWebPart(t,"Adds a Brightcove Video Embed onto classic and modern pages.",e||"An error occurred."),r=$e()(),o="BrightcoveVideo-".concat(r.format("YYYY-MM-DD"),"-").concat(r.format("hh-mm-ss"),".webpart");He.saveAs(new Blob([n],{type:"text/plain;charset=utf-8"}),o)}},{key:"generateVideoEmbedCode",value:function(){var e=this.props.bcPlayerProps;return z.renderToStaticMarkup(s.createElement(re,Object.assign({},e,{mode:"Video"}))).replace(/&amp;/g,"&").replace(/%3A/g,":")}},{key:"renderMini",value:function(e,t){var n=this.props,r=n.bcPlayerProps,o=n.defaultVideoPlayerId,a=n.retrieveAllPlayers,i=n.showUploadWebPartButton,c=n.doesEmbedHelperExist,l=this.state.isWebPartUploading;return r.renderMode="Embed",s.createElement(s.Fragment,null,s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-xs-3 control-label small"},"Preview in browser"),s.createElement("div",{className:"col-xs-9 word-wrap"},s.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},e))),s.createElement(ce,{retrieveAllPlayers:a,defaultPlayerId:o,playerType:"Video",renderMode:"Embed",labelClass:"col-xs-3 control-label small",controlClass:"col-xs-9",formControlClass:"input-sm small",whClass:"col-xs-6",showEmbedCustomizations:!0,showAdvancedEmbedCustomizations:!0,bcPlayerProps:r,onPlayerPropsChanged:this.handlePlayerPropsChanged}),s.createElement("div",{className:"col-xs-12 small"},s.createElement("div",null,"Brightcove Snippet (Paste to Script Editor web part or publishing zone):"),s.createElement("textarea",{id:"embedCode",style:{width:"100%",height:"65px",wordBreak:"break-all"},value:t,spellCheck:!1,onChange:this.handleEmbedCodeChange}),s.createElement(I,null),s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},onClick:this.downloadScriptEditorWebPart},s.createElement(j.a,{icon:T.e}),"\xa0Download Web Part"),l&&s.createElement(B,{loadingText:"Uploading..."}),!0===i&&!l&&s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},disabled:!c,onClick:this.uploadWebPartToGallery,title:c?"":"Unable to upload web part as the Brightcove Embed Helper is not installed."},s.createElement(j.a,{icon:T.h}),"\xa0Upload Web Part to Gallery")),s.createElement("div",{className:"col-xs-12 small",style:{paddingTop:"5px"}},s.createElement(A.a,{className:"pull-right",bsSize:"small",onClick:function(){return ze.d.closeParentDialog(!1)}},"Close Dialog")))}},{key:"renderPart",value:function(e,t){var n=this.props,r=n.bcPlayerProps,o=n.defaultVideoPlayerId,a=n.retrieveAllPlayers;return r.renderMode="Part",s.createElement(s.Fragment,null,s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-xs-3 control-label small"},"Preview in browser"),s.createElement("div",{className:"col-xs-9 word-wrap"},s.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},e))),s.createElement(ce,{retrieveAllPlayers:a,defaultPlayerId:o,playerType:"Video",renderMode:"Part",labelClass:"col-xs-3 control-label small",controlClass:"col-xs-9",formControlClass:"input-sm small",whClass:"col-xs-6",showEmbedCustomizations:!0,showAdvancedEmbedCustomizations:!1,bcPlayerProps:r,onPlayerPropsChanged:this.handlePlayerPropsChanged}),s.createElement("div",{className:"col-xs-12",style:{padding:"0"}},s.createElement("label",null,"Brightcove Snippet (Edit to customize Playlist embed code)")),s.createElement("div",{className:"col-xs-12",style:{padding:"0"}},s.createElement("textarea",{id:"embedCode",style:{width:"100%",height:"65px",wordBreak:"break-all"},value:t,spellCheck:!1,onChange:this.handleEmbedCodeChange}),s.createElement(I,null)))}},{key:"renderFull",value:function(e,t){var n=this.props,r=n.bcPlayerProps,o=n.defaultVideoPlayerId,a=n.retrieveAllPlayers,i=n.spAddinContext;return r.renderMode="Full",s.createElement(s.Fragment,null,s.createElement("div",{className:"row"},s.createElement("div",{className:"form-group"},s.createElement("div",{id:"bcEmbedPreview"},r.accountId&&r.modeId&&i&&s.createElement(ye,{accountId:r.accountId,playerId:r.playerId,videoId:r.modeId,style:{width:"100%",height:"400px"}}))),s.createElement("div",{className:"form-group"},s.createElement("label",null,"Preview in browser"),s.createElement("div",null,s.createElement("a",{href:e,target:"_blank",rel:"noopener noreferrer"},e)))),s.createElement("div",{className:"row"},s.createElement("div",{className:"col-md-6"},s.createElement("h4",null,"Copy Code"),s.createElement("div",null,"Copy the appropriate code below and paste it into your web page or app."),s.createElement("textarea",{id:"embedCode",style:{width:"100%",height:"300px",wordBreak:"break-all"},value:t,spellCheck:!1,onChange:this.handleEmbedCodeChange}),s.createElement(I,null),s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},onClick:this.downloadScriptEditorWebPart},s.createElement(j.a,{icon:T.e})," Download Web Part")),s.createElement("div",{className:"col-md-6"},"Change Player Size",s.createElement(ce,{retrieveAllPlayers:a,defaultPlayerId:o,playerType:"Video",renderMode:"Full",showEmbedCustomizations:!0,showAdvancedEmbedCustomizations:!1,bcPlayerProps:r,onPlayerPropsChanged:this.handlePlayerPropsChanged}))))}},{key:"render",value:function(){var e=this,t=this.props,n=t.bcPlayerProps,r=t.layoutMode,o="https://players.brightcove.net/".concat(n.accountId,"/").concat(n.playerId,"_default/index.html?videoId=").concat(n.modeId),a=n.embedCodeOverride||this.generateVideoEmbedCode();return s.createElement(s.Fragment,null,function(){switch(r){case"Mini":return e.renderMini(o,a);case"Part":return e.renderPart(o,a);default:return e.renderFull(o,a)}}())}}]),t}(s.Component),Object(f.a)(De.prototype,"handlePlayerPropsChanged",[b.a],Object.getOwnPropertyDescriptor(De.prototype,"handlePlayerPropsChanged"),De.prototype),Object(f.a)(De.prototype,"handleEmbedCodeChange",[b.a],Object.getOwnPropertyDescriptor(De.prototype,"handleEmbedCodeChange"),De.prototype),Object(f.a)(De.prototype,"addWebPartToPage",[b.a],Object.getOwnPropertyDescriptor(De.prototype,"addWebPartToPage"),De.prototype),Object(f.a)(De.prototype,"takeSnapshot",[b.a],Object.getOwnPropertyDescriptor(De.prototype,"takeSnapshot"),De.prototype),Object(f.a)(De.prototype,"uploadWebPartToGallery",[b.a],Object.getOwnPropertyDescriptor(De.prototype,"uploadWebPartToGallery"),De.prototype),Object(f.a)(De.prototype,"downloadScriptEditorWebPart",[b.a],Object.getOwnPropertyDescriptor(De.prototype,"downloadScriptEditorWebPart"),De.prototype),De),Ye=(Me=function(e){function t(e,n){var r;Object(l.a)(this,t),r=Object(p.a)(this,Object(d.a)(t).call(this,e,n));var o=Fe.getDefaultBrightcoveExperienceProps();return o.renderMode="Embed",o.sharepointVersion=e.connectorContext.spAddinContext.SPProductNumber,r.state={experiencesFilter:"",isLoadingExperiences:!0,allExperiences:[],filteredExperiences:[],showUploadWebPartButton:!1,bcExperienceProps:o},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props.connectorContext,!(n=this.state.bcExperienceProps).accountId&&t.availableAccounts&&t.availableAccounts.length>0&&(n.accountId=t.availableAccounts[0].accountId),this.loadExperiences(n.accountId||""),this.setState({bcExperienceProps:n,showUploadWebPartButton:!0===t.doesEmbedHelperExist});case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"loadExperiences",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.props.connectorContext,t){e.next=3;break}return e.abrupt("return");case 3:return this.setState({isLoadingExperiences:!0,experiencesFilter:""}),r=n.bcApiGateway.experiencesApi,e.next=7,r.getExperiences(t);case 7:o=e.sent,this.setState({isLoadingExperiences:!1,allExperiences:o.items,filteredExperiences:o.items});case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleAccountChange",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=this.state.bcExperienceProps).accountId!==t.accountId&&(n.accountId=t.accountId,this.setState({bcExperienceProps:n}),this.loadExperiences(t.accountId));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleExperiencesFilterChange",value:function(e){this.setState({experiencesFilter:e});var t=this.state.allExperiences;if(e){var n=e.toLowerCase();t=Object(C.filter)(t,(function(e){return!!(e.name&&e.name.toLowerCase().indexOf(n)>-1)}))}this.setState({filteredExperiences:t})}},{key:"experienceSelected",value:function(e,t){var n,r=this.state.bcExperienceProps;r.embedCodeOverride=void 0,t&&(n=e,r.experienceId=n.id),this.setState({selectedExperience:n,bcExperienceProps:r})}},{key:"handleExperiencePropsChanged",value:function(e){this.setState({bcExperienceProps:e})}},{key:"renderExperienceNameCell",value:function(e,t){var n=q()("".concat(window.location.origin).concat(window.location.pathname).concat(window.location.search));return(n=(n=n.removeQuery("mini")).removeQuery("IsDlg")).hash("/".concat(this.state.bcExperienceProps.accountId,"/manage-experiences/").concat(t.id,"/preview")),s.createElement(s.Fragment,null,s.createElement("a",{className:"small",href:n.toString(),target:"_blank",rel:"noopener noreferrer"},t.name),s.createElement("br",null),s.createElement("div",{className:"small"},t.template),s.createElement("div",{className:"small"},t.id))}},{key:"render",value:function(){var e=this,t=this.props.connectorContext,n=this.state,r=n.bcExperienceProps,o=n.experiencesFilter,a=n.isLoadingExperiences,c=n.filteredExperiences,l=n.selectedExperience,u=n.showUploadWebPartButton,p="col-xs-3 control-label small",d="col-xs-9 word-wrap small",h={mode:"radio",clickToSelect:!0,className:"info",onSelect:this.experienceSelected};return s.createElement("div",{className:"form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:p},"Brightcove Account:"),s.createElement("div",{className:d},s.createElement(S,{className:"input-sm",availableAccounts:t.availableAccounts,selectedAccountId:r.accountId,onChange:this.handleAccountChange}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:p},"Experiences Filter:"),s.createElement("div",{className:d},s.createElement("div",{className:"input-group"},s.createElement("input",{type:"search",placeholder:"Search",className:"form-control input-sm",value:o,onChange:function(t){return e.handleExperiencesFilterChange(t.target.value)}}),s.createElement("div",{className:"input-group-btn searchButton"},s.createElement(A.a,{bsSize:"small"},"\xa0",s.createElement("i",{className:"glyphicon glyphicon-search"})))))),a&&r.accountId&&s.createElement(B,{loadingText:"Loading Experiences..."}),!a&&r.accountId&&s.createElement(s.Fragment,null,s.createElement("div",{className:"well"},s.createElement(R.BootstrapTable,{data:c,striped:!0,bordered:!1,selectRow:h,options:{defaultSortName:"updatedAt",defaultSortOrder:"desc"},height:"250"},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:this.renderExperienceNameCell,dataSort:!0},"Name"),s.createElement(R.TableHeaderColumn,{dataField:"description",dataSort:!0,hidden:!0},"Short Description"),s.createElement(R.TableHeaderColumn,{dataField:"updatedAt",dataSort:!0,hidden:!0},"Updated At"),s.createElement(R.TableHeaderColumn,{dataField:"id",dataSort:!0,isKey:!0,hidden:!0},"ID")),s.createElement("hr",null)),s.createElement(Je,{bcExperienceProps:r,layoutMode:i.Mini,connectorContext:t,experience:l,hideExperienceName:!0,labelClass:p,controlClass:d,showUploadWebPartButton:u,onExperiencePropsChanged:this.handleExperiencePropsChanged}),s.createElement("div",{className:"col-xs-12 small",style:{paddingTop:"5px"}},s.createElement(A.a,{className:"pull-right",bsSize:"small",style:{margin:"2px"},onClick:function(){return ze.d.closeParentDialog(!1)}},"Close Dialog"))))}}]),t}(s.Component),Object(f.a)(Me.prototype,"handleAccountChange",[b.a],Object.getOwnPropertyDescriptor(Me.prototype,"handleAccountChange"),Me.prototype),Object(f.a)(Me.prototype,"handleExperiencesFilterChange",[b.a],Object.getOwnPropertyDescriptor(Me.prototype,"handleExperiencesFilterChange"),Me.prototype),Object(f.a)(Me.prototype,"experienceSelected",[b.a],Object.getOwnPropertyDescriptor(Me.prototype,"experienceSelected"),Me.prototype),Object(f.a)(Me.prototype,"handleExperiencePropsChanged",[b.a],Object.getOwnPropertyDescriptor(Me.prototype,"handleExperiencePropsChanged"),Me.prototype),Object(f.a)(Me.prototype,"renderExperienceNameCell",[b.a],Object.getOwnPropertyDescriptor(Me.prototype,"renderExperienceNameCell"),Me.prototype),Me),Ze=(Ve=function(e){function t(e,n){var r;Object(l.a)(this,t),r=Object(p.a)(this,Object(d.a)(t).call(this,e,n));var o=le.getDefaultBrightcovePlaylistProps();return o.sharepointVersion=r.props.connectorContext.spAddinContext.SPProductNumber,r.state={bcPlayerProps:o,searchParameters:Object(Y.getDefaultPlaylistSearchParameters)(),isLoadingPlaylists:!1,playlists:[],defaultPlaylistPlayerId:"",showUploadWebPartButton:!1},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props.connectorContext,!(n=this.state.bcPlayerProps).accountId&&t.availableAccounts&&t.availableAccounts.length>0&&(n.accountId=t.availableAccounts[0].accountId),(r=Object(C.find)(t.availableAccounts,(function(e){return e.accountId===n.accountId})))&&this.setState({defaultPlaylistPlayerId:r.defaultPlaylistPlayerId}),this.searchForPlaylists(n.accountId||"",this.state.searchParameters),this.setState({bcPlayerProps:n,showUploadWebPartButton:!0===t.doesEmbedHelperExist});case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"searchForPlaylists",value:function(){var e=Object(E.a)(w.a.mark((function e(t,n){var r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:this.setState({isLoadingPlaylists:!0}),r=this.props.connectorContext.bcApiGateway,o=r.playlistsApi,a={limit:n.searchLimit||45,sort:n.sortOrder===Y.SortOrder.Descending?"-":"",q:n.searchTerms?'+"'.concat(n.searchTerms,'"'):""},e.t0=n.sortField,e.next=e.t0===Y.PlaylistSortField.DisplayName?9:e.t0===Y.PlaylistSortField.ModifiedDate?11:13;break;case 9:return a.sort+="name",e.abrupt("break",14);case 11:return a.sort+="updated_at",e.abrupt("break",14);case 13:return e.abrupt("break",14);case 14:return e.next=16,o.getPlaylists(t,a);case 16:i=e.sent,this.setState({isLoadingPlaylists:!1,playlists:i});case 18:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleAccountChange",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=this.state.bcPlayerProps).accountId!==t.accountId&&(n.accountId=t.accountId,this.setState({bcPlayerProps:n}),this.searchForPlaylists(n.accountId||"",this.state.searchParameters));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handlePlayerEmbedCodeChanged",value:function(e){this.setState({bcPlayerProps:e})}},{key:"handleSearchParametersChanged",value:function(e,t){var n=this.state.bcPlayerProps;this.setState({searchParameters:e}),"searchTerms"!==t&&this.searchForPlaylists(n.accountId||"",e)}},{key:"playlistSelected",value:function(e,t){var n,r=this.state.bcPlayerProps;r.embedCodeOverride=void 0,t&&(n=e,r.modeId=n.id),this.setState({selectedPlaylist:n,bcPlayerProps:r})}},{key:"renderPlaylistNameCell",value:function(e,t){var n=this.state.bcPlayerProps,r=q()("".concat(window.location.origin).concat(window.location.pathname).concat(window.location.search));return(r=(r=r.removeQuery("mini")).removeQuery("IsDlg")).hash("/".concat(n.accountId,"/manage-playlists/").concat(t.id,"/edit")),s.createElement("div",{className:"row"},s.createElement("div",{className:"col-xs-12"},s.createElement("a",{className:"small",href:r.toString(),target:"_blank",rel:"noopener noreferrer"},t.name),s.createElement("div",{className:"small"},t.id)))}},{key:"render",value:function(){var e=this.props.connectorContext,t=this.state,n=t.bcPlayerProps,r=t.searchParameters,o=t.isLoadingPlaylists,a=t.playlists,c=t.defaultPlaylistPlayerId,l=t.selectedPlaylist,u=t.showUploadWebPartButton,p={mode:"radio",clickToSelect:!0,className:"info",onSelect:this.playlistSelected};return s.createElement("div",{className:"form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-xs-3 control-label small"},"Brightcove Account:"),s.createElement("div",{className:"col-xs-9"},s.createElement(S,{className:"input-sm",availableAccounts:e.availableAccounts,selectedAccountId:n.accountId,onChange:this.handleAccountChange}))),s.createElement(Ie,{accountId:n.accountId||"",labelClass:"col-xs-3 control-label small",controlClass:"col-xs-9",formControlClass:"input-xs small",searchParameters:r,onSearchParametersChanged:this.handleSearchParametersChanged,onSearchForPlaylists:this.searchForPlaylists}),o&&n.accountId&&s.createElement(B,{loadingText:"Loading Playlists..."}),!o&&n.accountId&&s.createElement("div",{className:"well"},s.createElement(R.BootstrapTable,{data:a,striped:!0,bordered:!1,selectRow:p,height:"250"},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:this.renderPlaylistNameCell},"Playlist"),s.createElement(R.TableHeaderColumn,{dataField:"id",isKey:!0,hidden:!0},"ID")),s.createElement("hr",null)),!o&&n.accountId&&l&&s.createElement(Ke,{layoutMode:i.Mini,bcPlayerProps:n,playlistTitle:l.name,defaultPlaylistPlayerId:c,doesEmbedHelperExist:e.doesEmbedHelperExist,spAddinContext:e.spAddinContext,spApiGateway:e.spApiGateway,showUploadWebPartButton:u,retrieveAllPlayers:e.retrieveAllPlayers,onPlayerPropsChanged:this.handlePlayerEmbedCodeChanged}))}}]),t}(s.Component),Object(f.a)(Ve.prototype,"searchForPlaylists",[b.a],Object.getOwnPropertyDescriptor(Ve.prototype,"searchForPlaylists"),Ve.prototype),Object(f.a)(Ve.prototype,"handleAccountChange",[b.a],Object.getOwnPropertyDescriptor(Ve.prototype,"handleAccountChange"),Ve.prototype),Object(f.a)(Ve.prototype,"handlePlayerEmbedCodeChanged",[b.a],Object.getOwnPropertyDescriptor(Ve.prototype,"handlePlayerEmbedCodeChanged"),Ve.prototype),Object(f.a)(Ve.prototype,"handleSearchParametersChanged",[b.a],Object.getOwnPropertyDescriptor(Ve.prototype,"handleSearchParametersChanged"),Ve.prototype),Object(f.a)(Ve.prototype,"playlistSelected",[b.a],Object.getOwnPropertyDescriptor(Ve.prototype,"playlistSelected"),Ve.prototype),Object(f.a)(Ve.prototype,"renderPlaylistNameCell",[b.a],Object.getOwnPropertyDescriptor(Ve.prototype,"renderPlaylistNameCell"),Ve.prototype),Ve),et=(Le=function(e){function t(e,n){var r;Object(l.a)(this,t),r=Object(p.a)(this,Object(d.a)(t).call(this,e,n));var o=Object(Y.getDefaultVideoSearchParameters)();o.searchTarget=Y.SearchTarget.VideoCloud;var a=le.getDefaultBrightcovePlayerProps();return a.mode="Video",a.sharepointVersion=r.props.connectorContext.spAddinContext.SPProductNumber,r.state={bcPlayerProps:a,searchParameters:o,isLoadingVideos:!1,videos:[],defaultVideoPlayerId:"",showUploadWebPartButton:!1},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props.connectorContext,!(n=this.state.bcPlayerProps).accountId&&t.availableAccounts&&t.availableAccounts.length>0&&(n.accountId=t.availableAccounts[0].accountId),(r=Object(C.find)(t.availableAccounts,(function(e){return e.accountId===n.accountId})))&&this.setState({defaultVideoPlayerId:r.defaultVideoPlayerId}),this.searchForVideos(n.accountId||"",this.state.searchParameters),this.setState({bcPlayerProps:n,showUploadWebPartButton:!0===t.doesEmbedHelperExist});case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"searchForVideos",value:function(){var e=Object(E.a)(w.a.mark((function e(t,n){var r,o,a,i,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return this.setState({isLoadingVideos:!0}),r=this.props.connectorContext,o=r.bcApiGateway,a=o.videosApi,i=r.getBCVideoSearchParams(n),e.next=9,a.getVideos(t,i);case 9:s=e.sent,n.folderId&&(s=Object(C.filter)(s,{folder_id:n.folderId})),this.setState({isLoadingVideos:!1,videos:s});case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleAccountChange",value:function(e){var t=this.state.bcPlayerProps;t.accountId!==e.accountId&&(t.accountId=e.accountId,this.setState({bcPlayerProps:t}),this.searchForVideos(t.accountId||"",this.state.searchParameters))}},{key:"handlePlayerEmbedCodeChanged",value:function(e){this.setState({bcPlayerProps:e})}},{key:"handleSearchParametersChanged",value:function(e,t){var n=this.state.bcPlayerProps;this.setState({searchParameters:e}),"searchTerms"!==t&&this.searchForVideos(n.accountId||"",e)}},{key:"videoSelected",value:function(e,t){var n,r=this.state.bcPlayerProps;r.embedCodeOverride=void 0,t&&(n=e,r.modeId=n.id),this.setState({selectedVideo:n,bcPlayerProps:r})}},{key:"renderVideoNameCell",value:function(e,t){var n=this.state.bcPlayerProps,r=Object(C.get)(t,"images.thumbnail.src"),o=q()("".concat(window.location.origin).concat(window.location.pathname).concat(window.location.search));return(o=(o=o.removeQuery("mini")).removeQuery("IsDlg")).hash("#/".concat(n.accountId,"/manage-videos/").concat(t.id,"/edit/")),s.createElement("div",{className:"row"},s.createElement("img",{className:"col-xs-2",src:r,alt:""}),s.createElement("div",{className:"col-xs-10"},s.createElement("a",{className:"small",href:o.toString(),target:"_blank",rel:"noopener noreferrer"},t.name),s.createElement("div",{className:"small"},t.id)))}},{key:"render",value:function(){var e=this.props.connectorContext,t=this.state,n=t.bcPlayerProps,r=t.searchParameters,o=t.isLoadingVideos,a=t.videos,c=t.defaultVideoPlayerId,l=t.selectedVideo,u=t.showUploadWebPartButton,p={mode:"radio",clickToSelect:!0,className:"info",onSelect:this.videoSelected};return s.createElement("div",{className:"form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-xs-3 control-label small"},"Brightcove Account:"),s.createElement("div",{className:"col-xs-9"},s.createElement(S,{className:"input-sm",availableAccounts:e.availableAccounts,selectedAccountId:n.accountId,onChange:this.handleAccountChange}))),s.createElement(Z,{accountId:n.accountId||"",connectorContext:e,labelClass:"col-xs-3 control-label small",controlClass:"col-xs-9",showSearchTarget:!1,formControlClass:"input-sm small",searchParameters:r,onSearchParametersChanged:this.handleSearchParametersChanged,onSearchForVideos:this.searchForVideos}),o&&n.accountId&&s.createElement(B,{loadingText:"Loading Videos..."}),!o&&n.accountId&&s.createElement("div",{className:"well"},s.createElement(R.BootstrapTable,{data:a,striped:!0,bordered:!1,selectRow:p,height:"250"},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:this.renderVideoNameCell},"Videos"),s.createElement(R.TableHeaderColumn,{dataField:"id",isKey:!0,hidden:!0},"ID")),s.createElement("hr",null)),!o&&n.accountId&&l&&s.createElement(Xe,{layoutMode:i.Mini,bcPlayerProps:n,videoTitle:l.name,defaultVideoPlayerId:c,doesEmbedHelperExist:e.doesEmbedHelperExist,spAddinContext:e.spAddinContext,spApiGateway:e.spApiGateway,showUploadWebPartButton:u,retrieveAllPlayers:e.retrieveAllPlayers,onPlayerPropsChanged:this.handlePlayerEmbedCodeChanged}))}}]),t}(s.Component),Object(f.a)(Le.prototype,"searchForVideos",[b.a],Object.getOwnPropertyDescriptor(Le.prototype,"searchForVideos"),Le.prototype),Object(f.a)(Le.prototype,"handleAccountChange",[b.a],Object.getOwnPropertyDescriptor(Le.prototype,"handleAccountChange"),Le.prototype),Object(f.a)(Le.prototype,"handlePlayerEmbedCodeChanged",[b.a],Object.getOwnPropertyDescriptor(Le.prototype,"handlePlayerEmbedCodeChanged"),Le.prototype),Object(f.a)(Le.prototype,"handleSearchParametersChanged",[b.a],Object.getOwnPropertyDescriptor(Le.prototype,"handleSearchParametersChanged"),Le.prototype),Object(f.a)(Le.prototype,"videoSelected",[b.a],Object.getOwnPropertyDescriptor(Le.prototype,"videoSelected"),Le.prototype),Object(f.a)(Le.prototype,"renderVideoNameCell",[b.a],Object.getOwnPropertyDescriptor(Le.prototype,"renderVideoNameCell"),Le.prototype),Le),tt=(n(1058),function(e){function t(e,n){var r;Object(l.a)(this,t),r=Object(p.a)(this,Object(d.a)(t).call(this,e,n));var o=q()().query(!0);return r.state={isLoading:!0,isDialog:"1"===o.IsDlg},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.connectorContext,this.setState({isLoading:!0}),e.next=4,t.initialize();case 4:this.setState({isLoading:!1});case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.props.connectorContext,t=this.state,n=t.isLoading,r={width:"580px"};return t.isDialog&&(r.width="",r.backgroundColor="initial"),n?s.createElement("div",{className:"mini",style:r},s.createElement(V,{loadingMessage:"Loading Brightcove Mini..."})):s.createElement(m.a,null,s.createElement("div",{className:"mini",style:r},s.createElement(y.e,null,s.createElement(y.c,{path:"/mini/videos",exact:!0},s.createElement(et,{connectorContext:e})),s.createElement(y.c,{path:"/mini/playlists",exact:!0},s.createElement(Ze,{connectorContext:e})),s.createElement(y.c,{path:"/mini/experiences",exact:!0},s.createElement(Ye,{connectorContext:e})),s.createElement(y.b,{to:"/"}))))}}]),t}(s.Component)),nt=(Be=function(e){function t(e,n){var r;Object(l.a)(this,t),r=Object(p.a)(this,Object(d.a)(t).call(this,e,n));var o=Object(Y.getDefaultVideoSearchParameters)();o.searchTarget=Y.SearchTarget.VideoCloud;var a=e.playerProps;a.mode="Video",a.sharepointVersion=r.props.connectorContext.spAddinContext.SPProductNumber;var i=q()().query(!0);return r.state={bcPlayerProps:a,searchParameters:o,isLoadingVideos:!1,isSaving:!1,videos:[],defaultVideoPlayerId:"",webPartId:i.wpId},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=this.props.connectorContext,t=this.state.bcPlayerProps;!t.accountId&&e.availableAccounts&&e.availableAccounts.length>0&&(t.accountId=e.availableAccounts[0].accountId);var n=Object(C.find)(e.availableAccounts,(function(e){return e.accountId===t.accountId}));n&&this.setState({defaultVideoPlayerId:n.defaultVideoPlayerId}),this.searchForVideos(t.accountId||"",this.state.searchParameters),this.setState({bcPlayerProps:t})}},{key:"searchForVideos",value:function(){var e=Object(E.a)(w.a.mark((function e(t,n){var r,o,a,i,s,c,l;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return this.setState({isLoadingVideos:!0}),r=this.props.connectorContext,o=r.bcApiGateway,a=this.state.bcPlayerProps,i=o.videosApi,s=r.getBCVideoSearchParams(n),e.next=10,i.getVideos(t,s);case 10:c=e.sent,n.folderId&&(c=Object(C.filter)(c,{folder_id:n.folderId})),a.modeId&&(l=Object(C.find)(c,{id:a.modeId})),this.setState({isLoadingVideos:!1,selectedVideo:l,videos:c});case 14:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleAccountChange",value:function(e){var t=this.state.bcPlayerProps;t.accountId!==e.accountId&&(t.accountId=e.accountId,this.setState({bcPlayerProps:t}),this.searchForVideos(t.accountId||"",this.state.searchParameters))}},{key:"handleSearchParametersChanged",value:function(e,t){this.setState({searchParameters:e}),"searchTerms"!==t&&this.searchForVideos(this.state.bcPlayerProps.accountId||"",e)}},{key:"handlePlayerPropsChanged",value:function(e){this.setState({bcPlayerProps:e})}},{key:"videoSelected",value:function(e,t){var n,r=this.state.bcPlayerProps;r.embedCodeOverride=void 0,t&&(n=e,r.modeId=n.id),this.setState({bcPlayerProps:r,selectedVideo:n})}},{key:"renderVideoNameCell",value:function(e,t){var n=this.state.bcPlayerProps,r=Object(C.get)(t,"images.thumbnail.src"),o=q()("".concat(window.location.origin).concat(window.location.pathname.replace(/AppPartPage.aspx/i,"Default.aspx")).concat(window.location.search));return(o=(o=o.removeQuery("part")).removeQuery("IsDlg")).hash("/".concat(n.accountId,"/manage-videos/").concat(t.id,"/edit")),s.createElement("div",{className:"row"},s.createElement("img",{className:"col-xs-2",src:r,alt:""}),s.createElement("div",{className:"col-xs-10"},s.createElement("a",{className:"small",href:o.toString(),target:"_blank",rel:"noopener noreferrer"},t.name),s.createElement("div",{className:"small"},t.id)))}},{key:"applyWebpartChanges",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.setState({isSaving:!0}),t=this.props.connectorContext,n=t.spApiGateway,r=this.state,o=r.bcPlayerProps,a=r.selectedVideo,i=r.webPartId,a){e.next=6;break}return e.abrupt("return");case 6:return o.modeId=a.id||"",e.next=9,n.spWebPartConfig.setBrightcoveWebPartProps(i,o);case 9:window.location.reload(!0);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancelWebpartChanges",value:function(){var e=Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:window.location.reload(!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.props.connectorContext,t=this.state,n=t.bcPlayerProps,r=t.searchParameters,o=t.isLoadingVideos,a=t.isSaving,c=t.videos,l=t.selectedVideo,u=t.defaultVideoPlayerId,p={mode:"radio",clickToSelect:!0,className:"info",onSelect:this.videoSelected};n.modeId&&(p.selected=[n.modeId]),l&&(p.selected=[l.id]);var d=!o&&n.accountId&&l;return s.createElement("div",{className:"form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-xs-3 control-label small"},"Brightcove Account:"),s.createElement("div",{className:"col-xs-9"},s.createElement(S,{className:"input-sm",availableAccounts:e.availableAccounts,selectedAccountId:n.accountId,onChange:this.handleAccountChange}))),s.createElement(Z,{accountId:n.accountId||"",connectorContext:e,labelClass:"col-xs-3 control-label small",controlClass:"col-xs-9",showSearchTarget:!1,formControlClass:"input-sm small",searchParameters:r,onSearchParametersChanged:this.handleSearchParametersChanged,onSearchForVideos:this.searchForVideos}),o&&n.accountId&&s.createElement(B,{loadingText:"Loading Videos..."}),!o&&n.accountId&&s.createElement(s.Fragment,null,s.createElement("div",{className:"well"},s.createElement(R.BootstrapTable,{data:c,striped:!0,bordered:!1,selectRow:p,height:"250"},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:this.renderVideoNameCell},"Videos"),s.createElement(R.TableHeaderColumn,{dataField:"id",isKey:!0,hidden:!0},"ID")),s.createElement("hr",null))),!o&&n.accountId&&l&&s.createElement(Xe,{layoutMode:i.Part,bcPlayerProps:n,videoTitle:l.name,defaultVideoPlayerId:u,doesEmbedHelperExist:e.doesEmbedHelperExist,spAddinContext:e.spAddinContext,spApiGateway:e.spApiGateway,showUploadWebPartButton:!1,retrieveAllPlayers:e.retrieveAllPlayers,onPlayerPropsChanged:this.handlePlayerPropsChanged}),s.createElement("div",{className:"col-xs-12",style:{paddingTop:"5px"}},a&&s.createElement(B,{loadingText:"Saving..."}),!a&&s.createElement(s.Fragment,null,s.createElement(A.a,{className:"pull-right",bsStyle:"primary",disabled:!d,style:{margin:"2px"},onClick:this.applyWebpartChanges},"Apply"),s.createElement(A.a,{className:"pull-right",style:{margin:"2px"},onClick:this.cancelWebpartChanges},"Cancel"))))}}]),t}(s.Component),Object(f.a)(Be.prototype,"searchForVideos",[b.a],Object.getOwnPropertyDescriptor(Be.prototype,"searchForVideos"),Be.prototype),Object(f.a)(Be.prototype,"handleAccountChange",[b.a],Object.getOwnPropertyDescriptor(Be.prototype,"handleAccountChange"),Be.prototype),Object(f.a)(Be.prototype,"handleSearchParametersChanged",[b.a],Object.getOwnPropertyDescriptor(Be.prototype,"handleSearchParametersChanged"),Be.prototype),Object(f.a)(Be.prototype,"handlePlayerPropsChanged",[b.a],Object.getOwnPropertyDescriptor(Be.prototype,"handlePlayerPropsChanged"),Be.prototype),Object(f.a)(Be.prototype,"videoSelected",[b.a],Object.getOwnPropertyDescriptor(Be.prototype,"videoSelected"),Be.prototype),Object(f.a)(Be.prototype,"renderVideoNameCell",[b.a],Object.getOwnPropertyDescriptor(Be.prototype,"renderVideoNameCell"),Be.prototype),Object(f.a)(Be.prototype,"applyWebpartChanges",[b.a],Object.getOwnPropertyDescriptor(Be.prototype,"applyWebpartChanges"),Be.prototype),Object(f.a)(Be.prototype,"cancelWebpartChanges",[b.a],Object.getOwnPropertyDescriptor(Be.prototype,"cancelWebpartChanges"),Be.prototype),Be),rt=(Re=function(e){function t(e,n){var r;Object(l.a)(this,t),r=Object(p.a)(this,Object(d.a)(t).call(this,e,n));var o=e.playerProps;o.mode="Playlist",o.sharepointVersion=r.props.connectorContext.spAddinContext.SPProductNumber;var a=q()().query(!0);return r.state={bcPlayerProps:o,searchParameters:Object(Y.getDefaultPlaylistSearchParameters)(),isLoadingPlaylists:!1,isSaving:!1,playlists:[],defaultPlaylistPlayerId:"",webPartId:a.wpId},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=this.props.connectorContext,t=this.state.bcPlayerProps;!t.accountId&&e.availableAccounts&&e.availableAccounts.length>0&&(t.accountId=e.availableAccounts[0].accountId);var n=Object(C.find)(e.availableAccounts,(function(e){return e.accountId===t.accountId}));n&&this.setState({defaultPlaylistPlayerId:n.defaultPlaylistPlayerId}),this.searchForPlaylists(t.accountId||"",this.state.searchParameters),this.setState({bcPlayerProps:t})}},{key:"searchForPlaylists",value:function(){var e=Object(E.a)(w.a.mark((function e(t,n){var r,o,a,i,s,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:this.setState({isLoadingPlaylists:!0}),r=this.props.connectorContext.bcApiGateway,o=this.state.bcPlayerProps,a=r.playlistsApi,i={limit:n.searchLimit||45,sort:n.sortOrder===Y.SortOrder.Descending?"-":"",q:n.searchTerms?'+"'.concat(n.searchTerms,'"'):""},e.t0=n.sortField,e.next=e.t0===Y.PlaylistSortField.DisplayName?10:e.t0===Y.PlaylistSortField.ModifiedDate?12:14;break;case 10:return i.sort+="name",e.abrupt("break",15);case 12:return i.sort+="updated_at",e.abrupt("break",15);case 14:return e.abrupt("break",15);case 15:return e.next=17,a.getPlaylists(t,i);case 17:s=e.sent,o.modeId&&(c=Object(C.find)(s,{id:o.modeId})),this.setState({isLoadingPlaylists:!1,selectedPlaylist:c,playlists:s});case 20:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleAccountChange",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=this.state.bcPlayerProps).accountId!==t.accountId&&(n.accountId=t.accountId,this.setState({bcPlayerProps:n}),this.searchForPlaylists(n.accountId||"",this.state.searchParameters));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleSearchParametersChanged",value:function(e,t){this.setState({searchParameters:e}),"searchTerms"!==t&&this.searchForPlaylists(this.state.bcPlayerProps.accountId||"",e)}},{key:"handlePlayerPropsChanged",value:function(e){this.setState({bcPlayerProps:e})}},{key:"playlistSelected",value:function(e,t){var n,r=this.state.bcPlayerProps;r.embedCodeOverride=void 0,t&&(n=e,r.modeId=n.id),this.setState({selectedPlaylist:n,bcPlayerProps:r})}},{key:"renderPlaylistNameCell",value:function(e,t){var n=this.state.bcPlayerProps,r=q()("".concat(window.location.origin).concat(window.location.pathname.replace(/AppPartPage.aspx/i,"Default.aspx")).concat(window.location.search));return(r=(r=r.removeQuery("part")).removeQuery("IsDlg")).hash("/".concat(n.accountId,"/manage-playlists/").concat(t.id,"/edit")),s.createElement("div",{className:"row"},s.createElement("div",{className:"col-xs-12"},s.createElement("a",{className:"small",href:r.toString(),target:"_blank",rel:"noopener noreferrer"},t.name),s.createElement("div",{className:"small"},t.id)))}},{key:"applyWebpartChanges",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.setState({isSaving:!0}),t=this.props.connectorContext,n=t.spApiGateway,r=this.state,o=r.bcPlayerProps,a=r.selectedPlaylist,i=r.webPartId,a){e.next=6;break}return e.abrupt("return");case 6:return o.modeId=a.id||"",e.next=9,n.spWebPartConfig.setBrightcoveWebPartProps(i,o);case 9:window.location.reload(!0);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancelWebpartChanges",value:function(){var e=Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:window.location.reload(!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.props.connectorContext,t=this.state,n=t.bcPlayerProps,r=t.searchParameters,o=t.isLoadingPlaylists,a=t.isSaving,c=t.playlists,l=t.defaultPlaylistPlayerId,u=t.selectedPlaylist,p={mode:"radio",clickToSelect:!0,className:"info",onSelect:this.playlistSelected};n.modeId&&(p.selected=[n.modeId]),u&&(p.selected=[u.id]);var d=!o&&n.accountId&&u;return s.createElement("div",{className:"form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-xs-3 control-label small"},"Brightcove Account:"),s.createElement("div",{className:"col-xs-9"},s.createElement(S,{className:"input-sm",availableAccounts:e.availableAccounts,selectedAccountId:n.accountId,onChange:this.handleAccountChange}))),s.createElement(Ie,{accountId:n.accountId||"",labelClass:"col-xs-3 control-label small",controlClass:"col-xs-9",formControlClass:"input-xs small",searchParameters:r,onSearchParametersChanged:this.handleSearchParametersChanged,onSearchForPlaylists:this.searchForPlaylists}),o&&n.accountId&&s.createElement(B,{loadingText:"Loading Playlists..."}),!o&&n.accountId&&s.createElement(s.Fragment,null,s.createElement("div",{className:"well"},s.createElement(R.BootstrapTable,{data:c,striped:!0,bordered:!1,selectRow:p,height:"250"},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:this.renderPlaylistNameCell},"Playlist"),s.createElement(R.TableHeaderColumn,{dataField:"id",isKey:!0,hidden:!0},"ID")),s.createElement("hr",null))),!o&&n.accountId&&u&&s.createElement(Ke,{layoutMode:i.Part,bcPlayerProps:n,playlistTitle:u.name,defaultPlaylistPlayerId:l,doesEmbedHelperExist:e.doesEmbedHelperExist,spAddinContext:e.spAddinContext,spApiGateway:e.spApiGateway,showUploadWebPartButton:!1,retrieveAllPlayers:e.retrieveAllPlayers,onPlayerPropsChanged:this.handlePlayerPropsChanged}),s.createElement("div",{className:"col-xs-12",style:{paddingTop:"5px"}},a&&s.createElement(B,{loadingText:"Saving..."}),!a&&s.createElement(s.Fragment,null,s.createElement(A.a,{className:"pull-right",bsStyle:"primary",disabled:!d,style:{margin:"2px"},onClick:this.applyWebpartChanges},"Apply"),s.createElement(A.a,{className:"pull-right",style:{margin:"2px"},onClick:this.cancelWebpartChanges},"Cancel"))))}}]),t}(s.Component),Object(f.a)(Re.prototype,"searchForPlaylists",[b.a],Object.getOwnPropertyDescriptor(Re.prototype,"searchForPlaylists"),Re.prototype),Object(f.a)(Re.prototype,"handleAccountChange",[b.a],Object.getOwnPropertyDescriptor(Re.prototype,"handleAccountChange"),Re.prototype),Object(f.a)(Re.prototype,"handleSearchParametersChanged",[b.a],Object.getOwnPropertyDescriptor(Re.prototype,"handleSearchParametersChanged"),Re.prototype),Object(f.a)(Re.prototype,"handlePlayerPropsChanged",[b.a],Object.getOwnPropertyDescriptor(Re.prototype,"handlePlayerPropsChanged"),Re.prototype),Object(f.a)(Re.prototype,"playlistSelected",[b.a],Object.getOwnPropertyDescriptor(Re.prototype,"playlistSelected"),Re.prototype),Object(f.a)(Re.prototype,"renderPlaylistNameCell",[b.a],Object.getOwnPropertyDescriptor(Re.prototype,"renderPlaylistNameCell"),Re.prototype),Object(f.a)(Re.prototype,"applyWebpartChanges",[b.a],Object.getOwnPropertyDescriptor(Re.prototype,"applyWebpartChanges"),Re.prototype),Object(f.a)(Re.prototype,"cancelWebpartChanges",[b.a],Object.getOwnPropertyDescriptor(Re.prototype,"cancelWebpartChanges"),Re.prototype),Re),ot=(We=function(e){function t(e,n){var r;Object(l.a)(this,t),r=Object(p.a)(this,Object(d.a)(t).call(this,e,n));var o=e.experienceProps;o.sharepointVersion=r.props.connectorContext.spAddinContext.SPProductNumber;var a=q()().query(!0);return r.state={bcExperienceProps:o,experiencesFilter:"",isLoadingExperiences:!0,isSaving:!1,allExperiences:[],filteredExperiences:[],webPartId:a.wpId},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props.connectorContext,!(n=this.state.bcExperienceProps).accountId&&t.availableAccounts&&t.availableAccounts.length>0&&(n.accountId=t.availableAccounts[0].accountId),this.loadExperiences(n.accountId||""),this.setState({bcExperienceProps:n});case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"loadExperiences",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.props.connectorContext,r=this.state.bcExperienceProps,t){e.next=4;break}return e.abrupt("return");case 4:return this.setState({isLoadingExperiences:!0,experiencesFilter:""}),o=n.bcApiGateway.experiencesApi,e.next=8,o.getExperiences(t);case 8:a=e.sent,i=void 0,r.experienceId&&(i=Object(C.find)(a.items,{id:r.experienceId})),this.setState({isLoadingExperiences:!1,allExperiences:a.items,filteredExperiences:a.items,selectedExperience:i});case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleAccountChange",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=this.state.bcExperienceProps).accountId!==t.accountId&&(n.accountId=t.accountId,this.setState({bcExperienceProps:n}),this.loadExperiences(t.accountId));case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleExperiencesFilterChange",value:function(e){this.setState({experiencesFilter:e});var t=this.state.allExperiences;if(e){var n=e.toLowerCase();t=Object(C.filter)(t,(function(e){return!!(e.name&&e.name.toLowerCase().indexOf(n)>-1)}))}this.setState({filteredExperiences:t})}},{key:"experienceSelected",value:function(e,t){var n,r=this.state.bcExperienceProps;r.embedCodeOverride=void 0,t&&(n=e,r.experienceId=n.id),this.setState({bcExperienceProps:r,selectedExperience:n})}},{key:"handleExperiencePropsChanged",value:function(e){this.setState({bcExperienceProps:e})}},{key:"renderExperienceNameCell",value:function(e,t){var n=this.state.bcExperienceProps,r=q()("".concat(window.location.origin).concat(window.location.pathname.replace(/AppPartPage.aspx/i,"Default.aspx")).concat(window.location.search));return(r=(r=r.removeQuery("part")).removeQuery("IsDlg")).hash("/".concat(n.accountId,"/manage-experiences/").concat(t.id,"/preview")),s.createElement(s.Fragment,null,s.createElement("a",{className:"small",href:r.toString(),target:"_blank",rel:"noopener noreferrer"},t.name),s.createElement("br",null),s.createElement("div",{className:"small"},t.template),s.createElement("div",{className:"small"},t.id))}},{key:"applyWebpartChanges",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.setState({isSaving:!0}),t=this.props.connectorContext,n=t.spApiGateway,r=this.state,o=r.bcExperienceProps,a=r.selectedExperience,i=r.webPartId,a){e.next=6;break}return e.abrupt("return");case 6:return o.experienceId=a.id||"",e.next=9,n.spWebPartConfig.setBrightcoveWebPartProps(i,o);case 9:window.location.reload(!0);case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"cancelWebpartChanges",value:function(){var e=Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:window.location.reload(!0);case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.props.connectorContext,n=this.state,r=n.bcExperienceProps,o=n.experiencesFilter,a=n.isLoadingExperiences,c=n.isSaving,l=n.filteredExperiences,u=n.selectedExperience,p="col-xs-3 control-label small",d="col-xs-9 word-wrap small",h={mode:"radio",clickToSelect:!0,className:"info",onSelect:this.experienceSelected};r.experienceId&&(h.selected=[r.experienceId]),u&&(h.selected=[u.id]);var f=!a&&r.accountId&&u;return s.createElement("div",{className:"form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:p},"Brightcove Account:"),s.createElement("div",{className:d},s.createElement(S,{className:"input-sm",availableAccounts:t.availableAccounts,selectedAccountId:r.accountId,onChange:this.handleAccountChange}))),s.createElement("div",{className:"form-group"},s.createElement("label",{className:p},"Experiences Filter:"),s.createElement("div",{className:d},s.createElement("div",{className:"input-group"},s.createElement("input",{type:"search",placeholder:"Search",className:"form-control input-sm",value:o,onChange:function(t){return e.handleExperiencesFilterChange(t.target.value)}}),s.createElement("div",{className:"input-group-btn searchButton"},s.createElement(A.a,{bsSize:"small"},"\xa0",s.createElement("i",{className:"glyphicon glyphicon-search"})))))),a&&r.accountId&&s.createElement(B,{loadingText:"Loading Experiences..."}),!a&&r.accountId&&s.createElement(s.Fragment,null,s.createElement("div",{className:"well"},s.createElement(R.BootstrapTable,{data:l,striped:!0,bordered:!1,selectRow:h,options:{defaultSortName:"updatedAt",defaultSortOrder:"desc"},height:"250"},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:this.renderExperienceNameCell,dataSort:!0},"Name"),s.createElement(R.TableHeaderColumn,{dataField:"description",dataSort:!0,hidden:!0},"Short Description"),s.createElement(R.TableHeaderColumn,{dataField:"updatedAt",dataSort:!0,hidden:!0},"Updated At"),s.createElement(R.TableHeaderColumn,{dataField:"id",dataSort:!0,isKey:!0,hidden:!0},"ID")),s.createElement("hr",null)),s.createElement(Je,{bcExperienceProps:r,layoutMode:i.Part,connectorContext:t,experience:u,hideExperienceName:!0,labelClass:p,controlClass:d,showUploadWebPartButton:!1,onExperiencePropsChanged:this.handleExperiencePropsChanged})),s.createElement("div",{className:"col-xs-12",style:{paddingTop:"5px"}},c&&s.createElement(B,{loadingText:"Saving..."}),!c&&s.createElement(s.Fragment,null,s.createElement(A.a,{className:"pull-right",bsStyle:"primary",disabled:!f,style:{margin:"2px"},onClick:this.applyWebpartChanges},"Apply"),s.createElement(A.a,{className:"pull-right",style:{margin:"2px"},onClick:this.cancelWebpartChanges},"Cancel"))))}}]),t}(s.Component),Object(f.a)(We.prototype,"handleAccountChange",[b.a],Object.getOwnPropertyDescriptor(We.prototype,"handleAccountChange"),We.prototype),Object(f.a)(We.prototype,"handleExperiencesFilterChange",[b.a],Object.getOwnPropertyDescriptor(We.prototype,"handleExperiencesFilterChange"),We.prototype),Object(f.a)(We.prototype,"experienceSelected",[b.a],Object.getOwnPropertyDescriptor(We.prototype,"experienceSelected"),We.prototype),Object(f.a)(We.prototype,"handleExperiencePropsChanged",[b.a],Object.getOwnPropertyDescriptor(We.prototype,"handleExperiencePropsChanged"),We.prototype),Object(f.a)(We.prototype,"renderExperienceNameCell",[b.a],Object.getOwnPropertyDescriptor(We.prototype,"renderExperienceNameCell"),We.prototype),Object(f.a)(We.prototype,"applyWebpartChanges",[b.a],Object.getOwnPropertyDescriptor(We.prototype,"applyWebpartChanges"),We.prototype),Object(f.a)(We.prototype,"cancelWebpartChanges",[b.a],Object.getOwnPropertyDescriptor(We.prototype,"cancelWebpartChanges"),We.prototype),We),at=function(e){function t(e,n){var r;Object(l.a)(this,t),r=Object(p.a)(this,Object(d.a)(t).call(this,e,n));var o=q()().query(!0);return r.state={isLoading:!0,isEditing:"1"===o.editmode,senderId:o.SenderId,webPartId:o.wpId,embedCodeUrl:o.embedCodeUrl,bcPlayerProps:le.getBrightcovePlayerPropsFromQueryString(),bcExperienceProps:Fe.getBrightcoveExperiencePropsFromQueryString()},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,r,o,a,i,s,c,l,u,p,d;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props.connectorContext,r=t.spApiGateway,o=this.state,a=o.isEditing,i=o.webPartId,s=o.embedCodeUrl,c=this.state,l=c.bcPlayerProps,u=c.bcExperienceProps,this.setState({isLoading:!0}),s||!i){e.next=12;break}return e.next=8,r.spWebPartConfig.getBrightcoveWebPartProps(i,l);case 8:return l=e.sent,e.next=11,r.spWebPartConfig.getBrightcoveWebPartProps(i,u);case 11:u=e.sent;case 12:if(!(s&&s.length>0)){e.next=26;break}return e.prev=13,e.next=16,fetch(s,{method:"GET",cache:"no-cache",credentials:"same-origin",redirect:"follow"});case 16:return p=e.sent,e.next=19,p.text();case 19:d=e.sent,l.embedCodeOverride=d,u.embedCodeOverride=d,e.next=26;break;case 24:e.prev=24,e.t0=e.catch(13);case 26:if(!a){e.next=31;break}return e.next=29,n(1059);case 29:return e.next=31,t.initialize();case 31:this.setState({isLoading:!1,bcPlayerProps:l,bcExperienceProps:u});case 32:case"end":return e.stop()}}),e,this,[[13,24]])})));return function(){return e.apply(this,arguments)}}()},{key:"renderPlaylist",value:function(e){var t=this.state.embedCodeUrl;return e.accountId&&e.modeId||t?s.createElement(re,Object.assign({bypassPlayerPadding:!0},e)):s.createElement(s.Fragment,null,s.createElement("p",null,s.createElement("strong",null,"This Brightcove Playlist needs to be configured.")),s.createElement("p",null,"Please edit this section to select the Brightcove playlist to display."))}},{key:"renderVideo",value:function(e){var t=this.state.embedCodeUrl;return e.accountId&&e.modeId||t?s.createElement(re,Object.assign({bypassPlayerPadding:!0},e)):s.createElement(s.Fragment,null,s.createElement("p",null,s.createElement("strong",null,"This Brightcove Video needs to be configured.")),s.createElement("p",null,"Please edit this section to the Brightcove video to display."))}},{key:"renderExperience",value:function(e){var t=this.state.embedCodeUrl;return e.accountId&&e.experienceId||t?s.createElement($,e):s.createElement(s.Fragment,null,s.createElement("p",null,s.createElement("strong",null,"This Brightcove Experience needs to be configured.")),s.createElement("p",null,"Please edit this section to select the Brightcove experience to display."))}},{key:"render",value:function(){var e=this.props.connectorContext,t=this.state,n=t.isLoading,r=t.isEditing,o=t.bcPlayerProps,a=t.bcExperienceProps,i={};return n?s.createElement("div",{className:"part",style:i}):s.createElement(m.a,null,s.createElement("div",{className:"part",style:i},s.createElement(y.e,null,s.createElement(y.c,{path:"/part/playlist",exact:!0},s.createElement(s.Fragment,null,r&&s.createElement(rt,{connectorContext:e,playerProps:o}),!r&&this.renderPlaylist(o))),s.createElement(y.c,{path:"/part/video",exact:!0},s.createElement(s.Fragment,null,r&&s.createElement(nt,{connectorContext:e,playerProps:o}),!r&&this.renderVideo(o))),s.createElement(y.c,{path:"/part/experience",exact:!0},s.createElement(s.Fragment,null,r&&s.createElement(ot,{connectorContext:e,experienceProps:a}),!r&&this.renderExperience(a))),s.createElement(y.b,{to:"/"}))))}}]),t}(s.Component),it=function(e){function t(){return Object(l.a)(this,t),Object(p.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(h.a)(t,e),Object(u.a)(t,[{key:"render",value:function(){return s.createElement("div",{className:"jumbotron"},s.createElement("h1",null,"Brightcove Video Connector"),s.createElement("p",{className:"lead"}),s.createElement("p",null,s.createElement("a",{href:"http://www.brightcove.com",target:"_blank",rel:"noopener noreferrer",className:"btn btn-primary btn-lg"},"Visit Brightcove \xbb")))}}]),t}(s.Component),st=n(127),ct=n(1073),lt=(Qe=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={showFieldModal:!1,newFieldValue:e.fieldValue||""},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"showFieldModal",value:function(){this.setState({showFieldModal:!0})}},{key:"hideFieldModal",value:function(){this.setState({showFieldModal:!1,newFieldValue:this.props.fieldValue||""})}},{key:"handleFieldChange",value:function(e){this.setState({newFieldValue:e.target.value})}},{key:"handleFieldChange2",value:function(e){var t=e.target;this.setState({newFieldValue:t.value})}},{key:"notifyUpdateFieldUpdate",value:function(){this.props.updateFieldValue(this.state.newFieldValue),this.setState({showFieldModal:!1})}},{key:"render",value:function(){var e=this.props,t=e.fieldName,n=e.fieldDescription,r=e.fieldValueType,o=e.fieldValue,a=e.connectorContext,i=this.state,c=i.showFieldModal,l=i.newFieldValue;return s.createElement("tr",null,s.createElement("td",{className:"NameField"},s.createElement(A.a,{className:"mLinks",bsStyle:"primary",bsSize:"large",onClick:this.showFieldModal},t)),s.createElement("td",null,o&&s.createElement(A.a,{className:"mLinks",bsStyle:"primary",bsSize:"large",onClick:this.showFieldModal},Object(C.truncate)(o,{length:30}))),n&&s.createElement("td",null,n),s.createElement(X.a,{show:c,onHide:this.hideFieldModal},s.createElement(X.a.Header,{closeButton:!0},s.createElement(X.a.Title,null,t)),s.createElement(X.a.Body,null,(!r||"text"===r)&&s.createElement(s.Fragment,null,s.createElement(ct.a,null,"Value"),s.createElement(O.a,{type:"text",value:l,placeholder:"Enter Value",onChange:this.handleFieldChange2})),"group"===r&&a&&s.createElement(s.Fragment,null,s.createElement(ct.a,null,t),s.createElement(M,{connectorContext:a,value:l,onChange:this.handleFieldChange2})),s.createElement("br",null),s.createElement("h4",null,"Description"),s.createElement("span",null,n)),s.createElement(X.a.Footer,null,s.createElement(A.a,{onClick:this.hideFieldModal,bsStyle:"default"},"Close"),s.createElement(A.a,{onClick:this.notifyUpdateFieldUpdate,bsStyle:"primary"},"Ok"))))}}]),t}(s.Component),Object(f.a)(Qe.prototype,"showFieldModal",[b.a],Object.getOwnPropertyDescriptor(Qe.prototype,"showFieldModal"),Qe.prototype),Object(f.a)(Qe.prototype,"hideFieldModal",[b.a],Object.getOwnPropertyDescriptor(Qe.prototype,"hideFieldModal"),Qe.prototype),Object(f.a)(Qe.prototype,"handleFieldChange",[b.a],Object.getOwnPropertyDescriptor(Qe.prototype,"handleFieldChange"),Qe.prototype),Object(f.a)(Qe.prototype,"handleFieldChange2",[b.a],Object.getOwnPropertyDescriptor(Qe.prototype,"handleFieldChange2"),Qe.prototype),Object(f.a)(Qe.prototype,"notifyUpdateFieldUpdate",[b.a],Object.getOwnPropertyDescriptor(Qe.prototype,"notifyUpdateFieldUpdate"),Qe.prototype),Qe),ut=n(140);n(1060);function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(n,!0).forEach((function(t){Object(ee.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ht,ft=(Ge=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isAddingAccount:!1,isLoadingAccounts:!0,isSavingSettings:!1,isImportingSettings:!1,showConnectorSettings:!1,currentConnectorSettings:st.defaultBrightcoveSettings,connectorSettings:st.defaultBrightcoveSettings},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.connectorContext,r=t.spApiGateway,0!==t.validationResult.accountEmptyGroups.length||n.currentUserRole&&n.currentUserRole===Y.UserRole.Author||(window.location.hash="#/"),e.next=4,r.settingsManager.loadBrightcoveSettings();case 4:o=e.sent,a=o.brightcoveAccounts,this.setState({isLoadingAccounts:!1,currentConnectorSettings:Object(C.cloneDeep)(o),connectorSettings:o,accounts:a});case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"showConnectorSettings",value:function(){var e=Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({showConnectorSettings:!0});case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"hideConnectorSettings",value:function(){var e=Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.setState({showConnectorSettings:!1});case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"saveConnectorSettings",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.spApiGateway,n=this.state.currentConnectorSettings,this.setState({showConnectorSettings:!1,isSavingSettings:!0}),e.next=5,t.settingsManager.saveBrightcoveSettings(n);case 5:window.location.reload(!0);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"exportConnectorSettings",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.spApiGateway,e.next=3,t.settingsManager.loadBrightcoveSettings(!1);case 3:n=e.sent,r=new Blob([JSON.stringify(n)],{type:"text/plain;charset=utf-8"}),o=$e()(),He.saveAs(r,"BrightcoveConnectorSettings_".concat(o.format("YYYY-MM-DD"),"-").concat(o.format("hh-mm-ss"),".json"));case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"importConnectorSettings",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.props,r=n.connectorContext,o=n.spApiGateway,1===t.length){e.next=3;break}return e.abrupt("return");case 3:return this.setState({showConnectorSettings:!1,isImportingSettings:!0}),a=t[0],e.prev=5,e.next=8,Object(ut.b)(a);case 8:return i=e.sent,e.next=11,o.settingsManager.saveBrightcoveSettings(i,!1);case 11:e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(5),r.raiseError("The connector settings could not be imported. Ensure that the file is a vaild Brightcove Settings export file."),e.abrupt("return");case 17:window.location.reload(!0);case 18:case"end":return e.stop()}}),e,this,[[5,13]])})));return function(t){return e.apply(this,arguments)}}()},{key:"addNewAccount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isAddingAccount:!0}),t=this.props.spApiGateway,e.next=4,t.settingsManager.loadBrightcoveSettings();case 4:for(n=e.sent,r=Object(st.makeId)(5);Object(C.find)(n.brightcoveAccounts,{id:r});)r=Object(st.makeId)(5);return o={id:Object(st.makeId)(5),title:"New Account",defaultPlaylistPlayerId:"",defaultVideoPlayerId:"",accountAuthorsGroupName:"",accountViewersGroupName:"",accountId:"",clientId:"",clientSecret:""},n.brightcoveAccounts||(n.brightcoveAccounts=[]),n.brightcoveAccounts.push(o),e.next=12,t.settingsManager.saveBrightcoveSettings(n);case 12:window.location.hash="#/account-management/view/".concat(o.id);case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"downloadEmbedHelper",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.props.connectorContext,n=ze.b.generateEmbedHelper(t.spAddinContext.SPHostUrl,t.spAddinContext.SPAppWebUrl),He.saveAs(n,ze.b.getEmbedHelperFileNameFromAppWebUrl(t.spAddinContext.SPAppWebUrl));case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e,t=this,n=this.state,r=n.isAddingAccount,o=n.isLoadingAccounts,a=n.isSavingSettings,i=n.isImportingSettings,c=n.accounts,l=n.showConnectorSettings,u=n.currentConnectorSettings,p=n.connectorSettings;if(r)return s.createElement(B,{loadingText:"Creating New Account..."});if(a)return s.createElement(B,{loadingText:"Saving Brightcove Settings... The app will refresh once complete."});if(i)return s.createElement(B,{loadingText:"Importing Brightcove Settings... The app will refresh once complete."});if(o||!c)return s.createElement(B,{loadingText:"Loading Accounts..."});var d=!Object(C.isEqual)(u,p);return s.createElement(s.Fragment,null,s.createElement("ol",{className:"breadcrumb"},s.createElement("li",null,s.createElement(m.c,{to:"/"},"Brightcove Management")),s.createElement("li",{className:"active"},"Account Management")),!this.state.isLoadingAccounts&&s.createElement("div",null,s.createElement("table",{className:"table table-striped"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("td",null,"Account Title"),s.createElement("td",null,"Authors Group"),s.createElement("td",null,"Viewers Group"))),s.createElement("tbody",null,c.map((function(e,t){return s.createElement("tr",{key:t},s.createElement("td",null,s.createElement(m.c,{className:"mLinks btn btn-lg btn-primary",to:"/account-management/view/".concat(e.id)},e.title)),s.createElement("td",null,s.createElement("span",null,e.accountAuthorsGroupName)),s.createElement("td",null,s.createElement("span",null,e.accountViewersGroupName)))})))),s.createElement("hr",null),s.createElement("div",null,s.createElement(A.a,{bsSize:"large",bsStyle:"default",style:{margin:"2px"},onClick:this.showConnectorSettings},s.createElement(j.a,{icon:T.c}),"\xa0Connector Settings"),s.createElement(A.a,{bsSize:"large",bsStyle:"default",style:{margin:"2px"},onClick:this.addNewAccount},s.createElement(j.a,{icon:T.f}),"\xa0Add new account"),s.createElement(A.a,{bsSize:"large",bsStyle:"default",style:{margin:"2px"},onClick:this.downloadEmbedHelper},s.createElement(j.a,{icon:T.e}),"\xa0Download Embed Helper"),s.createElement("hr",null))),s.createElement(X.a,{show:l,onHide:this.hideConnectorSettings},s.createElement(X.a.Header,{closeButton:!0},s.createElement(X.a.Title,null,"Brightcove Connector Settings")),s.createElement(X.a.Body,null,s.createElement("table",{className:"table table-striped"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("td",null,"Property"),s.createElement("td",null,"Value"),s.createElement("td",null,"Description"))),s.createElement("tbody",null,s.createElement(lt,{fieldName:"Proxy Url",fieldDescription:"This field is used to specify the full address of the proxy (Leave blank to use the Brightcove Auth endpoint directly) ",fieldValue:u.proxySettings.proxyUrl,updateFieldValue:function(e){t.setState({currentConnectorSettings:dt({},u,{proxySettings:dt({},u.proxySettings,{proxyUrl:e})})})}})))),s.createElement(X.a.Footer,null,s.createElement(pe.a,{ref:function(t){e=t},onDrop:this.importConnectorSettings,disableClick:!0,multiple:!1,style:{textAlign:"center",marginTop:"5px",display:"none"}}),s.createElement(A.a,{className:"pull-left",onClick:this.exportConnectorSettings,bsStyle:"default"},s.createElement(j.a,{icon:T.e}),"\xa0Export Settings"),s.createElement(A.a,{className:"pull-left",onClick:function(){e&&e.open()},bsStyle:"default"},s.createElement(j.a,{icon:T.h}),"\xa0Import Settings"),s.createElement(A.a,{onClick:this.hideConnectorSettings,bsStyle:"default"},"Close"),s.createElement(A.a,{onClick:this.saveConnectorSettings,bsStyle:"primary",disabled:!d},"Save"))))}}]),t}(s.Component),Object(f.a)(Ge.prototype,"showConnectorSettings",[b.a],Object.getOwnPropertyDescriptor(Ge.prototype,"showConnectorSettings"),Ge.prototype),Object(f.a)(Ge.prototype,"hideConnectorSettings",[b.a],Object.getOwnPropertyDescriptor(Ge.prototype,"hideConnectorSettings"),Ge.prototype),Object(f.a)(Ge.prototype,"saveConnectorSettings",[b.a],Object.getOwnPropertyDescriptor(Ge.prototype,"saveConnectorSettings"),Ge.prototype),Object(f.a)(Ge.prototype,"exportConnectorSettings",[b.a],Object.getOwnPropertyDescriptor(Ge.prototype,"exportConnectorSettings"),Ge.prototype),Object(f.a)(Ge.prototype,"importConnectorSettings",[b.a],Object.getOwnPropertyDescriptor(Ge.prototype,"importConnectorSettings"),Ge.prototype),Object(f.a)(Ge.prototype,"addNewAccount",[b.a],Object.getOwnPropertyDescriptor(Ge.prototype,"addNewAccount"),Ge.prototype),Object(f.a)(Ge.prototype,"downloadEmbedHelper",[b.a],Object.getOwnPropertyDescriptor(Ge.prototype,"downloadEmbedHelper"),Ge.prototype),Ge);n(1061);function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(n,!0).forEach((function(t){Object(ee.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gt,vt,bt,Pt,wt,Et=(ht=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isDeletingAccount:!1,isSavingAccount:!1,isLoadingAccount:!0,isLoadingCustomFields:!1,showCustomFieldsModal:!1,showDeleteModal:!1},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props,n=t.connectorContext,r=t.validationResult,o=n.spApiGateway,0!==r.accountEmptyGroups.length||n.currentUserRole&&n.currentUserRole===Y.UserRole.Author||(window.location.hash="#/"),e.next=5,o.settingsManager.loadBrightcoveSettings();case 5:if(a=e.sent,i=Object(C.find)(a.brightcoveAccounts,{id:this.props.accountId})){e.next=10;break}return window.location.hash="#/account-management",e.abrupt("return");case 10:this.setState({isLoadingAccount:!1,account:Object(C.cloneDeep)(i),originalAccount:i});case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"saveAccountChanges",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.setState({isSavingAccount:!0}),t=this.state.account){e.next=4;break}return e.abrupt("return");case 4:return n=this.props.connectorContext,r=n.spApiGateway,e.next=8,r.settingsManager.loadBrightcoveSettings();case 8:return o=e.sent,a=Object(C.find)(o.brightcoveAccounts,{id:this.props.accountId}),Object(C.merge)(a,t),e.next=13,r.settingsManager.saveBrightcoveSettings(o);case 13:return e.next=15,n.refreshAccounts();case 15:this.setState({isSavingAccount:!1,account:Object(C.cloneDeep)(a),originalAccount:a}),window.location.hash="#/account-management",window.location.reload(!0);case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"deleteAccount",value:function(){this.setState({showDeleteModal:!0})}},{key:"deleteCancel",value:function(){this.setState({showDeleteModal:!1})}},{key:"deleteConfirm",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isDeletingAccount:!0}),t=this.props.connectorContext,n=t.spApiGateway,e.next=5,n.settingsManager.loadBrightcoveSettings();case 5:return r=e.sent,o=Object(C.find)(r.brightcoveAccounts,{id:this.props.accountId}),Object(C.pull)(r.brightcoveAccounts,o),e.next=10,n.settingsManager.saveBrightcoveSettings(r);case 10:window.location.hash="#/account-management";case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.props.connectorContext,n=this.state,r=n.isDeletingAccount,o=n.isSavingAccount,a=n.isLoadingAccount,i=n.account,c=n.originalAccount;if(r)return s.createElement(B,{loadingText:"Deleting Account..."});if(o)return s.createElement(B,{loadingText:"Saving Account settings... The app will refresh once complete."});if(a||!i)return s.createElement(B,{loadingText:"Loading Account..."});var l=Object(C.isEqual)(i,c);return s.createElement(s.Fragment,null,s.createElement("ol",{className:"breadcrumb"},s.createElement("li",null,s.createElement(m.c,{to:"/"},"Brightcove Management")),s.createElement("li",null,s.createElement(m.c,{to:"/account-management"},"Account Management")),s.createElement("li",{className:"active"},i.title)),s.createElement("div",{className:"hideSection"},s.createElement("table",{className:"table table-striped"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("td",null,"Property"),s.createElement("td",null,"Value"),s.createElement("td",null,"Description"))),s.createElement("tbody",null,s.createElement(lt,{fieldName:"Account Name",fieldDescription:"This field is used to specify the account name",fieldValue:i.title,updateFieldValue:function(t){e.setState({account:yt({},i,{title:t})})}}),s.createElement(lt,{fieldName:"DefaultVideoPlayerId",fieldDescription:"This field is used to specify the default video player of the account",fieldValue:i.defaultVideoPlayerId,updateFieldValue:function(t){e.setState({account:yt({},i,{defaultVideoPlayerId:t})})}}),s.createElement(lt,{fieldName:"DefaultPlaylistPlayerId",fieldDescription:"This field is used to specify the default playlist id of the account",fieldValue:i.defaultPlaylistPlayerId,updateFieldValue:function(t){e.setState({account:yt({},i,{defaultPlaylistPlayerId:t})})}}),s.createElement(lt,{fieldName:"Account Id",fieldDescription:"The Brightcove Account Id",fieldValue:i.accountId,updateFieldValue:function(t){e.setState({account:yt({},i,{accountId:t})})}}),s.createElement(lt,{fieldName:"Client Id",fieldDescription:"The Brightcove API Authentication Client Id",fieldValue:i.clientId,updateFieldValue:function(t){e.setState({account:yt({},i,{clientId:t})})}}),s.createElement(lt,{fieldName:"Client Secret",fieldDescription:"The Brightcove API Authentication Client Secret",fieldValue:i.clientSecret,updateFieldValue:function(t){e.setState({account:yt({},i,{clientSecret:t})})}}))),s.createElement("hr",null),s.createElement("table",{className:"table table-striped"},s.createElement("thead",null,s.createElement("tr",null,s.createElement("td",null,"Group"),s.createElement("td",null,"Value"))),s.createElement("tbody",null,s.createElement(lt,{fieldName:"Author's Group",fieldValue:i.accountAuthorsGroupName,fieldValueType:"group",connectorContext:t,updateFieldValue:function(t){e.setState({account:yt({},i,{accountAuthorsGroupName:t})})}}),s.createElement(lt,{fieldName:"Viewer's Group",fieldValue:i.accountViewersGroupName,fieldValueType:"group",connectorContext:t,updateFieldValue:function(t){e.setState({account:yt({},i,{accountViewersGroupName:t})})}}))),s.createElement("div",null,s.createElement("hr",null),s.createElement(A.a,{bsStyle:l?"default":"primary",bsSize:"large",disabled:l,onClick:this.saveAccountChanges,style:{margin:"2px"}},"Save Account"),s.createElement(A.a,{bsStyle:"warning",bsSize:"large",onClick:this.deleteAccount,style:{margin:"2px"}},"Delete Account"),s.createElement(m.b,{className:"btn btn-lg btn-default",to:"/account-management",style:{margin:"2px"}},"Cancel"))),s.createElement(X.a,{show:this.state.showDeleteModal,onHide:this.deleteCancel},s.createElement(X.a.Header,{closeButton:!0},s.createElement(X.a.Title,null,"Confirm Account Deletion")),s.createElement(X.a.Body,null,s.createElement("h5",null,"This account will be permanently deleted. Are you sure you want to proceed?")),s.createElement(X.a.Footer,null,s.createElement(A.a,{onClick:this.deleteConfirm,bsStyle:"danger"},"Delete Account"),s.createElement(A.a,{onClick:this.deleteCancel},"Cancel"))),s.createElement(y.a,{when:!l,message:"There are unsaved changes. Are you sure you wish to leave?"}))}}]),t}(s.Component),Object(f.a)(ht.prototype,"saveAccountChanges",[b.a],Object.getOwnPropertyDescriptor(ht.prototype,"saveAccountChanges"),ht.prototype),Object(f.a)(ht.prototype,"deleteAccount",[b.a],Object.getOwnPropertyDescriptor(ht.prototype,"deleteAccount"),ht.prototype),Object(f.a)(ht.prototype,"deleteCancel",[b.a],Object.getOwnPropertyDescriptor(ht.prototype,"deleteCancel"),ht.prototype),Object(f.a)(ht.prototype,"deleteConfirm",[b.a],Object.getOwnPropertyDescriptor(ht.prototype,"deleteConfirm"),ht.prototype),ht),xt=n(455),Ot=n(1074),Ct=(n(1062),gt=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={videoFiles:[],currentTags:[]},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"onDrop",value:function(e){var t=this,n=this.props,r=n.connectorContext,o=n.accountId,a=this.state,i=a.videoFiles,s=a.selectedFolder,c=a.currentTags;if(!o)throw new Error("An account must be selected.");e.forEach(function(){var e=Object(E.a)(w.a.mark((function e(n){var a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a={file:n,accountId:o,targetFolder:Object(C.cloneDeep)(s),tags:Object(C.cloneDeep)(c),fileName:n.name,isUploading:!0,isComplete:!1,hasError:!1,status:"Starting Upload...",progress:10},i.push(a),r.performDynamicIngest(a,(function(e){var n=i.indexOf(e);i[n]=e,t.setState({videoFiles:i})}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.setState({videoFiles:i})}},{key:"updateVideoStatus",value:function(){this.setState({videoFiles:Object(xt.a)(this.state.videoFiles)})}},{key:"handleSelectedAccountChange",value:function(e){var t=this.props.onAccountChange;t&&t(e.accountId)}},{key:"handleSelectedFolderChange",value:function(e){this.setState({selectedFolder:e})}},{key:"handleOnTagsChange",value:function(e){var t=[],n=e.target.value;n&&(t=n.split(",").map((function(e){return e.trim()}))),this.setState({currentTags:t})}},{key:"render",value:function(){var e,t=this.props,n=t.connectorContext,r=t.accountId,o=this.state,a=o.videoFiles,i=o.selectedFolder,c=o.currentTags,l=Object(C.filter)(a,{isUploading:!0}),u=c.join(",");return s.createElement(s.Fragment,null,s.createElement("ol",{className:"breadcrumb"},s.createElement("li",null,s.createElement(m.b,{to:"/"},"Brightcove Management")),s.createElement("li",{className:"active"},"Add Videos")),s.createElement("div",{className:"formContent"},s.createElement("label",null,"Select Account:")," ",s.createElement(S,{availableAccounts:n.availableAccounts,selectedAccountId:r,onChange:this.handleSelectedAccountChange})),s.createElement(pe.a,{className:"dropzone",ref:function(t){e=t},onDrop:this.onDrop,disableClick:!0},(function(){return s.createElement("div",{style:{textAlign:"center",marginTop:"5px"}},s.createElement("div",{className:"drag-videos-icon"},s.createElement(j.a,{icon:T.a,style:{color:"#d32781"},size:"5x"})),s.createElement("h5",{className:"drag-videos-target"},"Drag Your Videos Here"),s.createElement("div",{className:"drag-or-label dimmable"},"-or-"),s.createElement(A.a,{bsStyle:"primary",onClick:function(){e&&e.open()}},"Browse for Videos"))})),s.createElement("div",{className:"form-group",style:{paddingTop:"5px"}},s.createElement("label",{className:"control-label"},"Folder for all current uploads"),s.createElement("div",{className:"control-group"},s.createElement(D,{accountId:r,connectorContext:n,selectedFolderId:i&&i.id,onChange:this.handleSelectedFolderChange}))),s.createElement("div",{className:"form-group",style:{paddingTop:"5px"}},s.createElement("label",{className:"control-label"},"Tags for all current uploads (comma-separated)"),s.createElement("div",{className:"control-group"},s.createElement("input",{className:"form-control",type:"text",value:u,onChange:this.handleOnTagsChange}))),s.createElement("hr",null),s.createElement("table",{className:"table table-striped"},s.createElement("tbody",null,a.map((function(e,t){return s.createElement("tr",{key:t,className:"row"},s.createElement("td",null,s.createElement("div",null,s.createElement("div",{className:"result"},e.fileName,"\xa0",s.createElement("span",{className:"small"},"(Account:\xa0",s.createElement("strong",null,e.accountId),"\xa0 Folder:\xa0",s.createElement("strong",null,e.targetFolder&&e.targetFolder.name,!e.targetFolder&&s.createElement("i",null,"Root Folder")),"\xa0 Tags:\xa0",s.createElement("strong",null,e.tags&&e.tags.length>0&&e.tags.join(", "),(!e.tags||e.tags.length<=0)&&s.createElement("i",null,"No Tags Entered")),")")),s.createElement("div",null,s.createElement(Ot.a,{bsStyle:e.hasError?"danger":"info",now:e.progress,striped:!0,active:!e.isComplete}),s.createElement("div",{style:{fontSize:"small"}},s.createElement("span",null,e.status),100===e.progress&&!e.hasError&&e.bcVideo&&s.createElement(m.b,{className:"btn btn-link",to:"/".concat(e.accountId,"/manage-videos/").concat(e.bcVideo.id,"/edit"),target:l.length>0?"_blank":"_self"},"Edit Video"))))))})))),s.createElement(y.a,{when:l&&l.length>0,message:"There are videos currently uploading. Are you sure you wish to leave?"}))}}]),t}(s.Component),Object(f.a)(gt.prototype,"onDrop",[b.a],Object.getOwnPropertyDescriptor(gt.prototype,"onDrop"),gt.prototype),Object(f.a)(gt.prototype,"handleSelectedAccountChange",[b.a],Object.getOwnPropertyDescriptor(gt.prototype,"handleSelectedAccountChange"),gt.prototype),Object(f.a)(gt.prototype,"handleSelectedFolderChange",[b.a],Object.getOwnPropertyDescriptor(gt.prototype,"handleSelectedFolderChange"),gt.prototype),Object(f.a)(gt.prototype,"handleOnTagsChange",[b.a],Object.getOwnPropertyDescriptor(gt.prototype,"handleOnTagsChange"),gt.prototype),gt),St=(n(1063),vt=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isLoadingExperiences:!0,showEmbedModal:!1,experiences:[]},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){this.loadExperiences(this.props.accountId)}},{key:"UNSAFE_componentWillUpdate",value:function(){var e=Object(E.a)(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.accountId!==this.props.accountId&&this.loadExperiences(t.accountId);case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadExperiences",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n,r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return this.setState({isLoadingExperiences:!0}),n=this.props.bcApiGateway.experiencesApi,e.prev=4,e.next=7,n.getExperiences(t);case 7:r=e.sent,this.setState({isLoadingExperiences:!1,experiences:r.items}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(4),this.setState({isLoadingExperiences:!1,experiences:[]});case 14:case"end":return e.stop()}}),e,this,[[4,11]])})));return function(t){return e.apply(this,arguments)}}()},{key:"handleAccountChange",value:function(){var e=Object(E.a)(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=this.props.onAccountChange)&&n(t.accountId),this.loadExperiences(t.accountId);case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleEmbedPlayerPropsChanged",value:function(e){this.setState({embedExperienceProps:e})}},{key:"showEmbedModal",value:function(e){var t=this.props.accountId,n=Fe.getDefaultBrightcoveExperienceProps();n.accountId=t,n.experienceId=e.id,n.sharepointVersion=this.props.connectorContext.spAddinContext.SPProductNumber,this.setState({showEmbedModal:!0,embedExperience:e,embedExperienceProps:n})}},{key:"hideEmbedModal",value:function(){this.setState({showEmbedModal:!1,embedExperience:void 0,embedExperienceProps:void 0})}},{key:"renderExperienceNameCell",value:function(e,t){var n=this.props.accountId,r="/".concat(n,"/manage-experiences/").concat(t.id,"/preview");return s.createElement(s.Fragment,null,s.createElement(m.b,{to:r},t.name),s.createElement("br",null),t.videos.videoIds&&t.videos.videoIds.length>0&&s.createElement(s.Fragment,null,s.createElement("div",{style:{fontSize:"small"}},"Video IDs in list: "),s.createElement("div",{style:{fontSize:"xx-small"}},t.videos.videoIds.map((function(e){return s.createElement("span",{key:e,style:{paddingLeft:"5px",float:"left"}},e)})))),(!t.videos.videoIds||0===t.videos.videoIds.length)&&s.createElement("i",null,"No Videos"))}},{key:"renderEditLink",value:function(e,t){var n=this;return s.createElement("div",{className:"result text-center"},s.createElement("div",null,s.createElement(A.a,{bsStyle:"success",style:{width:"70px"},bsSize:"small",onClick:function(){return n.showEmbedModal(t)}},"Embed")))}},{key:"render",value:function(){var e=this.props,t=e.accountId,n=e.connectorContext,r=this.state,o=r.isLoadingExperiences,a=r.experiences,c=r.showEmbedModal,l=r.embedExperience,u=r.embedExperienceProps;return s.createElement(s.Fragment,null,s.createElement("ol",{className:"breadcrumb"},s.createElement("li",null,s.createElement(m.b,{to:"/"},"Brightcove Management")),s.createElement("li",{className:"active"},"Manage Experiences")),s.createElement("div",{className:"search form-horizontal"},s.createElement("div",{className:"form-group"},s.createElement("label",{className:"col-md-3 control-label"},"Select Account:")," ",s.createElement("div",{className:"col-md-9"},s.createElement(S,{availableAccounts:n.availableAccounts,selectedAccountId:t,onChange:this.handleAccountChange})))),t&&s.createElement(s.Fragment,null,o&&s.createElement(B,{loadingText:"Loading Experiences..."}),!o&&s.createElement(s.Fragment,null,s.createElement(R.BootstrapTable,{data:a,striped:!0,bordered:!1,options:{defaultSortName:"updatedAt",defaultSortOrder:"desc",noDataText:"There are no experiences defined in this account."}},s.createElement(R.TableHeaderColumn,{dataField:"name",dataFormat:this.renderExperienceNameCell,dataSort:!0},"Name"),s.createElement(R.TableHeaderColumn,{dataField:"description",dataSort:!0},"Short Description"),s.createElement(R.TableHeaderColumn,{dataField:"template",dataSort:!0},"Type"),s.createElement(R.TableHeaderColumn,{width:"200",dataField:"id",dataSort:!0,isKey:!0},"ID"),s.createElement(R.TableHeaderColumn,{dataField:"updatedAt",dataSort:!0,hidden:!0},"Updated At"),s.createElement(R.TableHeaderColumn,{width:"90",dataFormat:this.renderEditLink},"Edit Link")),s.createElement("hr",null)),s.createElement(X.a,{className:"embed",show:c,onHide:this.hideEmbedModal,bsSize:"large"},s.createElement(X.a.Header,{closeButton:!0},s.createElement(X.a.Title,null,"Embed Experience")),s.createElement(X.a.Body,null,u&&s.createElement(Je,{bcExperienceProps:u,layoutMode:i.Full,connectorContext:n,experience:l,onExperiencePropsChanged:this.handleEmbedPlayerPropsChanged})),s.createElement(X.a.Footer,null))))}}]),t}(s.Component),Object(f.a)(vt.prototype,"UNSAFE_componentWillMount",[b.a],Object.getOwnPropertyDescriptor(vt.prototype,"UNSAFE_componentWillMount"),vt.prototype),Object(f.a)(vt.prototype,"UNSAFE_componentWillUpdate",[b.a],Object.getOwnPropertyDescriptor(vt.prototype,"UNSAFE_componentWillUpdate"),vt.prototype),Object(f.a)(vt.prototype,"handleAccountChange",[b.a],Object.getOwnPropertyDescriptor(vt.prototype,"handleAccountChange"),vt.prototype),Object(f.a)(vt.prototype,"handleEmbedPlayerPropsChanged",[b.a],Object.getOwnPropertyDescriptor(vt.prototype,"handleEmbedPlayerPropsChanged"),vt.prototype),Object(f.a)(vt.prototype,"showEmbedModal",[b.a],Object.getOwnPropertyDescriptor(vt.prototype,"showEmbedModal"),vt.prototype),Object(f.a)(vt.prototype,"hideEmbedModal",[b.a],Object.getOwnPropertyDescriptor(vt.prototype,"hideEmbedModal"),vt.prototype),Object(f.a)(vt.prototype,"renderExperienceNameCell",[b.a],Object.getOwnPropertyDescriptor(vt.prototype,"renderExperienceNameCell"),vt.prototype),Object(f.a)(vt.prototype,"renderEditLink",[b.a],Object.getOwnPropertyDescriptor(vt.prototype,"renderEditLink"),vt.prototype),vt),_t=(n(1064),bt=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isLoadingExperience:!0},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getExperience();case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getExperience",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.props,n=t.accountId,r=t.experienceId,o=t.bcApiGateway,r){e.next=4;break}return window.location.hash="#/".concat(n,"/manage-experiences"),e.abrupt("return");case 4:return this.setState({isLoadingExperience:!0}),a=o.experiencesApi,e.next=8,a.getExperienceById(n,r);case 8:i=e.sent,this.setState({isLoadingExperience:!1,experience:i});case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.props,t=e.experienceId,n=e.accountId,r=this.state,o=r.isLoadingExperience,a=r.experience;return o||!a?s.createElement(B,{loadingText:"Loading Experience..."}):s.createElement(s.Fragment,null,s.createElement("ol",{className:"breadcrumb"},s.createElement("li",null,s.createElement(m.b,{to:"/"},"Brightcove Management")),s.createElement("li",null,s.createElement(m.b,{to:"/".concat(n,"/manage-experiences")},"Manage Experiences")),s.createElement("li",null,s.createElement(m.b,{to:"/".concat(n,"/manage-experiences")},"Account ",n)),s.createElement("li",{className:"active"},"Experience ",t.substr(0,7))),s.createElement("div",{className:"form-horizontal"},s.createElement("h3",null,a.name),s.createElement("div",{className:"row"},s.createElement("iframe",{title:"Experience",className:"col-md-12",src:a.previewUrl,style:{height:"500px"}})),s.createElement("hr",null),s.createElement("div",{className:"pull-right"},s.createElement(m.b,{className:"btn btn-default btn-space",to:"/".concat(a.accountId,"/manage-experiences")},"Cancel"))))}}]),t}(s.Component),Object(f.a)(bt.prototype,"componentDidMount",[b.a],Object.getOwnPropertyDescriptor(bt.prototype,"componentDidMount"),bt.prototype),Object(f.a)(bt.prototype,"getExperience",[b.a],Object.getOwnPropertyDescriptor(bt.prototype,"getExperience"),bt.prototype),bt),kt=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isPerformingInstallationAction:!1,installationActionMessage:""},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"render",value:function(){var e=this.props.validationResult,t=this.state,n=t.isPerformingInstallationAction,r=t.installationActionMessage;return s.createElement(s.Fragment,null,n&&s.createElement(B,{loadingText:r||"Configuring..."}),!n&&s.createElement(s.Fragment,null,s.createElement("h4",null,"Welcome to the Brightcove Video Connector for SharePoint!"),s.createElement("p",null,"We've detected a few installation steps that need to be completed:"),s.createElement("ul",null,!e.isProxyDefined&&s.createElement("li",null,s.createElement("span",null,s.createElement("strong",null,"Missing/Empty Proxy settings.")),s.createElement("div",null,"The Brightcove Proxy settings must be provided. Please provide the proxy settings in 'Connector Settings' under Account Management"),s.createElement("br",null)),!e.areAccountsAvailable&&s.createElement(s.Fragment,null,s.createElement("li",null,s.createElement("span",null,s.createElement("strong",null,"No accounts defined")),s.createElement("div",null,"Please add a new account within account management."))),e.areAccountsAvailable&&s.createElement(s.Fragment,null,e.accountEmptyAccountId.length>0&&s.createElement("li",null,s.createElement("span",null,s.createElement("strong",null,"Account Id not defined in account")),s.createElement("div",null,"The following accounts are missing the account id:"),e.accountEmptyAccountId.map((function(e,t){return s.createElement("div",{key:t},e)})),s.createElement("br",null),s.createElement("p",null,"Please correct this by editing the account settings"),s.createElement("br",null)),e.accountEmptyGroups.length>0&&s.createElement("li",null,s.createElement("span",null,s.createElement("strong",null,"Groups not defined in account")),s.createElement("div",null,"The following accounts do not have groups defined:"),e.accountEmptyGroups.map((function(e,t){return s.createElement("div",{key:t},e)})),s.createElement("br",null),s.createElement("p",null,"Please correct this by editing the account settings"),s.createElement("br",null)),e.missingGroups.length>0&&s.createElement("li",null,s.createElement("span",null,s.createElement("strong",null,"Missing Groups")),s.createElement("div",null,"The following groups are specified within account settings but have not been created:"),e.missingGroups.map((function(e,t){return s.createElement("div",{key:t},e)})),s.createElement("br",null)))),s.createElement("p",null,s.createElement("i",null,"For more information or assistance, please visit the Brightcove Video Connector documentation"," ",s.createElement("a",{href:"https://support.brightcove.com/getting-started-brightcove-video-connect-sharepoint",target:"_blank",rel:"noopener noreferrer"}," ","by clicking this link")))))}}]),t}(s.Component),jt=(n(1065),function(e){var t=e.label,n=e.to,r=e.activeOnlyWhenExact,o=e.path;return s.createElement(y.c,{path:o||n,exact:r,children:function(e){var r=e.match;return s.createElement(s.Fragment,null,r&&s.createElement(m.b,{className:"btn btn-lg btn-block btn-primary",to:n},t),!r&&s.createElement(m.b,{className:"btn btn-lg btn-block btn-default",to:n},t))}})}),Tt=(Pt=function(e){function t(e,n){var r;return Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n))).state={isLoading:!1,showInstallationModal:!1,validationResult:{isValid:!1,isSettingsListCreated:!1,isProxyDefined:!1,isAccountsListCreated:!1,isVideosListCreated:!1,areAccountsAvailable:!1,accountEmptyAccountId:[],accountEmptyGroups:[],missingGroups:[],currentUserAvailableAccounts:[],currentUserMaxRole:Y.UserRole.None}},r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"UNSAFE_componentWillMount",value:function(){var e=Object(E.a)(w.a.mark((function e(){var t,n,r,o;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.props.connectorContext,this.setState({isLoading:!0}),e.next=4,t.validateConfiguration();case 4:if(n=e.sent,t.currentUserRole=n.currentUserMaxRole,!n.isValid){e.next=9;break}return e.next=9,t.initialize();case 9:r=Object(y.g)(window.location.hash.replace("#",""),{path:"/:accountId(\\d+)"}),o="",r&&(o=r.params.accountId),!o&&t.availableAccounts&&t.availableAccounts.length>0&&(o=t.availableAccounts[0].accountId),this.setState({isLoading:!1,validationResult:n,showInstallationModal:!n.isValid&&(!t.currentUserRole||t.currentUserRole===Y.UserRole.Author)});case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"handleAccountChange",value:function(e){var t="",n=Object(y.g)(window.location.hash.replace("#",""),{path:"/:accountId(\\d+):accountActionPath(.*)?"});n&&n.params.accountActionPath&&(t=n.params.accountActionPath),window.location.hash="/".concat(e).concat(t),window.location.reload()}},{key:"hideInstallationModel",value:function(){this.setState({showInstallationModal:!1})}},{key:"render",value:function(){var e=this;if(this.state.isLoading)return s.createElement(V,null);var t=this.props.connectorContext,n=t.bcApiGateway,r=t.spApiGateway,o=this.state,a=o.validationResult,i=o.showInstallationModal,c=t&&t.currentUserRole&&t.currentUserRole===Y.UserRole.Author||a.accountEmptyGroups.length>0||a.accountEmptyAccountId.length>0||!1,l=Object(y.g)(window.location.hash.replace("#",""),{path:"/:accountId(\\d+)"}),u="";return l?u=l.params.accountId:t.availableAccounts&&t.availableAccounts.length>0&&(u=t.availableAccounts[0].accountId),s.createElement(m.a,null,s.createElement("div",{className:"App"},s.createElement("div",{className:"container body-content"},s.createElement("div",{className:"row"},s.createElement("div",{className:"col-md-4"},s.createElement("nav",{className:"leftNav"},s.createElement(jt,{to:"/",label:"Home",activeOnlyWhenExact:!0,path:"/:accountId(\\d+)?"}),c&&s.createElement(jt,{to:"/account-management",label:"Account Management"}),u&&s.createElement(s.Fragment,null,s.createElement(jt,{to:"/".concat(u,"/add-videos"),label:"Add Videos",path:"/:accountId(\\d+)/add-videos"}),s.createElement(jt,{to:"/".concat(u,"/manage-videos"),label:"Manage Videos",path:"/:accountId(\\d+)/manage-videos"}),s.createElement(jt,{to:"/".concat(u,"/manage-playlists"),label:"Manage Playlists",path:"/:accountId(\\d+)/manage-playlists"}),s.createElement(jt,{to:"/".concat(u,"/manage-experiences"),label:"Manage Experiences",path:"/:accountId(\\d+)/manage-experiences"})))),s.createElement("div",{className:"col-md-8"},s.createElement(y.e,null,s.createElement(y.c,{path:"/:accountId(\\d+)?",exact:!0,component:it}),s.createElement(y.c,{path:"/account-management",exact:!0},s.createElement(ft,{connectorContext:t,bcApiGateway:n,spApiGateway:r,validationResult:a})),s.createElement(y.c,{path:"/account-management/view/:accountSharePointId",render:function(e){return s.createElement(Et,{connectorContext:t,accountId:e.match.params.accountSharePointId,validationResult:a})}}),s.createElement(y.c,{path:"/:accountId/add-videos",render:function(){return s.createElement(Ct,{connectorContext:t,accountId:u,onAccountChange:e.handleAccountChange})}}),s.createElement(y.c,{path:"/:accountId/manage-videos",exact:!0},s.createElement(ue,{accountId:u,connectorContext:t,onAccountChange:this.handleAccountChange})),s.createElement(y.c,{path:"/:accountId/manage-videos/:videoId/edit",render:function(e){return s.createElement(ge,{connectorContext:t,accountId:u,videoId:e.match.params.videoId})}}),s.createElement(y.c,{path:"/:accountId/manage-playlists",exact:!0},s.createElement(Ce,{accountId:u,connectorContext:t,bcApiGateway:n,spApiGateway:r,onAccountChange:this.handleAccountChange})),s.createElement(y.c,{path:"/:accountId/manage-playlists/new",render:function(){return s.createElement(_e,{accountId:u,bcApiGateway:n,spApiGateway:r})}}),s.createElement(y.c,{path:"/:accountId/manage-playlists/:playlistId/edit",render:function(e){return s.createElement(_e,{bcApiGateway:n,spApiGateway:r,accountId:u,playlistId:e.match.params.playlistId})}}),s.createElement(y.c,{path:"/:accountId/manage-experiences",exact:!0},s.createElement(St,{accountId:u,connectorContext:t,bcApiGateway:n,spApiGateway:r,onAccountChange:this.handleAccountChange})),s.createElement(y.c,{path:"/:accountId/manage-experiences/:experienceId/preview",render:function(e){return s.createElement(_t,{connectorContext:t,bcApiGateway:n,spApiGateway:r,accountId:u,experienceId:e.match.params.experienceId})}}),u&&s.createElement(y.b,{to:"/".concat(u)}),!u&&s.createElement(y.b,{to:"/"})))),s.createElement("hr",null),s.createElement("footer",null,s.createElement("p",{className:"copyright"},"\xa9 2018 - Brightcove"),s.createElement("p",{className:"version"},"4.1.4"))),s.createElement(X.a,{className:"installation-modal",show:i,onHide:this.hideInstallationModel,bsSize:"large"},s.createElement(X.a.Header,{closeButton:!0},s.createElement(X.a.Title,null,"Brightcove Video Connector for SharePoint Installation")),s.createElement(X.a.Body,null,s.createElement(kt,{spApiGateway:t.spApiGateway,validationResult:a})),s.createElement(X.a.Footer,null))))}}]),t}(s.Component),Object(f.a)(Pt.prototype,"handleAccountChange",[b.a],Object.getOwnPropertyDescriptor(Pt.prototype,"handleAccountChange"),Pt.prototype),Object(f.a)(Pt.prototype,"hideInstallationModel",[b.a],Object.getOwnPropertyDescriptor(Pt.prototype,"hideInstallationModel"),Pt.prototype),Pt),It=(wt=function(e){function t(e,n){var r;Object(l.a)(this,t),(r=Object(p.a)(this,Object(d.a)(t).call(this,e,n)))._notificationSystem=void 0;var o=new Y.ConnectorContext(r.raiseError);r.state={connectorContext:o};var a=o.spAddinContext;if(a.mini)switch(a.mini){case"videos":window.location.hash="#/mini/videos";break;case"playlists":window.location.hash="#/mini/playlists";break;case"experiences":window.location.hash="#/mini/experiences"}if(a.part)switch(a.part){case"experience":window.location.hash="#part/experience";break;case"playlist":window.location.hash="#/part/playlist";break;case"video":window.location.hash="#/part/video"}return r}return Object(h.a)(t,e),Object(u.a)(t,[{key:"render",value:function(){var e=this,t=this.state.connectorContext;return s.createElement(m.a,null,s.createElement(s.Fragment,null,s.createElement(y.e,null,s.createElement(y.c,{path:"/mini/:area",exact:!0},s.createElement(tt,{connectorContext:t,raiseError:this.raiseError})),s.createElement(y.c,{path:"/part/:kind",exact:!0},s.createElement(at,{connectorContext:t,raiseError:this.raiseError})),s.createElement(y.c,null,s.createElement(Tt,{connectorContext:t,raiseError:this.raiseError}))),s.createElement(v.a,{ref:function(t){return e.setNotificationSystem(t)}})))}},{key:"setNotificationSystem",value:function(e){this._notificationSystem=e}},{key:"raiseError",value:function(e){return!this._notificationSystem||(this._notificationSystem.addNotification({title:"An error has occurred",message:e,level:"error",position:"br",autoDismiss:0}),!1)}}]),t}(s.Component),Object(f.a)(wt.prototype,"setNotificationSystem",[b.a],Object.getOwnPropertyDescriptor(wt.prototype,"setNotificationSystem"),wt.prototype),Object(f.a)(wt.prototype,"raiseError",[b.a],Object.getOwnPropertyDescriptor(wt.prototype,"raiseError"),wt.prototype),wt);n(35),n(1066),n(1067),n(1068),n(1069),n(1070);c.render(s.createElement(It,null),document.getElementById("root"))},127:function(e,t,n){"use strict";var r=n(439);n.o(r,"defaultBrightcoveSettings")&&n.d(t,"defaultBrightcoveSettings",(function(){return r.defaultBrightcoveSettings})),n.o(r,"makeId")&&n.d(t,"makeId",(function(){return r.makeId}));var o=n(154);n.d(t,"defaultBrightcoveSettings",(function(){return o.a}));n(197),n(196);var a=n(140);n.d(t,"makeId",(function(){return a.a}))},140:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(1),o=n.n(r),a=n(5),i=n(6);function s(e){for(var t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=0;r<e;r++)t+=n.charAt(Math.floor(Math.random()*n.length));return t}function c(e){return l.apply(this,arguments)}function l(){return(l=Object(a.a)(o.a.mark((function e(t){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new FileReader,e.abrupt("return",new Promise((function(e,r){n.onerror=function(){n.abort(),r(new Error("Problem parsing input file."))},n.onload=function(){Object(i.isString)(n.result)&&e(JSON.parse(n.result))},n.readAsText(t)})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},154:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={proxySettings:{proxyUrl:""},brightcoveAccounts:[]}},196:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(8),o=n(9),a=n(17),i=n.n(a),s=function(){function e(){Object(r.a)(this,e),this.$document=void 0,this.$promises=void 0,this.$document=document,this.$promises={}}return Object(o.a)(e,[{key:"loadIFrame",value:function(e,t){var n=this;if(!e)throw Error("The url of the page to load in the iframe must be specified as the first parameter.");return t=t||"allow-forms allow-scripts allow-same-origin",e=i()(e).normalize().toString(),this._loader(e,(function(){var r=n.$document.createElement("iframe");return r.tabIndex=-1,r.style.display="none",r.height="0",r.width="0",r.frameBorder="0",t&&(r.sandbox=t),r.src=e,n.$document.body.appendChild(r),r}))}},{key:"loadScript",value:function(e){var t=this;if(!e)throw Error("The url of the script to load must be specified as the first parameter.");return e=i()(e).normalize().toString(),this._loader(e,(function(){var n=t.$document.createElement("script");return n.src=e,t.$document.body.appendChild(n),n}))}},{key:"loadCSS",value:function(e){var t=this;if(!e)throw Error("The url of the css to load must be specified as the first parameter.");return e=i()(e).normalize().toString(),this._loader(e,(function(){var n=t.$document.createElement("link");return n.rel="stylesheet",n.type="text/css",n.href=e,t.$document.head.appendChild(n),n}))}},{key:"_loader",value:function(e,t){if(this.$promises[e])return this.$promises[e];var n,r,o=new Promise((function(e,t){n=e,r=t})),a=t(e);return a.onload=a.onreadystatechange=function(){a.readyState&&"complete"!==a.readyState&&"loaded"!==a.readyState||n(a)},a.onerror=function(){r(a)},this.$promises[e]=o}}]),e}()},197:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(1),o=n.n(r),a=n(5),i=n(8),s=n(9),c=n(48),l=n.n(c),u=n(6),p=function(){function e(t,n){Object(i.a)(this,e),this._spApiGateway=void 0,this._proxyUrl=void 0,this._accessTokens=void 0,this._errorCallback=void 0,this._accessTokens={},this._spApiGateway=t,this._errorCallback=n}return Object(s.a)(e,[{key:"obtainAccessToken",value:function(){var e=Object(a.a)(o.a.mark((function e(t){var n,r,a,i,s,c,p,d,h;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("Account Id must be specified.");case 2:if(this._proxyUrl){e.next=17;break}return e.prev=3,e.next=6,this._spApiGateway.settingsManager.loadBrightcoveSettings();case 6:n=e.sent,(r=n.proxySettings.proxyUrl)&&!Object(u.endsWith)(r,"/")&&(r+="/"),this._proxyUrl=r,e.next=17;break;case 13:throw e.prev=13,e.t0=e.catch(3),this.raiseError("An error occurred while attempting to retrieve brightcove settings: ".concat(e.t0));case 17:if(a=this._proxyUrl?"".concat(this._proxyUrl,"api/auth?v=").concat((new Date).getTime()):"https://oauth.brightcove.com/v4/access_token?v=".concat((new Date).getTime()),e.prev=18,this._accessTokens[t]){e.next=30;break}return e.next=22,this._spApiGateway.settingsManager.loadBrightcoveSettings();case 22:if(i=e.sent,s=Object(u.find)(i.brightcoveAccounts,{accountId:t})){e.next=27;break}throw this.raiseError("Unable to find the specified account defined in settings: ".concat(t));case 27:this._accessTokens[t]={apiCredentials:{client_id:s.clientId,client_secret:s.clientSecret}},e.next=33;break;case 30:if(!((c=this._accessTokens[t].accessToken)&&c.expiration&&l()(c.expiration).isAfter(l()()))){e.next=33;break}return e.abrupt("return",c);case 33:e.next=39;break;case 35:throw e.prev=35,e.t1=e.catch(18),this.raiseError("An error occurred while attempting to retrieve account settings: ".concat(e.t1));case 39:return e.prev=39,p=this._accessTokens[t],e.next=43,fetch(a,{method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:"grant_type=client_credentials&client_id=".concat(p.apiCredentials.client_id,"&client_secret=").concat(p.apiCredentials.client_secret)});case 43:return d=e.sent,e.next=46,d.json();case 46:if((h=e.sent)&&h.access_token){e.next=49;break}throw new Error("Unable to obtain access token");case 49:return h.expires_in=parseInt(h.expires_in,10),h.obtainedAt=l()().toDate(),h.expiration=l()().add(h.expires_in,"seconds").toDate(),this._accessTokens[t].accessToken=h,this.clearAccessTokenInFuture(t),e.abrupt("return",h);case 57:throw e.prev=57,e.t2=e.catch(39),this.raiseError("An error occurred while attempting to contact the Brightcove Proxy. Please ensure the proxy is operational. ".concat(e.t2));case 61:case"end":return e.stop()}}),e,this,[[3,13],[18,35],[39,57]])})));return function(t){return e.apply(this,arguments)}}()},{key:"invalidateAccessToken",value:function(e){if(!e)throw new Error("Account Id must be specified.");delete this._accessTokens[e]}},{key:"raiseError",value:function(e,t){var n="".concat(e," ").concat(t&&t.message?t.message:""),r=new Error(n);if(!this._errorCallback)throw r;if(!0===this._errorCallback(e,t))throw r;return r}},{key:"clearAccessTokenInFuture",value:function(e){if(this._accessTokens[e]){var t=this._accessTokens[e];t.accessToken&&t.accessToken.expires_in&&(t.clearAccessToken&&clearTimeout(t.clearAccessToken),t.clearAccessToken=setTimeout((function(){t.accessToken=void 0}),1e3*t.accessToken.expires_in))}}}]),e}()},429:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(6);function o(e){var t={videoId:e.id,referenceId:e.reference_id||"",name:e.name,shortDescription:e.description||"",longDescription:e.long_description||"",complete:e.complete||!1,state:e.state||"",relatedLinkUrl:e.link?e.link.url:"",relatedLinkText:e.link?e.link.text:"",creationDate:new Date(e.created_at),startAvailabilityDate:e.schedule&&e.schedule.starts_at?new Date(e.schedule.starts_at):void 0,endAvailabilityDate:e.schedule&&e.schedule.ends_at?new Date(e.schedule.ends_at):void 0,economics:e.economics||"",tags:e.tags?Object(r.filter)(e.tags,(function(e){return!Object(r.startsWith)(e,"bcsp-")})):[],customFields:e.custom_fields||[],textTracks:e.text_tracks||[],videoStillUrl:"",thumbnailUrl:""};return e.images&&(e.images.poster&&(t.videoStillUrl=e.images.poster.src||""),e.images.thumbnail&&(t.thumbnailUrl=e.images.thumbnail.src||"")),t}function a(e,t){var n={name:e.name,description:e.shortDescription,long_description:e.longDescription,state:e.state,link:{text:e.relatedLinkText,url:e.relatedLinkUrl},schedule:{starts_at:e.startAvailabilityDate?e.startAvailabilityDate.toISOString():null,ends_at:e.endAvailabilityDate?e.endAvailabilityDate.toISOString():null},economics:e.economics,tags:e.tags,custom_fields:e.customFields};if(t){n.tags||(n.tags=[]);var o=!0,a=!1,i=void 0;try{for(var s,c=t[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var l=s.value;n.tags.push(l)}}catch(u){a=!0,i=u}finally{try{o||null==c.return||c.return()}finally{if(a)throw i}}}return n.text_tracks=Object(r.filter)(e.textTracks,(function(e){return!!e.id})),n}},430:function(e,t){},431:function(e,t){},432:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r,o=n(10);function a(){return{searchTerms:"",searchLimit:30,sortField:r.ModifiedDate,sortOrder:o.SortOrder.Descending}}!function(e){e.DisplayName="name",e.ModifiedDate="modifiedDate"}(r||(r={}))},433:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e[e.None=0]="None",e[e.Viewer=1]="Viewer",e[e.Author=2]="Author"}(r||(r={}))},434:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i}));var r,o,a=n(10);function i(){return{searchTerms:"",searchTarget:r.VideoCloud,searchLimit:30,sortField:o.UpdatedDate,sortOrder:a.SortOrder.Descending}}!function(e){e.SharePoint="SharePoint",e.VideoCloud="VideoCloud"}(r||(r={})),function(e){e.Name="name",e.CreationDate="creationDate",e.StartDate="startDate",e.UpdatedDate="updatedDate",e.TotalPlays="totalPlays"}(o||(o={}))},439:function(e,t){},440:function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(5),i=n(205),s=n(8),c=n(9),l=n(3),u=(n(751),n(90)),p=n(45),d=n(197),h=n(54),f=n(10),m=n(6);function y(e){return g.apply(this,arguments)}function g(){return(g=Object(a.a)(o.a.mark((function e(t){var n,r,a,i,s,c,l,u,p,d,h,y,g,v,b,P,w,E,x,O,C,S,_;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.spApiGateway,r=n.settingsManager,a=n.spGroups,i=!1,s=[],c=[],l=[],u=[],p=f.UserRole.None,e.next=9,r.loadBrightcoveSettings();case 9:return d=e.sent,h=!0,y=d.brightcoveAccounts,(i=y&&y.length>0)||(p=f.UserRole.Author),e.next=16,a.getSiteGroups();case 16:return g=e.sent,e.next=19,a.getUserGroups(t);case 19:v=e.sent,b=!0,P=!1,w=void 0,e.prev=23,E=y[Symbol.iterator]();case 25:if(b=(x=E.next()).done){e.next=39;break}if((O=x.value).accountAuthorsGroupName&&O.accountViewersGroupName){e.next=30;break}return c.push(O.title),e.abrupt("continue",36);case 30:O.accountId||s.push(O.title),Object(m.find)(g,{title:O.accountAuthorsGroupName})&&Object(m.find)(g,{title:O.accountViewersGroupName})||l.indexOf(O.accountAuthorsGroupName)<0&&l.push(O.accountAuthorsGroupName),C=!1,S=!1,Object(m.find)(v,{title:O.accountAuthorsGroupName})&&(C=!0,p<f.UserRole.Author&&(p=f.UserRole.Author)),Object(m.find)(v,{title:O.accountViewersGroupName})&&(S=!0,p<f.UserRole.Viewer&&(p=f.UserRole.Viewer)),(C||S)&&u.push(O);case 36:b=!0,e.next=25;break;case 39:e.next=45;break;case 41:e.prev=41,e.t0=e.catch(23),P=!0,w=e.t0;case 45:e.prev=45,e.prev=46,b||null==E.return||E.return();case 48:if(e.prev=48,!P){e.next=51;break}throw w;case 51:return e.finish(48);case 52:return e.finish(45);case 53:return _=h&&i&&s.length<=0&&c.length<=0&&l.length<=0,e.abrupt("return",{isValid:_,isProxyDefined:h,isAccountsListCreated:!1,isSettingsListCreated:!1,isVideosListCreated:!1,areAccountsAvailable:i,accountEmptyAccountId:s,accountEmptyGroups:c,missingGroups:l,currentUserAvailableAccounts:u,currentUserMaxRole:p});case 55:case"end":return e.stop()}}),e,this,[[23,41,45,53],[46,,48,52]])})))).apply(this,arguments)}var v=n(448),b=n.n(v);function P(e,t){return w.apply(this,arguments)}function w(){return(w=Object(a.a)(o.a.mark((function e(t,n){var r,a,i,s,c,l,u;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("A video must be specified.");case 2:return r=function(e,r){t.hasError=!0,t.status="An error has occurred while creating the Brightcove Video: "+r.message,t.isUploading=!1,t.isComplete=!0,t.progress=100,n&&n(t)},a=this.bcApiGateway,i=a.dynamicIngestApi,s=a.videosApi,c=a.foldersApi,t.status="Creating Brightcove video for ".concat(t.fileName,"..."),t.progress=10,n&&n(t),e.prev=7,e.next=10,s.createVideo(t.accountId,t.fileName,t.tags);case 10:l=e.sent,t.bcVideo=l,e.next=18;break;case 14:return e.prev=14,e.t0=e.catch(7),r("An error has occurred while creating the Brightcove Video: "+e.t0.message,e.t0),e.abrupt("return");case 18:return e.prev=18,n&&n(t),e.finish(18);case 21:if(!t.targetFolder||!t.targetFolder.id){e.next=37;break}return t.status="Adding video to folder ".concat(t.targetFolder.name,"..."),t.progress=15,n&&n(t),e.prev=25,e.next=28,c.addVideoToFolder(t.accountId,t.targetFolder.id,t.bcVideo.id);case 28:e.next=34;break;case 30:return e.prev=30,e.t1=e.catch(25),r("An error has occurred while adding the video to a folder: "+e.t1.message,e.t1),e.abrupt("return");case 34:return e.prev=34,n&&n(t),e.finish(34);case 37:return t.status="Getting AWS S3 Urls for ".concat(t.bcVideo.id,"..."),t.progress=20,n&&n(t),e.prev=40,e.next=43,i.getUploadUrls(t.accountId,t.bcVideo.id,t.fileName);case 43:t.uploadUrls=e.sent,e.next=50;break;case 46:return e.prev=46,e.t2=e.catch(40),r("An error has occurred while obtaining upload urls: "+e.t2.message,e.t2),e.abrupt("return");case 50:return e.prev=50,n&&n(t),e.finish(50);case 53:return t.status="Uploading '".concat(t.fileName,"' (").concat(t.bcVideo.id,") to AWS (Initializing...)"),t.progress=40,n&&n(t),e.prev=56,e.next=59,b()({method:"PUT",url:t.uploadUrls.signed_url,headers:{"Content-Type":""},data:t.file,onUploadProgress:function(e){if(t.bcVideo){var r=e.loaded/e.total;t.status="Uploading '".concat(t.fileName,"' (").concat(t.bcVideo.id,") to AWS (").concat((100*r).toFixed(2),"%)..."),t.progress=40+40*r,n&&n(t)}}});case 59:e.next=65;break;case 61:return e.prev=61,e.t3=e.catch(56),r("An error has occurred uploading a video to AWS: "+e.t3.message,e.t3),e.abrupt("return");case 65:return e.prev=65,n&&n(t),e.finish(65);case 68:return t.status="Making an ingest request for ".concat(t.bcVideo.id,"..."),t.progress=80,n&&n(t),e.prev=71,e.next=74,i.makeIngestRequest(t.accountId,t.bcVideo.id,t.uploadUrls.api_request_url);case 74:u=e.sent,t.ingestResponse=u,e.next=82;break;case 78:return e.prev=78,e.t4=e.catch(71),r("An error has occurred while making an ingest request: "+e.t4.message,e.t4),e.abrupt("return");case 82:return e.prev=82,n&&n(t),e.finish(82);case 85:return t.status="Ingest request made. Finalizing file upload.",t.isUploading=!1,t.progress=90,n&&n(t),t.status="File transfer completed. Video is now processing on Brightcove..",t.isUploading=!1,t.progress=95,n&&n(t),e.prev=93,e.next=96,E(this,t.accountId,t.bcVideo.id);case 96:e.next=102;break;case 98:return e.prev=98,e.t5=e.catch(93),r("An error has occurred while checking on ingest job status: "+e.t5.message,e.t5),e.abrupt("return");case 102:t.status="Upload & Processing Complete!",t.isUploading=!1,t.isComplete=!0,t.progress=100,n&&n(t);case 107:case"end":return e.stop()}}),e,this,[[7,14,18,21],[25,30,34,37],[40,46,50,53],[56,61,65,68],[71,78,82,85],[93,98]])})))).apply(this,arguments)}function E(e,t,n,r){r||(r=1e4);var i=e.bcApiGateway.videosApi;return new Promise((function(e,s){var c=setInterval(Object(a.a)(o.a.mark((function r(){var a,l,u;return o.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,i.getVideoById(t,n);case 3:a=r.sent,l=Object(m.get)(a,"images.thumbnail"),u=Object(m.get)(a,"images.thumbnail.src"),l&&u&&(clearInterval(c),e()),r.next=13;break;case 9:r.prev=9,r.t0=r.catch(0),clearInterval(c),s(r.t0);case 13:case"end":return r.stop()}}),r,null,[[0,9]])}))),r)}))}function x(e,t){return O.apply(this,arguments)}function O(){return(O=Object(a.a)(o.a.mark((function e(t,n){var r,a,i,s,c,l,u,p,d,h,y;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",[]);case 2:return r=this.bcApiGateway,a=r.videosApi,i=this.getBCVideoSearchParams(n),e.next=7,a.getVideos(t,i);case 7:for(s=e.sent,n.folderId&&(s=Object(m.filter)(s,{folder_id:n.folderId})),c=[],l=!0,u=!1,p=void 0,e.prev=13,d=s[Symbol.iterator]();!(l=(h=d.next()).done);l=!0)y=h.value,c.push(Object(f.mapBCVideoToMVideo)(y));e.next=21;break;case 17:e.prev=17,e.t0=e.catch(13),u=!0,p=e.t0;case 21:e.prev=21,e.prev=22,l||null==d.return||d.return();case 24:if(e.prev=24,!u){e.next=27;break}throw p;case 27:return e.finish(24);case 28:return e.finish(21);case 29:return e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this,[[13,17,21,29],[22,,24,28]])})))).apply(this,arguments)}var C,S,_,k,j=n(35),T=n(449),I=n(17),A=n.n(I);n.d(t,"a",(function(){return F}));var F=(C=function(){function e(t){Object(s.a)(this,e),Object(i.a)(this,"allAccounts",S,this),this.addinWebId=void 0,this.currentUserRole=void 0,Object(i.a)(this,"userGroups",_,this),Object(i.a)(this,"doesEmbedHelperExist",k,this),this.onError=void 0,this._spAddinContext=void 0,this._bcApiGateway=void 0,this._spApiGateway=void 0,this._players={},this.onError=t,Object(j.setup)({sp:{headers:{Accept:"application/json; odata=verbose"}}});var n=A()();this._spAddinContext=n.query(!0),Object(m.defaultsDeep)(this._spAddinContext,{ProductId:"{2505c87f-4689-4a50-bbcd-d52be3e636a2}",SPHostUrl:"https://baristalabs.sharepoint.com/",SPAppWebUrl:"http://localhost:3002",SPLanguage:"en-US",SPClientTag:"4",SPProductNumber:"16.0.7421.1210",Referrer:"default"}),"default"===this._spAddinContext.SPHostUrl&&(this.spAddinContext.SPHostUrl=""),"default"===this._spAddinContext.SPAppWebUrl&&(this.spAddinContext.SPAppWebUrl=""),this._spAddinContext.Referrer&&"default"!==this._spAddinContext.Referrer||(this.spAddinContext.Referrer=document.referrer),this._spApiGateway=new p.e(this._spAddinContext,this.onError);var r=new d.a(this._spApiGateway,this.onError);this._bcApiGateway=new h.BrightcoveApiGateway(r,this.onError),this.allAccounts=[],this.userGroups=[]}return Object(c.a)(e,[{key:"getBCPlaylistSearchParams",value:function(e){var t={limit:e.searchLimit||45,sort:e.sortOrder===f.SortOrder.Descending?"-":"",q:e.searchTerms?"".concat(e.searchTerms):""};switch(e.sortField){case f.PlaylistSortField.DisplayName:t.sort+="name";break;case f.PlaylistSortField.ModifiedDate:t.sort+="updated_at"}return t}},{key:"getBCVideoSearchParams",value:function(e){var t={limit:e.searchLimit||45,sort:e.sortOrder===f.SortOrder.Descending?"-":"",q:e.searchTerms?"".concat(e.searchTerms):""};switch(this.addinWebId&&(t.q+='-tags:"bcsp-'.concat(this.addinWebId.replace(/-/g,""),'-1"')),e.sortField){case f.VideoSortField.Name:t.sort+="name";break;case f.VideoSortField.TotalPlays:t.sort+="plays_total";break;case f.VideoSortField.UpdatedDate:t.sort+="updated_at";break;case f.VideoSortField.CreationDate:t.sort+="created_at";break;case f.VideoSortField.StartDate:t.sort+="schedule_starts_at";break;default:throw new Error("Unknown or unsupported sort field: "+e.sortField)}return e.folderId&&(t.limit=1e3),t}},{key:"initialize",value:function(){var e=Object(a.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.refreshAccounts();case 2:return e.next=4,this.refreshUserGroups();case 4:return e.next=6,this.refreshEmbedHelper();case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"raiseError",value:function(e,t){return this.onError(e,t)}},{key:"refreshAccounts",value:function(){var e=Object(a.a)(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.spApiGateway.settingsManager.loadBrightcoveSettings();case 2:t=e.sent,this.allAccounts=t.brightcoveAccounts;case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"refreshEmbedHelper",value:function(){var e=Object(a.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.spApiGateway.spEmbedUtil.doesEmbedHelperExist();case 2:this.doesEmbedHelperExist=e.sent;case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"refreshUserGroups",value:function(){var e=Object(a.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,this.spApiGateway.spGroups.getUserGroups(t);case 3:this.userGroups=e.sent;case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"retrieveAllPlayers",value:function(){var e=Object(a.a)(o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n&&!1!==n||void 0===this._players[t]){e.next=2;break}return e.abrupt("return",this._players[t]);case 2:return r=this.bcApiGateway.playerManagementApi,e.prev=3,e.next=6,r.getAllPlayers(t);case 6:if(!((a=e.sent)&&a.item_count>0&&a.items)){e.next=10;break}return this._players[t]=a.items,e.abrupt("return",this._players[t]);case 10:e.next=14;break;case 12:e.prev=12,e.t0=e.catch(3);case 14:return e.abrupt("return",[]);case 15:case"end":return e.stop()}}),e,this,[[3,12]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"searchForBrightcoveVideos",value:function(){var e=Object(a.a)(o.a.mark((function e(t,n){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",x.call(this,t,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"performDynamicIngest",value:function(){var e=Object(a.a)(o.a.mark((function e(t,n){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P.call(this,t,n));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"validateConfiguration",value:function(){var e=Object(a.a)(o.a.mark((function e(t){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,y.call(this,t);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"availableAccounts",get:function(){var e=[];if(!this.allAccounts)return e;var t=!0,n=!1,r=void 0;try{for(var o,a=this.allAccounts[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;if(i.accountAuthorsGroupName&&i.accountViewersGroupName){var s=!1,c=!1;Object(m.find)(this.userGroups,{title:i.accountAuthorsGroupName})&&(s=!0),Object(m.find)(this.userGroups,{title:i.accountViewersGroupName})&&(c=!0),(s||c)&&e.push(i)}}}catch(l){n=!0,r=l}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}return e}},{key:"bcApiGateway",get:function(){return this._bcApiGateway}},{key:"spAddinContext",get:function(){return this._spAddinContext}},{key:"spApiGateway",get:function(){return this._spApiGateway}}]),e}(),S=Object(l.a)(C.prototype,"allAccounts",[u.c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_=Object(l.a)(C.prototype,"userGroups",[u.c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),k=Object(l.a)(C.prototype,"doesEmbedHelperExist",[u.c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Object(l.a)(C.prototype,"availableAccounts",[u.b],Object.getOwnPropertyDescriptor(C.prototype,"availableAccounts"),C.prototype),Object(l.a)(C.prototype,"initialize",[u.a],Object.getOwnPropertyDescriptor(C.prototype,"initialize"),C.prototype),Object(l.a)(C.prototype,"refreshAccounts",[u.a],Object.getOwnPropertyDescriptor(C.prototype,"refreshAccounts"),C.prototype),Object(l.a)(C.prototype,"refreshEmbedHelper",[u.a],Object.getOwnPropertyDescriptor(C.prototype,"refreshEmbedHelper"),C.prototype),Object(l.a)(C.prototype,"refreshUserGroups",[u.a],Object.getOwnPropertyDescriptor(C.prototype,"refreshUserGroups"),C.prototype),Object(l.a)(C.prototype,"retrieveAllPlayers",[T.bind,u.a],Object.getOwnPropertyDescriptor(C.prototype,"retrieveAllPlayers"),C.prototype),C)},45:function(e,t,n){"use strict";var r=n(1),o=n.n(r),a=n(5),i=n(8),s=n(9),c=n(35),l=n(154),u=n(6),p=n(17),d=n.n(p),h=n(206),f=function(){function e(t,n,r){Object(i.a)(this,e),this._addinWebUrl=void 0,this._hostWebUrl=void 0,this._webUrl=void 0,this._web=void 0,this._errorCallback=void 0,this._hostWebUrl=t,this._addinWebUrl=n,n?(this._webUrl=n,this._web=new c.Web(n)):(this._webUrl=t,this._web=new c.Web(t)),this._errorCallback=r}return Object(s.a)(e,[{key:"loadBrightcoveSettings",value:function(){var e=Object(a.a)(o.a.mark((function e(t){var n,r,a,i,s,c,p,f,m;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d()("".concat(this._webUrl,"/").concat("BrightcoveSettings","/").concat("ConnectorSettings.txt")).path(),r=l.a,e.prev=2,e.next=5,this._web.getFileByServerRelativeUrl(n).getJSON();case 5:(a=e.sent).error||(r=Object(u.defaultsDeep)(a,l.a)),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:if(void 0!==t&&!0!==t){e.next=31;break}for(i=!0,s=!1,c=void 0,e.prev=15,p=r.brightcoveAccounts[Symbol.iterator]();!(i=(f=p.next()).done);i=!0)if((m=f.value).clientSecret)try{m.clientSecret=h.AES.decrypt(m.clientSecret,"BrightcoveConectorRocks").toString(h.enc.Utf8)}catch(o){this.raiseError("Error decrypting client secret for ".concat(m.accountId))}e.next=23;break;case 19:e.prev=19,e.t1=e.catch(15),s=!0,c=e.t1;case 23:e.prev=23,e.prev=24,i||null==p.return||p.return();case 26:if(e.prev=26,!s){e.next=29;break}throw c;case 29:return e.finish(26);case 30:return e.finish(23);case 31:return e.abrupt("return",r);case 32:case"end":return e.stop()}}),e,this,[[2,9],[15,19,23,31],[24,,26,30]])})));return function(t){return e.apply(this,arguments)}}()},{key:"saveBrightcoveSettings",value:function(){var e=Object(a.a)(o.a.mark((function e(t,n){var r,a,i,s,c,l,u,p,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=d()("".concat(this._webUrl,"/").concat("BrightcoveSettings","/")).path(),void 0!==n&&!0!==n){e.next=21;break}for(a=!0,i=!1,s=void 0,e.prev=5,c=t.brightcoveAccounts[Symbol.iterator]();!(a=(l=c.next()).done);a=!0)u=l.value,p=h.AES.encrypt(u.clientSecret,"BrightcoveConectorRocks").toString(),u.clientSecret=p;e.next=13;break;case 9:e.prev=9,e.t0=e.catch(5),i=!0,s=e.t0;case 13:e.prev=13,e.prev=14,a||null==c.return||c.return();case 16:if(e.prev=16,!i){e.next=19;break}throw s;case 19:return e.finish(16);case 20:return e.finish(13);case 21:return e.prev=21,this._web.getFolderByServerRelativeUrl(r).files.add("ConnectorSettings.txt",JSON.stringify(t),!0),f=new Promise((function(e){return setTimeout(e,2e3)})),e.next=26,f;case 26:e.next=32;break;case 28:throw e.prev=28,e.t1=e.catch(21),this.raiseError("Unable to save Brightcove Settings");case 32:case"end":return e.stop()}}),e,this,[[5,9,13,21],[14,,16,20],[21,28]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"raiseError",value:function(e,t){var n="".concat(e," ").concat(t&&t.message?t.message:""),r=new Error(n);if(!this._errorCallback)throw r;if(!0===this._errorCallback(e,t))throw r;return r}},{key:"addinWebUrl",get:function(){return this._addinWebUrl}},{key:"hostWebUrl",get:function(){return this._hostWebUrl}},{key:"web",get:function(){return this._web}}]),e}(),m=function(){function e(t,n){Object(i.a)(this,e),this._web=void 0,this._web=n?c.sp.crossDomainWeb(n,t):new c.Web(t)}return Object(s.a)(e,[{key:"ensureGroup",value:function(){var e=Object(a.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._web.siteGroups.filter("Title eq '".concat(t,"'")).get();case 2:if(!(e.sent.length>0)){e.next=5;break}return e.abrupt("return",!0);case 5:return e.abrupt("return",!1);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSiteGroups",value:function(){var e=Object(a.a)(o.a.mark((function e(){var t;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._web.siteGroups.get();case 2:return t=e.sent,e.abrupt("return",this.mapGroups(t));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getUserGroups",value:function(){var e=Object(a.a)(o.a.mark((function e(t){var n,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=6;break}return e.next=3,this._web.currentUser.select("Id").get();case 3:n=e.sent,e.next=9;break;case 6:return e.next=8,this._web.siteUsers.getByEmail(t).select("Id").get();case 8:n=e.sent;case 9:if(n){e.next=11;break}throw new Error("Unable to obtain the current user.");case 11:return e.next=13,this._web.siteUsers.getById(n.Id).groups.get();case 13:return r=e.sent,e.abrupt("return",this.mapGroups(r));case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"mapGroups",value:function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(n=(a=i.next()).done);n=!0){var s=a.value;t.push({id:s.Id,title:s.Title})}}catch(c){r=!0,o=c}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}return t}}]),e}(),y=function(){function e(t,n){Object(i.a)(this,e),this._docLibPath="BrightcoveWebPartData/",this._webUrl=void 0,this._web=void 0,n?(this._webUrl=n,this._web=new c.Web(n)):(this._webUrl=t,this._web=new c.Web(t))}return Object(s.a)(e,[{key:"getBrightcoveWebPartProps",value:function(){var e=Object(a.a)(o.a.mark((function e(t,n){var r,a,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d()(this._webUrl+"/".concat(this._docLibPath).concat(t,".txt")).path(),a=n,e.prev=2,e.next=5,this._web.getFileByServerRelativeUrl(r).getJSON();case 5:(i=e.sent).error||(a=Object(u.defaultsDeep)(i,n)),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(2);case 11:return e.abrupt("return",a);case 12:case"end":return e.stop()}}),e,this,[[2,9]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"setBrightcoveWebPartProps",value:function(){var e=Object(a.a)(o.a.mark((function e(t,n){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=d()(this._webUrl+"/".concat(this._docLibPath)).path();try{this._web.getFolderByServerRelativeUrl(r).files.add("".concat(t,".txt"),JSON.stringify(n),!0)}catch(o){}case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}(),g=function(){function e(t,n){if(Object(i.a)(this,e),this._spAddinContext=void 0,this._spGroups=void 0,this._spEmbedUtil=void 0,this._spWebPartConfig=void 0,this._connectorSettingsManager=void 0,this._errorCallback=void 0,!t)throw new Error("spAddinContext must be specified.");this._spAddinContext=t,this._errorCallback=n;var r=this._spAddinContext.SPHostUrl,o=this._spAddinContext.SPAppWebUrl;r===window.location.origin&&(o=void 0),this._connectorSettingsManager=new f(r,o,this._errorCallback),this._spGroups=new m(r,o),this._spEmbedUtil=new _(r,o),this._spWebPartConfig=new y(r,o)}return Object(s.a)(e,[{key:"settingsManager",get:function(){return this._connectorSettingsManager}},{key:"spAddinContext",get:function(){return this._spAddinContext}},{key:"spGroups",get:function(){return this._spGroups}},{key:"spEmbedUtil",get:function(){return this._spEmbedUtil}},{key:"spWebPartConfig",get:function(){return this._spWebPartConfig}}]),e}(),v=function(){function e(){Object(i.a)(this,e)}return Object(s.a)(e,null,[{key:"ensureScriptLoaded",value:function(){var e=Object(a.a)(o.a.mark((function e(t,n){var r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Promise((function(e){r=e})),SP.SOD.registerSod(t,n),SP.SOD.executeFunc(t,"",(function(){r()})),e.abrupt("return",a);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"executePendingQuery",value:function(){var e=Object(a.a)(o.a.mark((function e(t){var n,r,a;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw Error("A ClientContext must be specified.");case 2:return a=new Promise((function(e,t){n=e,r=t})),t.executeQueryAsync((function(e,t){n(t)}),(function(e,t){var n=new Error(t.get_message());n.spError=t,r(n)})),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"getWebId",value:function(){var e=Object(a.a)(o.a.mark((function e(t){var n,r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new c.Web(t),e.next=3,n.get();case 3:return r=e.sent,e.abrupt("return",r.Id);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"uploadFile",value:function(){var e=Object(a.a)(o.a.mark((function e(t,n,r,a){var i,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new c.Web(t),e.next=3,i.getFolderByServerRelativeUrl(n).files.add(r,a);case 3:return s=e.sent,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e)})));return function(t,n,r,o){return e.apply(this,arguments)}}()},{key:"closeParentDialog",value:function(e){e?parent.postMessage("CloseCustomActionDialogRefresh","*"):parent.postMessage("CloseCustomActionDialogNoRefresh","*")}},{key:"closeAndRedirect",value:function(e){var t=parent.postMessage;!t&&parent.document.postMessage&&(t=parent.document.postMessage),t&&t("NavigateParent="+e,"*")}},{key:"resizeMessage",value:function(e,t,n){var r=window.parent.postMessage;if(r){var o="<message senderId=".concat(e,">resize(").concat(t,", ").concat(n,")</message>");r(o,"*")}}},{key:"updateWebPartProperties",value:function(){var t=Object(a.a)(o.a.mark((function t(n,r,a,i,s){var l,u,p,d,h,f,m,y,g,v,b,P,w,E,x,O;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return l=s?c.sp.crossDomainWeb(s,n):new c.Web(n),u=l.getFileByServerRelativeUrl(r),t.next=4,c.ClientSidePage.fromFile(u);case 4:if(p=t.sent,d=a.replace("g_","").replace(/_/g,"-"),!(h=p.findControlById(d))){t.next=18;break}return h.setProperties(i),t.prev=9,t.next=12,p.save();case 12:t.next=16;break;case 14:t.prev=14,t.t0=t.catch(9);case 16:t.next=28;break;case 18:for(s?(f=new SP.ClientContext(s),y=new SP.AppContextSite(f,n),m=y.get_web()):(f=new SP.ClientContext(n),m=f.get_web()),g=m.getFileByServerRelativeUrl(r),v=g.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared),b=v.get_webParts(),P=b.getByControlId(a),w=P.get_webPart().get_properties(),E=0,x=Object.keys(i);E<x.length;E++)O=x[E],w.set_item(O,i[O]);return P.saveWebPartChanges(),t.next=28,e.executePendingQuery(f);case 28:case"end":return t.stop()}}),t,null,[[9,14]])})));return function(e,n,r,o,a){return t.apply(this,arguments)}}()}]),e}(),b=n(196),P=n(140),w=n(447),E=n.n(w),x={createProxyTimeout:5e3,messagePrefix:"SP.RequestExecutor",messageResponseTimeout:5e3},O=function(){function e(t,n,r){Object(i.a)(this,e),this._window=void 0,this._origin=void 0,this._messageId=void 0,this._iFrame=void 0,this._config=void 0,this._messageCounter=void 0,this._isRemoved=void 0,this._window=window,this._origin=t,this._messageId=Object(P.a)(7),this._iFrame=n,this._config=r,this._messageCounter=0,this._isRemoved=!1}return Object(s.a)(e,[{key:"invokeDirect",value:function(e,t,n,r){if(!e)throw Error("A command must be specified.");if(this._isRemoved||!this._iFrame||!this._iFrame.parentElement||!this._iFrame.contentWindow)throw Error("The SPProxy for ".concat(this._origin," has been removed."));t=t||{},n=n||this._origin||"*",t.$$command=e,t.$$postMessageId="".concat(this._config.messagePrefix,"_").concat(this._messageId,"_").concat(++this._messageCounter);var o=void 0;r&&(o=Object(u.get)(t,r)),o?this._iFrame.contentWindow.postMessage(t,n,[o]):this._iFrame.contentWindow.postMessage(t,n)}},{key:"invoke",value:function(){var e=Object(a.a)(o.a.mark((function e(t,n,r,a,i,s){var c,l,p,d,h,f,m=this;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw Error("A command must be specified.");case 2:if(!this._isRemoved&&this._iFrame&&this._iFrame.parentElement&&this._iFrame.contentWindow){e.next=4;break}throw Error("The SPProxy for ".concat(this._origin," has been removed."));case 4:return n=n||{},r=r||this._origin||"*",a||(a=this._config.messageResponseTimeout||5e3),n.$$command=t,n.$$postMessageId="".concat(this._config.messagePrefix,"_").concat(this._messageId,"_").concat(++this._messageCounter),p=new E.a((function(e,t){c=e,l=t})),d=function(e){if((e=e.originalEvent||e)&&e.data&&e.data.$$postMessageId&&e.data.$$postMessageId===n.$$postMessageId){var t=e.data;switch(t.$$origin=e.origin,t.$$result){case"success":c(t);break;case"progress":"function"===typeof s&&s(t);break;case"error":var r=new Error(t.message);for(var o in r.$$spproxy="eval",r.name=t.name,r.stack=t.stack,t)t.hasOwnProperty(o)&&(r[o]=t[o]);l(r);break;default:l(Error("An unknown or unsupported result type was reported by the HostWebProxy: ".concat(t.$$result)))}}},a&&a>0&&((h=Error("invoke() timed out while waiting for a response while executing ".concat(t,". (").concat(a,"ms)"))).$$spproxy="timeout",p=p.timeout(a,h)),p=p.finally((function(){m._window.removeEventListener("message",d)})),this._window.addEventListener("message",d),f=void 0,i&&(f=Object(u.get)(n,i)),f?this._iFrame.contentWindow.postMessage(n,r,[f]):this._iFrame.contentWindow.postMessage(n,r),e.abrupt("return",p);case 18:case"end":return e.stop()}}),e,this)})));return function(t,n,r,o,a,i){return e.apply(this,arguments)}}()},{key:"origin",get:function(){return this._origin}}],[{key:"getOrCreateProxy",value:function(){var t=Object(a.a)(o.a.mark((function t(n,r){var a,i,s,c,l;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n){t.next=2;break}throw Error("The absolute url to a HostWebProxy.aspx must be specified as the first argument.");case 2:if(r=Object(u.defaultsDeep)({},r,x),a=d()(n).normalize(),i=a.origin(),!this.$proxies[i]){t.next=7;break}return t.abrupt("return",this.$proxies[i]);case 7:return a.setQuery({v:(new Date).getTime()}),t.next=10,this.$resourceLoader.loadIFrame(a.toString(),"allow-forms allow-scripts allow-same-origin");case 10:if(s=t.sent){t.next=13;break}throw Error("Unable to load Proxy IFrame.");case 13:if(s.parentElement&&s.contentWindow){t.next=15;break}throw Error("Proxy IFrame was loaded, but does not contain a parent element or content window.");case 15:return c=new e(i,s,r),this.$proxies[i]=c,t.next=19,c.invoke("Ping",{},i,r.createProxyTimeout);case 19:if("Pong"===(l=t.sent).data){t.next=22;break}throw Error("Did not expect the following response to Ping: ".concat(l.data));case 22:return t.abrupt("return",c);case 23:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"removeProxy",value:function(e){if("string"===typeof e){var t=d()(e).normalize().origin();if(!(e=this.$proxies[t]))return!1}var n=e._iFrame.parentElement;return n&&n.removeChild(e._iFrame),e._isRemoved=!0,delete this.$proxies[e._origin]}}]),e}();O.$resourceLoader=new b.a,O.$proxies={};var C,S=function(e,t,n){return'<?xml version="1.0" encoding="utf-8"?>\n<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">\n    <Title>'.concat(e,"</Title>\n    <FrameType>Default</FrameType>\n    <Description>").concat(t,'</Description>\n    <IsIncluded>true</IsIncluded><ZoneID></ZoneID><PartOrder>0</PartOrder>\n    <FrameState>Normal</FrameState>\n    <Height />\n    <Width />\n    <AllowRemove>true</AllowRemove>\n    <AllowZoneChange>true</AllowZoneChange>\n    <AllowMinimize>true</AllowMinimize>\n    <AllowConnect>true</AllowConnect>\n    <AllowEdit>true</AllowEdit>\n    <AllowHide>true</AllowHide>\n    <IsVisible>true</IsVisible>\n    <DetailLink /><HelpLink />\n    <HelpMode>Modeless</HelpMode>\n    <Dir>Default</Dir>\n    <PartImageSmall />\n    <MissingAssembly>Cannot import this Web Part.</MissingAssembly>\n    <PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>\n    <IsIncludedFilter />\n    <Assembly>Microsoft.SharePoint, Version=13.0.0.0, Culture=neutral, PublicKeyToken=94de0004b6e3fcc5</Assembly>\n    <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>\n    <ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />\n    <Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[').concat(n,']]></Content>\n    <PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />\n</WebPart>')},_=function(){function e(t,n){Object(i.a)(this,e),this._addinWebUrl=void 0,this._hostWebUrl=void 0,this._web=void 0,this._doesEmbedHelperExist=void 0,this._addinWebUrl=n,this._hostWebUrl=t,this._web=n?c.sp.crossDomainWeb(n,t):new c.Web(t)}return Object(s.a)(e,[{key:"doesEmbedHelperExist",value:function(){var t=Object(a.a)(o.a.mark((function t(){var n,r;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===this._doesEmbedHelperExist){t.next=2;break}return t.abrupt("return",this._doesEmbedHelperExist);case 2:return n=d()("".concat(this._hostWebUrl,"/Brightcove/").concat(e.getEmbedHelperFileNameFromAppWebUrl(this._addinWebUrl||this._hostWebUrl))).path(),t.prev=3,t.next=6,this._web.getFileByServerRelativeUrl(n).get();case 6:r=t.sent,this._doesEmbedHelperExist=r.Exists,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(3),this._doesEmbedHelperExist=!1;case 13:return t.abrupt("return",this._doesEmbedHelperExist);case 14:case"end":return t.stop()}}),t,this,[[3,10]])})));return function(){return t.apply(this,arguments)}}()},{key:"getWebPartPageType",value:function(){var e=Object(a.a)(o.a.mark((function e(t){var n,r,a,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=d()(t).path())&&!d()(n).equals(document.location.origin)){e.next=3;break}return e.abrupt("return",void 0);case 3:return r=new d.a(n).relativeTo(this._hostWebUrl).toString(),e.next=6,this._web.getFileByServerRelativeUrl(r).listItemAllFields.select("ContentTypeId,PublishingPageLayout").get();case 6:return a=e.sent,i=C.Other,Object(u.startsWith)(a.ContentTypeId,"0x010108")?i=C.WikiPage:Object(u.startsWith)(a.ContentTypeId,"0x010109")?i=C.WikiPage:void 0!==a.PublishingPageLayout&&(i=C.PublishingPage),e.abrupt("return",i);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"insertContentEditorWebPart",value:function(){var t=Object(a.a)(o.a.mark((function t(n,r,a,i){var s,c,l,u;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getWebPartPageType(n);case 2:if((s=t.sent)===C.WikiPage||s===C.PublishingPage||s===C.WebPartPage){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,O.getOrCreateProxy("".concat(this._hostWebUrl,"/Brightcove/").concat(e.getEmbedHelperFileNameFromAppWebUrl(this._addinWebUrl||this._hostWebUrl)));case 7:c=t.sent,l={hostWebUrl:this._hostWebUrl,webPartPageUrl:"/"+d()(n).relativeTo(d()(this._hostWebUrl).origin()).pathname(),webPartXml:S(r,a,i),zoneId:"wpz",zoneIndex:0},t.t0=s,t.next=t.t0===C.WikiPage?12:t.t0===C.PublishingPage?14:t.t0===C.WebPartPage?16:17;break;case 12:return l.isWikiPage=!0,t.abrupt("break",18);case 14:return l.isPublishingPage=!0,t.abrupt("break",18);case 16:return t.abrupt("break",18);case 17:return t.abrupt("return");case 18:return t.next=20,c.invoke("InsertWebPart",l);case 20:return u=t.sent,t.abrupt("return",u.webPartId);case 22:case"end":return t.stop()}}),t,this)})));return function(e,n,r,o){return t.apply(this,arguments)}}()},{key:"uploadWebPartToGallery",value:function(){var t=Object(a.a)(o.a.mark((function t(n,r,a){var i,s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,O.getOrCreateProxy("".concat(this._hostWebUrl,"/Brightcove/").concat(e.getEmbedHelperFileNameFromAppWebUrl(this._addinWebUrl||this._hostWebUrl)));case 2:return i=t.sent,s={hostWebUrl:this._hostWebUrl,webPartXml:n,webPartFileName:r,group:a},t.next=6,i.invoke("UploadWebPartToGallery",s);case 6:case"end":return t.stop()}}),t,this)})));return function(e,n,r){return t.apply(this,arguments)}}()}],[{key:"generateEmbedHelper",value:function(e,t){if(!e)throw Error("hostWebUrl must be specified.");var r=n(806),o={responseOrigin:"*",trustedOriginAuthorities:[d()(window.location.href).origin()]};t&&o.trustedOriginAuthorities.push(d()(t).origin());var a="\n            window.__brightcoveConfig = ".concat(JSON.stringify(o,null,4),";\n            "),i=r.replace(/(\/\/ @\}-,--`--> Start BrightcoveConfig)([\s\S]*)(\/\/ @\}-,--`--> End BrightcoveConfig)/,"$1\n".concat(a,"\n$3"));return new Blob([i],{type:"text/plain;charset=utf-8"})}},{key:"getEmbedHelperFileNameFromAppWebUrl",value:function(e){var t=new d.a(e);return"BrightcoveEmbedHelper-".concat(t.hostname(),".aspx")}},{key:"generateScriptEditorWebPart",value:function(e,t,n){return'<?xml version="1.0" encoding="utf-8"?>\n<webParts>\n    <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">\n        <metaData>\n            <type name="Microsoft.SharePoint.WebPartPages.ScriptEditorWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />\n            <importErrorMessage>Cannot import this Web Part.</importErrorMessage>\n        </metaData>\n        <data>\n            <properties>\n                <property name="ExportMode" type="exportmode">All</property>\n                <property name="HelpUrl" type="string" />\n                <property name="Hidden" type="bool">False</property>\n                <property name="Description" type="string">'.concat(Object(u.escape)(t),'</property>\n                <property name="Content" type="string">').concat(Object(u.escape)(n),'</property>\n                <property name="CatalogIconImageUrl" type="string" />\n                <property name="Title" type="string">').concat(Object(u.escape)(e),'</property>\n                <property name="AllowHide" type="bool">True</property>\n                <property name="AllowMinimize" type="bool">True</property>\n                <property name="AllowZoneChange" type="bool">True</property>\n                <property name="TitleUrl" type="string" />\n                <property name="ChromeType" type="chrometype">None</property>\n                <property name="AllowConnect" type="bool">True</property>\n                <property name="Width" type="unit" />\n                <property name="Height" type="unit" />\n                <property name="HelpMode" type="helpmode">Navigate</property>\n                <property name="AllowEdit" type="bool">True</property>\n                <property name="TitleIconImageUrl" type="string" />\n                <property name="Direction" type="direction">NotSet</property>\n                <property name="AllowClose" type="bool">True</property>\n                <property name="ChromeState" type="chromestate">Normal</property>\n            </properties>\n        </data>\n    </webPart>\n</webParts>')}}]),e}();n.d(t,"f",(function(){return C})),n.d(t,"a",(function(){return f})),n.d(t,"c",(function(){return m})),n.d(t,"e",(function(){return g})),n.d(t,"d",(function(){return v})),n.d(t,"b",(function(){return _})),function(e){e.WikiPage="Wiki",e.WebPartPage="WebPartPage",e.PublishingPage="PublishingPage",e.Other="Other"}(C||(C={}))},456:function(e,t,n){e.exports=n(1071)},54:function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(807)),r(n(810)),r(n(811)),r(n(812)),r(n(813)),r(n(817)),r(n(818)),r(n(819)),r(n(820)),r(n(821)),r(n(822))},806:function(e,t,n){"use strict";n.r(t),t.default='<!DOCTYPE html>\n<%@ Register tagprefix="WebPartPages" namespace="Microsoft.SharePoint.WebPartPages" assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>\n<html xmlns="http://www.w3.org/1999/xhtml">\n<WebPartPages:AllowFraming ID="AllowFraming1" runat="server" />\n\n<head runat="server">\n    <meta name="GENERATOR" content="Microsoft SharePoint" />\n    <meta http-equiv="X-UA-Compatible" content="IE=edge">\n    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n    <meta http-equiv="Expires" content="0" />\n    <title>Brightcove Video Connector for SharePoint - Embed Helper</title>\n    <link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.5.0/css/fabric.min.css">\n    <link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.5.0/css/fabric.components.min.css">\n    <script type="text/javascript" src="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.5.0/js/fabric.min.js"><\/script>\n    <script type="text/javascript" src="_layouts/1033/init.js"><\/script>\n    <script type="text/javascript" src="_layouts/15/MicrosoftAjax.js"><\/script>\n    <script type="text/javascript" src="_layouts/15/sp.core.js"><\/script>\n    <script type="text/javascript" src="_layouts/15/sp.runtime.js"><\/script>\n    <script type="text/javascript" src="_layouts/15/sp.js"><\/script>\n</head>\n\n<body>\n    <div id="root">\n        <div class="ms-Spinner ms-Spinner--large">\n            <div id="statusLabel" class="ms-Spinner-label">\n                Initializing...\n            </div>\n        </div>\n    </div>\n    <script id="Brightcove-Config" type="text/javascript">\n        // @}-,--`--\x3e Start BrightcoveConfig\n        // @}-,--`--\x3e End BrightcoveConfig\n    <\/script>\n<script type="text/javascript">!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/",e(e.s=174)}([function(t,e,n){var r=n(3),o=n(24),i=n(15),a=n(16),s=n(21),u="prototype",c=function(t,e,n){var l,p,f,h,d=t&c.F,y=t&c.G,g=t&c.S,v=t&c.P,m=t&c.B,b=y?r:g?r[e]||(r[e]={}):(r[e]||{})[u],_=y?o:o[e]||(o[e]={}),P=_[u]||(_[u]={});y&&(n=e);for(l in n)p=!d&&b&&void 0!==b[l],f=(p?b:n)[l],h=m&&p?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,b&&a(b,l,f,t&c.U),_[l]!=f&&i(_,l,h),v&&P[l]!=f&&(P[l]=f)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){"use strict";(function(t){function r(t){if(null===t)return"";var e=t.indexOf("_api/");return e>-1?t.substr(0,e):t}Object.defineProperty(e,"__esModule",{value:!0});var o=n(33);e.extractWebUrl=r;var i=function(){function e(){}return e.getCtxCallback=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){e.apply(t,n)}},e.urlParamExists=function(t){return t=t.replace(/[\\[]/,"\\\\[").replace(/[\\]]/,"\\\\]"),new RegExp("[\\\\?&]"+t+"=([^&#]*)").test(location.search)},e.getUrlParamByName=function(t){t=t.replace(/[\\[]/,"\\\\[").replace(/[\\]]/,"\\\\]");var e=new RegExp("[\\\\?&]"+t+"=([^&#]*)"),n=e.exec(location.search);return null==n?"":decodeURIComponent(n[1].replace(/\\+/g," "))},e.getUrlParamBoolByName=function(t){var e=this.getUrlParamByName(t);return!(""===e||/false|0/i.test(e))},e.stringInsert=function(t,e,n){return e>0?t.substring(0,e)+n+t.substring(e,t.length):n+t},e.dateAdd=function(t,e,n){var r=new Date(t);switch(e.toLowerCase()){case"year":r.setFullYear(r.getFullYear()+n);break;case"quarter":r.setMonth(r.getMonth()+3*n);break;case"month":r.setMonth(r.getMonth()+n);break;case"week":r.setDate(r.getDate()+7*n);break;case"day":r.setDate(r.getDate()+n);break;case"hour":r.setTime(r.getTime()+36e5*n);break;case"minute":r.setTime(r.getTime()+6e4*n);break;case"second":r.setTime(r.getTime()+1e3*n);break;default:r=void 0}return r},e.loadStylesheet=function(t,e){e&&(t+="?"+encodeURIComponent((new Date).getTime().toString()));var n=document.getElementsByTagName("head");if(n.length>0){var r=document.createElement("link");n[0].appendChild(r),r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.setAttribute("href",t)}},e.combinePaths=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.filter(function(t){return!e.stringIsNullOrEmpty(t)}).map(function(t){return t.replace(/^[\\\\|\\/]/,"").replace(/[\\\\|\\/]$/,"")}).join("/").replace(/\\\\/g,"/")},e.getRandomString=function(t){for(var e=new Array(t),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=0;r<t;r++)e[r]=n.charAt(Math.floor(Math.random()*n.length));return e.join("")},e.getGUID=function(){var t=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)})},e.isFunction=function(t){return"function"==typeof t},e.isArray=function(t){return Array.isArray?Array.isArray(t):t&&"number"==typeof t.length&&t.constructor===Array},e.stringIsNullOrEmpty=function(t){return void 0===t||null===t||t.length<1},e.extend=function(t,e,n){if(void 0===n&&(n=!1),null===e||void 0===e)return t;var r=n?function(t,e){return!(e in t)}:function(){return!0};return Object.getOwnPropertyNames(e).filter(function(e){return r(t,e)}).reduce(function(t,n){return t[n]=e[n],t},t)},e.isUrlAbsolute=function(t){return/^https?:\\/\\/|^\\/\\//i.test(t)},e.toAbsoluteUrl=function(n){return new Promise(function(r){if(e.isUrlAbsolute(n))return r(n);if(null!==o.RuntimeConfig.spBaseUrl)return r(e.combinePaths(o.RuntimeConfig.spBaseUrl,n));if(void 0!==t._spPageContextInfo){if(t._spPageContextInfo.hasOwnProperty("webAbsoluteUrl"))return r(e.combinePaths(t._spPageContextInfo.webAbsoluteUrl,n));if(t._spPageContextInfo.hasOwnProperty("webServerRelativeUrl"))return r(e.combinePaths(t._spPageContextInfo.webServerRelativeUrl,n))}if(void 0!==t.location){var i=t.location.toString().toLowerCase();["/_layouts/","/siteassets/"].forEach(function(t){var o=i.indexOf(t);if(o>0)return r(e.combinePaths(i.substr(0,o),n))})}return r(n)})},e}();e.Util=i}).call(e,n(62))},function(t,e,n){var r=n(5);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(54),a=n(59),s=n(20),u=n(34),c=n(108),l=n(109),p=n(110),f=function(t){function e(e,n){var r=t.call(this)||this;if(r._options={},r._query=new i.Dictionary,r._batch=null,"string"==typeof e){var a=e;if(o.Util.isUrlAbsolute(a)||a.lastIndexOf("/")<0)r._parentUrl=a,r._url=o.Util.combinePaths(a,n);else if(a.lastIndexOf("/")>a.lastIndexOf("(")){var s=a.lastIndexOf("/");r._parentUrl=a.slice(0,s),n=o.Util.combinePaths(a.slice(s),n),r._url=o.Util.combinePaths(r._parentUrl,n)}else{var s=a.lastIndexOf("(");r._parentUrl=a.slice(0,s),r._url=o.Util.combinePaths(a,n)}}else{var u=e;r._parentUrl=u._url,r._options=u._options;var c=u._query.get("@target");null!==c&&r._query.add("@target",c),r._url=o.Util.combinePaths(r._parentUrl,n)}return r}return r(e,t),e.prototype.addBatchDependency=function(){return this.hasBatch?this._batch.addDependency():function(){return null}},Object.defineProperty(e.prototype,"hasBatch",{get:function(){return null!==this._batch},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"batch",{get:function(){return this.hasBatch?this._batch:null},enumerable:!0,configurable:!0}),e.prototype.as=function(t){var e=new t(this._url,null);return o.Util.extend(e,this,!0)},e.prototype.inBatch=function(t){if(null!==this._batch)throw new s.AlreadyInBatchException;return this._batch=t,this},e.prototype.toUrlAndQuery=function(){var t=new i.Dictionary,e=this.toUrl().replace(/\'!(@.*?)::(.*?)\'/gi,function(e,n,r){return u.Logger.write("Rewriting aliased parameter from match "+e+" to label: "+n+" value: "+r,u.LogLevel.Verbose),t.add(n,"\'"+r+"\'"),n});return t.merge(this._query),t.count()>0&&(e+="?"+t.getKeys().map(function(e){return e+"="+t.get(e)}).join("&")),e},e.prototype.getParent=function(t,e,n,r){void 0===e&&(e=this.parentUrl);var o=new t(e,n);o.configure(this._options);var i=this.query.get("@target");return null!==i&&o.query.add("@target",i),void 0!==r&&(o=o.inBatch(r)),o},e.prototype.clone=function(t,e,n){void 0===n&&(n=!0);var r=new t(this,e);r.configure(this._options);var o=this.query.get("@target");return null!==o&&r.query.add("@target",o),n&&this.hasBatch&&(r=r.inBatch(this.batch)),r},e.prototype.toRequestContext=function(t,e,n,r){var i=this;void 0===e&&(e={}),void 0===r&&(r=l.PipelineMethods.default);var s=this.hasBatch?this.addBatchDependency():function(){};return o.Util.toAbsoluteUrl(this.toUrlAndQuery()).then(function(u){return a.mergeOptions(e,i._options),{batch:i._batch,batchDependency:s,cachingOptions:i._cachingOptions,clientFactory:function(){return new p.HttpClient},isBatched:i.hasBatch,isCached:i._useCaching,options:e,parser:n,pipeline:r,requestAbsoluteUrl:u,requestId:o.Util.getGUID(),verb:t}})},e}(c.ODataQueryable);e.SharePointQueryable=f;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.filter=function(t){return this._query.add("$filter",t),this},e.prototype.select=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length>0&&this._query.add("$select",t.join(",")),this},e.prototype.expand=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length>0&&this._query.add("$expand",t.join(",")),this},e.prototype.orderBy=function(t,e){void 0===e&&(e=!0);for(var n=this._query.getKeys(),r=[],o=e?" asc":" desc",i=0;i<n.length;i++)if("$orderby"===n[i]){r.push(this._query.get("$orderby"));break}return r.push(""+t+o),this._query.add("$orderby",r.join(",")),this},e.prototype.skip=function(t){return this._query.add("$skip",t.toString()),this},e.prototype.top=function(t){return this._query.add("$top",t.toString()),this},e}(f);e.SharePointQueryableCollection=h;var d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.select=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length>0&&this._query.add("$select",t.join(",")),this},e.prototype.expand=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length>0&&this._query.add("$expand",t.join(",")),this},e}(f);e.SharePointQueryableInstance=d},function(t,e,n){var r=n(63)("wks"),o=n(40),i=n(3).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},function(t,e,n){t.exports=!n(4)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(2),o=n(119),i=n(25),a=Object.defineProperty;e.f=n(8)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(27),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(26);t.exports=function(t){return Object(r(t))}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(0),o=n(4),i=n(26),a=/"/g,s=function(t,e,n,r){var o=String(i(t)),s="<"+e;return""!==n&&(s+=" "+n+\'="\'+String(r).replace(a,"&quot;")+\'"\'),s+">"+o+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*o(function(){var e=""[t](\'"\');return e!==e.toLowerCase()||e.split(\'"\').length>3}),"String",n)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(9),o=n(39);t.exports=n(8)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(3),o=n(15),i=n(14),a=n(40)("src"),s="toString",u=Function[s],c=(""+u).split(s);n(24).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,a)||o(n,a,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||u.call(this)})},function(t,e,n){var r=n(55),o=n(26);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(56),o=n(39),i=n(17),a=n(25),s=n(14),u=n(119),c=Object.getOwnPropertyDescriptor;e.f=n(8)?c:function(t,e){if(t=i(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(14),o=n(11),i=n(84)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){"use strict";function r(t){i.Logger.log({data:{},level:i.LogLevel.Error,message:"["+t.name+"]::"+t.message})}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(34),a=function(t){function e(e,n,r){var o=t.call(this,"Error making HttpClient request in queryable: ["+e+"] "+n)||this;return o.status=e,o.statusText=n,o.data=r,o.name="ProcessHttpClientResponseException",i.Logger.log({data:o.data,level:i.LogLevel.Error,message:o.message}),o}return o(e,t),e}(Error);e.ProcessHttpClientResponseException=a;var s=function(t){function e(e){void 0===e&&(e="Cannot create a caching configuration provider since cache is not available.");var n=t.call(this,e)||this;return n.name="NoCacheAvailableException",r(n),n}return o(e,t),e}(Error);e.NoCacheAvailableException=s;var u=function(t){function e(e){void 0===e&&(e="Unable to determine API url.");var n=t.call(this,e)||this;return n.name="APIUrlException",r(n),n}return o(e,t),e}(Error);e.APIUrlException=u;var c=function(t){function e(e,n){void 0===n&&(n="Auth URL Endpoint could not be determined from data. Data logged.");var r=t.call(this,n)||this;return r.name="APIUrlException",i.Logger.log({data:e,level:i.LogLevel.Error,message:r.message}),r}return o(e,t),e}(Error);e.AuthUrlException=c;var l=function(t){function e(e){void 0===e&&(e="Using NodeFetchClient in the browser is not supported.");var n=t.call(this,e)||this;return n.name="NodeFetchClientUnsupportedException",r(n),n}return o(e,t),e}(Error);e.NodeFetchClientUnsupportedException=l;var p=function(t){function e(){var e=this,n=["SP.RequestExecutor is undefined. ","Load the SP.RequestExecutor.js library (/_layouts/15/SP.RequestExecutor.js) before loading the PnP JS Core library."].join(" ");return e=t.call(this,n)||this,e.name="SPRequestExecutorUndefinedException",r(e),e}return o(e,t),e}(Error);e.SPRequestExecutorUndefinedException=p;var f=function(t){function e(e){void 0===e&&(e="The maximum comment length is 1023 characters.");var n=t.call(this,e)||this;return n.name="MaxCommentLengthException",r(n),n}return o(e,t),e}(Error);e.MaxCommentLengthException=f;var h=function(t){function e(e){void 0===e&&(e="This operation");var n=t.call(this,e+" is not supported as part of a batch.")||this;return n.name="NotSupportedInBatchException",r(n),n}return o(e,t),e}(Error);e.NotSupportedInBatchException=h;var d=function(t){function e(e,n){void 0===n&&(n="Could not extract odata id in object, you may be using nometadata. Object data logged to logger.");var r=t.call(this,n)||this;return r.name="ODataIdException",i.Logger.log({data:e,level:i.LogLevel.Error,message:r.message}),r}return o(e,t),e}(Error);e.ODataIdException=d;var y=function(t){function e(e){var n=t.call(this,e)||this;return n.name="BatchParseException",r(n),n}return o(e,t),e}(Error);e.BatchParseException=y;var g=function(t){function e(e){void 0===e&&(e="This query is already part of a batch.");var n=t.call(this,e)||this;return n.name="AlreadyInBatchException",r(n),n}return o(e,t),e}(Error);e.AlreadyInBatchException=g;var v=function(t){function e(e){void 0===e&&(e="This query is already part of a batch.");var n=t.call(this,e)||this;return n.name="FunctionExpectedException",r(n),n}return o(e,t),e}(Error);e.FunctionExpectedException=v;var m=function(t){function e(e){var n=t.call(this,e)||this;return n.name="UrlException",r(n),n}return o(e,t),e}(Error);e.UrlException=m},function(t,e,n){var r=n(12);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can\'t convert object to primitive value")}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can\'t call method on  "+t);return t}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(0),o=n(24),i=n(4);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(21),o=n(55),i=n(11),a=n(10),s=n(101);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,l=4==t,p=6==t,f=5==t||p,h=e||s;return function(e,s,d){for(var y,g,v=i(e),m=o(v),b=r(s,d,3),_=a(m.length),P=0,w=n?h(e,_):u?h(e,0):void 0;_>P;P++)if((f||P in m)&&(y=m[P],g=b(y,P,v),t))if(n)w[P]=g;else if(g)switch(t){case 3:return!0;case 5:return y;case 6:return P;case 2:w.push(y)}else if(l)return!1;return p?-1:c||l?l:w}}},function(t,e,n){"use strict";function r(t){if(t.hasOwnProperty("odata.id"))return t["odata.id"];if(t.hasOwnProperty("__metadata")&&t.__metadata.hasOwnProperty("id"))return t.__metadata.id;throw new l.ODataIdException(t)}function o(t){return t.hasOwnProperty("odata.metadata")&&t.hasOwnProperty("odata.editLink")?u.Util.combinePaths(u.extractWebUrl(t["odata.metadata"]),"_api",t["odata.editLink"]):t.hasOwnProperty("__metadata")?t.__metadata.uri:(c.Logger.write("No uri information found in ODataEntity parsing, chaining will fail for this object.",c.LogLevel.Warning),"")}function i(t){return new f(t)}function a(t){return new h(t)}var s=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),c=n(34),l=n(20),p=n(77);e.spExtractODataId=r;var f=function(t){function e(e){var n=t.call(this)||this;return n.factory=e,n.hydrate=function(t){var e=new n.factory(o(t),null);return u.Util.extend(e,t)},n}return s(e,t),e.prototype.parse=function(e){var n=this;return t.prototype.parse.call(this,e).then(function(t){var e=new n.factory(o(t),null);return u.Util.extend(e,t)})},e}(p.ODataParserBase),h=function(t){function e(e){var n=t.call(this)||this;return n.factory=e,n.hydrate=function(t){return t.map(function(t){var e=new n.factory(o(t),null);return u.Util.extend(e,t)})},n}return s(e,t),e.prototype.parse=function(e){var n=this;return t.prototype.parse.call(this,e).then(function(t){return t.map(function(t){var e=new n.factory(o(t),null);return u.Util.extend(e,t)})})},e}(p.ODataParserBase);e.spGetEntityUrl=o,e.spODataEntity=i,e.spODataEntityArray=a},function(t,e,n){"use strict";if(n(8)){var r=n(37),o=n(3),i=n(4),a=n(0),s=n(72),u=n(107),c=n(21),l=n(45),p=n(39),f=n(15),h=n(47),d=n(27),y=n(10),g=n(146),v=n(41),m=n(25),b=n(14),_=n(57),P=n(5),w=n(11),S=n(98),O=n(42),x=n(19),C=n(43).f,I=n(100),T=n(40),j=n(7),E=n(29),U=n(64),A=n(103),F=n(136),R=n(58),M=n(68),D=n(44),k=n(102),L=n(135),B=n(9),N=n(18),Q=B.f,q=N.f,H=o.RangeError,W=o.TypeError,G=o.Uint8Array,z="ArrayBuffer",V="Shared"+z,$="BYTES_PER_ELEMENT",J="prototype",K=Array[J],X=u.ArrayBuffer,Z=u.DataView,Y=E(0),tt=E(2),et=E(3),nt=E(4),rt=E(5),ot=E(6),it=U(!0),at=U(!1),st=F.values,ut=F.keys,ct=F.entries,lt=K.lastIndexOf,pt=K.reduce,ft=K.reduceRight,ht=K.join,dt=K.sort,yt=K.slice,gt=K.toString,vt=K.toLocaleString,mt=j("iterator"),bt=j("toStringTag"),_t=T("typed_constructor"),Pt=T("def_constructor"),wt=s.CONSTR,St=s.TYPED,Ot=s.VIEW,xt="Wrong length!",Ct=E(1,function(t,e){return Ut(A(t,t[Pt]),e)}),It=i(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),Tt=!!G&&!!G[J].set&&i(function(){new G(1).set({})}),jt=function(t,e){var n=d(t);if(n<0||n%e)throw H("Wrong offset!");return n},Et=function(t){if(P(t)&&St in t)return t;throw W(t+" is not a typed array!")},Ut=function(t,e){if(!(P(t)&&_t in t))throw W("It is not a typed array constructor!");return new t(e)},At=function(t,e){return Ft(A(t,t[Pt]),e)},Ft=function(t,e){for(var n=0,r=e.length,o=Ut(t,r);r>n;)o[n]=e[n++];return o},Rt=function(t,e,n){Q(t,e,{get:function(){return this._d[n]}})},Mt=function(t){var e,n,r,o,i,a,s=w(t),u=arguments.length,l=u>1?arguments[1]:void 0,p=void 0!==l,f=I(s);if(void 0!=f&&!S(f)){for(a=f.call(s),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);s=r}for(p&&u>2&&(l=c(l,arguments[2],2)),e=0,n=y(s.length),o=Ut(this,n);n>e;e++)o[e]=p?l(s[e],e):s[e];return o},Dt=function(){for(var t=0,e=arguments.length,n=Ut(this,e);e>t;)n[t]=arguments[t++];return n},kt=!!G&&i(function(){vt.call(new G(1))}),Lt=function(){return vt.apply(kt?yt.call(Et(this)):Et(this),arguments)},Bt={copyWithin:function(t,e){return L.call(Et(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Et(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return k.apply(Et(this),arguments)},filter:function(t){return At(this,tt(Et(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Et(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Et(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Y(Et(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Et(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Et(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ht.apply(Et(this),arguments)},lastIndexOf:function(t){return lt.apply(Et(this),arguments)},map:function(t){return Ct(Et(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return pt.apply(Et(this),arguments)},reduceRight:function(t){return ft.apply(Et(this),arguments)},reverse:function(){for(var t,e=this,n=Et(e).length,r=Math.floor(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e},some:function(t){return et(Et(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return dt.call(Et(this),t)},subarray:function(t,e){var n=Et(this),r=n.length,o=v(t,r);return new(A(n,n[Pt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,y((void 0===e?r:v(e,r))-o))}},Nt=function(t,e){return At(this,yt.call(Et(this),t,e))},Qt=function(t){Et(this);var e=jt(arguments[1],1),n=this.length,r=w(t),o=y(r.length),i=0;if(o+e>n)throw H(xt);for(;i<o;)this[e+i]=r[i++]},qt={entries:function(){return ct.call(Et(this))},keys:function(){return ut.call(Et(this))},values:function(){return st.call(Et(this))}},Ht=function(t,e){return P(t)&&t[St]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Wt=function(t,e){return Ht(t,e=m(e,!0))?p(2,t[e]):q(t,e)},Gt=function(t,e,n){return!(Ht(t,e=m(e,!0))&&P(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?Q(t,e,n):(t[e]=n.value,t)};wt||(N.f=Wt,B.f=Gt),a(a.S+a.F*!wt,"Object",{getOwnPropertyDescriptor:Wt,defineProperty:Gt}),i(function(){gt.call({})})&&(gt=vt=function(){return ht.call(this)});var zt=h({},Bt);h(zt,qt),f(zt,mt,qt.values),h(zt,{slice:Nt,set:Qt,constructor:function(){},toString:gt,toLocaleString:Lt}),Rt(zt,"buffer","b"),Rt(zt,"byteOffset","o"),Rt(zt,"byteLength","l"),Rt(zt,"length","e"),Q(zt,bt,{get:function(){return this[St]}}),t.exports=function(t,e,n,u){u=!!u;var c=t+(u?"Clamped":"")+"Array",p="get"+t,h="set"+t,d=o[c],v=d||{},m=d&&x(d),b=!d||!s.ABV,w={},S=d&&d[J],I=function(t,n){var r=t._d;return r.v[p](n*e+r.o,It)},T=function(t,n,r){var o=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[h](n*e+o.o,r,It)},j=function(t,e){Q(t,e,{get:function(){return I(this,e)},set:function(t){return T(this,e,t)},enumerable:!0})};b?(d=n(function(t,n,r,o){l(t,d,c,"_d");var i,a,s,u,p=0,h=0;if(P(n)){if(!(n instanceof X||(u=_(n))==z||u==V))return St in n?Ft(d,n):Mt.call(d,n);i=n,h=jt(r,e);var v=n.byteLength;if(void 0===o){if(v%e)throw H(xt);if((a=v-h)<0)throw H(xt)}else if((a=y(o)*e)+h>v)throw H(xt);s=a/e}else s=g(n),a=s*e,i=new X(a);for(f(t,"_d",{b:i,o:h,l:a,e:s,v:new Z(i)});p<s;)j(t,p++)}),S=d[J]=O(zt),f(S,"constructor",d)):i(function(){d(1)})&&i(function(){new d(-1)})&&M(function(t){new d,new d(null),new d(1.5),new d(t)},!0)||(d=n(function(t,n,r,o){l(t,d,c);var i;return P(n)?n instanceof X||(i=_(n))==z||i==V?void 0!==o?new v(n,jt(r,e),o):void 0!==r?new v(n,jt(r,e)):new v(n):St in n?Ft(d,n):Mt.call(d,n):new v(g(n))}),Y(m!==Function.prototype?C(v).concat(C(m)):C(v),function(t){t in d||f(d,t,v[t])}),d[J]=S,r||(S.constructor=d));var E=S[mt],U=!!E&&("values"==E.name||void 0==E.name),A=qt.values;f(d,_t,!0),f(S,St,c),f(S,Ot,!0),f(S,Pt,d),(u?new d(1)[bt]==c:bt in S)||Q(S,bt,{get:function(){return c}}),w[c]=d,a(a.G+a.W+a.F*(d!=v),w),a(a.S,c,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*i(function(){v.of.call(d,1)}),c,{from:Mt,of:Dt}),$ in S||f(S,$,e),a(a.P,c,Bt),D(c),a(a.P+a.F*Tt,c,{set:Qt}),a(a.P+a.F*!U,c,qt),r||S.toString==gt||(S.toString=gt),a(a.P+a.F*i(function(){new d(1).slice()}),c,{slice:Nt}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()})||!i(function(){S.toLocaleString.call([1,2])})),c,{toLocaleString:Lt}),R[c]=U?E:A,r||U||f(S,mt,A)}}else t.exports=function(){}},function(t,e,n){var r=n(141),o=n(0),i=n(63)("metadata"),a=i.store||(i.store=new(n(144))),s=function(t,e,n){var o=a.get(t);if(!o){if(!n)return;a.set(t,o=new r)}var i=o.get(e);if(!i){if(!n)return;o.set(e,i=new r)}return i},u=function(t,e,n){var r=s(e,n,!1);return void 0!==r&&r.has(t)},c=function(t,e,n){var r=s(e,n,!1);return void 0===r?void 0:r.get(t)},l=function(t,e,n,r){s(n,r,!0).set(t,e)},p=function(t,e){var n=s(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},f=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},h=function(t){o(o.S,"Reflect",t)};t.exports={store:a,map:s,has:u,get:c,set:l,keys:p,key:f,exp:h}},function(t,e,n){"use strict";function r(t){a.set(t)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(159),i=function(){function t(){this._defaultCachingStore="session",this._defaultCachingTimeoutSeconds=60,this._globalCacheDisable=!1,this._enableCacheExpiration=!1,this._cacheExpirationIntervalMilliseconds=750,this._spfxContext=null,this._spFetchClientFactory=function(){return new o.FetchClient},this._spBaseUrl=null,this._spHeaders=null,this._graphHeaders=null,this._graphFetchClientFactory=function(){return null}}return t.prototype.set=function(t){var e=this;if(t.hasOwnProperty("globalCacheDisable")&&(this._globalCacheDisable=t.globalCacheDisable),t.hasOwnProperty("defaultCachingStore")&&(this._defaultCachingStore=t.defaultCachingStore),t.hasOwnProperty("defaultCachingTimeoutSeconds")&&(this._defaultCachingTimeoutSeconds=t.defaultCachingTimeoutSeconds),t.hasOwnProperty("sp")&&(t.sp.hasOwnProperty("fetchClientFactory")&&(this._spFetchClientFactory=t.sp.fetchClientFactory),t.sp.hasOwnProperty("baseUrl")&&(this._spBaseUrl=t.sp.baseUrl),t.sp.hasOwnProperty("headers")&&(this._spHeaders=t.sp.headers)),t.hasOwnProperty("spfxContext")&&(this._spfxContext=t.spfxContext,void 0!==this._spfxContext.graphHttpClient&&(this._graphFetchClientFactory=function(){return e._spfxContext.graphHttpClient})),t.hasOwnProperty("graph")&&(t.graph.hasOwnProperty("headers")&&(this._graphHeaders=t.graph.headers),t.graph.hasOwnProperty("fetchClientFactory")&&(this._graphFetchClientFactory=t.graph.fetchClientFactory)),t.hasOwnProperty("enableCacheExpiration")&&(this._enableCacheExpiration=t.enableCacheExpiration),t.hasOwnProperty("cacheExpirationIntervalMilliseconds")){var n=t.cacheExpirationIntervalMilliseconds<300?300:t.cacheExpirationIntervalMilliseconds;this._cacheExpirationIntervalMilliseconds=n}},Object.defineProperty(t.prototype,"defaultCachingStore",{get:function(){return this._defaultCachingStore},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"defaultCachingTimeoutSeconds",{get:function(){return this._defaultCachingTimeoutSeconds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"globalCacheDisable",{get:function(){return this._globalCacheDisable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spFetchClientFactory",{get:function(){return this._spFetchClientFactory},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spBaseUrl",{get:function(){return null!==this._spBaseUrl?this._spBaseUrl:null!==this._spfxContext?this._spfxContext.pageContext.web.absoluteUrl:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spHeaders",{get:function(){return this._spHeaders},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableCacheExpiration",{get:function(){return this._enableCacheExpiration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cacheExpirationIntervalMilliseconds",{get:function(){return this._cacheExpirationIntervalMilliseconds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spfxContext",{get:function(){return this._spfxContext},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphFetchClientFactory",{get:function(){return this._graphFetchClientFactory},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphHeaders",{get:function(){return this._graphHeaders},enumerable:!0,configurable:!0}),t}();e.RuntimeConfigImpl=i;var a=new i;e.RuntimeConfig=a,e.setRuntimeConfig=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r;!function(t){t[t.Verbose=0]="Verbose",t[t.Info=1]="Info",t[t.Warning=2]="Warning",t[t.Error=3]="Error",t[t.Off=99]="Off"}(r=e.LogLevel||(e.LogLevel={}));var o=function(){function t(){}return Object.defineProperty(t,"activeLogLevel",{get:function(){return t.instance.activeLogLevel},set:function(e){t.instance.activeLogLevel=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"instance",{get:function(){return void 0!==t._instance&&null!==t._instance||(t._instance=new i),t._instance},enumerable:!0,configurable:!0}),t.subscribe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.map(function(e){return t.instance.subscribe(e)})},t.clearSubscribers=function(){return t.instance.clearSubscribers()},Object.defineProperty(t,"count",{get:function(){return t.instance.count},enumerable:!0,configurable:!0}),t.write=function(e,n){void 0===n&&(n=r.Verbose),t.instance.log({level:n,message:e})},t.writeJSON=function(e,n){void 0===n&&(n=r.Verbose),t.instance.log({level:n,message:JSON.stringify(e)})},t.log=function(e){t.instance.log(e)},t.measure=function(e,n){return t.instance.measure(e,n)},t}();e.Logger=o;var i=function(){function t(t,e){void 0===t&&(t=r.Warning),void 0===e&&(e=[]),this.activeLogLevel=t,this.subscribers=e}return t.prototype.subscribe=function(t){this.subscribers.push(t)},t.prototype.clearSubscribers=function(){var t=this.subscribers.slice(0);return this.subscribers.length=0,t},Object.defineProperty(t.prototype,"count",{get:function(){return this.subscribers.length},enumerable:!0,configurable:!0}),t.prototype.write=function(t,e){void 0===e&&(e=r.Verbose),this.log({level:e,message:t})},t.prototype.log=function(t){void 0===t||t.level<this.activeLogLevel||this.subscribers.map(function(e){return e.log(t)})},t.prototype.measure=function(t,e){console.profile(t);try{return e()}finally{console.profileEnd()}},t}(),a=function(){function t(){}return t.prototype.log=function(t){var e=this.format(t);switch(t.level){case r.Verbose:case r.Info:console.log(e);break;case r.Warning:console.warn(e);break;case r.Error:console.error(e)}},t.prototype.format=function(t){var e=[];return e.push("Message: "+t.message),void 0!==t.data&&e.push(" Data: "+JSON.stringify(t.data)),e.join("")},t}();e.ConsoleListener=a;var s=function(){function t(t){this.method=t}return t.prototype.log=function(t){this.method(t)},t}();e.FunctionListener=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(54),a=n(172),s=n(108),u=n(109),c=function(t){function e(e,n){var r=t.call(this)||this;if(r._query=new i.Dictionary,"string"==typeof e){var a=e;r._parentUrl=a,r._url=o.Util.combinePaths(a,n)}else{var s=e;r._parentUrl=s._url,r._url=o.Util.combinePaths(r._parentUrl,n)}return r}return r(e,t),e.prototype.as=function(t){var e=new t(this._url,null);return o.Util.extend(e,this,!0)},e.prototype.toUrlAndQuery=function(){var t=this;return this.toUrl()+"?"+this._query.getKeys().map(function(e){return e+"="+t._query.get(e)}).join("&")},e.prototype.getParent=function(t,e,n){return void 0===e&&(e=this.parentUrl),new t(e,n)},e.prototype.clone=function(t,e,n){return void 0===n&&(n=!0),new t(this,e)},e.prototype.toRequestContext=function(t,e,n,r){return void 0===e&&(e={}),void 0===r&&(r=u.PipelineMethods.default),Promise.resolve({batch:null,batchDependency:function(){},cachingOptions:this._cachingOptions,clientFactory:function(){return new a.GraphHttpClient},isBatched:!1,isCached:this._useCaching,options:e,parser:n,pipeline:r,requestAbsoluteUrl:this.toUrlAndQuery(),requestId:o.Util.getGUID(),verb:t})},e}(s.ODataQueryable);e.GraphQueryable=c;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.filter=function(t){return this._query.add("$filter",t),this},e.prototype.select=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length>0&&this._query.add("$select",t.join(",")),this},e.prototype.expand=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length>0&&this._query.add("$expand",t.join(",")),this},e.prototype.orderBy=function(t,e){void 0===e&&(e=!0);for(var n=this._query.getKeys(),r=[],o=e?" asc":" desc",i=0;i<n.length;i++)if("$orderby"===n[i]){r.push(this._query.get("$orderby"));break}return r.push(""+t+o),this._query.add("$orderby",r.join(",")),this},e.prototype.top=function(t){return this._query.add("$top",t.toString()),this},e.prototype.skip=function(t){return this._query.add("$top",t.toString()),this},e.prototype.skipToken=function(t){return this._query.add("$skiptoken",t),this},Object.defineProperty(e.prototype,"count",{get:function(){return this._query.add("$count","true"),this},enumerable:!0,configurable:!0}),e}(c);e.GraphQueryableCollection=l;var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.search=function(t){return this._query.add("$search",t),this},e}(l);e.GraphQueryableSearchableCollection=p;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.select=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length>0&&this._query.add("$select",t.join(",")),this},e.prototype.expand=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.length>0&&this._query.add("$expand",t.join(",")),this},e}(c);e.GraphQueryableInstance=f},function(t,e,n){var r=n(40)("meta"),o=n(5),i=n(14),a=n(9).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(4)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},p=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},f=function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},h=function(t){return c&&d.NEED&&u(t)&&!i(t,r)&&l(t),t},d=t.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:h}},function(t,e){t.exports=!1},function(t,e,n){var r=n(7)("unscopables"),o=Array.prototype;void 0==o[r]&&n(15)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(27),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(2),o=n(122),i=n(85),a=n(84)("IE_PROTO"),s=function(){},u="prototype",c=function(){var t,e=n(82)("iframe"),r=i.length;for(e.style.display="none",n(86).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\\/script>"),t.close(),c=t.F;r--;)delete c[u][i[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[u]=r(t),n=new s,s[u]=null,n[a]=t):n=c(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(121),o=n(85).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){"use strict";var r=n(3),o=n(9),i=n(8),a=n(7)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(21),o=n(133),i=n(98),a=n(2),s=n(10),u=n(100),c={},l={},e=t.exports=function(t,e,n,p,f){var h,d,y,g,v=f?function(){return t}:u(t),m=r(n,p,e?2:1),b=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(i(v)){for(h=s(t.length);h>b;b++)if((g=e?m(a(d=t[b])[0],d[1]):m(t[b]))===c||g===l)return g}else for(y=v.call(t);!(d=y.next()).done;)if((g=o(y,m,d.value,e))===c||g===l)return g};e.BREAK=c,e.RETURN=l},function(t,e,n){var r=n(16);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";function r(){return new u}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(77),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(i.ODataParserBase);e.ODataDefaultParser=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.parse=function(e){return t.prototype.parse.call(this,e).then(function(t){return t})},e}(i.ODataParserBase);e.ODataValue=r;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.parseImpl=function(t,e){t.json().then(e)},e}(i.ODataParserBase);e.ODataRawParserImpl=c,e.ODataRaw=new c;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.parseImpl=function(t,e){t.text().then(e)},e}(i.ODataParserBase);e.TextFileParser=l;var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.parseImpl=function(t,e){t.blob().then(e)},e}(i.ODataParserBase);e.BlobFileParser=p;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.parseImpl=function(t,e){t.json().then(e)},e}(i.ODataParserBase);e.JSONFileParser=f;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.parseImpl=function(t,e){a.Util.isFunction(t.arrayBuffer)&&t.arrayBuffer().then(e),t.buffer().then(e)},e}(i.ODataParserBase);e.BufferFileParser=h},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(48),a=n(1),s=n(20),u=n(166),c=n(61),l=n(79),p=n(30),f=function(t){function e(e,n){return void 0===n&&(n="files"),t.call(this,e,n)||this}return r(e,t),e.prototype.getByName=function(t){var e=new h(this);return e.concat("(\'"+t+"\')"),e},e.prototype.add=function(t,n,r){var o=this;return void 0===r&&(r=!0),new e(this,"add(overwrite="+r+",url=\'"+t+"\')").postCore({body:n}).then(function(e){return{data:e,file:o.getByName(t)}})},e.prototype.addChunked=function(t,n,r,o,i){var a=this;return void 0===o&&(o=!0),void 0===i&&(i=10485760),this.clone(e,"add(overwrite="+o+",url=\'"+t+"\')",!1).postCore().then(function(){return a.getByName(t)}).then(function(t){return t.setContentChunked(n,r,i)})},e.prototype.addTemplateFile=function(t,n){var r=this;return this.clone(e,"addTemplateFile(urloffile=\'"+t+"\',templatefiletype="+n+")",!1).postCore().then(function(e){return{data:e,file:r.getByName(t)}})},e}(o.SharePointQueryableCollection);e.Files=f;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"listItemAllFields",{get:function(){return new o.SharePointQueryableCollection(this,"listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"versions",{get:function(){return new d(this)},enumerable:!0,configurable:!0}),e.prototype.approve=function(t){return void 0===t&&(t=""),this.clone(e,"approve(comment=\'"+t+"\')").postCore()},e.prototype.cancelUpload=function(t){return this.clone(e,"cancelUpload(uploadId=guid\'"+t+"\')",!1).postCore()},e.prototype.checkin=function(t,n){if(void 0===t&&(t=""),void 0===n&&(n=g.Major),t.length>1023)throw new s.MaxCommentLengthException;return this.clone(e,"checkin(comment=\'"+t+"\',checkintype="+n+")").postCore()},e.prototype.checkout=function(){return this.clone(e,"checkout").postCore()},e.prototype.copyTo=function(t,n){return void 0===n&&(n=!0),this.clone(e,"copyTo(strnewurl=\'"+t+"\',boverwrite="+n+")").postCore()},e.prototype.delete=function(t){return void 0===t&&(t="*"),this.clone(e,null).postCore({headers:{"IF-Match":t,"X-HTTP-Method":"DELETE"}})},e.prototype.deny=function(t){if(void 0===t&&(t=""),t.length>1023)throw new s.MaxCommentLengthException;return this.clone(e,"deny(comment=\'"+t+"\')").postCore()},e.prototype.getLimitedWebPartManager=function(t){return void 0===t&&(t=v.Shared),new u.LimitedWebPartManager(this,"getLimitedWebPartManager(scope="+t+")")},e.prototype.moveTo=function(t,n){return void 0===n&&(n=m.Overwrite),this.clone(e,"moveTo(newurl=\'"+t+"\',flags="+n+")").postCore()},e.prototype.publish=function(t){if(void 0===t&&(t=""),t.length>1023)throw new s.MaxCommentLengthException;return this.clone(e,"publish(comment=\'"+t+"\')").postCore()},e.prototype.recycle=function(){return this.clone(e,"recycle").postCore()},e.prototype.undoCheckout=function(){return this.clone(e,"undoCheckout").postCore()},e.prototype.unpublish=function(t){if(void 0===t&&(t=""),t.length>1023)throw new s.MaxCommentLengthException;return this.clone(e,"unpublish(comment=\'"+t+"\')").postCore()},e.prototype.getText=function(){return this.clone(e,"$value",!1).get(new i.TextFileParser,{headers:{binaryStringResponseBody:"true"}})},e.prototype.getBlob=function(){return this.clone(e,"$value",!1).get(new i.BlobFileParser,{headers:{binaryStringResponseBody:"true"}})},e.prototype.getBuffer=function(){return this.clone(e,"$value",!1).get(new i.BufferFileParser,{headers:{binaryStringResponseBody:"true"}})},e.prototype.getJSON=function(){return this.clone(e,"$value",!1).get(new i.JSONFileParser,{headers:{binaryStringResponseBody:"true"}})},e.prototype.setContent=function(t){var n=this;return this.clone(e,"$value",!1).postCore({body:t,headers:{"X-HTTP-Method":"PUT"}}).then(function(t){return new e(n)})},e.prototype.getItem=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.listItemAllFields;return n.select.apply(n,t).get().then(function(t){return a.Util.extend(new c.Item(p.spGetEntityUrl(t)),t)})},e.prototype.setContentChunked=function(t,e,n){var r=this;void 0===n&&(n=10485760),void 0===e&&(e=function(){return null});var o=t.size,i=parseInt((t.size/n).toString(),10)+(t.size%n==0?1:0),s=a.Util.getGUID();e({uploadId:s,blockNumber:1,chunkSize:n,currentPointer:0,fileSize:o,stage:"starting",totalBlocks:i});for(var u=this.startUpload(s,t.slice(0,n)),c=2;c<i;c++)!function(a){u=u.then(function(u){return e({uploadId:s,blockNumber:a,chunkSize:n,currentPointer:u,fileSize:o,stage:"continue",totalBlocks:i}),r.continueUpload(s,u,t.slice(u,u+n))})}(c);return u.then(function(a){return e({uploadId:s,blockNumber:i,chunkSize:n,currentPointer:a,fileSize:o,stage:"finishing",totalBlocks:i}),r.finishUpload(s,a,t.slice(a))})},e.prototype.startUpload=function(t,n){return this.clone(e,"startUpload(uploadId=guid\'"+t+"\')",!1).postAsCore({body:n}).then(function(t){return"object"==typeof t&&(t=t.StartUpload),parseFloat(t)})},e.prototype.continueUpload=function(t,n,r){return this.clone(e,"continueUpload(uploadId=guid\'"+t+"\',fileOffset="+n+")",!1).postAsCore({body:r}).then(function(t){return"object"==typeof t&&(t=t.ContinueUpload),parseFloat(t)})},e.prototype.finishUpload=function(t,n,r){return this.clone(e,"finishUpload(uploadId=guid\'"+t+"\',fileOffset="+n+")",!1).postAsCore({body:r}).then(function(t){return{data:t,file:new e(t.ServerRelativeUrl)}})},e}(l.SharePointQueryableShareableFile);e.File=h;var d=function(t){function e(e,n){return void 0===n&&(n="versions"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new y(this);return e.concat("("+t+")"),e},e.prototype.deleteAll=function(){return new e(this,"deleteAll").postCore()},e.prototype.deleteById=function(t){return this.clone(e,"deleteById(vid="+t+")").postCore()},e.prototype.recycleByID=function(t){return this.clone(e,"recycleByID(vid="+t+")").postCore()},e.prototype.deleteByLabel=function(t){return this.clone(e,"deleteByLabel(versionlabel=\'"+t+"\')").postCore()},e.prototype.recycleByLabel=function(t){return this.clone(e,"recycleByLabel(versionlabel=\'"+t+"\')").postCore()},e.prototype.restoreByLabel=function(t){return this.clone(e,"restoreByLabel(versionlabel=\'"+t+"\')").postCore()},e}(o.SharePointQueryableCollection);e.Versions=d;var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.delete=function(t){return void 0===t&&(t="*"),this.postCore({headers:{"IF-Match":t,"X-HTTP-Method":"DELETE"}})},e.prototype.openBinaryStream=function(){return this.clone(e,"openBinaryStream").postCore()},e}(o.SharePointQueryableInstance);e.Version=y;var g;!function(t){t[t.Minor=0]="Minor",t[t.Major=1]="Major",t[t.Overwrite=2]="Overwrite"}(g=e.CheckinType||(e.CheckinType={}));var v;!function(t){t[t.User=0]="User",t[t.Shared=1]="Shared"}(v=e.WebPartsPersonalizationScope||(e.WebPartsPersonalizationScope={}));var m;!function(t){t[t.Overwrite=1]="Overwrite",t[t.AllowBrokenThickets=8]="AllowBrokenThickets"}(m=e.MoveOperations||(e.MoveOperations={})),function(t){t[t.StandardPage=0]="StandardPage",t[t.WikiPage=1]="WikiPage",t[t.FormPage=2]="FormPage",t[t.ClientSidePage=3]="ClientSidePage"}(e.TemplateFileType||(e.TemplateFileType={}))},function(t,e,n){var r=n(9).f,o=n(14),i=n(7)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(121),o=n(85);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(0),o=n(26),i=n(4),a=n(88),s="["+a+"]",u="\u200b\x85",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),p=function(t,e,n){var o={},s=i(function(){return!!a[t]()||u[t]()!=u}),c=o[t]=s?e(f):a[t];n&&(o[n]=c),r(r.P+r.F*s,"String",o)},f=p.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(l,"")),t};t.exports=p},function(t,e,n){var r=n(5);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=[]),this.keys=t,this.values=e}return t.prototype.get=function(t){var e=this.keys.indexOf(t);return e<0?null:this.values[e]},t.prototype.add=function(t,e){var n=this.keys.indexOf(t);n>-1?this.values[n]=e:(this.keys.push(t),this.values.push(e))},t.prototype.merge=function(t){var e=this;if("getKeys"in t){var n=t;n.getKeys().map(function(t){e.add(t,n.get(t))})}else{var r=t;for(var o in r)r.hasOwnProperty(o)&&this.add(o,r[o])}},t.prototype.remove=function(t){var e=this.keys.indexOf(t);if(e<0)return null;var n=this.values[e];return this.keys.splice(e,1),this.values.splice(e,1),n},t.prototype.getKeys=function(){return this.keys},t.prototype.getValues=function(){return this.values},t.prototype.clear=function(){this.keys=[],this.values=[]},t.prototype.count=function(){return this.keys.length},t}();e.Dictionary=r},function(t,e,n){var r=n(22);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(22),o=n(7)("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){t.exports={}},function(t,e,n){"use strict";function r(t,e){t.headers=t.headers||{};var n=i.Util.extend(t.headers,e.headers);t=i.Util.extend(t,e),t.headers=n}function o(t,e){void 0!==e&&null!==e&&new Request("",{headers:e}).headers.forEach(function(e,n){t.append(n,e)})}Object.defineProperty(e,"__esModule",{value:!0});var i=n(1);e.mergeOptions=r,e.mergeHeaders=o},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(78),a=n(114),s=n(116),u=n(112),c=n(113),l=n(388),p=n(81),f=n(111),h=n(49),d=n(1),y=n(78),g=n(165),v=n(115),m=n(30),b=n(117),_=n(167),P=n(79),w=n(389),S=n(168),O=n(169),x=function(t){function e(e,n){return void 0===n&&(n="webs"),t.call(this,e,n)||this}return r(e,t),e.prototype.add=function(t,n,r,o,i,a){void 0===r&&(r=""),void 0===o&&(o="STS"),void 0===i&&(i=1033),void 0===a&&(a=!0);var s={Description:r,Language:i,Title:t,Url:n,UseSamePermissionsAsParentSite:a,WebTemplate:o},u=JSON.stringify({parameters:d.Util.extend({__metadata:{type:"SP.WebCreationInformation"}},s)});return this.clone(e,"add").postCore({body:u}).then(function(t){return{data:t,web:new I(m.spExtractODataId(t).replace(/_api\\/web\\/?/i,""))}})},e}(o.SharePointQueryableCollection);e.Webs=x;var C=function(t){function e(e,n){return void 0===n&&(n="webinfos"),t.call(this,e,n)||this}return r(e,t),e}(o.SharePointQueryableCollection);e.WebInfos=C;var I=function(t){function e(e,n){return void 0===n&&(n="_api/web"),t.call(this,e,n)||this}return r(e,t),e.fromUrl=function(t,n){return new e(d.extractWebUrl(t),n)},Object.defineProperty(e.prototype,"webs",{get:function(){return new x(this)},enumerable:!0,configurable:!0}),e.prototype.getSubwebsFilteredForCurrentUser=function(t,e){return void 0===t&&(t=-1),void 0===e&&(e=-1),this.clone(x,"getSubwebsFilteredForCurrentUser(nWebTemplateFilter="+t+",nConfigurationFilter="+e+")")},Object.defineProperty(e.prototype,"allProperties",{get:function(){return this.clone(o.SharePointQueryableCollection,"allproperties")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"webinfos",{get:function(){return new C(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentTypes",{get:function(){return new c.ContentTypes(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lists",{get:function(){return new i.Lists(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fields",{get:function(){return new a.Fields(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"features",{get:function(){return new _.Features(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"availablefields",{get:function(){return new a.Fields(this,"availablefields")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"navigation",{get:function(){return new s.Navigation(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"siteUsers",{get:function(){return new g.SiteUsers(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"siteGroups",{get:function(){return new u.SiteGroups(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"siteUserInfoList",{get:function(){return new y.List(this,"siteuserinfolist")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"regionalSettings",{get:function(){return new l.RegionalSettings(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentUser",{get:function(){return new g.CurrentUser(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"folders",{get:function(){return new p.Folders(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userCustomActions",{get:function(){return new v.UserCustomActions(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"effectiveBasePermissions",{get:function(){return new o.SharePointQueryable(this,"effectivebasepermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"roleDefinitions",{get:function(){return new f.RoleDefinitions(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relatedItems",{get:function(){return w.RelatedItemManagerImpl.FromUrl(this.toUrl())},enumerable:!0,configurable:!0}),e.prototype.createBatch=function(){return new b.ODataBatch(this.parentUrl)},Object.defineProperty(e.prototype,"rootFolder",{get:function(){return new p.Folder(this,"rootFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"associatedOwnerGroup",{get:function(){return new u.SiteGroup(this,"associatedownergroup")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"associatedMemberGroup",{get:function(){return new u.SiteGroup(this,"associatedmembergroup")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"associatedVisitorGroup",{get:function(){return new u.SiteGroup(this,"associatedvisitorgroup")},enumerable:!0,configurable:!0}),e.prototype.getFolderByServerRelativeUrl=function(t){return new p.Folder(this,"getFolderByServerRelativeUrl(\'"+t+"\')")},e.prototype.getFolderByServerRelativePath=function(t){return new p.Folder(this,"getFolderByServerRelativePath(decodedUrl=\'"+t+"\')")},e.prototype.getFileByServerRelativeUrl=function(t){return new h.File(this,"getFileByServerRelativeUrl(\'"+t+"\')")},e.prototype.getFileByServerRelativePath=function(t){return new h.File(this,"getFileByServerRelativePath(decodedUrl=\'"+t+"\')")},e.prototype.getList=function(t){return new y.List(this,"getList(\'"+t+"\')")},e.prototype.update=function(t){var e=this,n=JSON.stringify(d.Util.extend({__metadata:{type:"SP.Web"}},t));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(t){return{data:t,web:e}})},e.prototype.delete=function(){return t.prototype.deleteCore.call(this)},e.prototype.applyTheme=function(t,n,r,o){var i=JSON.stringify({backgroundImageUrl:r,colorPaletteUrl:t,fontSchemeUrl:n,shareGenerated:o});return this.clone(e,"applytheme").postCore({body:i})},e.prototype.applyWebTemplate=function(t){var n=this.clone(e,"applywebtemplate");return n.concat("(@t)"),n.query.add("@t",t),n.postCore()},e.prototype.ensureUser=function(t){var n=JSON.stringify({logonName:t});return this.clone(e,"ensureuser").postCore({body:n}).then(function(t){return{data:t,user:new g.SiteUser(m.spExtractODataId(t))}})},e.prototype.availableWebTemplates=function(t,e){return void 0===t&&(t=1033),void 0===e&&(e=!0),new o.SharePointQueryableCollection(this,"getavailablewebtemplates(lcid="+t+", doincludecrosslanguage="+e+")")},e.prototype.getCatalog=function(t){return this.clone(e,"getcatalog("+t+")").select("Id").get().then(function(t){return new y.List(m.spExtractODataId(t))})},e.prototype.getChanges=function(t){var n=JSON.stringify({query:d.Util.extend({__metadata:{type:"SP.ChangeQuery"}},t)});return this.clone(e,"getchanges").postCore({body:n})},Object.defineProperty(e.prototype,"customListTemplate",{get:function(){return new o.SharePointQueryableCollection(this,"getcustomlisttemplates")},enumerable:!0,configurable:!0}),e.prototype.getUserById=function(t){return new g.SiteUser(this,"getUserById("+t+")")},e.prototype.mapToIcon=function(t,n,r){return void 0===n&&(n=0),void 0===r&&(r=""),this.clone(e,"maptoicon(filename=\'"+t+"\', progid=\'"+r+"\', size="+n+")").get()},e.prototype.getStorageEntity=function(t){return this.clone(e,"getStorageEntity(\'"+t+"\')").get()},e.prototype.getAppCatalog=function(t){return new S.AppCatalog(t||this)},e.prototype.getClientSideWebParts=function(){return this.clone(o.SharePointQueryableCollection,"GetClientSideWebParts").get()},e.prototype.addClientSidePage=function(t,e,n){return void 0===e&&(e=t.replace(/\\.[^\\/.]+$/,"")),void 0===n&&(n="Site Pages"),O.ClientSidePage.create(this.lists.getByTitle(n),t,e)},e.prototype.addClientSidePageByPath=function(t,e,n){return void 0===n&&(n=t.replace(/\\.[^\\/.]+$/,"")),O.ClientSidePage.create(this.getList(e),t,n)},e}(P.SharePointQueryableShareableWeb);e.Web=I},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(79),a=n(81),s=n(49),u=n(113),c=n(1),l=n(77),p=n(384),f=n(78),h=n(158),d=function(t){function e(e,n){return void 0===n&&(n="items"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new y(this);return e.concat("("+t+")"),e},e.prototype.getItemByStringId=function(t){var e=new y(this);return e.concat("/../getItemByStringId(\'"+t+"\')"),e},e.prototype.skip=function(t,e){return void 0===e&&(e=!1),e?this._query.add("$skiptoken",encodeURIComponent("Paged=TRUE&PagedPrev=TRUE&p_ID="+t)):this._query.add("$skiptoken",encodeURIComponent("Paged=TRUE&p_ID="+t)),this},e.prototype.getPaged=function(){return this.getAs(new b)},e.prototype.getAll=function(t){var n=this;void 0===t&&(t=2e3),h.Logger.write("Calling items.getAll should be done sparingly. Ensure this is the correct choice. If you are unsure, it is not.",h.LogLevel.Warning);var r=new e(this,"").top(t).configure({headers:{Accept:"application/json;odata=nometadata"}});return this.query.getKeys().filter(function(t){return/^\\$select$|^\\$filter$|^\\$top$|^\\$expand$/.test(t.toLowerCase())}).reduce(function(t,e){return t.query.add(e,n.query.get(e)),t},r),new Promise(function(t,e){var n=[],o=function(r){[].push.apply(n,r.results),r.hasNext?r.getNext().then(o).catch(e):t(n)};r.getPaged().then(o).catch(e)})},e.prototype.add=function(t,n){var r=this;void 0===t&&(t={}),void 0===n&&(n=null);var o=this.addBatchDependency();return this.ensureListItemEntityTypeName(n).then(function(n){var i=JSON.stringify(c.Util.extend({__metadata:{type:n}},t)),a=r.clone(e,null).postAsCore({body:i}).then(function(t){return{data:t,item:r.getById(t.Id)}});return o(),a})},e.prototype.ensureListItemEntityTypeName=function(t){return t?Promise.resolve(t):this.getParent(f.List).getListItemEntityTypeFullName()},e}(o.SharePointQueryableCollection);e.Items=d;var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"attachmentFiles",{get:function(){return new p.AttachmentFiles(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contentType",{get:function(){return new u.ContentType(this,"ContentType")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"effectiveBasePermissions",{get:function(){return new o.SharePointQueryable(this,"EffectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"effectiveBasePermissionsForUI",{get:function(){return new o.SharePointQueryable(this,"EffectiveBasePermissionsForUI")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fieldValuesAsHTML",{get:function(){return new o.SharePointQueryableInstance(this,"FieldValuesAsHTML")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fieldValuesAsText",{get:function(){return new o.SharePointQueryableInstance(this,"FieldValuesAsText")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fieldValuesForEdit",{get:function(){return new o.SharePointQueryableInstance(this,"FieldValuesForEdit")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"folder",{get:function(){return new a.Folder(this,"folder")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"file",{get:function(){return new s.File(this,"file")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"versions",{get:function(){return new v(this)},enumerable:!0,configurable:!0}),e.prototype.update=function(t,e,n){var r=this;return void 0===e&&(e="*"),void 0===n&&(n=null),new Promise(function(o,i){var a=r.addBatchDependency();return r.ensureListItemEntityTypeName(n).then(function(n){var i=JSON.stringify(c.Util.extend({__metadata:{type:n}},t));return a(),r.postCore({body:i,headers:{"IF-Match":e,"X-HTTP-Method":"MERGE"}},new _).then(function(t){o({data:t,item:r})})}).catch(function(t){return i(t)})})},e.prototype.delete=function(t){return void 0===t&&(t="*"),this.postCore({headers:{"IF-Match":t,"X-HTTP-Method":"DELETE"}})},e.prototype.recycle=function(){return this.clone(e,"recycle").postCore()},e.prototype.getWopiFrameUrl=function(t){void 0===t&&(t=0);var n=this.clone(e,"getWOPIFrameUrl(@action)");return n._query.add("@action",t),n.postCore().then(function(t){return t.hasOwnProperty("GetWOPIFrameUrl")?t.GetWOPIFrameUrl:t})},e.prototype.validateUpdateListItem=function(t,n){return void 0===n&&(n=!1),this.clone(e,"validateupdatelistitem").postCore({body:JSON.stringify({formValues:t,bNewDocumentUpdate:n})})},e.prototype.ensureListItemEntityTypeName=function(t){return t?Promise.resolve(t):this.getParent(f.List,this.parentUrl.substr(0,this.parentUrl.lastIndexOf("/"))).getListItemEntityTypeFullName()},e}(i.SharePointQueryableShareableItem);e.Item=y;var g=function(){function t(t,e){this.nextUrl=t,this.results=e}return Object.defineProperty(t.prototype,"hasNext",{get:function(){return"string"==typeof this.nextUrl&&this.nextUrl.length>0},enumerable:!0,configurable:!0}),t.prototype.getNext=function(){return this.hasNext?new d(this.nextUrl,null).getPaged():new Promise(function(t){return t(null)})},t}();e.PagedItemCollection=g;var v=function(t){function e(e,n){return void 0===n&&(n="versions"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new m(this);return e.concat("("+t+")"),e},e}(o.SharePointQueryableCollection);e.ItemVersions=v;var m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},e}(o.SharePointQueryableInstance);e.ItemVersion=m;var b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.parse=function(t){var e=this;return new Promise(function(n,r){e.handleError(t,r)&&t.json().then(function(t){var r=t.hasOwnProperty("d")&&t.d.hasOwnProperty("__next")?t.d.__next:t["odata.nextLink"];n(new g(r,e.parseODataJSON(t)))})})},e}(l.ODataParserBase),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.parse=function(t){var e=this;return new Promise(function(n,r){e.handleError(t,r)&&n({"odata.etag":t.headers.get("etag")})})},e}(l.ODataParserBase)},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(24),o=n(3),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(37)?"pure":"global",copyright:"\xa9 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var r=n(17),o=n(10),i=n(41);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=o(u.length),l=i(a,c);if(t&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(22);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(5),o=n(22),i=n(7)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(7)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(2);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var r=n(15),o=n(16),i=n(4),a=n(26),s=n(7);t.exports=function(t,e,n){var u=s(t),c=n(a,u,""[t]),l=c[0],p=c[1];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(o(String.prototype,t,l),r(RegExp.prototype,u,2==e?function(t,e){return p.call(t,this,e)}:function(t){return p.call(t,this)}))}},function(t,e,n){"use strict";var r=n(3),o=n(0),i=n(16),a=n(47),s=n(36),u=n(46),c=n(45),l=n(5),p=n(4),f=n(68),h=n(50),d=n(89);t.exports=function(t,e,n,y,g,v){var m=r[t],b=m,_=g?"set":"add",P=b&&b.prototype,w={},S=function(t){var e=P[t];i(P,t,"delete"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof b&&(v||P.forEach&&!p(function(){(new b).entries().next()}))){var O=new b,x=O[_](v?{}:-0,1)!=O,C=p(function(){O.has(1)}),I=f(function(t){new b(t)}),T=!v&&p(function(){for(var t=new b,e=5;e--;)t[_](e,e);return!t.has(-0)});I||(b=e(function(e,n){c(e,b,t);var r=d(new m,e,b);return void 0!=n&&u(n,g,r[_],r),r}),b.prototype=P,P.constructor=b),(C||T)&&(S("delete"),S("has"),g&&S("get")),(T||x)&&S(_),v&&P.clear&&delete P.clear}else b=y.getConstructor(e,t,g,_),a(b.prototype,n),s.NEED=!0;return h(b,t),w[t]=b,o(o.G+o.W+o.F*(b!=m),w),v||y.setStrong(b,t,g),b}},function(t,e,n){for(var r,o=n(3),i=n(15),a=n(40),s=a("typed_array"),u=a("view"),c=!(!o.ArrayBuffer||!o.DataView),l=c,p=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");p<9;)(r=o[f[p++]])?(i(r.prototype,s,!0),i(r.prototype,u,!0)):l=!1;t.exports={ABV:c,CONSTR:l,TYPED:s,VIEW:u}},function(t,e,n){"use strict";t.exports=n(37)||!n(4)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(3)[t]})},function(t,e,n){"use strict";var r=n(0);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){"use strict";var r=n(0),o=n(12),i=n(21),a=n(46);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,u=arguments[1];return o(this),e=void 0!==u,e&&o(u),void 0==t?new this:(n=[],e?(r=0,s=i(u,arguments[2],2),a(t,!1,function(t){n.push(s(t,r++))})):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(54),i=n(33),a=n(34),s=function(){function t(t,e){this.store=t,this.defaultTimeoutMinutes=e,this.defaultTimeoutMinutes=void 0===e?-1:e,this.enabled=this.test(),i.RuntimeConfig.enableCacheExpiration&&(a.Logger.write("Enabling cache expiration.",a.LogLevel.Info),this.cacheExpirationHandler())}return t.prototype.get=function(t){if(!this.enabled)return null;var e=this.store.getItem(t);if(null==e)return null;var n=JSON.parse(e);return new Date(n.expiration)<=new Date?(a.Logger.write("Removing item with key \'"+t+"\' from cache due to expiration.",a.LogLevel.Info),this.delete(t),null):n.value},t.prototype.put=function(t,e,n){this.enabled&&this.store.setItem(t,this.createPersistable(e,n))},t.prototype.delete=function(t){this.enabled&&this.store.removeItem(t)},t.prototype.getOrPut=function(t,e,n){var r=this;return this.enabled?new Promise(function(o){var i=r.get(t);null==i?e().then(function(e){r.put(t,e,n),o(e)}):o(i)}):e()},t.prototype.deleteExpired=function(){var t=this;return new Promise(function(e,n){t.enabled||e();try{for(var r=0;r<t.store.length;r++){var o=t.store.key(r);/["|\']?pnp["|\']? ?: ?1/i.test(t.store.getItem(o))&&t.get(o)}e()}catch(t){n(t)}})},t.prototype.test=function(){var t="test";try{return this.store.setItem(t,t),this.store.removeItem(t),!0}catch(t){return!1}},t.prototype.createPersistable=function(t,e){if(void 0===e){var n=i.RuntimeConfig.defaultCachingTimeoutSeconds;this.defaultTimeoutMinutes>0&&(n=60*this.defaultTimeoutMinutes),e=r.Util.dateAdd(new Date,"second",n)}return JSON.stringify({pnp:1,expiration:e,value:t})},t.prototype.cacheExpirationHandler=function(){var t=this;a.Logger.write("Called cache expiration handler.",a.LogLevel.Verbose),this.deleteExpired().then(function(e){setTimeout(r.Util.getCtxCallback(t,t.cacheExpirationHandler),i.RuntimeConfig.cacheExpirationIntervalMilliseconds)}).catch(function(t){a.Logger.log({data:t,level:a.LogLevel.Error,message:"Error deleting expired cache entries, see data for details. Timeout not reset."})})},t}();e.PnPClientStorageWrapper=s;var u=function(){function t(t){void 0===t&&(t=new o.Dictionary),this._store=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this._store.count()},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this._store.clear()},t.prototype.getItem=function(t){return this._store.get(t)},t.prototype.key=function(t){return this._store.getKeys()[t]},t.prototype.removeItem=function(t){this._store.remove(t)},t.prototype.setItem=function(t,e){this._store.add(t,e)},t}(),c=function(){function t(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this._local=t,this._session=e}return Object.defineProperty(t.prototype,"local",{get:function(){return null===this._local&&(this._local=new s("undefined"!=typeof localStorage?localStorage:new u)),this._local},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"session",{get:function(){return null===this._session&&(this._session=new s("undefined"!=typeof sessionStorage?sessionStorage:new u)),this._session},enumerable:!0,configurable:!0}),t}();e.PnPClientStorage=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20),o=n(34),i=function(){function t(){}return t.prototype.parse=function(t){var e=this;return new Promise(function(n,r){e.handleError(t,r)&&e.parseImpl(t,n,r)})},t.prototype.parseImpl=function(t,e,n){var r=this;t.headers.has("Content-Length")&&0===parseFloat(t.headers.get("Content-Length"))||204===t.status?e({}):t.text().then(function(t){return t.replace(/\\s/gi,"").length>0?JSON.parse(t):{}}).then(function(t){return e(r.parseODataJSON(t))}).catch(function(t){return n(t)})},t.prototype.handleError=function(t,e){return t.ok||t.json().then(function(n){var o={responseBody:n,responseHeaders:t.headers};e(new r.ProcessHttpClientResponseException(t.status,t.statusText,o))}).catch(function(n){o.Logger.log({data:n,level:o.LogLevel.Warning,message:"There was an error parsing the error response body. See data for details."});var i={responseBody:"[[body not available]]",responseHeaders:t.headers};e(new r.ProcessHttpClientResponseException(t.status,t.statusText,i))}),t.ok},t.prototype.parseODataJSON=function(t){var e=t;return t.hasOwnProperty("d")?e=t.d.hasOwnProperty("results")?t.d.results:t.d:t.hasOwnProperty("value")&&(e=t.value),e},t}();e.ODataParserBase=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(61),i=n(385),a=n(113),s=n(114),u=n(386),c=n(387),l=n(6),p=n(164),f=n(1),h=n(115),d=n(30),y=n(20),g=n(81),v=function(t){function e(e,n){return void 0===n&&(n="lists"),t.call(this,e,n)||this}return r(e,t),e.prototype.getByTitle=function(t){return new m(this,"getByTitle(\'"+t+"\')")},e.prototype.getById=function(t){var e=new m(this);return e.concat("(\'"+t+"\')"),e},e.prototype.add=function(t,e,n,r,o){var i=this;void 0===e&&(e=""),void 0===n&&(n=100),void 0===r&&(r=!1),void 0===o&&(o={});var a=f.Util.extend({AllowContentTypes:r,BaseTemplate:n,ContentTypesEnabled:r,Description:e,Title:t,__metadata:{type:"SP.List"}},o);return this.postCore({body:JSON.stringify(a)}).then(function(t){return{data:t,list:i.getByTitle(a.Title)}})},e.prototype.ensure=function(t,e,n,r,o){var i=this;if(void 0===e&&(e=""),void 0===n&&(n=100),void 0===r&&(r=!1),void 0===o&&(o={}),this.hasBatch)throw new y.NotSupportedInBatchException("The ensure list method");return new Promise(function(a,s){var u=f.Util.extend(o,{Title:t,Description:e,ContentTypesEnabled:r},!0),c=i.getByTitle(u.Title);c.get().then(function(t){c.update(u).then(function(t){a({created:!1,data:t,list:i.getByTitle(u.Title)})}).catch(function(t){return s(t)})}).catch(function(o){i.add(t,e,n,r,u).then(function(t){a({created:!0,data:t.data,list:i.getByTitle(u.Title)})}).catch(function(t){return s(t)})})})},e.prototype.ensureSiteAssetsLibrary=function(){return this.clone(e,"ensuresiteassetslibrary").postCore().then(function(t){return new m(d.spExtractODataId(t))})},e.prototype.ensureSitePagesLibrary=function(){return this.clone(e,"ensuresitepageslibrary").postCore().then(function(t){return new m(d.spExtractODataId(t))})},e}(l.SharePointQueryableCollection);e.Lists=v;var m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"contentTypes",{get:function(){return new a.ContentTypes(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return new o.Items(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"views",{get:function(){return new i.Views(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fields",{get:function(){return new s.Fields(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"forms",{get:function(){return new u.Forms(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"defaultView",{get:function(){return new i.View(this,"DefaultView")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userCustomActions",{get:function(){return new h.UserCustomActions(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"effectiveBasePermissions",{get:function(){return new l.SharePointQueryable(this,"EffectiveBasePermissions")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"eventReceivers",{get:function(){return new l.SharePointQueryableCollection(this,"EventReceivers")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"relatedFields",{get:function(){return new l.SharePointQueryable(this,"getRelatedFields")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"informationRightsManagementSettings",{get:function(){return new l.SharePointQueryable(this,"InformationRightsManagementSettings")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"subscriptions",{get:function(){return new c.Subscriptions(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rootFolder",{get:function(){return new g.Folder(this,"rootFolder")},enumerable:!0,configurable:!0}),e.prototype.getView=function(t){return new i.View(this,"getView(\'"+t+"\')")},e.prototype.update=function(t,n){var r=this;void 0===n&&(n="*");var o=JSON.stringify(f.Util.extend({__metadata:{type:"SP.List"}},t));return this.postCore({body:o,headers:{"IF-Match":n,"X-HTTP-Method":"MERGE"}}).then(function(n){var o=r;return t.hasOwnProperty("Title")&&(o=r.getParent(e,r.parentUrl,"getByTitle(\'"+t.Title+"\')")),{data:n,list:o}})},e.prototype.delete=function(t){return void 0===t&&(t="*"),this.postCore({headers:{"IF-Match":t,"X-HTTP-Method":"DELETE"}})},e.prototype.getChanges=function(t){return this.clone(e,"getchanges").postCore({body:JSON.stringify({query:f.Util.extend({__metadata:{type:"SP.ChangeQuery"}},t)})})},e.prototype.getItemsByCAMLQuery=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=this.clone(e,"getitems");return o.expand.apply(o,n).postCore({body:JSON.stringify({query:f.Util.extend({__metadata:{type:"SP.CamlQuery"}},t)})})},e.prototype.getListItemChangesSinceToken=function(t){return this.clone(e,"getlistitemchangessincetoken").postCore({body:JSON.stringify({query:f.Util.extend({__metadata:{type:"SP.ChangeLogItemQuery"}},t)})},{parse:function(t){return t.text()}})},e.prototype.recycle=function(){return this.clone(e,"recycle").postCore().then(function(t){return t.hasOwnProperty("Recycle")?t.Recycle:t})},e.prototype.renderListData=function(t){var n=this.clone(e,"renderlistdata(@viewXml)");return n.query.add("@viewXml","\'"+t+"\'"),n.postCore().then(function(t){return t.hasOwnProperty("RenderListData")?JSON.parse(t.RenderListData):JSON.parse(t)})},e.prototype.renderListDataAsStream=function(t,n){void 0===n&&(n=null);var r={overrideParameters:f.Util.extend({__metadata:{type:"SP.RenderListDataOverrideParameters"}},n),parameters:f.Util.extend({__metadata:{type:"SP.RenderListDataParameters"}},t)};return this.clone(e,"RenderListDataAsStream",!0).postCore({body:JSON.stringify(r)})},e.prototype.renderListFormData=function(t,n,r){return this.clone(e,"renderlistformdata(itemid="+t+", formid=\'"+n+"\', mode=\'"+r+"\')").postCore().then(function(t){return t=JSON.parse(t),t.hasOwnProperty("ListData")?t.ListData:t})},e.prototype.reserveListItemId=function(){return this.clone(e,"reservelistitemid").postCore().then(function(t){return t.hasOwnProperty("ReserveListItemId")?t.ReserveListItemId:t})},e.prototype.getListItemEntityTypeFullName=function(){return this.clone(e,null,!1).select("ListItemEntityTypeFullName").getAs().then(function(t){return t.ListItemEntityTypeFullName})},e}(p.SharePointQueryableSecurable);e.List=m},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(60),a=n(30),s=n(6),u=n(164),c=n(80),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getShareLink=function(t,n){void 0===n&&(n=null);var r=null!==n?n.toISOString():null;return this.clone(e,"shareLink").postAsCore({body:JSON.stringify({request:{createLink:!0,emailData:null,settings:{expiration:r,linkKind:t}}})})},e.prototype.shareWith=function(t,n,r,a,s){var u=this;void 0===r&&(r=!1),void 0===a&&(a=!1),Array.isArray(t)||(t=[t]);var l=JSON.stringify(t.map(function(t){return{Key:t}})),p=n===c.SharingRole.Edit?c.RoleType.Contributor:c.RoleType.Reader;return i.Web.fromUrl(this.toUrl()).roleDefinitions.select("Id").filter("RoleTypeKind eq "+p).get().then(function(t){if(!Array.isArray(t)||t.length<1)throw new Error("Could not locate a role defintion with RoleTypeKind "+p);var n={includeAnonymousLinkInEmail:r,peoplePickerInput:l,propagateAcl:a,roleValue:"role:"+t[0].Id,useSimplifiedRoles:!0};return void 0!==s&&(n=o.Util.extend(n,{emailBody:s.body,emailSubject:void 0!==s.subject?s.subject:"",sendEmail:!0})),u.clone(e,"shareObject").postAsCore({body:JSON.stringify(n)})})},e.prototype.shareObject=function(t,e){var n=this;return void 0===e&&(e=!1),e?this.sendShareObjectRequest(t):(t=o.Util.extend(t,{group:null,includeAnonymousLinkInEmail:!1,propagateAcl:!1,useSimplifiedRoles:!0},!0),this.getRoleValue(t.role,t.group).then(function(e){Array.isArray(t.loginNames)||(t.loginNames=[t.loginNames]);var r=JSON.stringify(t.loginNames.map(function(t){return{Key:t}})),i={peoplePickerInput:r,roleValue:e,url:t.url};return void 0!==t.emailData&&null!==t.emailData&&(i=o.Util.extend(i,{emailBody:t.emailData.body,emailSubject:void 0!==t.emailData.subject?t.emailData.subject:"Shared with you.",sendEmail:!0})),n.sendShareObjectRequest(i)}))},e.prototype.unshareObjectWeb=function(t){return this.clone(e,"unshareObject").postAsCore({body:JSON.stringify({url:t})})},e.prototype.checkPermissions=function(t){return this.clone(e,"checkPermissions").postAsCore({body:JSON.stringify({recipients:t})})},e.prototype.getSharingInformation=function(t){return void 0===t&&(t=null),this.clone(e,"getSharingInformation").postAsCore({body:JSON.stringify({request:t})})},e.prototype.getObjectSharingSettings=function(t){return void 0===t&&(t=!0),this.clone(e,"getObjectSharingSettings").postAsCore({body:JSON.stringify({useSimplifiedRoles:t})})},e.prototype.unshareObject=function(){return this.clone(e,"unshareObject").postAsCore()},e.prototype.deleteLinkByKind=function(t){return this.clone(e,"deleteLinkByKind").postCore({body:JSON.stringify({linkKind:t})})},e.prototype.unshareLink=function(t,n){return void 0===n&&(n="00000000-0000-0000-0000-000000000000"),this.clone(e,"unshareLink").postCore({body:JSON.stringify({linkKind:t,shareId:n})})},e.prototype.getRoleValue=function(t,e){if(void 0===e||null===e){var n=t===c.SharingRole.Edit?c.RoleType.Contributor:c.RoleType.Reader;return i.Web.fromUrl(this.toUrl()).roleDefinitions.select("Id").top(1).filter("RoleTypeKind eq "+n).getAs().then(function(t){if(t.length<1)throw new Error("Could not locate associated role definition for supplied role. Edit and View are supported");return"role: "+t[0].Id})}switch(e){case c.RoleType.Contributor:return i.Web.fromUrl(this.toUrl()).associatedMemberGroup.select("Id").getAs().then(function(t){return"group: "+t.Id});case c.RoleType.Reader:case c.RoleType.Guest:return i.Web.fromUrl(this.toUrl()).associatedVisitorGroup.select("Id").getAs().then(function(t){return"group: "+t.Id});default:throw new Error("Could not determine role value for supplied value. Contributor, Reader, and Guest are supported")}},e.prototype.getShareObjectWeb=function(t){return Promise.resolve(i.Web.fromUrl(t,"/_api/SP.Web.ShareObject"))},e.prototype.sendShareObjectRequest=function(t){return this.getShareObjectWeb(this.toUrl()).then(function(n){return n.expand("UsersWithAccessRequests","GroupsSharedWith").as(e).postCore({body:JSON.stringify(t)})})},e}(s.SharePointQueryable);e.SharePointQueryableShareable=l;var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.shareWith=function(t,e,n){var r=this;void 0===e&&(e=c.SharingRole.View);var a=this.addBatchDependency();return i.Web.fromUrl(this.toUrl(),"/_api/web/url").get().then(function(i){return a(),r.shareObject(o.Util.combinePaths(i,"/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1"),t,e,n)})},e.prototype.shareObject=function(t,e,n,r,o,i,a,s){return void 0===i&&(i=!1),void 0===a&&(a=!1),void 0===s&&(s=!0),this.clone(l,null).shareObject({emailData:r,group:o,includeAnonymousLinkInEmail:a,loginNames:e,propagateAcl:i,role:n,url:t,useSimplifiedRoles:s})},e.prototype.shareObjectRaw=function(t){return this.clone(l,null).shareObject(t,!0)},e.prototype.unshareObject=function(t){return this.clone(l,null).unshareObjectWeb(t)},e}(u.SharePointQueryableSecurable);e.SharePointQueryableShareableWeb=p;var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getShareLink=function(t,e){return void 0===t&&(t=c.SharingLinkKind.OrganizationView),void 0===e&&(e=null),this.clone(l,null).getShareLink(t,e)},e.prototype.shareWith=function(t,e,n,r){return void 0===e&&(e=c.SharingRole.View),void 0===n&&(n=!1),this.clone(l,null).shareWith(t,e,n,!1,r)},e.prototype.checkSharingPermissions=function(t){return this.clone(l,null).checkPermissions(t)},e.prototype.getSharingInformation=function(t){return void 0===t&&(t=null),this.clone(l,null).getSharingInformation(t)},e.prototype.getObjectSharingSettings=function(t){return void 0===t&&(t=!0),this.clone(l,null).getObjectSharingSettings(t)},e.prototype.unshare=function(){return this.clone(l,null).unshareObject()},e.prototype.deleteSharingLinkByKind=function(t){return this.clone(l,null).deleteLinkByKind(t)},e.prototype.unshareLink=function(t,e){return this.clone(l,null).unshareLink(t,e)},e}(u.SharePointQueryableSecurable);e.SharePointQueryableShareableItem=f;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getShareLink=function(t,e){void 0===t&&(t=c.SharingLinkKind.OrganizationView),void 0===e&&(e=null);var n=this.addBatchDependency();return this.getShareable().then(function(r){return n(),r.getShareLink(t,e)})},e.prototype.checkSharingPermissions=function(t){var e=this.addBatchDependency();return this.getShareable().then(function(n){return e(),n.checkPermissions(t)})},e.prototype.getSharingInformation=function(t){void 0===t&&(t=null);var e=this.addBatchDependency();return this.getShareable().then(function(n){return e(),n.getSharingInformation(t)})},e.prototype.getObjectSharingSettings=function(t){void 0===t&&(t=!0);var e=this.addBatchDependency();return this.getShareable().then(function(n){return e(),n.getObjectSharingSettings(t)})},e.prototype.unshare=function(){var t=this.addBatchDependency();return this.getShareable().then(function(e){return t(),e.unshareObject()})},e.prototype.deleteSharingLinkByKind=function(t){var e=this.addBatchDependency();return this.getShareable().then(function(n){return e(),n.deleteLinkByKind(t)})},e.prototype.unshareLink=function(t,e){var n=this.addBatchDependency();return this.getShareable().then(function(r){return n(),r.unshareLink(t,e)})},e.prototype.getShareable=function(){var t=this;return this.clone(d,"listItemAllFields",!1).select("odata.editlink").get().then(function(e){var n=new l(a.spGetEntityUrl(e));return t.hasBatch&&(n=n.inBatch(t.batch)),n})},e}(s.SharePointQueryableInstance);e.FileFolderShared=h;var d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.shareWith=function(t,e,n,r){void 0===e&&(e=c.SharingRole.View),void 0===n&&(n=!1);var o=this.addBatchDependency();return this.getShareable().then(function(i){return o(),i.shareWith(t,e,n,!1,r)})},e}(h);e.SharePointQueryableShareableFile=d;var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.shareWith=function(t,e,n,r,o){void 0===e&&(e=c.SharingRole.View),void 0===n&&(n=!1),void 0===r&&(r=!1);var i=this.addBatchDependency();return this.getShareable().then(function(a){return i(),a.shareWith(t,e,n,r,o)})},e}(h);e.SharePointQueryableShareableFolder=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.Display=1]="Display",t[t.Edit=2]="Edit",t[t.New=3]="New"}(e.ControlMode||(e.ControlMode={})),function(t){t[t.Invalid=0]="Invalid",t[t.Integer=1]="Integer",t[t.Text=2]="Text",t[t.Note=3]="Note",t[t.DateTime=4]="DateTime",t[t.Counter=5]="Counter",t[t.Choice=6]="Choice",t[t.Lookup=7]="Lookup",t[t.Boolean=8]="Boolean",t[t.Number=9]="Number",t[t.Currency=10]="Currency",t[t.URL=11]="URL",t[t.Computed=12]="Computed",t[t.Threading=13]="Threading",t[t.Guid=14]="Guid",t[t.MultiChoice=15]="MultiChoice",t[t.GridChoice=16]="GridChoice",t[t.Calculated=17]="Calculated",t[t.File=18]="File",t[t.Attachments=19]="Attachments",t[t.User=20]="User",t[t.Recurrence=21]="Recurrence",t[t.CrossProjectLink=22]="CrossProjectLink",t[t.ModStat=23]="ModStat",t[t.Error=24]="Error",t[t.ContentTypeId=25]="ContentTypeId",t[t.PageSeparator=26]="PageSeparator",t[t.ThreadIndex=27]="ThreadIndex",t[t.WorkflowStatus=28]="WorkflowStatus",t[t.AllDayEvent=29]="AllDayEvent",t[t.WorkflowEventType=30]="WorkflowEventType"}(e.FieldTypes||(e.FieldTypes={})),function(t){t[t.DateOnly=0]="DateOnly",t[t.DateTime=1]="DateTime"}(e.DateTimeFieldFormatType||(e.DateTimeFieldFormatType={})),function(t){t[t.DefaultValue=0]="DefaultValue",t[t.AddToDefaultContentType=1]="AddToDefaultContentType",t[t.AddToNoContentType=2]="AddToNoContentType",t[t.AddToAllContentTypes=4]="AddToAllContentTypes",t[t.AddFieldInternalNameHint=8]="AddFieldInternalNameHint",t[t.AddFieldToDefaultView=16]="AddFieldToDefaultView",t[t.AddFieldCheckDisplayName=32]="AddFieldCheckDisplayName"}(e.AddFieldOptions||(e.AddFieldOptions={})),function(t){t[t.Gregorian=1]="Gregorian",t[t.Japan=3]="Japan",t[t.Taiwan=4]="Taiwan",t[t.Korea=5]="Korea",t[t.Hijri=6]="Hijri",t[t.Thai=7]="Thai",t[t.Hebrew=8]="Hebrew",t[t.GregorianMEFrench=9]="GregorianMEFrench",t[t.GregorianArabic=10]="GregorianArabic",t[t.GregorianXLITEnglish=11]="GregorianXLITEnglish",t[t.GregorianXLITFrench=12]="GregorianXLITFrench",t[t.KoreaJapanLunar=14]="KoreaJapanLunar",t[t.ChineseLunar=15]="ChineseLunar",t[t.SakaEra=16]="SakaEra",t[t.UmAlQura=23]="UmAlQura"}(e.CalendarType||(e.CalendarType={})),function(t){t[t.Hyperlink=0]="Hyperlink",t[t.Image=1]="Image"}(e.UrlFieldFormatType||(e.UrlFieldFormatType={})),function(t){t[t.Dropdown=0]="Dropdown",t[t.RadioButtons=1]="RadioButtons"}(e.ChoiceFieldFormatType||(e.ChoiceFieldFormatType={})),function(t){t[t.EmptyMask=0]="EmptyMask",t[t.ViewListItems=1]="ViewListItems",t[t.AddListItems=2]="AddListItems",t[t.EditListItems=3]="EditListItems",t[t.DeleteListItems=4]="DeleteListItems",t[t.ApproveItems=5]="ApproveItems",t[t.OpenItems=6]="OpenItems",t[t.ViewVersions=7]="ViewVersions",t[t.DeleteVersions=8]="DeleteVersions",t[t.CancelCheckout=9]="CancelCheckout",t[t.ManagePersonalViews=10]="ManagePersonalViews",t[t.ManageLists=12]="ManageLists",t[t.ViewFormPages=13]="ViewFormPages",t[t.AnonymousSearchAccessList=14]="AnonymousSearchAccessList",t[t.Open=17]="Open",t[t.ViewPages=18]="ViewPages",t[t.AddAndCustomizePages=19]="AddAndCustomizePages",t[t.ApplyThemeAndBorder=20]="ApplyThemeAndBorder",t[t.ApplyStyleSheets=21]="ApplyStyleSheets",t[t.ViewUsageData=22]="ViewUsageData",t[t.CreateSSCSite=23]="CreateSSCSite",t[t.ManageSubwebs=24]="ManageSubwebs",t[t.CreateGroups=25]="CreateGroups",t[t.ManagePermissions=26]="ManagePermissions",t[t.BrowseDirectories=27]="BrowseDirectories",t[t.BrowseUserInfo=28]="BrowseUserInfo",t[t.AddDelPrivateWebParts=29]="AddDelPrivateWebParts",t[t.UpdatePersonalWebParts=30]="UpdatePersonalWebParts",t[t.ManageWeb=31]="ManageWeb",t[t.AnonymousSearchAccessWebLists=32]="AnonymousSearchAccessWebLists",t[t.UseClientIntegration=37]="UseClientIntegration",t[t.UseRemoteAPIs=38]="UseRemoteAPIs",t[t.ManageAlerts=39]="ManageAlerts",t[t.CreateAlerts=40]="CreateAlerts",t[t.EditMyUserInfo=41]="EditMyUserInfo",t[t.EnumeratePermissions=63]="EnumeratePermissions",t[t.FullMask=65]="FullMask"}(e.PermissionKind||(e.PermissionKind={})),function(t){t[t.None=0]="None",t[t.Guest=1]="Guest",t[t.Reader=2]="Reader",t[t.Contributor=3]="Contributor",t[t.WebDesigner=4]="WebDesigner",t[t.Administrator=5]="Administrator"}(e.RoleType||(e.RoleType={})),function(t){t[t.Invalid=-1]="Invalid",t[t.DefaultView=0]="DefaultView",t[t.NormalView=1]="NormalView",t[t.DialogView=2]="DialogView",t[t.View=3]="View",t[t.DisplayForm=4]="DisplayForm",t[t.DisplayFormDialog=5]="DisplayFormDialog",t[t.EditForm=6]="EditForm",t[t.EditFormDialog=7]="EditFormDialog",t[t.NewForm=8]="NewForm",t[t.NewFormDialog=9]="NewFormDialog",t[t.SolutionForm=10]="SolutionForm",t[t.PAGE_MAXITEMS=11]="PAGE_MAXITEMS"}(e.PageType||(e.PageType={})),function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Direct=1]="Direct",t[t.OrganizationView=2]="OrganizationView",t[t.OrganizationEdit=3]="OrganizationEdit",t[t.AnonymousView=4]="AnonymousView",t[t.AnonymousEdit=5]="AnonymousEdit",t[t.Flexible=6]="Flexible"}(e.SharingLinkKind||(e.SharingLinkKind={})),function(t){t[t.None=0]="None",t[t.View=1]="View",t[t.Edit=2]="Edit",t[t.Owner=3]="Owner"}(e.SharingRole||(e.SharingRole={})),function(t){t[t.CompletedSuccessfully=0]="CompletedSuccessfully",t[t.AccessRequestsQueued=1]="AccessRequestsQueued",t[t.NoResolvedUsers=-1]="NoResolvedUsers",t[t.AccessDenied=-2]="AccessDenied",t[t.CrossSiteRequestNotSupported=-3]="CrossSiteRequestNotSupported",t[t.UnknowError=-4]="UnknowError",t[t.EmailBodyTooLong=-5]="EmailBodyTooLong",t[t.ListUniqueScopesExceeded=-6]="ListUniqueScopesExceeded",t[t.CapabilityDisabled=-7]="CapabilityDisabled",t[t.ObjectNotSupported=-8]="ObjectNotSupported",t[t.NestedGroupsNotSupported=-9]="NestedGroupsNotSupported"}(e.SharingOperationStatusCode||(e.SharingOperationStatusCode={})),function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Folder=2]="Folder",t[t.Item=3]="Item",t[t.List=4]="List",t[t.Web=5]="Web",t[t.Max=6]="Max"}(e.SPSharedObjectType||(e.SPSharedObjectType={})),function(t){t[t.None=0]="None",t[t.AllowList=1]="AllowList",t[t.BlockList=2]="BlockList"}(e.SharingDomainRestrictionMode||(e.SharingDomainRestrictionMode={})),function(t){t[t.None=0]="None",t[t.ContextInfo=1]="ContextInfo",t[t.ListData=2]="ListData",t[t.ListSchema=4]="ListSchema",t[t.MenuView=8]="MenuView",t[t.ListContentType=16]="ListContentType",t[t.FileSystemItemId=32]="FileSystemItemId",t[t.ClientFormSchema=64]="ClientFormSchema",t[t.QuickLaunch=128]="QuickLaunch",t[t.Spotlight=256]="Spotlight",t[t.Visualization=512]="Visualization",t[t.ViewMetadata=1024]="ViewMetadata",t[t.DisableAutoHyperlink=2048]="DisableAutoHyperlink",t[t.EnableMediaTAUrls=4096]="EnableMediaTAUrls",t[t.ParentInfo=8192]="ParentInfo",t[t.PageContextInfo=16384]="PageContextInfo",t[t.ClientSideComponentManifest=32768]="ClientSideComponentManifest"}(e.RenderListDataOptions||(e.RenderListDataOptions={})),function(t){t[t.PeopleAndGroups=1]="PeopleAndGroups",t[t.PeopleOnly=0]="PeopleOnly"}(e.FieldUserSelectionMode||(e.FieldUserSelectionMode={}))},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(79),a=n(49),s=n(1),u=n(30),c=n(61),l=function(t){function e(e,n){return void 0===n&&(n="folders"),t.call(this,e,n)||this}return r(e,t),e.prototype.getByName=function(t){var e=new p(this);return e.concat("(\'"+t+"\')"),e},e.prototype.add=function(t){var n=this;return this.clone(e,"add(\'"+t+"\')").postCore().then(function(e){return{data:e,folder:n.getByName(t)}})},e}(o.SharePointQueryableCollection);e.Folders=l;var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"contentTypeOrder",{get:function(){return new o.SharePointQueryableCollection(this,"contentTypeOrder")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"files",{get:function(){return new a.Files(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"folders",{get:function(){return new l(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"listItemAllFields",{get:function(){return new o.SharePointQueryableCollection(this,"listItemAllFields")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentFolder",{get:function(){return new e(this,"parentFolder")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return new o.SharePointQueryableInstance(this,"properties")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"serverRelativeUrl",{get:function(){return new o.SharePointQueryable(this,"serverRelativeUrl")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"uniqueContentTypeOrder",{get:function(){return new o.SharePointQueryableCollection(this,"uniqueContentTypeOrder")},enumerable:!0,configurable:!0}),e.prototype.update=function(t){var e=this,n=JSON.stringify(s.Util.extend({__metadata:{type:"SP.Folder"}},t));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(t){return{data:t,folder:e}})},e.prototype.delete=function(t){return void 0===t&&(t="*"),this.clone(e,null).postCore({headers:{"IF-Match":t,"X-HTTP-Method":"DELETE"}})},e.prototype.recycle=function(){return this.clone(e,"recycle").postCore()},e.prototype.getItem=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.listItemAllFields;return n.select.apply(n,t).get().then(function(t){return s.Util.extend(new c.Item(u.spGetEntityUrl(t)),t)})},e}(i.SharePointQueryableShareableFolder);e.Folder=p},function(t,e,n){var r=n(5),o=n(3).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(3),o=n(24),i=n(37),a=n(120),s=n(9).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(63)("keys"),o=n(40);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(3).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(5),o=n(2),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can\'t set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(21)(Function.call,n(18).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e){t.exports="\\t\\n\\v\\f\\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\\u2028\\u2029\\ufeff"},function(t,e,n){var r=n(5),o=n(87).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){"use strict";var r=n(27),o=n(26);t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can\'t be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var r=n(27),o=n(26);t.exports=function(t){return function(e,n){var i,a,s=String(o(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(i=s.charCodeAt(u),i<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):i:t?s.slice(u,u+2):a-56320+(i-55296<<10)+65536)}}},function(t,e,n){"use strict";var r=n(37),o=n(0),i=n(16),a=n(15),s=n(58),u=n(95),c=n(50),l=n(19),p=n(7)("iterator"),f=!([].keys&&"next"in[].keys()),h="keys",d="values",y=function(){return this};t.exports=function(t,e,n,g,v,m,b){u(n,e,g);var _,P,w,S=function(t){if(!f&&t in I)return I[t];switch(t){case h:case d:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",x=v==d,C=!1,I=t.prototype,T=I[p]||I["@@iterator"]||v&&I[v],j=T||S(v),E=v?x?S("entries"):j:void 0,U="Array"==e?I.entries||T:T;if(U&&(w=l(U.call(new t)))!==Object.prototype&&w.next&&(c(w,O,!0),r||"function"==typeof w[p]||a(w,p,y)),x&&T&&T.name!==d&&(C=!0,j=function(){return T.call(this)}),r&&!b||!f&&!C&&I[p]||a(I,p,j),s[e]=j,s[O]=y,v)if(_={values:x?j:S(d),keys:m?j:S(h),entries:E},b)for(P in _)P in I||i(I,P,_[P]);else o(o.P+o.F*(f||C),e,_);return _}},function(t,e,n){"use strict";var r=n(42),o=n(39),i=n(50),a={};n(15)(a,n(7)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(67),o=n(26);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn\'t accept regex!");return String(o(t))}},function(t,e,n){var r=n(7)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(58),o=n(7)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){"use strict";var r=n(9),o=n(39);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},function(t,e,n){var r=n(57),o=n(7)("iterator"),i=n(58);t.exports=n(24).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(272);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){"use strict";var r=n(11),o=n(41),i=n(10);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:o(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){var r=n(2),o=n(12),i=n(7)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[i])?e:o(n)}},function(t,e,n){var r=n(3),o=n(139).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(22)(a);t.exports=function(){var t,e,n,c=function(){var r,o;for(u&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve(void 0);n=function(){l.then(c)}}else n=function(){o.call(r,c)};else{var p=!0,f=document.createTextNode("");new i(c).observe(f,{characterData:!0}),n=function(){f.data=p=!p}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=o(e),this.reject=o(n)}var o=n(12);t.exports.f=function(t){return new r(t)}},function(t,e,n){var r=n(3),o=r.navigator;t.exports=o&&o.userAgent||""},function(t,e,n){"use strict";function r(t,e,n){var r,o,i,a=new Array(n),s=8*n-e-1,u=(1<<s)-1,c=u>>1,l=23===e?N(2,-24)-N(2,-77):0,p=0,f=t<0||0===t&&1/t<0?1:0;for(t=B(t),t!=t||t===k?(o=t!=t?1:0,r=u):(r=Q(q(t)/H),t*(i=N(2,-r))<1&&(r--,i*=2),t+=r+c>=1?l/i:l*N(2,1-c),t*i>=2&&(r++,i/=2),r+c>=u?(o=0,r=u):r+c>=1?(o=(t*i-1)*N(2,e),r+=c):(o=t*N(2,c-1)*N(2,e),r=0));e>=8;a[p++]=255&o,o/=256,e-=8);for(r=r<<e|o,s+=e;s>0;a[p++]=255&r,r/=256,s-=8);return a[--p]|=128*f,a}function o(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,a=i>>1,s=o-7,u=n-1,c=t[u--],l=127&c;for(c>>=7;s>0;l=256*l+t[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===l)l=1-a;else{if(l===i)return r?NaN:c?-k:k;r+=N(2,e),l-=a}return(c?-1:1)*r*N(2,l-e)}function i(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function a(t){return[255&t]}function s(t){return[255&t,t>>8&255]}function u(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function c(t){return r(t,52,8)}function l(t){return r(t,23,4)}function p(t,e,n){C(t[U],e,{get:function(){return this[n]}})}function f(t,e,n,r){var o=+n,i=O(o);if(i+e>t[$])throw D(A);var a=t[V]._b,s=i+t[J],u=a.slice(s,s+e);return r?u:u.reverse()}function h(t,e,n,r,o,i){var a=+n,s=O(a);if(s+e>t[$])throw D(A);for(var u=t[V]._b,c=s+t[J],l=r(+o),p=0;p<e;p++)u[c+p]=l[i?p:e-p-1]}var d=n(3),y=n(8),g=n(37),v=n(72),m=n(15),b=n(47),_=n(4),P=n(45),w=n(27),S=n(10),O=n(146),x=n(43).f,C=n(9).f,I=n(102),T=n(50),j="ArrayBuffer",E="DataView",U="prototype",A="Wrong index!",F=d[j],R=d[E],M=d.Math,D=d.RangeError,k=d.Infinity,L=F,B=M.abs,N=M.pow,Q=M.floor,q=M.log,H=M.LN2,W="buffer",G="byteLength",z="byteOffset",V=y?"_b":W,$=y?"_l":G,J=y?"_o":z;if(v.ABV){if(!_(function(){F(1)})||!_(function(){new F(-1)})||_(function(){return new F,new F(1.5),new F(NaN),F.name!=j})){F=function(t){return P(this,F),new L(O(t))};for(var K,X=F[U]=L[U],Z=x(L),Y=0;Z.length>Y;)(K=Z[Y++])in F||m(F,K,L[K]);g||(X.constructor=F)}var tt=new R(new F(2)),et=R[U].setInt8;tt.setInt8(0,2147483648),tt.setInt8(1,2147483649),!tt.getInt8(0)&&tt.getInt8(1)||b(R[U],{setInt8:function(t,e){et.call(this,t,e<<24>>24)},setUint8:function(t,e){et.call(this,t,e<<24>>24)}},!0)}else F=function(t){P(this,F,j);var e=O(t);this._b=I.call(new Array(e),0),this[$]=e},R=function(t,e,n){P(this,R,E),P(t,F,E);var r=t[$],o=w(e);if(o<0||o>r)throw D("Wrong offset!");if(n=void 0===n?r-o:S(n),o+n>r)throw D("Wrong length!");this[V]=t,this[J]=o,this[$]=n},y&&(p(F,G,"_l"),p(R,W,"_b"),p(R,G,"_l"),p(R,z,"_o")),b(R[U],{getInt8:function(t){return f(this,1,t)[0]<<24>>24},getUint8:function(t){return f(this,1,t)[0]},getInt16:function(t){var e=f(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=f(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return i(f(this,4,t,arguments[1]))},getUint32:function(t){return i(f(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return o(f(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return o(f(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){h(this,1,t,a,e)},setUint8:function(t,e){h(this,1,t,a,e)},setInt16:function(t,e){h(this,2,t,s,e,arguments[2])},setUint16:function(t,e){h(this,2,t,s,e,arguments[2])},setInt32:function(t,e){h(this,4,t,u,e,arguments[2])},setUint32:function(t,e){h(this,4,t,u,e,arguments[2])},setFloat32:function(t,e){h(this,4,t,l,e,arguments[2])},setFloat64:function(t,e){h(this,8,t,c,e,arguments[2])}});T(F,j),T(R,E),m(R[U],v.VIEW,!0),e[j]=F,e[E]=R},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(59),i=n(48),a=n(33),s=n(109),u=function(){function t(){}return t.prototype.concat=function(t){return this._url+=t,this},t.prototype.append=function(t){this._url=r.Util.combinePaths(this._url,t)},Object.defineProperty(t.prototype,"parentUrl",{get:function(){return this._parentUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"query",{get:function(){return this._query},enumerable:!0,configurable:!0}),t.prototype.configure=function(t){return o.mergeOptions(this._options,t),this},t.prototype.usingCaching=function(t){return a.RuntimeConfig.globalCacheDisable||(this._useCaching=!0,this._cachingOptions=t),this},t.prototype.toUrl=function(){return this._url},t.prototype.get=function(t,e){return void 0===t&&(t=new i.ODataDefaultParser),void 0===e&&(e={}),this.toRequestContext("GET",e,t,s.PipelineMethods.default).then(function(t){return s.pipe(t)})},t.prototype.getAs=function(t,e){return void 0===t&&(t=new i.ODataDefaultParser),void 0===e&&(e={}),this.toRequestContext("GET",e,t,s.PipelineMethods.default).then(function(t){return s.pipe(t)})},t.prototype.postCore=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=new i.ODataDefaultParser),this.toRequestContext("POST",t,e,s.PipelineMethods.default).then(function(t){return s.pipe(t)})},t.prototype.postAsCore=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=new i.ODataDefaultParser),this.toRequestContext("POST",t,e,s.PipelineMethods.default).then(function(t){return s.pipe(t)})},t.prototype.patchCore=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=new i.ODataDefaultParser),this.toRequestContext("PATCH",t,e,s.PipelineMethods.default).then(function(t){return s.pipe(t)})},t.prototype.deleteCore=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=new i.ODataDefaultParser),this.toRequestContext("DELETE",t,e,s.PipelineMethods.default).then(function(t){return s.pipe(t)})},t}();e.ODataQueryable=u},function(t,e,n){"use strict";function r(t){return l.Logger.log({data:t.result,level:l.LogLevel.Verbose,message:"["+t.requestId+"] ("+(new Date).getTime()+") Returning result, see data property for value."}),Promise.resolve(t.result)}function o(t,e){return new Promise(function(n){t.result=e,t.hasResult=!0,n(t)})}function i(t){return t.pipeline.length<1?Promise.resolve(t):t.pipeline.shift()(t)}function a(t){return i(t).then(function(t){return r(t)}).catch(function(t){throw l.Logger.log({data:t,level:l.LogLevel.Error,message:"Error in request pipeline: "+t.message}),t})}function s(t){return void 0===t&&(t=!1),function(e,n,r){var o=r.value;r.value=function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return!t&&r.length>0&&r[0].hasOwnProperty("hasResult")&&r[0].hasResult?(l.Logger.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Skipping request pipeline method "+n+", existing result in pipeline.",l.LogLevel.Verbose),Promise.resolve(r[0])):(l.Logger.write("["+r[0].requestId+"] ("+(new Date).getTime()+") Calling request pipeline method "+n+".",l.LogLevel.Verbose),o.apply(e,r).then(function(t){return i(t)}))}}}var u=this&&this.__decorate||function(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};Object.defineProperty(e,"__esModule",{value:!0});var c=n(161),l=n(34),p=n(1);e.setResult=o,e.pipe=a,e.requestPipelineMethod=s;var f=function(){function t(){}return t.logStart=function(t){return new Promise(function(e){l.Logger.log({data:l.Logger.activeLogLevel===l.LogLevel.Info?{}:t,level:l.LogLevel.Info,message:"["+t.requestId+"] ("+(new Date).getTime()+") Beginning "+t.verb+" request ("+t.requestAbsoluteUrl+")"}),e(t)})},t.caching=function(t){return new Promise(function(e){if("GET"===t.verb&&t.isCached){l.Logger.write("["+t.requestId+"] ("+(new Date).getTime()+") Caching is enabled for request, checking cache...",l.LogLevel.Info);var n=new c.CachingOptions(t.requestAbsoluteUrl.toLowerCase());if(void 0!==t.cachingOptions&&(n=p.Util.extend(n,t.cachingOptions)),null!==n.store){var r=n.store.get(n.key);if(null!==r)return l.Logger.log({data:l.Logger.activeLogLevel===l.LogLevel.Info?{}:r,level:l.LogLevel.Info,message:"["+t.requestId+"] ("+(new Date).getTime()+") Value returned from cache."}),t.batchDependency(),t.parser.hasOwnProperty("hydrate")&&(r=t.parser.hydrate(r)),o(t,r).then(function(t){return e(t)})}l.Logger.write("["+t.requestId+"] ("+(new Date).getTime()+") Value not found in cache.",l.LogLevel.Info),t.parser=new c.CachingParserWrapper(t.parser,n)}return e(t)})},t.send=function(t){return new Promise(function(e,n){if(t.isBatched){var r=t.batch.add(t.requestAbsoluteUrl,t.verb,t.options,t.parser);t.batchDependency(),l.Logger.write("["+t.requestId+"] ("+(new Date).getTime()+") Batching request in batch "+t.batch.batchId+".",l.LogLevel.Info),e(o(t,r))}else{l.Logger.write("["+t.requestId+"] ("+(new Date).getTime()+") Sending request.",l.LogLevel.Info);var i=t.clientFactory(),a=p.Util.extend(t.options||{},{method:t.verb});i.fetch(t.requestAbsoluteUrl,a).then(function(e){return t.parser.parse(e)}).then(function(e){return o(t,e)}).then(function(t){return e(t)}).catch(function(t){return n(t)})}})},t.logEnd=function(t){return new Promise(function(e){t.isBatched?l.Logger.log({data:l.Logger.activeLogLevel===l.LogLevel.Info?{}:t,level:l.LogLevel.Info,message:"["+t.requestId+"] ("+(new Date).getTime()+") "+t.verb+" request will complete in batch "+t.batch.batchId+"."}):l.Logger.log({data:l.Logger.activeLogLevel===l.LogLevel.Info?{}:t,level:l.LogLevel.Info,message:"["+t.requestId+"] ("+(new Date).getTime()+") Completing "+t.verb+" request."}),e(t)})},Object.defineProperty(t,"default",{get:function(){return[t.logStart,t.caching,t.send,t.logEnd]},enumerable:!0,configurable:!0}),u([s(!0)],t,"logStart",null),u([s()],t,"caching",null),u([s()],t,"send",null),u([s(!0)],t,"logEnd",null),t}();e.PipelineMethods=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(383),o=n(1),i=n(33),a=n(20),s=n(59),u=function(){function t(){this._impl=i.RuntimeConfig.spFetchClientFactory(),this._digestCache=new r.DigestCache(this)}return t.prototype.fetch=function(t,e){var n=this;void 0===e&&(e={});var r=o.Util.extend(e,{cache:"no-cache",credentials:"same-origin"},!0),u=new Headers;if(s.mergeHeaders(u,i.RuntimeConfig.spHeaders),s.mergeHeaders(u,e.headers),u.has("Accept")||u.append("Accept","application/json"),u.has("Content-Type")||u.append("Content-Type","application/json;odata=verbose;charset=utf-8"),u.has("X-ClientService-ClientTag")||u.append("X-ClientService-ClientTag","PnPCoreJS:3.0.8"),u.has("User-Agent")||u.append("User-Agent","NONISV|SharePointPnP|PnPCoreJS/3.0.8"),r=o.Util.extend(r,{headers:u}),r.method&&"GET"!==r.method.toUpperCase()&&!u.has("X-RequestDigest")&&!u.has("Authorization")){var c=t.indexOf("_api/");if(c<0)throw new a.APIUrlException;var l=t.substr(0,c);return this._digestCache.getDigest(l).then(function(e){return u.append("X-RequestDigest",e),n.fetchRaw(t,r)})}return this.fetchRaw(t,r)},t.prototype.fetchRaw=function(t,e){var n=this;void 0===e&&(e={});var r=new Headers;s.mergeHeaders(r,e.headers),e=o.Util.extend(e,{headers:r});var i=function(r){n._impl.fetch(t,e).then(function(t){return r.resolve(t)}).catch(function(t){429!==t.status&&503!==t.status&&r.reject(t);var e=r.delay;r.delay*=2,r.attempts++,r.retryCount<=r.attempts&&r.reject(t),setTimeout(o.Util.getCtxCallback(n,i,r),e)})};return new Promise(function(t,e){var r={attempts:0,delay:100,reject:e,resolve:t,retryCount:7};i.call(n,r)})},t.prototype.get=function(t,e){void 0===e&&(e={});var n=o.Util.extend(e,{method:"GET"});return this.fetch(t,n)},t.prototype.post=function(t,e){void 0===e&&(e={});var n=o.Util.extend(e,{method:"POST"});return this.fetch(t,n)},t.prototype.patch=function(t,e){void 0===e&&(e={});var n=o.Util.extend(e,{method:"PATCH"});return this.fetch(t,n)},t.prototype.delete=function(t,e){void 0===e&&(e={});var n=o.Util.extend(e,{method:"DELETE"});return this.fetch(t,n)},t}();e.HttpClient=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(112),a=n(1),s=function(t){function e(e,n){return void 0===n&&(n="roleassignments"),t.call(this,e,n)||this}return r(e,t),e.prototype.add=function(t,n){return this.clone(e,"addroleassignment(principalid="+t+", roledefid="+n+")").postCore()},e.prototype.remove=function(t,n){return this.clone(e,"removeroleassignment(principalid="+t+", roledefid="+n+")").postCore()},e.prototype.getById=function(t){var e=new u(this);return e.concat("("+t+")"),e},e}(o.SharePointQueryableCollection);e.RoleAssignments=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"groups",{get:function(){return new i.SiteGroups(this,"groups")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return new p(this)},enumerable:!0,configurable:!0}),e.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},e}(o.SharePointQueryableInstance);e.RoleAssignment=u;var c=function(t){function e(e,n){return void 0===n&&(n="roledefinitions"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){return new l(this,"getById("+t+")")},e.prototype.getByName=function(t){return new l(this,"getbyname(\'"+t+"\')")},e.prototype.getByType=function(t){return new l(this,"getbytype("+t+")")},e.prototype.add=function(t,e,n,r){var o=this,i=JSON.stringify({BasePermissions:a.Util.extend({__metadata:{type:"SP.BasePermissions"}},r),Description:e,Name:t,Order:n,__metadata:{type:"SP.RoleDefinition"}});return this.postCore({body:i}).then(function(t){return{data:t,definition:o.getById(t.Id)}})},e}(o.SharePointQueryableCollection);e.RoleDefinitions=c;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.update=function(t){var e=this;void 0!==t.hasOwnProperty("BasePermissions")&&(t.BasePermissions=a.Util.extend({__metadata:{type:"SP.BasePermissions"}},t.BasePermissions));var n=JSON.stringify(a.Util.extend({__metadata:{type:"SP.RoleDefinition"}},t));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(n){var r=e;return t.hasOwnProperty("Name")&&(r=e.getParent(c,e.parentUrl,"").getByName(t.Name)),{data:n,definition:r}})},e.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},e}(o.SharePointQueryableInstance);e.RoleDefinition=l;var p=function(t){function e(e,n){return void 0===n&&(n="roledefinitionbindings"),t.call(this,e,n)||this}return r(e,t),e}(o.SharePointQueryableCollection);e.RoleDefinitionBindings=p},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(165),a=n(1);!function(t){t[t.None=0]="None",t[t.User=1]="User",t[t.DistributionList=2]="DistributionList",t[t.SecurityGroup=4]="SecurityGroup",t[t.SharePointGroup=8]="SharePointGroup",t[t.All=15]="All"}(e.PrincipalType||(e.PrincipalType={}));var s=function(t){function e(e,n){return void 0===n&&(n="sitegroups"),t.call(this,e,n)||this}return r(e,t),e.prototype.add=function(t){var e=this,n=JSON.stringify(a.Util.extend({__metadata:{type:"SP.Group"}},t));return this.postCore({body:n}).then(function(t){return{data:t,group:e.getById(t.Id)}})},e.prototype.getByName=function(t){return new u(this,"getByName(\'"+t+"\')")},e.prototype.getById=function(t){var e=new u(this);return e.concat("("+t+")"),e},e.prototype.removeById=function(t){return this.clone(e,"removeById(\'"+t+"\')").postCore()},e.prototype.removeByLoginName=function(t){return this.clone(e,"removeByLoginName(\'"+t+"\')").postCore()},e}(o.SharePointQueryableCollection);e.SiteGroups=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"users",{get:function(){return new i.SiteUsers(this,"users")},enumerable:!0,configurable:!0}),e.prototype.update=function(t){var n=this,r=a.Util.extend({__metadata:{type:"SP.Group"}},t);return this.postCore({body:JSON.stringify(r),headers:{"X-HTTP-Method":"MERGE"}}).then(function(r){var o=n;return t.hasOwnProperty("Title")&&(o=n.getParent(e,n.parentUrl,"getByName(\'"+t.Title+"\')")),{data:r,group:o}})},e}(o.SharePointQueryableInstance);e.SiteGroup=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(6),a=function(t){function e(e,n){return void 0===n&&(n="contenttypes"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new s(this);return e.concat("(\'"+t+"\')"),e},e.prototype.addAvailableContentType=function(t){var n=this,r=JSON.stringify({contentTypeId:t});return this.clone(e,"addAvailableContentType").postAsCore({body:r}).then(function(t){return{contentType:n.getById(t.id),data:t}})},e.prototype.add=function(t,e,n,r,i){var a=this;void 0===n&&(n=""),void 0===r&&(r="Custom Content Types"),void 0===i&&(i={});var s=JSON.stringify(o.Util.extend({Description:n,Group:r,Id:{StringValue:t},Name:e,__metadata:{type:"SP.ContentType"}},i));return this.postCore({body:s}).then(function(t){return{contentType:a.getById(t.id),data:t}})},e}(i.SharePointQueryableCollection);e.ContentTypes=a;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"fieldLinks",{get:function(){return new u(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fields",{get:function(){return new i.SharePointQueryableCollection(this,"fields")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new e(this,"parent")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"workflowAssociations",{get:function(){return new i.SharePointQueryableCollection(this,"workflowAssociations")},enumerable:!0,configurable:!0}),e.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},e}(i.SharePointQueryableInstance);e.ContentType=s;var u=function(t){function e(e,n){return void 0===n&&(n="fieldlinks"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new c(this);return e.concat("(guid\'"+t+"\')"),e},e}(i.SharePointQueryableCollection);e.FieldLinks=u;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(i.SharePointQueryableInstance);e.FieldLink=c},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(1),a=n(80),s=function(t){function e(e,n){return void 0===n&&(n="fields"),t.call(this,e,n)||this}return r(e,t),e.prototype.getByTitle=function(t){return new u(this,"getByTitle(\'"+t+"\')")},e.prototype.getByInternalNameOrTitle=function(t){return new u(this,"getByInternalNameOrTitle(\'"+t+"\')")},e.prototype.getById=function(t){var e=new u(this);return e.concat("(\'"+t+"\')"),e},e.prototype.createFieldAsXml=function(t){var n,r=this;n="string"==typeof t?{SchemaXml:t}:t;var o=JSON.stringify({parameters:i.Util.extend({__metadata:{type:"SP.XmlSchemaFieldCreationInformation"}},n)});return this.clone(e,"createfieldasxml").postAsCore({body:o}).then(function(t){return{data:t,field:r.getById(t.Id)}})},e.prototype.add=function(t,n,r){var o=this,a=JSON.stringify(i.Util.extend({Title:t,__metadata:{type:n}},r));return this.clone(e,null).postAsCore({body:a}).then(function(t){return{data:t,field:o.getById(t.Id)}})},e.prototype.addText=function(t,e,n){void 0===e&&(e=255);var r={FieldTypeKind:2,MaxLength:e};return this.add(t,"SP.FieldText",i.Util.extend(r,n))},e.prototype.addCalculated=function(t,e,n,r,o){void 0===r&&(r=a.FieldTypes.Text);var s={DateFormat:n,FieldTypeKind:17,Formula:e,OutputType:r};return this.add(t,"SP.FieldCalculated",i.Util.extend(s,o))},e.prototype.addDateTime=function(t,e,n,r,o){void 0===e&&(e=a.DateTimeFieldFormatType.DateOnly),void 0===n&&(n=a.CalendarType.Gregorian),void 0===r&&(r=0);var s={DateTimeCalendarType:n,DisplayFormat:e,FieldTypeKind:4,FriendlyDisplayFormat:r};return this.add(t,"SP.FieldDateTime",i.Util.extend(s,o))},e.prototype.addNumber=function(t,e,n,r){var o={FieldTypeKind:9};return void 0!==e&&(o=i.Util.extend({MinimumValue:e},o)),void 0!==n&&(o=i.Util.extend({MaximumValue:n},o)),this.add(t,"SP.FieldNumber",i.Util.extend(o,r))},e.prototype.addCurrency=function(t,e,n,r,o){void 0===r&&(r=1033);var a={CurrencyLocaleId:r,FieldTypeKind:10};return void 0!==e&&(a=i.Util.extend({MinimumValue:e},a)),void 0!==n&&(a=i.Util.extend({MaximumValue:n},a)),this.add(t,"SP.FieldCurrency",i.Util.extend(a,o))},e.prototype.addMultilineText=function(t,e,n,r,o,a,s){void 0===e&&(e=6),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!0);var u={AllowHyperlink:a,AppendOnly:o,FieldTypeKind:3,NumberOfLines:e,RestrictedMode:r,RichText:n};return this.add(t,"SP.FieldMultiLineText",i.Util.extend(u,s))},e.prototype.addUrl=function(t,e,n){void 0===e&&(e=a.UrlFieldFormatType.Hyperlink);var r={DisplayFormat:e,FieldTypeKind:11};return this.add(t,"SP.FieldUrl",i.Util.extend(r,n))},e.prototype.addUser=function(t,e,n){var r={FieldTypeKind:20,SelectionMode:e};return this.add(t,"SP.FieldUser",i.Util.extend(r,n))},e.prototype.addLookup=function(t,n,r,o){var a=this,s=JSON.stringify({parameters:i.Util.extend({FieldTypeKind:7,LookupFieldName:r,LookupListId:n,Title:t,__metadata:{type:"SP.FieldCreationInformation"}},o)});return this.clone(e,"addfield").postAsCore({body:s}).then(function(t){return{data:t,field:a.getById(t.Id)}})},e.prototype.addChoice=function(t,e,n,r,o){void 0===n&&(n=a.ChoiceFieldFormatType.Dropdown);var s={Choices:{results:e},EditFormat:n,FieldTypeKind:6,FillInChoice:r};return this.add(t,"SP.FieldChoice",i.Util.extend(s,o))},e.prototype.addMultiChoice=function(t,e,n,r){var o={Choices:{results:e},FieldTypeKind:15,FillInChoice:n};return this.add(t,"SP.FieldMultiChoice",i.Util.extend(o,r))},e.prototype.addBoolean=function(t,e){var n={FieldTypeKind:8};return this.add(t,"SP.Field",i.Util.extend(n,e))},e}(o.SharePointQueryableCollection);e.Fields=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.update=function(t,e){var n=this;void 0===e&&(e="SP.Field");var r=JSON.stringify(i.Util.extend({__metadata:{type:e}},t));return this.postCore({body:r,headers:{"X-HTTP-Method":"MERGE"}}).then(function(t){return{data:t,field:n}})},e.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},e.prototype.setShowInDisplayForm=function(t){return this.clone(e,"setshowindisplayform("+t+")").postCore()},e.prototype.setShowInEditForm=function(t){return this.clone(e,"setshowineditform("+t+")").postCore()},e.prototype.setShowInNewForm=function(t){return this.clone(e,"setshowinnewform("+t+")").postCore()},e}(o.SharePointQueryableInstance);e.Field=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(1),a=function(t){function e(e,n){return void 0===n&&(n="usercustomactions"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new s(this);return e.concat("(\'"+t+"\')"),e},e.prototype.add=function(t){var e=this,n=JSON.stringify(i.Util.extend({__metadata:{type:"SP.UserCustomAction"}},t));return this.postCore({body:n}).then(function(t){return{action:e.getById(t.Id),data:t}})},e.prototype.clear=function(){return this.clone(e,"clear").postCore()},e}(o.SharePointQueryableCollection);e.UserCustomActions=a;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.update=function(t){var e=this,n=JSON.stringify(i.Util.extend({__metadata:{type:"SP.UserCustomAction"}},t));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(t){return{action:e,data:t}})},e.prototype.delete=function(){return t.prototype.deleteCore.call(this)},e}(o.SharePointQueryableInstance);e.UserCustomAction=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getById=function(t){var e=new a(this);return e.concat("("+t+")"),e},e.prototype.add=function(t,n,r){var o=this;void 0===r&&(r=!0);var i=JSON.stringify({IsVisible:r,Title:t,Url:n,__metadata:{type:"SP.NavigationNode"}});return this.clone(e,null).postCore({body:i}).then(function(t){return{data:t,node:o.getById(t.Id)}})},e.prototype.moveAfter=function(t,n){var r=JSON.stringify({nodeId:t,previousNodeId:n});return this.clone(e,"MoveAfter").postCore({body:r})},e}(o.SharePointQueryableCollection);e.NavigationNodes=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return new i(this,"Children")},enumerable:!0,configurable:!0}),e.prototype.delete=function(){return t.prototype.deleteCore.call(this)},e}(o.SharePointQueryableInstance);e.NavigationNode=a;var s=function(t){function e(e,n){return void 0===n&&(n="navigation"),t.call(this,e,n)||this}return r(e,t),Object.defineProperty(e.prototype,"quicklaunch",{get:function(){return new i(this,"quicklaunch")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"topNavigationBar",{get:function(){return new i(this,"topnavigationbar")},enumerable:!0,configurable:!0}),e}(o.SharePointQueryable);e.Navigation=s;var u=function(t){function e(e){return void 0===e&&(e=null),t.call(this,"_api/navigation",e)||this}return r(e,t),e.prototype.getMenuState=function(t,n,r,o){return void 0===t&&(t=null),void 0===n&&(n=10),void 0===r&&(r=null),void 0===o&&(o=null),new e("MenuState").postCore({body:JSON.stringify({customProperties:o,depth:n,mapProviderName:r,menuNodeKey:t})})},e.prototype.getMenuNodeKey=function(t,n){return void 0===n&&(n=null),new e("MenuNodeKey").postCore({body:JSON.stringify({currentUrl:t,mapProviderName:n})})},e}(o.SharePointQueryable);e.NavigationService=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(34),i=n(110),a=n(59),s=n(33),u=n(20),c=function(){function t(t,e){void 0===e&&(e=r.Util.getGUID()),this.baseUrl=t,this._batchId=e,this._requests=[],this._dependencies=[]}return t.ParseResponse=function(t){return new Promise(function(e,n){for(var r,o,i=[],a="--batchresponse_",s=new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)","i"),c=t.split("\\n"),l="batch",p=0;p<c.length;++p){var f=c[p];switch(l){case"batch":if(f.substr(0,a.length)===a)l="batchHeaders";else if(""!==f.trim())throw new u.BatchParseException("Invalid response, line "+p);break;case"batchHeaders":""===f.trim()&&(l="status");break;case"status":var h=s.exec(f);if(3!==h.length)throw new u.BatchParseException("Invalid status, line "+p);r=parseInt(h[1],10),o=h[2],l="statusHeaders";break;case"statusHeaders":""===f.trim()&&(l="body");break;case"body":i.push(204===r?new Response:new Response(f,{status:r,statusText:o})),l="batch"}}"status"!==l&&n(new u.BatchParseException("Unexpected end of input")),e(i)})},Object.defineProperty(t.prototype,"batchId",{get:function(){return this._batchId},enumerable:!0,configurable:!0}),t.prototype.add=function(t,e,n,r){var o={method:e.toUpperCase(),options:n,parser:r,reject:null,resolve:null,url:t},i=new Promise(function(t,e){o.resolve=t,o.reject=e});return this._requests.push(o),i},t.prototype.addDependency=function(){var t,e=new Promise(function(e){t=e});return this._dependencies.push(e),t},t.prototype.execute=function(){var t=this;return Promise.all(this._dependencies).then(function(){return Promise.all(t._dependencies)}).then(function(){return t.executeImpl()})},t.prototype.executeImpl=function(){var e=this;if(o.Logger.write("["+this.batchId+"] ("+(new Date).getTime()+") Executing batch with "+this._requests.length+" requests.",o.LogLevel.Info),this._requests.length<1)return o.Logger.write("Resolving empty batch.",o.LogLevel.Info),Promise.resolve();var n=new i.HttpClient;return r.Util.toAbsoluteUrl(this.baseUrl).then(function(i){for(var c=[],l="",p=0;p<e._requests.length;p++){var f=e._requests[p];"GET"===f.method?(l.length>0&&(c.push("--changeset_"+l+"--\\n\\n"),l=""),c.push("--batch_"+e._batchId+"\\n")):(l.length<1&&(l=r.Util.getGUID(),c.push("--batch_"+e._batchId+"\\n"),c.push(\'Content-Type: multipart/mixed; boundary="changeset_\'+l+\'"\\n\\n\')),c.push("--changeset_"+l+"\\n")),c.push("Content-Type: application/http\\n"),c.push("Content-Transfer-Encoding: binary\\n\\n");var h=new Headers,d=r.Util.isUrlAbsolute(f.url)?f.url:r.Util.combinePaths(i,f.url);if(o.Logger.write("["+e.batchId+"] ("+(new Date).getTime()+") Adding request "+f.method+" "+d+" to batch.",o.LogLevel.Verbose),"GET"!==f.method){var y=f.method;f.hasOwnProperty("options")&&f.options.hasOwnProperty("headers")&&void 0!==f.options.headers["X-HTTP-Method"]&&(y=f.options.headers["X-HTTP-Method"],delete f.options.headers["X-HTTP-Method"]),c.push(y+" "+d+" HTTP/1.1\\n"),h.set("Content-Type","application/json;odata=verbose;charset=utf-8")}else c.push(f.method+" "+d+" HTTP/1.1\\n");a.mergeHeaders(h,s.RuntimeConfig.spHeaders),f.options&&a.mergeHeaders(h,f.options.headers),h.has("Accept")||h.append("Accept","application/json"),h.has("Content-Type")||h.append("Content-Type","application/json;odata=verbose;charset=utf-8"),h.has("X-ClientService-ClientTag")||h.append("X-ClientService-ClientTag","PnPCoreJS:3.0.8"),h.forEach(function(t,e){c.push(e+": "+t+"\\n")}),c.push("\\n"),f.options.body&&c.push(f.options.body+"\\n\\n")}l.length>0&&(c.push("--changeset_"+l+"--\\n\\n"),l=""),c.push("--batch_"+e._batchId+"--\\n");var g={"Content-Type":"multipart/mixed; boundary=batch_"+e._batchId},v={body:c.join(""),headers:g,method:"POST"};return o.Logger.write("["+e.batchId+"] ("+(new Date).getTime()+") Sending batch request.",o.LogLevel.Info),n.fetch(r.Util.combinePaths(i,"/_api/$batch"),v).then(function(t){return t.text()}).then(t.ParseResponse).then(function(t){if(t.length!==e._requests.length)throw new u.BatchParseException("Could not properly parse responses to match requests in batch.");return o.Logger.write("["+e.batchId+"] ("+(new Date).getTime()+") Resolving batched requests.",o.LogLevel.Info),t.reduce(function(t,n,r){var i=e._requests[r];return o.Logger.write("["+e.batchId+"] ("+(new Date).getTime()+") Resolving batched request "+i.method+" "+i.url+".",o.LogLevel.Verbose),t.then(function(t){return i.parser.parse(n).then(i.resolve).catch(i.reject)})},Promise.resolve())})})},t}();e.ODataBatch=c},function(t,e,n){"use strict";function r(){}function o(t){try{return t.then}catch(t){return v=t,m}}function i(t,e){try{return t(e)}catch(t){return v=t,m}}function a(t,e,n){try{t(e,n)}catch(t){return v=t,m}}function s(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("Promise constructor\'s argument is not a function");this._75=0,this._83=0,this._18=null,this._38=null,t!==r&&y(t,this)}function u(t,e,n){return new t.constructor(function(o,i){var a=new s(r);a.then(o,i),c(t,new d(e,n,a))})}function c(t,e){for(;3===t._83;)t=t._18;if(s._47&&s._47(t),0===t._83)return 0===t._75?(t._75=1,void(t._38=e)):1===t._75?(t._75=2,void(t._38=[t._38,e])):void t._38.push(e);l(t,e)}function l(t,e){g(function(){var n=1===t._83?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._83?p(e.promise,t._18):f(e.promise,t._18));var r=i(n,t._18);r===m?f(e.promise,v):p(e.promise,r)})}function p(t,e){if(e===t)return f(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var n=o(e);if(n===m)return f(t,v);if(n===t.then&&e instanceof s)return t._83=3,t._18=e,void h(t);if("function"==typeof n)return void y(n.bind(e),t)}t._83=1,t._18=e,h(t)}function f(t,e){t._83=2,t._18=e,s._71&&s._71(t,e),h(t)}function h(t){if(1===t._75&&(c(t,t._38),t._38=null),2===t._75){for(var e=0;e<t._38.length;e++)c(t,t._38[e]);t._38=null}}function d(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function y(t,e){var n=!1,r=a(t,function(t){n||(n=!0,p(e,t))},function(t){n||(n=!0,f(e,t))});n||r!==m||(n=!0,f(e,v))}var g=n(177),v=null,m={};t.exports=s,s._47=null,s._71=null,s._44=r,s.prototype.then=function(t,e){if(this.constructor!==s)return u(this,t,e);var n=new s(r);return c(this,new d(t,e,n)),n}},function(t,e,n){t.exports=!n(8)&&!n(4)(function(){return 7!=Object.defineProperty(n(82)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){e.f=n(7)},function(t,e,n){var r=n(14),o=n(17),i=n(64)(!1),a=n(84)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){var r=n(9),o=n(2),i=n(51);t.exports=n(8)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(17),o=n(43).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return o(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?s(t):o(r(t))}},function(t,e,n){"use strict";var r=n(51),o=n(65),i=n(56),a=n(11),s=n(55),u=Object.assign;t.exports=!u||n(4)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,c=1,l=o.f,p=i.f;u>c;)for(var f,h=s(arguments[c++]),d=l?r(h).concat(l(h)):r(h),y=d.length,g=0;y>g;)p.call(h,f=d[g++])&&(n[f]=h[f]);return n}:u},function(t,e,n){"use strict";var r=n(12),o=n(5),i=n(126),a=[].slice,s={},u=function(t,e,n){if(!(e in s)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";s[e]=Function("F,a","return new F("+r.join(",")+")")}return s[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),s=function(){var r=n.concat(a.call(arguments));return this instanceof s?u(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(s.prototype=e.prototype),s}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(3).parseInt,o=n(52).trim,i=n(88),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(3).parseFloat,o=n(52).trim;t.exports=1/r(n(88)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(22);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(5),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(91),o=Math.pow,i=o(2,-52),a=o(2,-23),s=o(2,127)*(2-a),u=o(2,-126),c=function(t){return t+1/i-1/i};t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),l=r(t);return o<u?l*c(o/u/a)*u*a:(e=(1+a/i)*o,n=e-(e-o),n>s||n!=n?l*(1/0):l*n)}},function(t,e,n){var r=n(2);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},function(t,e,n){var r=n(12),o=n(11),i=n(55),a=n(10);t.exports=function(t,e,n,s,u){r(e);var c=o(t),l=i(c),p=a(c.length),f=u?p-1:0,h=u?-1:1;if(n<2)for(;;){if(f in l){s=l[f],f+=h;break}if(f+=h,u?f<0:p<=f)throw TypeError("Reduce of empty array with no initial value")}for(;u?f>=0:p>f;f+=h)f in l&&(s=e(s,l[f],f,c));return s}},function(t,e,n){"use strict";var r=n(11),o=n(41),i=n(10);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),s=o(t,a),u=o(e,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:o(c,a))-u,a-s),p=1;for(u<s&&s<u+l&&(p=-1,u+=l-1,s+=l-1);l-- >0;)u in n?n[s]=n[u]:delete n[s],s+=p,u+=p;return n}},function(t,e,n){"use strict";var r=n(38),o=n(137),i=n(58),a=n(17);t.exports=n(94)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){n(8)&&"g"!=/./g.flags&&n(9).f(RegExp.prototype,"flags",{configurable:!0,get:n(69)})},function(t,e,n){var r,o,i,a=n(21),s=n(126),u=n(86),c=n(82),l=n(3),p=l.process,f=l.setImmediate,h=l.clearImmediate,d=l.MessageChannel,y=l.Dispatch,g=0,v={},m="onreadystatechange",b=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},_=function(t){b.call(t.data)};f&&h||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},h=function(t){delete v[t]},"process"==n(22)(p)?r=function(t){p.nextTick(a(b,t,1))}:y&&y.now?r=function(t){y.now(a(b,t,1))}:d?(o=new d,i=o.port2,o.port1.onmessage=_,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",_,!1)):r=m in c("script")?function(t){u.appendChild(c("script"))[m]=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:f,clear:h}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){"use strict";var r=n(142),o=n(53),i="Map";t.exports=n(71)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,i),t);return e&&e.v},set:function(t,e){return r.def(o(this,i),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(9).f,o=n(42),i=n(47),a=n(21),s=n(45),u=n(46),c=n(94),l=n(137),p=n(44),f=n(8),h=n(36).fastKey,d=n(53),y=f?"_s":"size",g=function(t,e){var n,r=h(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var l=t(function(t,r){s(t,l,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[y]=0,void 0!=r&&u(r,n,t[c],t)});return i(l.prototype,{clear:function(){for(var t=d(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[y]=0},delete:function(t){var n=d(this,e),r=g(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[y]--}return!!r},forEach:function(t){d(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(d(this,e),t)}}),f&&r(l.prototype,"size",{get:function(){return d(this,e)[y]}}),l},def:function(t,e,n){var r,o,i=g(t,e);return i?i.v=n:(t._l=i={i:o=h(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[y]++,"F"!==o&&(t._i[o]=i)),t},getEntry:g,setStrong:function(t,e,n){c(t,e,function(t,n){this._t=d(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),p(e)}}},function(t,e,n){"use strict";var r=n(142),o=n(53);t.exports=n(71)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,o=n(29)(0),i=n(16),a=n(36),s=n(124),u=n(145),c=n(5),l=n(4),p=n(53),f="WeakMap",h=a.getWeak,d=Object.isExtensible,y=u.ufstore,g={},v=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(c(t)){var e=h(t);return!0===e?y(p(this,f)).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(p(this,f),t,e)}},b=t.exports=n(71)(f,v,m,u,!0,!0);l(function(){return 7!=(new b).set((Object.freeze||Object)(g),7).get(g)})&&(r=u.getConstructor(v,f),s(r.prototype,m),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=b.prototype,n=e[t];i(e,t,function(e,o){if(c(e)&&!d(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},function(t,e,n){"use strict";var r=n(47),o=n(36).getWeak,i=n(2),a=n(5),s=n(45),u=n(46),c=n(29),l=n(14),p=n(53),f=c(5),h=c(6),d=0,y=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},v=function(t,e){return f(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=v(this,t);if(e)return e[1]},has:function(t){return!!v(this,t)},set:function(t,e){var n=v(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var c=t(function(t,r){s(t,c,e,"_i"),t._t=e,t._i=d++,t._l=void 0,void 0!=r&&u(r,n,t[i],t)});return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?y(p(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?y(p(this,e)).has(t):n&&l(n,this._i)}}),c},def:function(t,e,n){var r=o(i(e),!0);return!0===r?y(t).set(e,n):r[t._i]=n,t},ufstore:y}},function(t,e,n){var r=n(27),o=n(10);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(43),o=n(65),i=n(2),a=n(3).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},function(t,e,n){"use strict";function r(t,e,n,c,l,p,f,h){for(var d,y,g=l,v=0,m=!!f&&s(f,h,3);v<c;){if(v in n){if(d=m?m(n[v],v,e):n[v],y=!1,i(d)&&(y=d[u],y=void 0!==y?!!y:o(d)),y&&p>0)g=r(t,e,d,a(d.length),g,p-1)-1;else{if(g>=9007199254740991)throw TypeError();t[g]=d}g++}v++}return g}var o=n(66),i=n(5),a=n(10),s=n(21),u=n(7)("isConcatSpreadable");t.exports=r},function(t,e,n){var r=n(10),o=n(90),i=n(26);t.exports=function(t,e,n,a){var s=String(i(t)),u=s.length,c=void 0===n?" ":String(n),l=r(e);if(l<=u||""==c)return s;var p=l-u,f=o.call(c,Math.ceil(p/c.length));return f.length>p&&(f=f.slice(0,p)),a?f+s:s+f}},function(t,e,n){var r=n(51),o=n(17),i=n(56).f;t.exports=function(t){return function(e){for(var n,a=o(e),s=r(a),u=s.length,c=0,l=[];u>c;)i.call(a,n=s[c++])&&l.push(t?[n,a[n]]:a[n]);return l}}},function(t,e,n){var r=n(57),o=n(152);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn\'t generic");return o(this)}}},function(t,e,n){var r=n(46);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e){t.exports=Math.scale||function(t,e,n,r,o){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||o!=o?NaN:t===1/0||t===-1/0?t:(t-e)*(o-r)/(n-e)+r}},function(t,e,n){(function(t,r){var o;!function(r){function i(t){throw new RangeError(E[t])}function a(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function s(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(j,"."),r+a(t.split("."),e).join(".")}function u(t){for(var e,n,r=[],o=0,i=t.length;o<i;)e=t.charCodeAt(o++),e>=55296&&e<=56319&&o<i?(n=t.charCodeAt(o++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),o--)):r.push(e);return r}function c(t){return a(t,function(t){var e="";return t>65535&&(t-=65536,e+=F(t>>>10&1023|55296),t=56320|1023&t),e+=F(t)}).join("")}function l(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:b}function p(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function f(t,e,n){var r=0;for(t=n?A(t/S):t>>1,t+=A(t/e);t>U*P>>1;r+=b)t=A(t/U);return A(r+(U+1)*t/(t+w))}function h(t){var e,n,r,o,a,s,u,p,h,d,y=[],g=t.length,v=0,w=x,S=O;for(n=t.lastIndexOf(C),n<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&i("not-basic"),y.push(t.charCodeAt(r));for(o=n>0?n+1:0;o<g;){for(a=v,s=1,u=b;o>=g&&i("invalid-input"),p=l(t.charCodeAt(o++)),(p>=b||p>A((m-v)/s))&&i("overflow"),v+=p*s,h=u<=S?_:u>=S+P?P:u-S,!(p<h);u+=b)d=b-h,s>A(m/d)&&i("overflow"),s*=d;e=y.length+1,S=f(v-a,e,0==a),A(v/e)>m-w&&i("overflow"),w+=A(v/e),v%=e,y.splice(v++,0,w)}return c(y)}function d(t){var e,n,r,o,a,s,c,l,h,d,y,g,v,w,S,I=[];for(t=u(t),g=t.length,e=x,n=0,a=O,s=0;s<g;++s)(y=t[s])<128&&I.push(F(y));for(r=o=I.length,o&&I.push(C);r<g;){for(c=m,s=0;s<g;++s)(y=t[s])>=e&&y<c&&(c=y);for(v=r+1,c-e>A((m-n)/v)&&i("overflow"),n+=(c-e)*v,e=c,s=0;s<g;++s)if(y=t[s],y<e&&++n>m&&i("overflow"),y==e){for(l=n,h=b;d=h<=a?_:h>=a+P?P:h-a,!(l<d);h+=b)S=l-d,w=b-d,I.push(F(p(d+S%w,0))),l=A(S/w);I.push(F(p(l,0))),a=f(n,v,r==o),n=0,++r}++n,++e}return I.join("")}function y(t){return s(t,function(t){return I.test(t)?h(t.slice(4).toLowerCase()):t})}function g(t){return s(t,function(t){return T.test(t)?"xn--"+d(t):t})}var v,m=("object"==typeof e&&e&&e.nodeType,"object"==typeof t&&t&&t.nodeType,2147483647),b=36,_=1,P=26,w=38,S=700,O=72,x=128,C="-",I=/^xn--/,T=/[^\\x20-\\x7E]/,j=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},U=b-_,A=Math.floor,F=String.fromCharCode;v={version:"1.3.2",ucs2:{decode:u,encode:c},decode:h,encode:d,toASCII:g,toUnicode:y},void 0!==(o=function(){return v}.call(e,n,e,t))&&(t.exports=o)}()}).call(e,n(379)(t),n(62))},function(t,e,n){var r,o;!function(i,a){"use strict";"object"==typeof t&&t.exports?t.exports=a():(r=a,void 0!==(o="function"==typeof r?r.call(e,n,e,t):r)&&(t.exports=o))}(0,function(t){"use strict";function e(t){var e=t.toLowerCase(),n=e.split(":"),r=n.length,o=8;""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[r-1]&&""===n[r-2]&&n.pop(),r=n.length,-1!==n[r-1].indexOf(".")&&(o=7);var i;for(i=0;i<r&&""!==n[i];i++);if(i<o)for(n.splice(i,1,"0000");n.length<o;)n.splice(i,0,"0000");for(var a,s=0;s<o;s++){a=n[s].split("");for(var u=0;u<3&&"0"===a[0]&&a.length>1;u++)a.splice(0,1);n[s]=a.join("")}var c=-1,l=0,p=0,f=-1,h=!1;for(s=0;s<o;s++)h?"0"===n[s]?p+=1:(h=!1,p>l&&(c=f,l=p)):"0"===n[s]&&(h=!0,f=s,p=1);p>l&&(c=f,l=p),l>1&&n.splice(c,l,""),r=n.length;var d="";for(""===n[0]&&(d=":"),s=0;s<r&&(d+=n[s],s!==r-1);s++)d+=":";return""===n[r-1]&&(d+=":"),d}function n(){return t.IPv6===this&&(t.IPv6=r),this}var r=t&&t.IPv6;return{best:e,noConflict:n}})},function(t,e,n){var r,o;!function(i,a){"use strict";"object"==typeof t&&t.exports?t.exports=a():(r=a,void 0!==(o="function"==typeof r?r.call(e,n,e,t):r)&&(t.exports=o))}(0,function(t){"use strict";var e=t&&t.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return!1;var o=n.list[t.slice(e+1)];return!!o&&o.indexOf(" "+t.slice(r+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var r=n.list[t.slice(e+1)];return!!r&&r.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var r=t.lastIndexOf(".",e-1);if(r<=0||r>=e-1)return null;var o=n.list[t.slice(e+1)];return o?o.indexOf(" "+t.slice(r+1,e)+" ")<0?null:t.slice(r+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n})},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},o=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(a=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],i=0}finally{o=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},i=function(){function t(){}return Object.defineProperty(t,"brightcoveConfig",{get:function(){return window.__brightcoveConfig},enumerable:!0,configurable:!0}),t.updateStatusMessage=function(t){var e=document.getElementById("statusLabel");e&&(e.childNodes[0].nodeValue=t)},t.timeout=function(t,e,n){var r;return Promise.race([t,new Promise(function(t,o){r=setTimeout(function(){o(new Error(n||"Timeout Error"))},e)})]).then(function(t){return clearTimeout(r),t},function(t){throw clearTimeout(r),t})},t.postMessage=function(t,e){t&&"function"==typeof t.postMessage&&t.postMessage(e,"*",e.transferrableData?[e.transferrableData]:void 0)},t.postMessageError=function(t,e,n,r){var o={$$command:e,$$postMessageId:n,$$result:"error",message:r,type:Object.prototype.toString.call(r),context:"proxy"};if("object"==typeof r){o.name=r.name,o.message=r.message,o.stack=r.stack;for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);o.originalError&&(o.originalError=JSON.stringify(o.originalError))}this.postMessage(t,o)},t.postProgress=function(t,e,n,r){var o={$$command:e,$$postMessageId:n,$$result:"progress",data:r};this.postMessage(t,o)},t.executePendingQuery=function(t){return r(this,void 0,void 0,function(){var e,n,r;return o(this,function(o){if(!t)throw Error("A ClientContext must be specified.");return r=new Promise(function(t,r){e=t,n=r}),t.executeQueryAsync(function(t,n){e(n)},function(t,e){var r=new Error(e.get_message());r.spError=e,n(r)}),[2,r]})})},t}()},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),i=n(76),a=n(381),s=n(34),u=n(382),c=n(33),l=n(392);e.util=o.Util,e.sp=new u.SPRest,e.graph=new l.GraphRest,e.storage=new i.PnPClientStorage,e.config=new a.Settings,e.log=s.Logger,e.setup=c.setRuntimeConfig,r(n(401)),r(n(404)),r(n(406)),r(n(409)),r(n(410));var p={config:e.config,graph:e.graph,log:e.log,setup:e.setup,sp:e.sp,storage:e.storage,util:e.util};e.default=p},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(){}return e.prototype.fetch=function(e,n){return t.fetch(e,n)},e}();e.FetchClient=n}).call(e,n(62))},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(1),a=function(){function t(t,e){void 0===t&&(t=""),void 0===e&&(e={}),this._query=e,"string"==typeof t&&t.length>0&&this.extendQuery({Querytext:t})}return t.create=function(e,n){return void 0===e&&(e=""),void 0===n&&(n={}),new t(e,n)},t.prototype.text=function(t){return this.extendQuery({Querytext:t})},t.prototype.template=function(t){return this.extendQuery({QueryTemplate:t})},t.prototype.sourceId=function(t){return this.extendQuery({SourceId:t})},Object.defineProperty(t.prototype,"enableInterleaving",{get:function(){return this.extendQuery({EnableInterleaving:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableStemming",{get:function(){return this.extendQuery({EnableStemming:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"trimDuplicates",{get:function(){return this.extendQuery({TrimDuplicates:!0})},enumerable:!0,configurable:!0}),t.prototype.trimDuplicatesIncludeId=function(t){return this.extendQuery({TrimDuplicatesIncludeId:t})},Object.defineProperty(t.prototype,"enableNicknames",{get:function(){return this.extendQuery({EnableNicknames:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableFql",{get:function(){return this.extendQuery({EnableFQL:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enablePhonetic",{get:function(){return this.extendQuery({EnablePhonetic:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bypassResultTypes",{get:function(){return this.extendQuery({BypassResultTypes:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"processBestBets",{get:function(){return this.extendQuery({ProcessBestBets:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableQueryRules",{get:function(){return this.extendQuery({EnableQueryRules:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableSorting",{get:function(){return this.extendQuery({EnableSorting:!0})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"generateBlockRankLog",{get:function(){return this.extendQuery({GenerateBlockRankLog:!0})},enumerable:!0,configurable:!0}),t.prototype.rankingModelId=function(t){return this.extendQuery({RankingModelId:t})},t.prototype.startRow=function(t){return this.extendQuery({StartRow:t})},t.prototype.rowLimit=function(t){return this.extendQuery({RowLimit:t})},t.prototype.rowsPerPage=function(t){return this.extendQuery({RowsPerPage:t})},t.prototype.selectProperties=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.extendQuery({SelectProperties:t})},t.prototype.culture=function(t){return this.extendQuery({Culture:t})},t.prototype.timeZoneId=function(t){return this.extendQuery({TimeZoneId:t})},t.prototype.refinementFilters=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.extendQuery({RefinementFilters:t})},t.prototype.refiners=function(t){return this.extendQuery({Refiners:t})},t.prototype.hiddenConstraints=function(t){return this.extendQuery({HiddenConstraints:t})},t.prototype.sortList=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.extendQuery({SortList:t})},t.prototype.timeout=function(t){return this.extendQuery({Timeout:t})},t.prototype.hithighlightedProperties=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.extendQuery({HitHighlightedProperties:t})},t.prototype.clientType=function(t){return this.extendQuery({ClientType:t})},t.prototype.personalizationData=function(t){return this.extendQuery({PersonalizationData:t})},t.prototype.resultsURL=function(t){return this.extendQuery({ResultsUrl:t})},t.prototype.queryTag=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.extendQuery({QueryTag:t})},t.prototype.properties=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.extendQuery({Properties:t})},Object.defineProperty(t.prototype,"processPersonalFavorites",{get:function(){return this.extendQuery({ProcessPersonalFavorites:!0})},enumerable:!0,configurable:!0}),t.prototype.queryTemplatePropertiesUrl=function(t){return this.extendQuery({QueryTemplatePropertiesUrl:t})},t.prototype.reorderingRules=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.extendQuery({ReorderingRules:t})},t.prototype.hitHighlightedMultivaluePropertyLimit=function(t){return this.extendQuery({HitHighlightedMultivaluePropertyLimit:t})},Object.defineProperty(t.prototype,"enableOrderingHitHighlightedProperty",{get:function(){return this.extendQuery({EnableOrderingHitHighlightedProperty:!0})},enumerable:!0,configurable:!0}),t.prototype.collapseSpecification=function(t){return this.extendQuery({CollapseSpecification:t})},t.prototype.uiLanguage=function(t){return this.extendQuery({UILanguage:t})},t.prototype.desiredSnippetLength=function(t){return this.extendQuery({DesiredSnippetLength:t})},t.prototype.maxSnippetLength=function(t){return this.extendQuery({MaxSnippetLength:t})},t.prototype.summaryLength=function(t){return this.extendQuery({SummaryLength:t})},t.prototype.toSearchQuery=function(){return this._query},t.prototype.extendQuery=function(t){return this._query=i.Util.extend(this._query,t),this},t}();e.SearchQueryBuilder=a;var s=function(t){function e(e,n){return void 0===n&&(n="_api/search/postquery"),t.call(this,e,n)||this}return r(e,t),e.prototype.execute=function(t){var e,n=this;e=t,e.SelectProperties&&(e.SelectProperties=this.fixupProp(t.SelectProperties)),e.RefinementFilters&&(e.RefinementFilters=this.fixupProp(t.RefinementFilters)),e.SortList&&(e.SortList=this.fixupProp(t.SortList)),e.HithighlightedProperties&&(e.HithighlightedProperties=this.fixupProp(t.HitHighlightedProperties)),e.ReorderingRules&&(e.ReorderingRules=this.fixupProp(t.ReorderingRules)),e.Properties&&(e.Properties=this.fixupProp(t.Properties));var r=JSON.stringify({request:i.Util.extend({__metadata:{type:"Microsoft.Office.Server.Search.REST.SearchRequest"}},e)});return this.postCore({body:r}).then(function(e){return new u(e,n.toUrl(),t)})},e.prototype.fixupProp=function(t){return t.hasOwnProperty("results")?t:{results:t}},e}(o.SharePointQueryableInstance);e.Search=s;var u=function(){function t(t,e,n,r,o){void 0===r&&(r=null),void 0===o&&(o=null),this._url=e,this._query=n,this._raw=r,this._primary=o,this._raw=t.postquery?t.postquery:t}return Object.defineProperty(t.prototype,"ElapsedTime",{get:function(){return this.RawSearchResults.ElapsedTime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"RowCount",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"TotalRows",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"TotalRowsIncludingDuplicates",{get:function(){return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"RawSearchResults",{get:function(){return this._raw},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"PrimarySearchResults",{get:function(){return null===this._primary&&(this._primary=this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows)),this._primary},enumerable:!0,configurable:!0}),t.prototype.getPage=function(t,e){if(this.TotalRows<this.RowCount)return Promise.resolve(null);var n=void 0!==e?e:this._query.hasOwnProperty("RowLimit")?this._query.RowLimit:10,r=i.Util.extend(this._query,{RowLimit:n,StartRow:n*(t-1)});return r.StartRow>this.TotalRows?Promise.resolve(null):new s(this._url,null).execute(r)},t.prototype.formatSearchResults=function(t){for(var e=new Array,n=t.results?t.results:t,r=0,o=n;r<o.length;r++){var i=o[r],a=i.Cells.results?i.Cells.results:i.Cells;e.push(a.reduce(function(t,e){return Object.defineProperty(t,e.Key,{configurable:!1,enumerable:!1,value:e.Value,writable:!1}),t},{}))}return e},t}();e.SearchResults=u,function(t){t[t.Ascending=0]="Ascending",t[t.Descending=1]="Descending",t[t.FQLFormula=2]="FQLFormula"}(e.SortDirection||(e.SortDirection={})),function(t){t[t.ResultContainsKeyword=0]="ResultContainsKeyword",t[t.TitleContainsKeyword=1]="TitleContainsKeyword",t[t.TitleMatchesKeyword=2]="TitleMatchesKeyword",t[t.UrlStartsWith=3]="UrlStartsWith",t[t.UrlExactlyMatches=4]="UrlExactlyMatches",t[t.ContentTypeIs=5]="ContentTypeIs",t[t.FileExtensionMatches=6]="FileExtensionMatches",t[t.ResultHasTag=7]="ResultHasTag",t[t.ManualCondition=8]="ManualCondition"}(e.ReorderingRuleMatchType||(e.ReorderingRuleMatchType={})),function(t){t[t.None=0]="None",t[t.StringType=1]="StringType",t[t.Int32Type=2]="Int32Type",t[t.BooleanType=3]="BooleanType",t[t.StringArrayType=4]="StringArrayType",t[t.UnSupportedType=5]="UnSupportedType"}(e.QueryPropertyValueType||(e.QueryPropertyValueType={}));var c=function(){function t(){}return t.Documents="e7ec8cee-ded8-43c9-beb5-436b54b31e84",t.ItemsMatchingContentType="5dc9f503-801e-4ced-8a2c-5d1237132419",t.ItemsMatchingTag="e1327b9c-2b8c-4b23-99c9-3730cb29c3f7",t.ItemsRelatedToCurrentUser="48fec42e-4a92-48ce-8363-c2703a40e67d",t.ItemsWithSameKeywordAsThisItem="5c069288-1d17-454a-8ac6-9c642a065f48",t.LocalPeopleResults="b09a7990-05ea-4af9-81ef-edfab16c4e31",t.LocalReportsAndDataResults="203fba36-2763-4060-9931-911ac8c0583b",t.LocalSharePointResults="8413cd39-2156-4e00-b54d-11efd9abdb89",t.LocalVideoResults="78b793ce-7956-4669-aa3b-451fc5defebf",t.Pages="5e34578e-4d08-4edc-8bf3-002acf3cdbcc",t.Pictures="38403c8c-3975-41a8-826e-717f2d41568a",t.Popular="97c71db1-58ce-4891-8b64-585bc2326c12",t.RecentlyChangedItems="ba63bbae-fa9c-42c0-b027-9a878f16557c",t.RecommendedItems="ec675252-14fa-4fbe-84dd-8d098ed74181",t.Wiki="9479bf85-e257-4318-b5a8-81a180f5faa1",t}();e.SearchBuiltInSourceId=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(76),o=n(1),i=n(33),a=function(){function t(t){this.key=t,this.expiration=o.Util.dateAdd(new Date,"second",i.RuntimeConfig.defaultCachingTimeoutSeconds),this.storeName=i.RuntimeConfig.defaultCachingStore}return Object.defineProperty(t.prototype,"store",{get:function(){return"local"===this.storeName?t.storage.local:t.storage.session},enumerable:!0,configurable:!0}),t.storage=new r.PnPClientStorage,t}();e.CachingOptions=a;var s=function(){function t(t,e){this._parser=t,this._cacheOptions=e}return t.prototype.parse=function(t){var e=this;return this._parser.parse(t).then(function(t){return null!==e._cacheOptions.store&&e._cacheOptions.store.put(e._cacheOptions.key,t,e._cacheOptions.expiration),t})},t}();e.CachingParserWrapper=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=function(t){function e(e,n){return void 0===n&&(n="_api/search/suggest"),t.call(this,e,n)||this}return r(e,t),e.prototype.execute=function(t){return this.mapQueryToQueryString(t),this.get().then(function(t){return new a(t)})},e.prototype.mapQueryToQueryString=function(t){this.query.add("querytext","\'"+t.querytext+"\'"),t.hasOwnProperty("count")&&this.query.add("inumberofquerysuggestions",t.count.toString()),t.hasOwnProperty("personalCount")&&this.query.add("inumberofresultsuggestions",t.personalCount.toString()),t.hasOwnProperty("preQuery")&&this.query.add("fprequerysuggestions",t.preQuery.toString()),t.hasOwnProperty("hitHighlighting")&&this.query.add("fhithighlighting",t.hitHighlighting.toString()),t.hasOwnProperty("capitalize")&&this.query.add("fcapitalizefirstletters",t.capitalize.toString()),t.hasOwnProperty("culture")&&this.query.add("culture",t.culture.toString()),t.hasOwnProperty("stemming")&&this.query.add("enablestemming",t.stemming.toString()),t.hasOwnProperty("includePeople")&&this.query.add("showpeoplenamesuggestions",t.includePeople.toString()),t.hasOwnProperty("queryRules")&&this.query.add("enablequeryrules",t.queryRules.toString()),t.hasOwnProperty("prefixMatch")&&this.query.add("fprefixmatchallterms",t.prefixMatch.toString())},e}(o.SharePointQueryableInstance);e.SearchSuggest=i;var a=function(){function t(t){t.hasOwnProperty("suggest")?(this.PeopleNames=t.suggest.PeopleNames.results,this.PersonalResults=t.suggest.PersonalResults.results,this.Queries=t.suggest.Queries.results):(this.PeopleNames=t.PeopleNames,this.PersonalResults=t.PersonalResults,this.Queries=t.Queries)}return t}();e.SearchSuggestResult=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(60),a=n(115),s=n(30),u=n(117),c=n(167),l=function(t){function e(e,n){return void 0===n&&(n="_api/site"),t.call(this,e,n)||this}return r(e,t),Object.defineProperty(e.prototype,"rootWeb",{get:function(){return new i.Web(this,"rootweb")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"features",{get:function(){return new c.Features(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userCustomActions",{get:function(){return new a.UserCustomActions(this)},enumerable:!0,configurable:!0}),e.prototype.getRootWeb=function(){return this.rootWeb.select("Url").get().then(function(t){return new i.Web(t.Url)})},e.prototype.getContextInfo=function(){return new e(this.parentUrl,"_api/contextinfo").postCore().then(function(t){if(t.hasOwnProperty("GetContextWebInformation")){var e=t.GetContextWebInformation;return e.SupportedSchemaVersions=e.SupportedSchemaVersions.results,e}return t})},e.prototype.getDocumentLibraries=function(t){var e=new o.SharePointQueryable("","_api/sp.web.getdocumentlibraries(@v)");return e.query.add("@v","\'"+t+"\'"),e.get().then(function(t){return t.hasOwnProperty("GetDocumentLibraries")?t.GetDocumentLibraries:t})},e.prototype.getWebUrlFromPageUrl=function(t){var e=new o.SharePointQueryable("","_api/sp.web.getweburlfrompageurl(@v)");return e.query.add("@v","\'"+t+"\'"),e.get().then(function(t){return t.hasOwnProperty("GetWebUrlFromPageUrl")?t.GetWebUrlFromPageUrl:t})},e.prototype.createBatch=function(){return new u.ODataBatch(this.parentUrl)},e.prototype.openWebById=function(t){return this.clone(e,"openWebById(\'"+t+"\')").postCore().then(function(t){return{data:t,web:i.Web.fromUrl(s.spExtractODataId(t))}})},e}(o.SharePointQueryableInstance);e.Site=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(60),i=n(111),a=n(80),s=n(6),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"roleAssignments",{get:function(){return new i.RoleAssignments(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstUniqueAncestorSecurableObject",{get:function(){return new s.SharePointQueryableInstance(this,"FirstUniqueAncestorSecurableObject")},enumerable:!0,configurable:!0}),e.prototype.getUserEffectivePermissions=function(t){var e=this.clone(s.SharePointQueryable,"getUserEffectivePermissions(@user)");return e.query.add("@user","\'"+encodeURIComponent(t)+"\'"),e.get().then(function(t){return t.hasOwnProperty("GetUserEffectivePermissions")?t.GetUserEffectivePermissions:t})},e.prototype.getCurrentUserEffectivePermissions=function(){var t=this;return o.Web.fromUrl(this.toUrl()).currentUser.select("LoginName").getAs().then(function(e){return t.getUserEffectivePermissions(e.LoginName)})},e.prototype.breakRoleInheritance=function(t,n){return void 0===t&&(t=!1),void 0===n&&(n=!1),this.clone(e,"breakroleinheritance(copyroleassignments="+t+", clearsubscopes="+n+")").postCore()},e.prototype.resetRoleInheritance=function(){return this.clone(e,"resetroleinheritance").postCore()},e.prototype.userHasPermissions=function(t,e){var n=this;return this.getUserEffectivePermissions(t).then(function(t){return n.hasPermissions(t,e)})},e.prototype.currentUserHasPermissions=function(t){var e=this;return this.getCurrentUserEffectivePermissions().then(function(n){return e.hasPermissions(n,t)})},e.prototype.hasPermissions=function(t,e){if(!e)return!0;var n=parseFloat(t.Low),r=parseFloat(t.High);if(e===a.PermissionKind.FullMask)return 32767==(32767&r)&&65535===n;e-=1;var o=1;return e>=0&&e<32?(o<<=e,0!=(n&o)):e>=32&&e<64&&(o<<=e-32,0!=(r&o))},e}(s.SharePointQueryableInstance);e.SharePointQueryableSecurable=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(112),a=n(1),s=function(t){function e(e,n){return void 0===n&&(n="siteusers"),t.call(this,e,n)||this}return r(e,t),e.prototype.getByEmail=function(t){return new u(this,"getByEmail(\'"+t+"\')")},e.prototype.getById=function(t){return new u(this,"getById("+t+")")},e.prototype.getByLoginName=function(t){var e=new u(this);return e.concat("(\'!@v::"+encodeURIComponent(t)+"\')"),e},e.prototype.removeById=function(t){return this.clone(e,"removeById("+t+")").postCore()},e.prototype.removeByLoginName=function(t){var n=this.clone(e,"removeByLoginName(@v)");return n.query.add("@v","\'"+encodeURIComponent(t)+"\'"),n.postCore()},e.prototype.add=function(t){var n=this;return this.clone(e,null).postCore({body:JSON.stringify({__metadata:{type:"SP.User"},LoginName:t})}).then(function(){return n.getByLoginName(t)})},e}(o.SharePointQueryableCollection);e.SiteUsers=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"groups",{get:function(){return new i.SiteGroups(this,"groups")},enumerable:!0,configurable:!0}),e.prototype.update=function(t){var e=this,n=a.Util.extend({__metadata:{type:"SP.User"}},t);return this.postCore({body:JSON.stringify(n),headers:{"X-HTTP-Method":"MERGE"}}).then(function(t){return{data:t,user:e}})},e.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},e}(o.SharePointQueryableInstance);e.SiteUser=u;var c=function(t){function e(e,n){return void 0===n&&(n="currentuser"),t.call(this,e,n)||this}return r(e,t),e}(o.SharePointQueryableInstance);e.CurrentUser=c},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"webparts",{get:function(){return new a(this,"webparts")},enumerable:!0,configurable:!0}),e.prototype.export=function(t){return this.clone(e,"ExportWebPart").postCore({body:JSON.stringify({webPartId:t})})},e.prototype.import=function(t){return this.clone(e,"ImportWebPart").postCore({body:JSON.stringify({webPartXml:t})})},e}(o.SharePointQueryable);e.LimitedWebPartManager=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getById=function(t){return new s(this,"getbyid(\'"+t+"\')")},e.prototype.getByControlId=function(t){return new s(this,"getByControlId(\'"+t+"\')")},e}(o.SharePointQueryableCollection);e.WebPartDefinitions=a;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"webpart",{get:function(){return new u(this)},enumerable:!0,configurable:!0}),e.prototype.saveChanges=function(){return this.clone(e,"SaveWebPartChanges").postCore()},e.prototype.moveTo=function(t,n){return this.clone(e,"MoveWebPartTo(zoneID=\'"+t+"\', zoneIndex="+n+")").postCore()},e.prototype.close=function(){return this.clone(e,"CloseWebPart").postCore()},e.prototype.open=function(){return this.clone(e,"OpenWebPart").postCore()},e.prototype.delete=function(){return this.clone(e,"DeleteWebPart").postCore()},e}(o.SharePointQueryableInstance);e.WebPartDefinition=s;var u=function(t){function e(e,n){return void 0===n&&(n="webpart"),t.call(this,e,n)||this}return r(e,t),e}(o.SharePointQueryableInstance);e.WebPart=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=function(t){function e(e,n){return void 0===n&&(n="features"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new a(this);return e.concat("(\'"+t+"\')"),e},e.prototype.add=function(t,n){var r=this;return void 0===n&&(n=!1),this.clone(e,"add").postCore({body:JSON.stringify({featdefScope:0,featureId:t,force:n})}).then(function(e){return{data:e,feature:r.getById(t)}})},e.prototype.remove=function(t,n){return void 0===n&&(n=!1),this.clone(e,"remove").postCore({body:JSON.stringify({featureId:t,force:n})})},e}(o.SharePointQueryableCollection);e.Features=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.deactivate=function(t){var n=this;void 0===t&&(t=!1);var r=this.addBatchDependency();return new e(this).select("DefinitionId").getAs().then(function(e){var o=n.getParent(i,n.parentUrl,"",n.batch).remove(e.DefinitionId,t);return r(),o})},e}(o.SharePointQueryableInstance);e.Feature=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(49),a=n(30),s=n(1),u=function(t){function e(e,n){void 0===n&&(n="_api/web/tenantappcatalog/AvailableApps");var r="";return"string"==typeof e?r=e:void 0!==e&&(r=e.toUrl()),t.call(this,s.extractWebUrl(r),n)||this}return r(e,t),e.prototype.getAppById=function(t){return new c(this,"getById(\'"+t+"\')")},e.prototype.add=function(t,n,r){return void 0===r&&(r=!0),new e(s.extractWebUrl(this.toUrl()),"_api/web/tenantappcatalog/add(overwrite="+r+",url=\'"+t+"\')").postCore({body:n}).then(function(t){return{data:t,file:new i.File(a.spExtractODataId(t))}})},e}(o.SharePointQueryableCollection);e.AppCatalog=u;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.deploy=function(){return this.clone(e,"Deploy").postCore()},e.prototype.retract=function(){return this.clone(e,"Retract").postCore()},e.prototype.install=function(){return this.clone(e,"Install").postCore()},e.prototype.uninstall=function(){return this.clone(e,"Uninstall").postCore()},e.prototype.upgrade=function(){return this.clone(e,"Upgrade").postCore()},e.prototype.remove=function(){return this.clone(e,"Remove").postCore()},e}(o.SharePointQueryableInstance);e.App=c},function(t,e,n){"use strict";function r(t){return t.length<1?1:Math.max.apply(null,t.map(function(t){return t.order}))+1}function o(t,e){void 0===e&&(e=0);var n=this.substring(e).search(t);return n>=0?n+e:n}function i(t,e){var n=new RegExp(e+\'="([^"]*?)"\',"i"),r=n.exec(t);return r.length>0?r[1]:null}function a(t,e,n){var r=[];if(void 0===t||null===t)return r;var i=t.replace(/[\\t\\r\\n]/g,""),a=o.call(i,e);if(a<0)return r;for(;a>-1;){for(var s=1,u=a+1,c=-1,l=-1;;){if(c=o.call(i,/<div[^>]*>/i,u),l=o.call(i,/<\\/div>/i,u),c<0&&(c=i.length+1),c<l?(s++,u=c+1):l<c&&(s--,u=l+1),0===s){var p=i.substring(a,l+6).trim();r.push(n(p));break}if(s>1e3||s<0)throw new Error("getBoundedDivMarkup exceeded depth parameters.")}a=o.call(i,e,l)}return r}function s(t){for(var e=0;e<t.length;e++)t[e].order=e+1,t[e].hasOwnProperty("columns")?s(t[e].columns):t[e].hasOwnProperty("controls")&&s(t[e].controls)}var u=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var c=n(49),l=n(61),p=n(1),f=function(t){function e(e,n,r){void 0===n&&(n=[]),void 0===r&&(r=!1);var o=t.call(this,e)||this;return o.sections=n,o.commentsDisabled=r,o}return u(e,t),e.create=function(t,n,r,o){return void 0===o&&(o="Article"),t.rootFolder.files.select("Name").filter("Name eq \'"+n+"\'").get().then(function(i){if(i.length>0)throw new Error("A file with the name \'"+n+"\' already exists in the library \'"+t.toUrl()+"\'.");return t.rootFolder.select("ServerRelativePath").get().then(function(i){var a=p.Util.combinePaths("/",i.ServerRelativePath.DecodedUrl,n);return t.rootFolder.files.addTemplateFile(a,c.TemplateFileType.ClientSidePage).then(function(t){return t.file.getItem().then(function(t){return t.update({BannerImageUrl:{Url:"/_layouts/15/images/sitepagethumbnail.png"},CanvasContent1:"",ClientSideApplicationId:"b6917cb1-93a0-4b97-a84d-7cf49975d4ec",ContentTypeId:"0x0101009D1CB255DA76424F860D91F20E6C4118",PageLayoutType:o,PromotedState:0,Title:r}).then(function(t){return new e(t.item.file,t.item.CommentsDisabled)})})})})})},e.fromFile=function(t){var n=new e(t);return n.load().then(function(t){return n})},e.jsonToEscapedString=function(t){return JSON.stringify(t).replace(/"/g,"&quot;").replace(/:/g,"&#58;").replace(/{/g,"&#123;").replace(/}/g,"&#125;")},e.escapedStringToJson=function(t){return JSON.parse(t.replace(/&quot;/g,\'"\').replace(/&#58;/g,":").replace(/&#123;/g,"{").replace(/&#125;/g,"}"))},e.prototype.addSection=function(){var t=new h(this,r(this.sections));return this.sections.push(t),t},e.prototype.toHtml=function(){s(this.sections);var t=[];t.push("<div>");for(var e=0;e<this.sections.length;e++)t.push(this.sections[e].toHtml());return t.push("</div>"),t.join("")},e.prototype.fromHtml=function(t){var e=this;return this.sections=[],a(t,/<div\\b[^>]*data-sp-canvascontrol[^>]*?>/i,function(t){var n=/controlType&quot;&#58;(\\d*?),/i.exec(t),r=null==n||n.length<2?0:parseInt(n[1],10),o=null;switch(r){case 0:o=new y(null,0),o.fromHtml(t),e.mergeColumnToTree(o);break;case 3:o=new v(""),o.fromHtml(t),e.mergeControlToTree(o);break;case 4:o=new g,o.fromHtml(t),e.mergeControlToTree(o)}}),s(this.sections),this},e.prototype.load=function(){var t=this;return this.getItem("CanvasContent1","CommentsDisabled").then(function(e){t.fromHtml(e.CanvasContent1),t.commentsDisabled=e.CommentsDisabled})},e.prototype.save=function(){return this.updateProperties({CanvasContent1:this.toHtml()})},e.prototype.enableComments=function(){var t=this;return this.setCommentsOn(!0).then(function(e){return t.commentsDisabled=!1,e})},e.prototype.disableComments=function(){var t=this;return this.setCommentsOn(!1).then(function(e){return t.commentsDisabled=!0,e})},e.prototype.findControlById=function(t){return this.findControl(function(e){return e.id===t})},e.prototype.findControl=function(t){for(var e=0;e<this.sections.length;e++)for(var n=0;n<this.sections[e].columns.length;n++)for(var r=0;r<this.sections[e].columns[n].controls.length;r++)if(t(this.sections[e].columns[n].controls[r]))return this.sections[e].columns[n].controls[r];return null},e.prototype.setCommentsOn=function(t){return this.getItem().then(function(e){return new l.Item(e,"SetCommentsDisabled("+!t+")").update({})})},e.prototype.mergeControlToTree=function(t){var e=null,n=null,r=this.sections.filter(function(e){return e.order===t.controlData.position.zoneIndex});r.length<1?(e=new h(this,t.controlData.position.zoneIndex),this.sections.push(e)):e=r[0];var o=e.columns.filter(function(e){return e.order===t.controlData.position.sectionIndex});o.length<1?(n=new y(e,t.controlData.position.sectionIndex,t.controlData.position.sectionFactor),e.columns.push(n)):n=o[0],t.column=n,n.addControl(t)},e.prototype.mergeColumnToTree=function(t){var e=null,n=this.sections.filter(function(e){return e.order===t.controlData.position.zoneIndex});n.length<1?(e=new h(this,t.controlData.position.zoneIndex),this.sections.push(e)):e=n[0],t.section=e,e.columns.push(t)},e.prototype.updateProperties=function(t,e){return void 0===e&&(e="*"),this.getItem().then(function(n){return n.update(t,e)})},e}(c.File);e.ClientSidePage=f;var h=function(){function t(t,e,n){void 0===n&&(n=[]),this.page=t,this.order=e,this.columns=n}return Object.defineProperty(t.prototype,"defaultColumn",{get:function(){return this.columns.length<1&&this.addColumn(12),this.columns[0]},enumerable:!0,configurable:!0}),t.prototype.addColumn=function(t){var e=new y(this,r(this.columns),t);return this.columns.push(e),e},t.prototype.addControl=function(t){return this.defaultColumn.addControl(t),this},t.prototype.toHtml=function(){for(var t=[],e=0;e<this.columns.length;e++)t.push(this.columns[e].toHtml());return t.join("")},t}();e.CanvasSection=h;var d=function(){function t(t,e,n,r,o,i){void 0===n&&(n=null),void 0===r&&(r=1),void 0===o&&(o=p.Util.getGUID()),void 0===i&&(i=null),this.controlType=t,this.dataVersion=e,this.column=n,this.order=r,this.id=o,this.controlData=i}return Object.defineProperty(t.prototype,"jsonData",{get:function(){return f.jsonToEscapedString(this.getControlData())},enumerable:!0,configurable:!0}),t.prototype.fromHtml=function(t){this.controlData=f.escapedStringToJson(i(t,"data-sp-controldata")),this.dataVersion=i(t,"data-sp-canvasdataversion"),this.controlType=this.controlData.controlType,this.id=this.controlData.id},t}();e.CanvasControl=d;var y=function(t){function e(e,n,r,o,i){void 0===r&&(r=12),void 0===o&&(o=[]),void 0===i&&(i="1.0");var a=t.call(this,0,i)||this;return a.section=e,a.order=n,a.factor=r,a.controls=o,a}return u(e,t),e.prototype.addControl=function(t){return t.column=this,this.controls.push(t),this},e.prototype.getControl=function(t){return this.controls[t]},e.prototype.toHtml=function(){var t=[];if(this.controls.length<1)t.push(\'<div data-sp-canvascontrol="" data-sp-canvasdataversion="\'+this.dataVersion+\'" data-sp-controldata="\'+this.jsonData+\'"></div>\');else for(var e=0;e<this.controls.length;e++)t.push(this.controls[e].toHtml(e+1));return t.join("")},e.prototype.fromHtml=function(e){t.prototype.fromHtml.call(this,e),this.controlData=f.escapedStringToJson(i(e,"data-sp-controldata")),this.factor=this.controlData.position.sectionFactor,this.order=this.controlData.position.sectionIndex},e.prototype.getControlData=function(){return{displayMode:2,position:{sectionFactor:this.factor,sectionIndex:this.order,zoneIndex:this.section.order}}},e}(d);e.CanvasColumn=y;var g=function(t){function e(e){void 0===e&&(e="");var n=t.call(this,4,"1.0")||this;return n.text=e,n}return u(e,t),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){t.startsWith("<p>")||(t="<p>"+t+"</p>"),this._text=t},enumerable:!0,configurable:!0}),e.prototype.getControlData=function(){return{controlType:this.controlType,editorType:"CKEditor",id:this.id,position:{controlIndex:this.order,sectionFactor:this.column.factor,sectionIndex:this.column.order,zoneIndex:this.column.section.order}}},e.prototype.toHtml=function(t){this.order=t;var e=[];return e.push(\'<div data-sp-canvascontrol="" data-sp-canvasdataversion="\'+this.dataVersion+\'" data-sp-controldata="\'+this.jsonData+\'">\'),e.push(\'<div data-sp-rte="">\'),e.push(""+this.text),e.push("</div>"),e.push("</div>"),e.join("")},e.prototype.fromHtml=function(e){t.prototype.fromHtml.call(this,e);var n=/<div[^>]*data-sp-rte[^>]*>(.*?)<\\/div>$/i.exec(e);this.text=n.length>1?n[1]:""},e}(d);e.ClientSideText=g;var v=function(t){function e(e,n,r,o,i,a){void 0===n&&(n=""),void 0===r&&(r={}),void 0===o&&(o=""),void 0===i&&(i=""),void 0===a&&(a=null);var s=t.call(this,3,"1.0")||this;return s.title=e,s.description=n,s.propertieJson=r,s.webPartId=o,s.htmlProperties=i,s.serverProcessedContent=a,s}return u(e,t),e.fromComponentDef=function(t){var n=new e("");return n.import(t),n},e.prototype.import=function(t){this.webPartId=t.Id.replace(/^\\{|\\}$/g,"");var e=JSON.parse(t.Manifest);this.title=e.preconfiguredEntries[0].title.default,this.description=e.preconfiguredEntries[0].description.default,this.propertieJson=this.parseJsonProperties(e.preconfiguredEntries[0].properties)},e.prototype.setProperties=function(t){return this.propertieJson=t,this},e.prototype.getProperties=function(){return this.propertieJson},e.prototype.toHtml=function(t){this.order=t;var e={dataVersion:this.dataVersion,description:this.description,id:this.webPartId,instanceId:this.id,properties:this.propertieJson,title:this.title},n=[];return n.push(\'<div data-sp-canvascontrol="" data-sp-canvasdataversion="\'+this.dataVersion+\'" data-sp-controldata="\'+this.jsonData+\'">\'),n.push(\'<div data-sp-webpart="" data-sp-canvasdataversion="\'+this.dataVersion+\'" data-sp-webpartdata="\'+f.jsonToEscapedString(e)+\'">\'),n.push("<div data-sp-componentid>"),n.push(this.webPartId),n.push("</div>"),n.push(\'<div data-sp-htmlproperties="">\'),n.push(this.renderHtmlProperties()),n.push("</div>"),n.push("</div>"),n.push("</div>"),n.join("")},e.prototype.fromHtml=function(e){t.prototype.fromHtml.call(this,e);var n=f.escapedStringToJson(i(e,"data-sp-webpartdata"));this.title=n.title,this.description=n.description,this.webPartId=n.id,this.setProperties(n.properties),void 0!==n.serverProcessedContent&&(this.serverProcessedContent=n.serverProcessedContent);var r=a(e,/<div\\b[^>]*data-sp-htmlproperties[^>]*?>/i,function(t){return t.replace(/^<div\\b[^>]*data-sp-htmlproperties[^>]*?>/i,"").replace(/<\\/div>$/i,"")});this.htmlProperties=r.length>0?r[0]:""},e.prototype.getControlData=function(){return{controlType:this.controlType,id:this.id,position:{controlIndex:this.order,sectionFactor:this.column.factor,sectionIndex:this.column.order,zoneIndex:this.column.section.order},webPartId:this.webPartId}},e.prototype.renderHtmlProperties=function(){var t=[];if(void 0===this.serverProcessedContent||null===this.serverProcessedContent)t.push(this.htmlProperties);else if(void 0!==this.serverProcessedContent){if(void 0!==this.serverProcessedContent.searchablePlainTexts)for(var e=0;e<this.serverProcessedContent.searchablePlainTexts.length;e++){var n=this.serverProcessedContent.searchablePlainTexts[e];t.push(\'<div data-sp-prop-name="\'+n.Name+\'" data-sp-searchableplaintext="true">\'),t.push(n.Value),t.push("</div>")}if(void 0!==this.serverProcessedContent.imageSources)for(var e=0;e<this.serverProcessedContent.imageSources.length;e++){var n=this.serverProcessedContent.imageSources[e];t.push(\'<img data-sp-prop-name="\'+n.Name+\'" src="\'+n.Value+\'" />\')}if(void 0!==this.serverProcessedContent.links)for(var e=0;e<this.serverProcessedContent.links.length;e++){var n=this.serverProcessedContent.links[e];t.push(\'<a data-sp-prop-name="\'+n.Name+\'" href="\'+n.Value+\'"></a>\')}}return t.join("")},e.prototype.parseJsonProperties=function(t){return void 0!==t.webPartData&&void 0!==t.webPartData.serverProcessedContent?this.serverProcessedContent=t.webPartData.serverProcessedContent:void 0!==t.serverProcessedContent?this.serverProcessedContent=t.serverProcessedContent:this.serverProcessedContent=null,void 0!==t.webPartData&&void 0!==t.webPartData.properties?t.webPartData.properties:void 0!==t.properties?t.properties:t},e}(d);e.ClientSideWebpart=v},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(1),a=function(t){function e(e,n){return void 0===n&&(n="_api/social.following"),t.call(this,e,n)||this}return r(e,t),Object.defineProperty(e.prototype,"my",{get:function(){return new s(this)},enumerable:!0,configurable:!0}),e.prototype.getFollowedSitesUri=function(){return this.clone(e,"FollowedSitesUri").get().then(function(t){return t.FollowedSitesUri||t})},e.prototype.getFollowedDocumentsUri=function(){return this.clone(e,"FollowedDocumentsUri").get().then(function(t){return t.FollowedDocumentsUri||t})},e.prototype.follow=function(t){return this.clone(e,"follow").postCore({body:this.createSocialActorInfoRequestBody(t)})},e.prototype.isFollowed=function(t){return this.clone(e,"isfollowed").postCore({body:this.createSocialActorInfoRequestBody(t)})},e.prototype.stopFollowing=function(t){return this.clone(e,"stopfollowing").postCore({body:this.createSocialActorInfoRequestBody(t)})},e.prototype.createSocialActorInfoRequestBody=function(t){return JSON.stringify({actor:i.Util.extend({Id:null,__metadata:{type:"SP.Social.SocialActorInfo"}},t)})},e}(o.SharePointQueryableInstance);e.SocialQuery=a;var s=function(t){function e(e,n){return void 0===n&&(n="my"),t.call(this,e,n)||this}return r(e,t),e.prototype.followed=function(t){return this.clone(e,"followed(types="+t+")").get().then(function(t){return t.hasOwnProperty("Followed")?t.Followed.results:t})},e.prototype.followedCount=function(t){return this.clone(e,"followedcount(types="+t+")").get().then(function(t){return t.FollowedCount||t})},e.prototype.followers=function(){return this.clone(e,"followers").get().then(function(t){return t.hasOwnProperty("Followers")?t.Followers.results:t})},e.prototype.suggestions=function(){return this.clone(e,"suggestions").get().then(function(t){return t.hasOwnProperty("Suggestions")?t.Suggestions.results:t})},e}(o.SharePointQueryableInstance);e.MySocialQuery=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(1),a=n(49),s=n(30),u=function(t){function e(n,r){return t.call(this,e.getBaseUrl(n),"_api/SP.Utilities.Utility."+r)||this}return r(e,t),e.getBaseUrl=function(t){if("string"==typeof t)return t;var e=t,n=e.toUrl(),r=n.indexOf("_api/");return r<0?n:n.substr(0,r)},e.prototype.excute=function(t){return this.postAsCore({body:JSON.stringify(t)})},e.prototype.sendEmail=function(t){var n={properties:{Body:t.Body,From:t.From,Subject:t.Subject,__metadata:{type:"SP.Utilities.EmailProperties"}}};return t.To&&t.To.length>0&&(n.properties=i.Util.extend(n.properties,{To:{results:t.To}})),t.CC&&t.CC.length>0&&(n.properties=i.Util.extend(n.properties,{CC:{results:t.CC}})),t.BCC&&t.BCC.length>0&&(n.properties=i.Util.extend(n.properties,{BCC:{results:t.BCC}})),t.AdditionalHeaders&&(n.properties=i.Util.extend(n.properties,{AdditionalHeaders:t.AdditionalHeaders})),this.clone(e,"SendEmail",!0).excute(n)},e.prototype.getCurrentUserEmailAddresses=function(){return this.clone(e,"GetCurrentUserEmailAddresses",!0).excute({})},e.prototype.resolvePrincipal=function(t,n,r,o,i,a){void 0===a&&(a=!1);var s={addToUserInfoList:i,input:t,inputIsEmailOnly:o,matchUserInfoList:a,scopes:n,sources:r};return this.clone(e,"ResolvePrincipalInCurrentContext",!0).excute(s)},e.prototype.searchPrincipals=function(t,n,r,o,i){var a={groupName:o,input:t,maxCount:i,scopes:n,sources:r};return this.clone(e,"SearchPrincipalsUsingContextWeb",!0).excute(a)},e.prototype.createEmailBodyForInvitation=function(t){var n={pageAddress:t};return this.clone(e,"CreateEmailBodyForInvitation",!0).excute(n)},e.prototype.expandGroupsToPrincipals=function(t,n){void 0===n&&(n=30);var r={inputs:t,maxCount:n};return this.clone(e,"ExpandGroupsToPrincipals",!0).excute(r)},e.prototype.createWikiPage=function(t){return this.clone(e,"CreateWikiPageInContextWeb",!0).excute({parameters:t}).then(function(t){return{data:t,file:new a.File(s.spExtractODataId(t))}})},e}(o.SharePointQueryable);e.UtilityMethod=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(33),i=n(59),a=function(){function t(){this._impl=o.RuntimeConfig.graphFetchClientFactory()}return t.prototype.fetch=function(t,e){void 0===e&&(e={});var n=new Headers;i.mergeHeaders(n,o.RuntimeConfig.graphHeaders),i.mergeHeaders(n,e.headers);var a=r.Util.extend(e,{headers:n});return this.fetchRaw(t,a)},t.prototype.fetchRaw=function(t,e){var n=this;void 0===e&&(e={});var o=new Headers;i.mergeHeaders(o,e.headers),e=r.Util.extend(e,{headers:o});var a=function(o){n._impl.fetch(t,{},e).then(function(t){return o.resolve(t)}).catch(function(t){429!==t.status&&503!==t.status&&o.reject(t);var e=o.delay;o.delay*=2,o.attempts++,o.retryCount<=o.attempts&&o.reject(t),setTimeout(r.Util.getCtxCallback(n,a,o),e)})};return new Promise(function(t,e){var r={attempts:0,delay:100,reject:e,resolve:t,retryCount:7};a.call(n,r)})},t.prototype.get=function(t,e){void 0===e&&(e={});var n=r.Util.extend(e,{method:"GET"});return this.fetch(t,n)},t.prototype.post=function(t,e){void 0===e&&(e={});var n=r.Util.extend(e,{method:"POST"});return this.fetch(t,n)},t.prototype.patch=function(t,e){void 0===e&&(e={});var n=r.Util.extend(e,{method:"PATCH"});return this.fetch(t,n)},t.prototype.delete=function(t,e){void 0===e&&(e={});var n=r.Util.extend(e,{method:"DELETE"});return this.fetch(t,n)},t}();e.GraphHttpClient=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(76),o=n(20),i=function(){function t(t,e,n){this.wrappedProvider=t,this.store=n||this.selectPnPCache(),this.cacheKey="_configcache_"+e}return t.prototype.getWrappedProvider=function(){return this.wrappedProvider},t.prototype.getConfiguration=function(){var t=this;if(!this.store||!this.store.enabled)return this.wrappedProvider.getConfiguration();var e=this.store.get(this.cacheKey);if(e)return new Promise(function(t){t(e)});var n=this.wrappedProvider.getConfiguration();return n.then(function(e){t.store.put(t.cacheKey,e)}),n},t.prototype.selectPnPCache=function(){var t=new r.PnPClientStorage;if(t.local&&t.local.enabled)return t.local;if(t.session&&t.session.enabled)return t.session;throw new o.NoCacheAvailableException},t}();e.default=i},function(t,e,n){n(175),n(376),t.exports=n(377)},function(t,e,n){"use strict";"undefined"==typeof Promise&&(n(176).enable(),window.Promise=n(178)),n(179),Object.assign=n(180),n(181),n(320)},function(t,e,n){"use strict";function r(){c=!1,s._47=null,s._71=null}function o(t){function e(e){(t.allRejections||a(p[e].error,t.whitelist||u))&&(p[e].displayId=l++,t.onUnhandled?(p[e].logged=!0,t.onUnhandled(p[e].displayId,p[e].error)):(p[e].logged=!0,i(p[e].displayId,p[e].error)))}function n(e){p[e].logged&&(t.onHandled?t.onHandled(p[e].displayId,p[e].error):p[e].onUnhandled||(console.warn("Promise Rejection Handled (id: "+p[e].displayId+"):"),console.warn(\'  This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id \'+p[e].displayId+".")))}t=t||{},c&&r(),c=!0;var o=0,l=0,p={};s._47=function(t){2===t._83&&p[t._56]&&(p[t._56].logged?n(t._56):clearTimeout(p[t._56].timeout),delete p[t._56])},s._71=function(t,n){0===t._75&&(t._56=o++,p[t._56]={displayId:null,error:n,timeout:setTimeout(e.bind(null,t._56),a(n,u)?100:2e3),logged:!1})}}function i(t,e){console.warn("Possible Unhandled Promise Rejection (id: "+t+"):"),((e&&(e.stack||e))+"").split("\\n").forEach(function(t){console.warn("  "+t)})}function a(t,e){return e.some(function(e){return t instanceof e})}var s=n(118),u=[ReferenceError,TypeError,RangeError],c=!1;e.disable=r,e.enable=o},function(t,e,n){"use strict";(function(e){function n(t){a.length||(i(),s=!0),a[a.length]=t}function r(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>c){for(var e=0,n=a.length-u;e<n;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,s=!1}function o(t){return function(){function e(){clearTimeout(n),clearInterval(r),t()}var n=setTimeout(e,0),r=setInterval(e,50)}}t.exports=n;var i,a=[],s=!1,u=0,c=1024,l=void 0!==e?e:self,p=l.MutationObserver||l.WebKitMutationObserver;i="function"==typeof p?function(t){var e=1,n=new p(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}(r):o(r),n.requestFlush=i,n.makeRequestCallFromTimer=o}).call(e,n(62))},function(t,e,n){"use strict";function r(t){var e=new o(o._44);return e._83=1,e._18=t,e}var o=n(118);t.exports=o;var i=r(!0),a=r(!1),s=r(null),u=r(void 0),c=r(0),l=r("");o.resolve=function(t){if(t instanceof o)return t;if(null===t)return s;if(void 0===t)return u;if(!0===t)return i;if(!1===t)return a;if(0===t)return c;if(""===t)return l;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new o(e.bind(t))}catch(t){return new o(function(e,n){n(t)})}return r(t)},o.all=function(t){var e=Array.prototype.slice.call(t);return new o(function(t,n){function r(a,s){if(s&&("object"==typeof s||"function"==typeof s)){if(s instanceof o&&s.then===o.prototype.then){for(;3===s._83;)s=s._18;return 1===s._83?r(a,s._18):(2===s._83&&n(s._18),void s.then(function(t){r(a,t)},n))}var u=s.then;if("function"==typeof u)return void new o(u.bind(s)).then(function(t){r(a,t)},n)}e[a]=s,0==--i&&t(e)}if(0===e.length)return t([]);for(var i=e.length,a=0;a<e.length;a++)r(a,e[a])})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){t.forEach(function(t){o.resolve(t).then(e,n)})})},o.prototype.catch=function(t){return this.then(null,t)}},function(t,e){!function(t){"use strict";function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\\-#$%&\'*+.\\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!=typeof t&&(t=String(t)),t}function r(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return v.iterable&&(e[Symbol.iterator]=function(){return e}),e}function o(t){this.map={},t instanceof o?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function i(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function a(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function s(t){var e=new FileReader,n=a(e);return e.readAsArrayBuffer(t),n}function u(t){var e=new FileReader,n=a(e);return e.readAsText(t),n}function c(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}function l(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(v.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(v.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(v.arrayBuffer&&v.blob&&b(t))this._bodyArrayBuffer=l(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!v.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!_(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=l(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},v.blob&&(this.blob=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?i(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(s)}),this.text=function(){var t=i(this);if(t)return t;if(this._bodyBlob)return u(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(c(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},v.formData&&(this.formData=function(){return this.text().then(d)}),this.json=function(){return this.text().then(JSON.parse)},this}function f(t){var e=t.toUpperCase();return P.indexOf(e)>-1?e:t}function h(t,e){e=e||{};var n=e.body;if(t instanceof h){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new o(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new o(e.headers)),this.method=f(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function d(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\\+/g," "),o=n.join("=").replace(/\\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(o))}}),e}function y(t){var e=new o;return t.replace(/\\r?\\n[\\t ]+/g," ").split(/\\r?\\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();e.append(r,o)}}),e}function g(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new o(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var v={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(v.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(t){return t&&DataView.prototype.isPrototypeOf(t)},_=ArrayBuffer.isView||function(t){return t&&m.indexOf(Object.prototype.toString.call(t))>-1};o.prototype.append=function(t,r){t=e(t),r=n(r);var o=this.map[t];this.map[t]=o?o+","+r:r},o.prototype.delete=function(t){delete this.map[e(t)]},o.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},o.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},o.prototype.set=function(t,r){this.map[e(t)]=n(r)},o.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},o.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),r(t)},o.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),r(t)},o.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),r(t)},v.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var P=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.clone=function(){return new h(this,{body:this._bodyInit})},p.call(h.prototype),p.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},g.error=function(){var t=new g(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];g.redirect=function(t,e){if(-1===w.indexOf(e))throw new RangeError("Invalid status code");return new g(null,{status:e,headers:{location:t}})},t.Headers=o,t.Request=h,t.Response=g,t.fetch=function(t,e){return new Promise(function(n,r){var o=new h(t,e),i=new XMLHttpRequest;i.onload=function(){var t={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};t.url="responseURL"in i?i.responseURL:t.headers.get("X-Request-URL");var e="response"in i?i.response:i.responseText;n(new g(e,t))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&v.blob&&(i.responseType="blob"),o.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,s,u=r(t),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)i.call(n,l)&&(u[l]=n[l]);if(o){s=o(n);for(var p=0;p<s.length;p++)a.call(n,s[p])&&(u[s[p]]=n[s[p]])}}return u}},function(t,e,n){n(182),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(262),n(263),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(136),n(286),n(287),n(138),n(288),n(289),n(290),n(291),n(292),n(141),n(143),n(144),n(294),n(295),n(296),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),t.exports=n(24)},function(t,e,n){"use strict";var r=n(3),o=n(14),i=n(8),a=n(0),s=n(16),u=n(36).KEY,c=n(4),l=n(63),p=n(50),f=n(40),h=n(7),d=n(120),y=n(83),g=n(183),v=n(66),m=n(2),b=n(5),_=n(17),P=n(25),w=n(39),S=n(42),O=n(123),x=n(18),C=n(9),I=n(51),T=x.f,j=C.f,E=O.f,U=r.Symbol,A=r.JSON,F=A&&A.stringify,R="prototype",M=h("_hidden"),D=h("toPrimitive"),k={}.propertyIsEnumerable,L=l("symbol-registry"),B=l("symbols"),N=l("op-symbols"),Q=Object[R],q="function"==typeof U,H=r.QObject,W=!H||!H[R]||!H[R].findChild,G=i&&c(function(){return 7!=S(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=T(Q,e);r&&delete Q[e],j(t,e,n),r&&t!==Q&&j(Q,e,r)}:j,z=function(t){var e=B[t]=S(U[R]);return e._k=t,e},V=q&&"symbol"==typeof U.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof U},$=function(t,e,n){return t===Q&&$(N,e,n),m(t),e=P(e,!0),m(n),o(B,e)?(n.enumerable?(o(t,M)&&t[M][e]&&(t[M][e]=!1),n=S(n,{enumerable:w(0,!1)})):(o(t,M)||j(t,M,w(1,{})),t[M][e]=!0),G(t,e,n)):j(t,e,n)},J=function(t,e){m(t);for(var n,r=g(e=_(e)),o=0,i=r.length;i>o;)$(t,n=r[o++],e[n]);return t},K=function(t,e){return void 0===e?S(t):J(S(t),e)},X=function(t){var e=k.call(this,t=P(t,!0));return!(this===Q&&o(B,t)&&!o(N,t))&&(!(e||!o(this,t)||!o(B,t)||o(this,M)&&this[M][t])||e)},Z=function(t,e){if(t=_(t),e=P(e,!0),t!==Q||!o(B,e)||o(N,e)){var n=T(t,e);return!n||!o(B,e)||o(t,M)&&t[M][e]||(n.enumerable=!0),n}},Y=function(t){for(var e,n=E(_(t)),r=[],i=0;n.length>i;)o(B,e=n[i++])||e==M||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===Q,r=E(n?N:_(t)),i=[],a=0;r.length>a;)!o(B,e=r[a++])||n&&!o(Q,e)||i.push(B[e]);return i};q||(U=function(){if(this instanceof U)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===Q&&e.call(N,n),o(this,M)&&o(this[M],t)&&(this[M][t]=!1),G(this,t,w(1,n))};return i&&W&&G(Q,t,{configurable:!0,set:e}),z(t)},s(U[R],"toString",function(){return this._k}),x.f=Z,C.f=$,n(43).f=O.f=Y,n(56).f=X,n(65).f=tt,i&&!n(37)&&s(Q,"propertyIsEnumerable",X,!0),d.f=function(t){return z(h(t))}),a(a.G+a.W+a.F*!q,{Symbol:U});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var rt=I(h.store),ot=0;rt.length>ot;)y(rt[ot++]);a(a.S+a.F*!q,"Symbol",{for:function(t){return o(L,t+="")?L[t]:L[t]=U(t)},keyFor:function(t){if(!V(t))throw TypeError(t+" is not a symbol!");for(var e in L)if(L[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!q,"Object",{create:K,defineProperty:$,defineProperties:J,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Y,getOwnPropertySymbols:tt}),A&&a(a.S+a.F*(!q||c(function(){var t=U();return"[null]"!=F([t])||"{}"!=F({a:t})||"{}"!=F(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(b(e)||void 0!==t)&&!V(t))return v(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!V(e))return e}),r[1]=e,F.apply(A,r)}}),U[R][D]||n(15)(U[R],D,U[R].valueOf),p(U,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(t,e,n){var r=n(51),o=n(65),i=n(56);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,s=n(t),u=i.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(0);r(r.S,"Object",{create:n(42)})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(8),"Object",{defineProperty:n(9).f})},function(t,e,n){var r=n(0);r(r.S+r.F*!n(8),"Object",{defineProperties:n(122)})},function(t,e,n){var r=n(17),o=n(18).f;n(28)("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},function(t,e,n){var r=n(11),o=n(19);n(28)("getPrototypeOf",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(11),o=n(51);n(28)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){n(28)("getOwnPropertyNames",function(){return n(123).f})},function(t,e,n){var r=n(5),o=n(36).onFreeze;n(28)("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(5),o=n(36).onFreeze;n(28)("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(5),o=n(36).onFreeze;n(28)("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},function(t,e,n){var r=n(5);n(28)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(5);n(28)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(5);n(28)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(0);r(r.S+r.F,"Object",{assign:n(124)})},function(t,e,n){var r=n(0);r(r.S,"Object",{is:n(199)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){var r=n(0);r(r.S,"Object",{setPrototypeOf:n(87).set})},function(t,e,n){"use strict";var r=n(57),o={};o[n(7)("toStringTag")]="z",o+""!="[object z]"&&n(16)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(0);r(r.P,"Function",{bind:n(125)})},function(t,e,n){var r=n(9).f,o=Function.prototype,i=/^\\s*function ([^ (]*)/,a="name";a in o||n(8)&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(5),o=n(19),i=n(7)("hasInstance"),a=Function.prototype;i in a||n(9).f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(0),o=n(127);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(t,e,n){var r=n(0),o=n(128);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(t,e,n){"use strict";var r=n(3),o=n(14),i=n(22),a=n(89),s=n(25),u=n(4),c=n(43).f,l=n(18).f,p=n(9).f,f=n(52).trim,h="Number",d=r[h],y=d,g=d.prototype,v=i(n(42)(g))==h,m="trim"in String.prototype,b=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=m?e.trim():f(e,3);var n,r,o,i=e.charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,u=e.slice(2),c=0,l=u.length;c<l;c++)if((a=u.charCodeAt(c))<48||a>o)return NaN;return parseInt(u,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(v?u(function(){g.valueOf.call(n)}):i(n)!=h)?a(new y(b(e)),n,d):b(e)};for(var _,P=n(8)?c(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;P.length>w;w++)o(y,_=P[w])&&!o(d,_)&&p(d,_,l(y,_));d.prototype=g,g.constructor=d,n(16)(r,h,d)}},function(t,e,n){"use strict";var r=n(0),o=n(27),i=n(129),a=n(90),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",p="0",f=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call(p,7-n.length)+n}return e},y=function(t,e,n){return 0===e?n:e%2==1?y(t,e-1,n*t):y(t*t,e/2,n)},g=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(4)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,u=i(this,l),c=o(t),v="",m=p;if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(v="-",u=-u),u>1e-21)if(e=g(u*y(2,69,1))-69,n=e<0?u*y(2,-e,1):u/y(2,e,1),n*=4503599627370496,(e=52-e)>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(y(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<<r),f(1,1),h(2),m=d()}else f(0,n),f(1<<-e,0),m=d()+a.call(p,c);return c>0?(s=m.length,m=v+(s<=c?"0."+a.call(p,c-s)+m:m.slice(0,s-c)+"."+m.slice(s-c))):m=v+m,m}})},function(t,e,n){"use strict";var r=n(0),o=n(4),i=n(129),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(0),o=n(3).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Number",{isInteger:n(130)})},function(t,e,n){var r=n(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(0),o=n(130),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},function(t,e,n){var r=n(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(0),o=n(128);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(t,e,n){var r=n(0),o=n(127);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(t,e,n){var r=n(0),o=n(131),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var o=n(0),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:r})},function(t,e,n){var r=n(0),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(0),o=n(91);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(0),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},function(t,e,n){var r=n(0),o=n(92);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(t,e,n){var r=n(0);r(r.S,"Math",{fround:n(132)})},function(t,e,n){var r=n(0),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,s=arguments.length,u=0;a<s;)n=o(arguments[a++]),u<n?(r=u/n,i=i*r*r+1,u=n):n>0?(r=n/u,i+=r*r):i+=n;return u===1/0?1/0:u*Math.sqrt(i)}})},function(t,e,n){var r=n(0),o=Math.imul;r(r.S+r.F*n(4)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,e){var n=65535,r=+t,o=+e,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(0);r(r.S,"Math",{log1p:n(131)})},function(t,e,n){var r=n(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(0);r(r.S,"Math",{sign:n(91)})},function(t,e,n){var r=n(0),o=n(92),i=Math.exp;r(r.S+r.F*n(4)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(0),o=n(92),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(0),o=n(41),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(0),o=n(17),i=n(10);r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(t,e,n){"use strict";n(52)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(93)(!0);n(94)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){"use strict";var r=n(0),o=n(93)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(0),o=n(10),i=n(96),a="endsWith",s=""[a];r(r.P+r.F*n(97)(a),"String",{endsWith:function(t){var e=i(this,t,a),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),u=void 0===n?r:Math.min(o(n),r),c=String(t);return s?s.call(e,c,u):e.slice(u-c.length,u)===c}})},function(t,e,n){"use strict";var r=n(0),o=n(96),i="includes";r(r.P+r.F*n(97)(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(0);r(r.P,"String",{repeat:n(90)})},function(t,e,n){"use strict";var r=n(0),o=n(10),i=n(96),a="startsWith",s=""[a];r(r.P+r.F*n(97)(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return s?s.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(13)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){"use strict";n(13)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(13)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(13)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(13)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(13)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(13)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(13)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(13)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(13)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(13)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(13)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(13)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(0),o=n(11),i=n(25);r(r.P+r.F*n(4)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(0),o=n(261);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},function(t,e,n){"use strict";var r=n(4),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-5e13-1))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(t,e,n){var r=Date.prototype,o="Invalid Date",i="toString",a=r[i],s=r.getTime;new Date(NaN)+""!=o&&n(16)(r,i,function(){var t=s.call(this);return t===t?a.call(this):o})},function(t,e,n){var r=n(7)("toPrimitive"),o=Date.prototype;r in o||n(15)(o,r,n(264))},function(t,e,n){"use strict";var r=n(2),o=n(25),i="number";t.exports=function(t){if("string"!==t&&t!==i&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),t!=i)}},function(t,e,n){var r=n(0);r(r.S,"Array",{isArray:n(66)})},function(t,e,n){"use strict";var r=n(21),o=n(0),i=n(11),a=n(133),s=n(98),u=n(10),c=n(99),l=n(100);o(o.S+o.F*!n(68)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,p,f=i(t),h="function"==typeof this?this:Array,d=arguments.length,y=d>1?arguments[1]:void 0,g=void 0!==y,v=0,m=l(f);if(g&&(y=r(y,d>2?arguments[2]:void 0,2)),void 0==m||h==Array&&s(m))for(e=u(f.length),n=new h(e);e>v;v++)c(n,v,g?y(f[v],v):f[v]);else for(p=m.call(f),n=new h;!(o=p.next()).done;v++)c(n,v,g?a(p,y,[o.value,v],!0):o.value);return n.length=v,n}})},function(t,e,n){"use strict";var r=n(0),o=n(99);r(r.S+r.F*n(4)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(0),o=n(17),i=[].join;r(r.P+r.F*(n(55)!=Object||!n(23)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(0),o=n(86),i=n(22),a=n(41),s=n(10),u=[].slice;r(r.P+r.F*n(4)(function(){o&&u.call(o)}),"Array",{slice:function(t,e){var n=s(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var o=a(t,n),c=a(e,n),l=s(c-o),p=new Array(l),f=0;f<l;f++)p[f]="String"==r?this.charAt(o+f):this[o+f];return p}})},function(t,e,n){"use strict";var r=n(0),o=n(12),i=n(11),a=n(4),s=[].sort,u=[1,2,3];r(r.P+r.F*(a(function(){u.sort(void 0)})||!a(function(){u.sort(null)})||!n(23)(s)),"Array",{sort:function(t){return void 0===t?s.call(i(this)):s.call(i(this),o(t))}})},function(t,e,n){"use strict";var r=n(0),o=n(29)(0),i=n(23)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},function(t,e,n){var r=n(5),o=n(66),i=n(7)("species");t.exports=function(t){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(0),o=n(29)(1);r(r.P+r.F*!n(23)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(29)(2);r(r.P+r.F*!n(23)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(29)(3);r(r.P+r.F*!n(23)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(29)(4);r(r.P+r.F*!n(23)([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(134);r(r.P+r.F*!n(23)([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){"use strict";var r=n(0),o=n(134);r(r.P+r.F*!n(23)([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(0),o=n(64)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(23)(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(0),o=n(17),i=n(27),a=n(10),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(23)(s)),"Array",{lastIndexOf:function(t){if(u)return s.apply(this,arguments)||0;var e=o(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(0);r(r.P,"Array",{copyWithin:n(135)}),n(38)("copyWithin")},function(t,e,n){var r=n(0);r(r.P,"Array",{fill:n(102)}),n(38)("fill")},function(t,e,n){"use strict";var r=n(0),o=n(29)(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(38)(i)},function(t,e,n){"use strict";var r=n(0),o=n(29)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(38)(i)},function(t,e,n){n(44)("Array")},function(t,e,n){var r=n(3),o=n(89),i=n(9).f,a=n(43).f,s=n(67),u=n(69),c=r.RegExp,l=c,p=c.prototype,f=/a/g,h=/a/g,d=new c(f)!==f;if(n(8)&&(!d||n(4)(function(){return h[n(7)("match")]=!1,c(f)!=f||c(h)==h||"/a/i"!=c(f,"i")}))){c=function(t,e){var n=this instanceof c,r=s(t),i=void 0===e;return!n&&r&&t.constructor===c&&i?t:o(d?new l(r&&!i?t.source:t,e):l((r=t instanceof c)?t.source:t,r&&i?u.call(t):e),n?this:p,c)};for(var y=a(l),g=0;y.length>g;)!function(t){t in c||i(c,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})}(y[g++]);p.constructor=c,c.prototype=p,n(16)(r,"RegExp",c)}n(44)("RegExp")},function(t,e,n){"use strict";n(138);var r=n(2),o=n(69),i=n(8),a="toString",s=/./[a],u=function(t){n(16)(RegExp.prototype,a,t,!0)};n(4)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):s.name!=a&&u(function(){return s.call(this)})},function(t,e,n){n(70)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(70)("replace",2,function(t,e,n){return[function(r,o){"use strict";var i=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},function(t,e,n){n(70)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(70)("split",2,function(t,e,r){"use strict";var o=n(67),i=r,a=[].push,s="split",u="length",c="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[u]||2!="ab"[s](/(?:ab)*/)[u]||4!="."[s](/(.?)(.?)/)[u]||"."[s](/()()/)[u]>1||""[s](/.?/)[u]){var l=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!o(t))return i.call(n,t,e);var r,s,p,f,h,d=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,v=void 0===e?4294967295:e>>>0,m=new RegExp(t.source,y+"g");for(l||(r=new RegExp("^"+m.source+"$(?!\\\\s)",y));(s=m.exec(n))&&!((p=s.index+s[0][u])>g&&(d.push(n.slice(g,s.index)),!l&&s[u]>1&&s[0].replace(r,function(){for(h=1;h<arguments[u]-2;h++)void 0===arguments[h]&&(s[h]=void 0)}),s[u]>1&&s.index<n[u]&&a.apply(d,s.slice(1)),f=s[0][u],g=p,d[u]>=v));)m[c]===s.index&&m[c]++;return g===n[u]?!f&&m.test("")||d.push(""):d.push(n.slice(g)),d[u]>v?d.slice(0,v):d}}else"0"[s](void 0,0)[u]&&(r=function(t,e){return void 0===t&&0===e?[]:i.call(this,t,e)});return[function(n,o){var i=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,i,o):r.call(String(i),n,o)},r]})},function(t,e,n){"use strict";var r,o,i,a,s=n(37),u=n(3),c=n(21),l=n(57),p=n(0),f=n(5),h=n(12),d=n(45),y=n(46),g=n(103),v=n(139).set,m=n(104)(),b=n(105),_=n(140),P=n(106),w=n(293),S="Promise",O=u.TypeError,x=u.process,C=x&&x.versions,I=C&&C.v8||"",T=u[S],j="process"==l(x),E=function(){},U=o=b.f,A=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[n(7)("species")]=function(t){t(E,E)};return(j||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof e&&0!==I.indexOf("6.6")&&-1===P.indexOf("Chrome/66")}catch(t){}}(),F=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},R=function(t,e){if(!t._n){t._n=!0;var n=t._c;m(function(){for(var r=t._v,o=1==t._s,i=0;n.length>i;)!function(e){var n,i,a,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2==t._h&&k(t),t._h=1),!0===s?n=r:(l&&l.enter(),n=s(r),l&&(l.exit(),a=!0)),n===e.promise?c(O("Promise-chain cycle")):(i=F(n))?i.call(n,u,c):u(n)):c(r)}catch(t){l&&!a&&l.exit(),c(t)}}(n[i++]);t._c=[],t._n=!1,e&&!t._h&&M(t)})}},M=function(t){v.call(u,function(){var e,n,r,o=t._v,i=D(t);if(i&&(e=_(function(){j?x.emit("unhandledRejection",o,t):(n=u.onunhandledrejection)?n({promise:t,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=j||D(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},D=function(t){return 1!==t._h&&0===(t._a||t._c).length},k=function(t){v.call(u,function(){var e;j?x.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},L=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},B=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw O("Promise can\'t be resolved itself");(e=F(t))?m(function(){var r={_w:n,_d:!1};try{e.call(t,c(B,r,1),c(L,r,1))}catch(t){L.call(r,t)}}):(n._v=t,n._s=1,R(n,!1))}catch(t){L.call({_w:n,_d:!1},t)}}};A||(T=function(t){d(this,T,S,"_h"),h(t),r.call(this);try{t(c(B,this,1),c(L,this,1))}catch(t){L.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(47)(T.prototype,{then:function(t,e){var n=U(g(this,T));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=j?x.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=c(B,t,1),this.reject=c(L,t,1)},b.f=U=function(t){return t===T||t===a?new i(t):o(t)}),p(p.G+p.W+p.F*!A,{Promise:T}),n(50)(T,S),n(44)(S),a=n(24)[S],p(p.S+p.F*!A,S,{reject:function(t){var e=U(this);return(0,e.reject)(t),e.promise}}),p(p.S+p.F*(s||!A),S,{resolve:function(t){return w(s&&this===a?T:this,t)}}),p(p.S+p.F*!(A&&n(68)(function(t){T.all(t).catch(E)})),S,{all:function(t){var e=this,n=U(e),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;y(t,!1,function(t){var s=i++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=U(e),r=n.reject,o=_(function(){y(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(t,e,n){var r=n(2),o=n(5),i=n(105);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(145),o=n(53),i="WeakSet";n(71)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,i),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(0),o=n(72),i=n(107),a=n(2),s=n(41),u=n(10),c=n(5),l=n(3).ArrayBuffer,p=n(103),f=i.ArrayBuffer,h=i.DataView,d=o.ABV&&l.isView,y=f.prototype.slice,g=o.VIEW,v="ArrayBuffer";r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!o.CONSTR,v,{isView:function(t){return d&&d(t)||c(t)&&g in t}}),r(r.P+r.U+r.F*n(4)(function(){return!new f(2).slice(1,void 0).byteLength}),v,{slice:function(t,e){if(void 0!==y&&void 0===e)return y.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),o=s(void 0===e?n:e,n),i=new(p(this,f))(u(o-r)),c=new h(this),l=new h(i),d=0;r<o;)l.setUint8(d++,c.getUint8(r++));return i}}),n(44)(v)},function(t,e,n){var r=n(0);r(r.G+r.W+r.F*!n(72).ABV,{DataView:n(107).DataView})},function(t,e,n){n(31)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(31)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(31)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){n(31)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(31)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(31)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(31)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(31)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(31)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){var r=n(0),o=n(12),i=n(2),a=(n(3).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(4)(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=o(t),u=i(n);return a?a(r,e,u):s.call(r,e,u)}})},function(t,e,n){var r=n(0),o=n(42),i=n(12),a=n(2),s=n(5),u=n(4),c=n(125),l=(n(3).Reflect||{}).construct,p=u(function(){function t(){}return!(l(function(){},[],t)instanceof t)}),f=!u(function(){l(function(){})});r(r.S+r.F*(p||f),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(f&&!p)return l(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(c.apply(t,r))}var u=n.prototype,h=o(s(u)?u:Object.prototype),d=Function.apply.call(t,h,e);return s(d)?d:h}})},function(t,e,n){var r=n(9),o=n(0),i=n(2),a=n(25);o(o.S+o.F*n(4)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){i(t),e=a(e,!0),i(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},function(t,e,n){var r=n(0),o=n(18).f,i=n(2);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},function(t,e,n){"use strict";var r=n(0),o=n(2),i=function(t){this._t=o(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(95)(i,"Object",function(){var t,e=this,n=e._k;do{if(e._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},function(t,e,n){function r(t,e){var n,s,l=arguments.length<3?t:arguments[2];return c(t)===l?t[e]:(n=o.f(t,e))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:u(s=i(t))?r(s,e,l):void 0}var o=n(18),i=n(19),a=n(14),s=n(0),u=n(5),c=n(2);s(s.S,"Reflect",{get:r})},function(t,e,n){var r=n(18),o=n(0),i=n(2);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},function(t,e,n){var r=n(0),o=n(19),i=n(2);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(0),o=n(2),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},function(t,e,n){var r=n(0);r(r.S,"Reflect",{ownKeys:n(147)})},function(t,e,n){var r=n(0),o=n(2),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},function(t,e,n){function r(t,e,n){var u,f,h=arguments.length<4?t:arguments[3],d=i.f(l(t),e);if(!d){if(p(f=a(t)))return r(f,e,n,h);d=c(0)}if(s(d,"value")){if(!1===d.writable||!p(h))return!1;if(u=i.f(h,e)){if(u.get||u.set||!1===u.writable)return!1;u.value=n,o.f(h,e,u)}else o.f(h,e,c(0,n));return!0}return void 0!==d.set&&(d.set.call(h,n),!0)}var o=n(9),i=n(18),a=n(19),s=n(14),u=n(0),c=n(39),l=n(2),p=n(5);u(u.S,"Reflect",{set:r})},function(t,e,n){var r=n(0),o=n(87);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),t.exports=n(24)},function(t,e,n){"use strict";var r=n(0),o=n(64)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(38)("includes")},function(t,e,n){"use strict";var r=n(0),o=n(148),i=n(11),a=n(10),s=n(12),u=n(101);r(r.P,"Array",{flatMap:function(t){var e,n,r=i(this);return s(t),e=a(r.length),n=u(r,0),o(n,r,r,e,0,1,t,arguments[1]),n}}),n(38)("flatMap")},function(t,e,n){"use strict";var r=n(0),o=n(148),i=n(11),a=n(10),s=n(27),u=n(101);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=i(this),n=a(e.length),r=u(e,0);return o(r,e,e,n,0,void 0===t?1:s(t)),r}}),n(38)("flatten")},function(t,e,n){"use strict";var r=n(0),o=n(93)(!0);r(r.P,"String",{at:function(t){return o(this,t)}})},function(t,e,n){"use strict";var r=n(0),o=n(149),i=n(106);r(r.P+r.F*/Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(i),"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";var r=n(0),o=n(149),i=n(106);r(r.P+r.F*/Version\\/10\\.\\d+(\\.\\d+)? Safari\\//.test(i),"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(52)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(52)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(0),o=n(26),i=n(10),a=n(67),s=n(69),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};n(95)(c,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(o(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in u?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(t.lastIndex),new c(r,e)}})},function(t,e,n){n(83)("asyncIterator")},function(t,e,n){n(83)("observable")},function(t,e,n){var r=n(0),o=n(147),i=n(17),a=n(18),s=n(99);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),u=a.f,c=o(r),l={},p=0;c.length>p;)void 0!==(n=u(r,e=c[p++]))&&s(l,e,n);return l}})},function(t,e,n){var r=n(0),o=n(150)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},function(t,e,n){var r=n(0),o=n(150)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},function(t,e,n){"use strict";var r=n(0),o=n(11),i=n(12),a=n(9);n(8)&&r(r.P+n(73),"Object",{__defineGetter__:function(t,e){a.f(o(this),t,{get:i(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(0),o=n(11),i=n(12),a=n(9);n(8)&&r(r.P+n(73),"Object",{__defineSetter__:function(t,e){a.f(o(this),t,{set:i(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(0),o=n(11),i=n(25),a=n(19),s=n(18).f;n(8)&&r(r.P+n(73),"Object",{__lookupGetter__:function(t){var e,n=o(this),r=i(t,!0);do{if(e=s(n,r))return e.get}while(n=a(n))}})},function(t,e,n){"use strict";var r=n(0),o=n(11),i=n(25),a=n(19),s=n(18).f;n(8)&&r(r.P+n(73),"Object",{__lookupSetter__:function(t){var e,n=o(this),r=i(t,!0);do{if(e=s(n,r))return e.set}while(n=a(n))}})},function(t,e,n){var r=n(0);r(r.P+r.R,"Map",{toJSON:n(151)("Map")})},function(t,e,n){var r=n(0);r(r.P+r.R,"Set",{toJSON:n(151)("Set")})},function(t,e,n){n(74)("Map")},function(t,e,n){n(74)("Set")},function(t,e,n){n(74)("WeakMap")},function(t,e,n){n(74)("WeakSet")},function(t,e,n){n(75)("Map")},function(t,e,n){n(75)("Set")},function(t,e,n){n(75)("WeakMap")},function(t,e,n){n(75)("WeakSet")},function(t,e,n){var r=n(0);r(r.G,{global:n(3)})},function(t,e,n){var r=n(0);r(r.S,"System",{global:n(3)})},function(t,e,n){var r=n(0),o=n(22);r(r.S,"Error",{isError:function(t){return"Error"===o(t)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var r=n(0),o=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*o}})},function(t,e,n){var r=n(0),o=n(153),i=n(132);r(r.S,"Math",{fscale:function(t,e,n,r,a){return i(o(t,e,n,r,a))}})},function(t,e,n){var r=n(0);r(r.S,"Math",{iaddh:function(t,e,n,r){var o=t>>>0,i=e>>>0,a=n>>>0;return i+(r>>>0)+((o&a|(o|a)&~(o+a>>>0))>>>31)|0}})},function(t,e,n){var r=n(0);r(r.S,"Math",{isubh:function(t,e,n,r){var o=t>>>0,i=e>>>0,a=n>>>0;return i-(r>>>0)-((~o&a|~(o^a)&o-a>>>0)>>>31)|0}})},function(t,e,n){var r=n(0);r(r.S,"Math",{imulh:function(t,e){var n=65535,r=+t,o=+e,i=r&n,a=o&n,s=r>>16,u=o>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>16)+((i*u>>>0)+(c&n)>>16)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var r=n(0),o=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*o}})},function(t,e,n){var r=n(0);r(r.S,"Math",{scale:n(153)})},function(t,e,n){var r=n(0);r(r.S,"Math",{umulh:function(t,e){var n=65535,r=+t,o=+e,i=r&n,a=o&n,s=r>>>16,u=o>>>16,c=(s*a>>>0)+(i*a>>>16);return s*u+(c>>>16)+((i*u>>>0)+(c&n)>>>16)}})},function(t,e,n){var r=n(0);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var r=n(0),o=n(105),i=n(140);r(r.S,"Promise",{try:function(t){var e=o.f(this),n=i(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=n(32),o=n(2),i=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,o(n),i(r))}})},function(t,e,n){var r=n(32),o=n(2),i=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:i(arguments[2]),r=a(o(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var u=s.get(e);return u.delete(n),!!u.size||s.delete(e)}})},function(t,e,n){var r=n(32),o=n(2),i=n(19),a=r.has,s=r.get,u=r.key,c=function(t,e,n){if(a(t,e,n))return s(t,e,n);var r=i(e);return null!==r?c(t,r,n):void 0};r.exp({getMetadata:function(t,e){return c(t,o(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){var r=n(143),o=n(152),i=n(32),a=n(2),s=n(19),u=i.keys,c=i.key,l=function(t,e){var n=u(t,e),i=s(t);if(null===i)return n;var a=l(i,e);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(t){return l(a(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,n){var r=n(32),o=n(2),i=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(32),o=n(2),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var r=n(32),o=n(2),i=n(19),a=r.has,s=r.key,u=function(t,e,n){if(a(t,e,n))return!0;var r=i(e);return null!==r&&u(t,r,n)};r.exp({hasMetadata:function(t,e){return u(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(32),o=n(2),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(32),o=n(2),i=n(12),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?o:i)(n),a(r))}}})},function(t,e,n){var r=n(0),o=n(104)(),i=n(3).process,a="process"==n(22)(i);r(r.G,{asap:function(t){var e=a&&i.domain;o(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(0),o=n(3),i=n(24),a=n(104)(),s=n(7)("observable"),u=n(12),c=n(2),l=n(45),p=n(47),f=n(15),h=n(46),d=h.RETURN,y=function(t){return null==t?void 0:u(t)},g=function(t){var e=t._c;e&&(t._c=void 0,e())},v=function(t){return void 0===t._o},m=function(t){v(t)||(t._o=void 0,g(t))},b=function(t,e){c(t),this._c=void 0,this._o=t,t=new _(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(e){return void t.error(e)}v(this)&&g(this)};b.prototype=p({},{unsubscribe:function(){m(this)}});var _=function(t){this._s=t};_.prototype=p({},{next:function(t){var e=this._s;if(!v(e)){var n=e._o;try{var r=y(n.next);if(r)return r.call(n,t)}catch(t){try{m(e)}finally{throw t}}}},error:function(t){var e=this._s;if(v(e))throw t;var n=e._o;e._o=void 0;try{var r=y(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{g(e)}finally{throw t}}return g(e),t},complete:function(t){var e=this._s;if(!v(e)){var n=e._o;e._o=void 0;try{var r=y(n.complete);t=r?r.call(n,t):void 0}catch(t){try{g(e)}finally{throw t}}return g(e),t}}});var P=function(t){l(this,P,"Observable","_f")._f=u(t)};p(P.prototype,{subscribe:function(t){return new b(t,this._f)},forEach:function(t){var e=this;return new(i.Promise||o.Promise)(function(n,r){u(t);var o=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),o.unsubscribe()}},error:r,complete:n})})}}),p(P,{from:function(t){var e="function"==typeof this?this:P,n=y(c(t)[s]);if(n){var r=c(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return a(function(){if(!n){try{if(h(t,!1,function(t){if(e.next(t),n)return d})===d)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t<e;)n[t]=arguments[t++];return new("function"==typeof this?this:P)(function(t){var e=!1;return a(function(){if(!e){for(var r=0;r<n.length;++r)if(t.next(n[r]),e)return;t.complete()}}),function(){e=!0}})}}),f(P.prototype,s,function(){return this}),r(r.G,{Observable:P}),n(44)("Observable")},function(t,e){!function(t,e){"use strict";function n(){if(!i){i=!0;for(var t=0;t<o.length;t++)o[t].fn.call(window,o[t].ctx);o=[]}}function r(){"complete"===document.readyState&&n()}t=t||"docReady",e=e||window;var o=[],i=!1,a=!1;e[t]=function(t,e){if(i)return void setTimeout(function(){t(e)},1);o.push({fn:t,ctx:e}),"complete"===document.readyState||!document.attachEvent&&"interactive"===document.readyState?setTimeout(n,1):a||(document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):(document.attachEvent("onreadystatechange",r),window.attachEvent("onload",n)),a=!0)}}("docReady",window)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(378),o=(n.n(r),n(157)),i=n(380),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(a=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],i=0}finally{o=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},u=this;window.docReady(function(){return a(u,void 0,void 0,function(){var t,e,n,a,u,c,l;return s(this,function(s){for(t=document.querySelectorAll(".ms-Spinner"),e=[],n=0;n<t.length;n++)a=new window.fabric.Spinner(t[n]),e.push(a);return u=new i.a,window.addEventListener("error",u.errorHandler),window.addEventListener("message",u.messageHandler),c=r(),l=c.query(!0),l.action?(l.action,o.a.updateStatusMessage("Error: Unknown or unsupported action: "+l.action),e[0].stop()):(o.a.updateStatusMessage("No Action Specified. This page is meant to be used by the Brightcove Video Connector Addin."),e[0].stop()),[2]})})})},function(t,e,n){var r,o,i;!function(a,s){"use strict";"object"==typeof t&&t.exports?t.exports=s(n(154),n(155),n(156)):(o=[n(154),n(155),n(156)],r=s,void 0!==(i="function"==typeof r?r.apply(e,o):r)&&(t.exports=i))}(0,function(t,e,n,r){"use strict";function o(t,e){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof o))return n?r?new o(t,e):new o(t):new o;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}function i(t){return/^[0-9]+$/.test(t)}function a(t){return t.replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g,"\\\\$1")}function s(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function u(t){return"Array"===s(t)}function c(t,e){var n,r,o={};if("RegExp"===s(e))o=null;else if(u(e))for(n=0,r=e.length;n<r;n++)o[e[n]]=!0;else o[e]=!0;for(n=0,r=t.length;n<r;n++)(o&&void 0!==o[t[n]]||!o&&e.test(t[n]))&&(t.splice(n,1),r--,n--);return t}function l(t,e){var n,r;if(u(e)){for(n=0,r=e.length;n<r;n++)if(!l(t,e[n]))return!1;return!0}var o=s(e);for(n=0,r=t.length;n<r;n++)if("RegExp"===o){if("string"==typeof t[n]&&t[n].match(e))return!0}else if(t[n]===e)return!0;return!1}function p(t,e){if(!u(t)||!u(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function f(t){var e=/^\\/+|\\/+$/g;return t.replace(e,"")}function h(t){return escape(t)}function d(t){return encodeURIComponent(t).replace(/[!\'()*]/g,h).replace(/\\*/g,"%2A")}function y(t){return function(e,n){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!n),this)}}function g(t,e){return function(n,r){return void 0===n?this._parts[t]||"":(null!==n&&(n+="",n.charAt(0)===e&&(n=n.substring(1))),this._parts[t]=n,this.build(!r),this)}}var v=r&&r.URI;o.version="1.19.1";var m=o.prototype,b=Object.prototype.hasOwnProperty;o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}},o.preventInvalidHostname=!1,o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\\._-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/,o.ip6_expression=/^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$/,o.find_uri_expression=/\\b((?:[a-z][\\w-]+:(?:\\/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,o.findUri={start:/\\b(?:([a-z][a-z0-9.+-]*:\\/\\/)|www\\.)/gi,end:/[\\s\\r\\n]|$/,trim:/[`!()\\[\\]{};:\'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\\([^\\)]*\\)|\\[[^\\]]*\\]|\\{[^}]*\\}|<[^>]*>)/g},o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\\.\\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return o.domAttributes[e]}},o.encode=d,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=d,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\\/\\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"\'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"\'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\\/\\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(t,e){var n=o.encode(t+"");return void 0===e&&(e=o.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},o.decodeQuery=function(t,e){t+="",void 0===e&&(e=o.escapeQuerySpace);try{return o.decode(e?t.replace(/\\+/g,"%20"):t)}catch(e){return t}};var _,P={encode:"encode",decode:"decode"},w=function(t,e){return function(n){try{return o[e](n+"").replace(o.characters[t][e].expression,function(n){return o.characters[t][e].map[n]})}catch(t){return n}}};for(_ in P)o[_+"PathSegment"]=w("pathname",P[_]),o[_+"UrnPathSegment"]=w("urnpath",P[_]);var S=function(t,e,n){return function(r){var i;i=n?function(t){return o[e](o[n](t))}:o[e];for(var a=(r+"").split(t),s=0,u=a.length;s<u;s++)a[s]=i(a[s]);return a.join(t)}};o.decodePath=S("/","decodePathSegment"),o.decodeUrnPath=S(":","decodeUrnPathSegment"),o.recodePath=S("/","encodePathSegment","decode"),o.recodeUrnPath=S(":","encodeUrnPathSegment","decode"),o.encodeReserved=w("reserved","encode"),o.parse=function(t,e){var n;return e||(e={preventInvalidHostname:o.preventInvalidHostname}),n=t.indexOf("#"),n>-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),n=t.indexOf("?"),n>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===t.substring(0,2)?(e.protocol=null,t=t.substring(2),t=o.parseAuthority(t,e)):(n=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(o.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3)?(t=t.substring(n+3),t=o.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0)),e.path=t,e},o.parseHost=function(t,e){t||(t=""),t=t.replace(/\\\\/g,"/");var n,r,i=t.indexOf("/");if(-1===i&&(i=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,i)||null,"/"===e.port&&(e.port=null);else{var a=t.indexOf(":"),s=t.indexOf("/"),u=t.indexOf(":",a+1);-1!==u&&(-1===s||u<s)?(e.hostname=t.substring(0,i)||null,e.port=null):(r=t.substring(0,i).split(":"),e.hostname=r[0]||null,e.port=r[1]||null)}return e.hostname&&"/"!==t.substring(i).charAt(0)&&(i++,t="/"+t),e.preventInvalidHostname&&o.ensureValidHostname(e.hostname,e.protocol),e.port&&o.ensureValidPort(e.port),t.substring(i)||"/"},o.parseAuthority=function(t,e){return t=o.parseUserinfo(t,e),o.parseHost(t,e)},o.parseUserinfo=function(t,e){var n,r=t.indexOf("/"),i=t.lastIndexOf("@",r>-1?r:t.length-1);return i>-1&&(-1===r||i<r)?(n=t.substring(0,i).split(":"),e.username=n[0]?o.decode(n[0]):null,n.shift(),e.password=n[0]?o.decode(n.join(":")):null,t=t.substring(i+1)):(e.username=null,e.password=null),t},o.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\\?*&*|&+$/g,"")))return{};for(var n,r,i,a={},s=t.split("&"),u=s.length,c=0;c<u;c++)n=s[c].split("="),r=o.decodeQuery(n.shift(),e),i=n.length?o.decodeQuery(n.join("="),e):null,b.call(a,r)?("string"!=typeof a[r]&&null!==a[r]||(a[r]=[a[r]]),a[r].push(i)):a[r]=i;return a},o.build=function(t){var e="";return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//"),e+=o.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&"string"==typeof t.hostname&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},o.buildHost=function(t){var e="";return t.hostname?(o.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},o.buildAuthority=function(t){return o.buildUserinfo(t)+o.buildHost(t)},o.buildUserinfo=function(t){var e="";return t.username&&(e+=o.encode(t.username)),t.password&&(e+=":"+o.encode(t.password)),e&&(e+="@"),e},o.buildQuery=function(t,e,n){var r,i,a,s,c="";for(i in t)if(b.call(t,i)&&i)if(u(t[i]))for(r={},a=0,s=t[i].length;a<s;a++)void 0!==t[i][a]&&void 0===r[t[i][a]+""]&&(c+="&"+o.buildQueryParameter(i,t[i][a],n),!0!==e&&(r[t[i][a]+""]=!0));else void 0!==t[i]&&(c+="&"+o.buildQueryParameter(i,t[i],n));return c.substring(1)},o.buildQueryParameter=function(t,e,n){return o.encodeQuery(t,n)+(null!==e?"="+o.encodeQuery(e,n):"")},o.addQuery=function(t,e,n){if("object"==typeof e)for(var r in e)b.call(e,r)&&o.addQuery(t,r,e[r]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=n);"string"==typeof t[e]&&(t[e]=[t[e]]),u(n)||(n=[n]),t[e]=(t[e]||[]).concat(n)}},o.setQuery=function(t,e,n){if("object"==typeof e)for(var r in e)b.call(e,r)&&o.setQuery(t,r,e[r]);else{if("string"!=typeof e)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");t[e]=void 0===n?null:n}},o.removeQuery=function(t,e,n){var r,i,a;if(u(e))for(r=0,i=e.length;r<i;r++)t[e[r]]=void 0;else if("RegExp"===s(e))for(a in t)e.test(a)&&(t[a]=void 0);else if("object"==typeof e)for(a in e)b.call(e,a)&&o.removeQuery(t,a,e[a]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==n?"RegExp"===s(n)?!u(t[e])&&n.test(t[e])?t[e]=void 0:t[e]=c(t[e],n):t[e]!==String(n)||u(n)&&1!==n.length?u(t[e])&&(t[e]=c(t[e],n)):t[e]=void 0:t[e]=void 0}},o.hasQuery=function(t,e,n,r){switch(s(e)){case"String":break;case"RegExp":for(var i in t)if(b.call(t,i)&&e.test(i)&&(void 0===n||o.hasQuery(t,i,n)))return!0;return!1;case"Object":for(var a in e)if(b.call(e,a)&&!o.hasQuery(t,a,e[a]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(s(n)){case"Undefined":return e in t;case"Boolean":return n===Boolean(u(t[e])?t[e].length:t[e]);case"Function":return!!n(t[e],e,t);case"Array":return!!u(t[e])&&(r?l:p)(t[e],n);case"RegExp":return u(t[e])?!!r&&l(t[e],n):Boolean(t[e]&&t[e].match(n));case"Number":n=String(n);case"String":return u(t[e])?!!r&&l(t[e],n):t[e]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},o.joinPaths=function(){for(var t=[],e=[],n=0,r=0;r<arguments.length;r++){var i=new o(arguments[r]);t.push(i);for(var a=i.segment(),s=0;s<a.length;s++)"string"==typeof a[s]&&e.push(a[s]),a[s]&&n++}if(!e.length||!n)return new o("");var u=new o("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||u.path("/"+u.path()),u.normalize()},o.commonPath=function(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n++)if(t.charAt(n)!==e.charAt(n)){n--;break}return n<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(n)&&"/"===e.charAt(n)||(n=t.substring(0,n).lastIndexOf("/")),t.substring(0,n+1))},o.withinString=function(t,e,n){n||(n={});var r=n.start||o.findUri.start,i=n.end||o.findUri.end,a=n.trim||o.findUri.trim,s=n.parens||o.findUri.parens,u=/[a-z0-9-]=["\']?$/i;for(r.lastIndex=0;;){var c=r.exec(t);if(!c)break;var l=c.index;if(n.ignoreHtml){var p=t.slice(Math.max(l-3,0),l);if(p&&u.test(p))continue}for(var f=l+t.slice(l).search(i),h=t.slice(l,f),d=-1;;){var y=s.exec(h);if(!y)break;var g=y.index+y[0].length;d=Math.max(d,g)}if(h=d>-1?h.slice(0,d)+h.slice(d).replace(a,""):h.replace(a,""),!(h.length<=c[0].length||n.ignore&&n.ignore.test(h))){f=l+h.length;var v=e(h,l,f,t);void 0!==v?(v=String(v),t=t.slice(0,l)+v+t.slice(f),r.lastIndex=l+v.length):r.lastIndex=f}}return r.lastIndex=0,t},o.ensureValidHostname=function(e,n){var r=!!e,i=!!n,a=!1;if(i&&(a=l(o.hostProtocols,n)),a&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(e&&e.match(o.invalid_hostname_characters)){if(!t)throw new TypeError(\'Hostname "\'+e+\'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available\');if(t.toASCII(e).match(o.invalid_hostname_characters))throw new TypeError(\'Hostname "\'+e+\'" contains characters other than [A-Z0-9.-:_]\')}},o.ensureValidPort=function(t){if(t){var e=Number(t);if(!(i(e)&&e>0&&e<65536))throw new TypeError(\'Port "\'+t+\'" is not a valid port\')}},o.noConflict=function(t){if(t){var e={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(e.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(e.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=r.SecondLevelDomains.noConflict()),e}return r.URI===this&&(r.URI=v),this},m.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},m.clone=function(){return new o(this)},m.valueOf=m.toString=function(){return this.build(!1)._string},m.protocol=y("protocol"),m.username=y("username"),m.password=y("password"),m.hostname=y("hostname"),m.port=y("port"),m.query=g("query","?"),m.fragment=g("fragment","#"),m.search=function(t,e){var n=this.query(t,e);return"string"==typeof n&&n.length?"?"+n:n},m.hash=function(t,e){var n=this.fragment(t,e);return"string"==typeof n&&n.length?"#"+n:n},m.pathname=function(t,e){if(void 0===t||!0===t){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?o.decodeUrnPath:o.decodePath)(n):n}return this._parts.urn?this._parts.path=t?o.recodeUrnPath(t):"":this._parts.path=t?o.recodePath(t):"/",this.build(!e),this},m.path=m.pathname,m.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=o._parts();var r=t instanceof o,i="object"==typeof t&&(t.hostname||t.path||t.pathname);if(t.nodeName&&(t=t[o.getDomAttribute(t)]||"",i=!1),!r&&i&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=o.parse(String(t),this._parts);else{if(!r&&!i)throw new TypeError("invalid input");var a=r?t._parts:t;for(n in a)"query"!==n&&b.call(this._parts,n)&&(this._parts[n]=a[n]);a.query&&this.query(a.query,!1)}return this.build(!e),this},m.is=function(t){var e=!1,r=!1,i=!1,a=!1,s=!1,u=!1,c=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,r=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),e=r||i,a=!e,s=a&&n&&n.has(this._parts.hostname),u=a&&o.idn_expression.test(this._parts.hostname),c=a&&o.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return a;case"sld":return s;case"ip":return e;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return i;case"idn":return u;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var O=m.protocol,x=m.port,C=m.hostname;m.protocol=function(t,e){if(t&&(t=t.replace(/:(\\/\\/)?$/,""),!t.match(o.protocol_expression)))throw new TypeError(\'Protocol "\'+t+"\\" contains characters other than [A-Z0-9.+-] or doesn\'t start with [A-Z]");return O.call(this,t,e)},m.scheme=m.protocol,m.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(t+="",":"===t.charAt(0)&&(t=t.substring(1)),o.ensureValidPort(t))),x.call(this,t,e))},m.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(t,n))throw new TypeError(\'Hostname "\'+t+\'" contains characters other than [A-Z0-9.-]\');t=n.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(t,this._parts.protocol)}return C.call(this,t,e)},m.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=o(t);return this.protocol(r.protocol()).authority(r.authority()).build(!e),this},m.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(t,this._parts))throw new TypeError(\'Hostname "\'+t+\'" contains characters other than [A-Z0-9.-]\');return this.build(!e),this},m.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(t,this._parts))throw new TypeError(\'Hostname "\'+t+\'" contains characters other than [A-Z0-9.-]\');return this.build(!e),this},m.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=o.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),o.parseUserinfo(t,this._parts),this.build(!e),this},m.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=o.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},m.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,r),s=new RegExp("^"+a(i));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&o.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,t),this.build(!e),this},m.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(e).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var i=new RegExp(a(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},m.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(r+1);return!0!==e&&n&&n.list[o.toLowerCase()]?n.get(this._parts.hostname)||o:o}var i;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError(\'TLD "\'+t+\'" contains characters other than [A-Z0-9]\');i=new RegExp(a(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(a(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,t)}return this.build(!e),this},m.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?o.decodePath(r):r}var i=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,i),u=new RegExp("^"+a(s));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=o.recodePath(t),this._parts.path=this._parts.path.replace(u,t),this.build(!e),this},m.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return t?o.decodePathSegment(r):r}var i=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\\.?\\//)&&(i=!0);var s=new RegExp(a(this.filename())+"$");return t=o.recodePath(t),this._parts.path=this._parts.path.replace(s,t),i?this.normalizePath(e):this.build(!e),this},m.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,i=this.filename(),s=i.lastIndexOf(".");return-1===s?"":(n=i.substring(s+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",t?o.decodePathSegment(r):r)}"."===t.charAt(0)&&(t=t.substring(1));var u,c=this.suffix();if(c)u=t?new RegExp(a(c)+"$"):new RegExp(a("."+c)+"$");else{if(!t)return this;this._parts.path+="."+o.recodePath(t)}return u&&(t=o.recodePath(t),this._parts.path=this._parts.path.replace(u,t)),this.build(!e),this},m.segment=function(t,e,n){var r=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),a=o.split(r);if(void 0!==t&&"number"!=typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error(\'Bad segment "\'+t+\'", must be 0-based integer\');if(i&&a.shift(),t<0&&(t=Math.max(a.length+t,0)),void 0===e)return void 0===t?a:a[t];if(null===t||void 0===a[t])if(u(e)){a=[];for(var s=0,c=e.length;s<c;s++)(e[s].length||a.length&&a[a.length-1].length)&&(a.length&&!a[a.length-1].length&&a.pop(),a.push(f(e[s])))}else(e||"string"==typeof e)&&(e=f(e),""===a[a.length-1]?a[a.length-1]=e:a.push(e));else e?a[t]=f(e):a.splice(t,1);return i&&a.unshift(""),this.path(a.join(r),n)},m.segmentCoded=function(t,e,n){var r,i,a;if("number"!=typeof t&&(n=e,e=t,t=void 0),void 0===e){if(r=this.segment(t,e,n),u(r))for(i=0,a=r.length;i<a;i++)r[i]=o.decode(r[i]);else r=void 0!==r?o.decode(r):void 0;return r}if(u(e))for(i=0,a=e.length;i<a;i++)e[i]=o.encode(e[i]);else e="string"==typeof e||e instanceof String?o.encode(e):e;return this.segment(t,e,n)};var I=m.query;return m.query=function(t,e){if(!0===t)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),r=t.call(this,n);return this._parts.query=o.buildQuery(r||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=o.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):I.call(this,t,e)},m.setQuery=function(t,e,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)r[t]=void 0!==e?e:null;else{if("object"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var i in t)b.call(t,i)&&(r[i]=t[i])}return this._parts.query=o.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},m.addQuery=function(t,e,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(r,t,void 0===e?null:e),this._parts.query=o.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},m.removeQuery=function(t,e,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(r,t,e),this._parts.query=o.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},m.hasQuery=function(t,e,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(r,t,e,n)},m.setSearch=m.setQuery,m.addSearch=m.addQuery,m.removeSearch=m.removeQuery,m.hasSearch=m.hasQuery,m.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},m.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},m.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},m.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},m.normalizePath=function(t){var e=this._parts.path;if(!e)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;e=o.recodePath(e);var n,r,i,a="";for("/"!==e.charAt(0)&&(n=!0,e="/"+e),"/.."!==e.slice(-3)&&"/."!==e.slice(-2)||(e+="/"),e=e.replace(/(\\/(\\.\\/)+)|(\\/\\.$)/g,"/").replace(/\\/{2,}/g,"/"),n&&(a=e.substring(1).match(/^(\\.\\.\\/)+/)||"")&&(a=a[0]);-1!==(r=e.search(/\\/\\.\\.(\\/|$)/));)0!==r?(i=e.substring(0,r).lastIndexOf("/"),-1===i&&(i=r),e=e.substring(0,i)+e.substring(r+3)):e=e.substring(3);return n&&this.is("relative")&&(e=a+e.substring(1)),this._parts.path=e,this.build(!t),this},m.normalizePathname=m.normalizePath,m.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},m.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},m.normalizeSearch=m.normalizeQuery,m.normalizeHash=m.normalizeFragment,m.iso8859=function(){var t=o.encode,e=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=t,o.decode=e}return this},m.unicode=function(){var t=o.encode,e=o.decode;o.encode=d,o.decode=unescape;try{this.normalize()}finally{o.encode=t,o.decode=e}return this},m.readable=function(){var e=this.clone();e.username("").password("").normalize();var n="";if(e._parts.protocol&&(n+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(n+=t.toUnicode(e._parts.hostname),e._parts.port&&(n+=":"+e._parts.port)):n+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(n+="/"),n+=e.path(!0),e._parts.query){for(var r="",i=0,a=e._parts.query.split("&"),s=a.length;i<s;i++){var u=(a[i]||"").split("=");r+="&"+o.decodeQuery(u[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==u[1]&&(r+="="+o.decodeQuery(u[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+r.substring(1)}return n+=o.decodeQuery(e.hash(),!0)},m.absoluteTo=function(t){var e,n,r,i=this.clone(),a=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof o||(t=new o(t)),i._parts.protocol)return i;if(i._parts.protocol=t._parts.protocol,this._parts.hostname)return i;for(n=0;r=a[n];n++)i._parts[r]=t._parts[r];return i._parts.path?(".."===i._parts.path.substring(-2)&&(i._parts.path+="/"),"/"!==i.path().charAt(0)&&(e=t.directory(),e=e||(0===t.path().indexOf("/")?"/":""),i._parts.path=(e?e+"/":"")+i._parts.path,i.normalizePath())):(i._parts.path=t._parts.path,i._parts.query||(i._parts.query=t._parts.query)),i.build(),i},m.relativeTo=function(t){var e,n,r,i,a,s=this.clone().normalize();if(s._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new o(t).normalize(),e=s._parts,n=t._parts,i=s.path(),a=t.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==a.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===n.protocol&&(e.protocol=null),e.username!==n.username||e.password!==n.password)return s.build();if(null!==e.protocol||null!==e.username||null!==e.password)return s.build();if(e.hostname!==n.hostname||e.port!==n.port)return s.build();if(e.hostname=null,e.port=null,i===a)return e.path="",s.build();if(!(r=o.commonPath(i,a)))return s.build();var u=n.path.substring(r.length).replace(/[^\\/]*$/,"").replace(/.*?\\//g,"../");return e.path=u+e.path.substring(r.length)||"./",s.build()},m.equals=function(t){var e,n,r,i=this.clone(),a=new o(t),s={},c={},l={};if(i.normalize(),a.normalize(),i.toString()===a.toString())return!0;if(e=i.query(),n=a.query(),i.query(""),a.query(""),i.toString()!==a.toString())return!1;if(e.length!==n.length)return!1;s=o.parseQuery(e,this._parts.escapeQuerySpace),c=o.parseQuery(n,this._parts.escapeQuerySpace);for(r in s)if(b.call(s,r)){if(u(s[r])){if(!p(s[r],c[r]))return!1}else if(s[r]!==c[r])return!1;l[r]=!0}for(r in c)if(b.call(c,r)&&!l[r])return!1;return!0},m.preventInvalidHostname=function(t){return this._parts.preventInvalidHostname=!!t,this},m.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},m.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},o})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(157),o=n(158),i=(n.n(o),this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},s=this&&this.__generator||function(t,e){function n(t){return function(e){return r([t,e])}}function r(n){if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(a=i[2&n[0]?"return":n[0]?"throw":"next"])&&!(a=a.call(i,n[1])).done)return a;switch(i=0,a&&(n=[0,a.value]),n[0]){case 0:case 1:a=n;break;case 4:return u.label++,{value:n[1],done:!1};case 5:u.label++,i=n[1],n=[0];continue;case 7:n=u.ops.pop(),u.trys.pop();continue;default:if(a=u.trys,!(a=a.length>0&&a[a.length-1])&&(6===n[0]||2===n[0])){u=0;continue}if(3===n[0]&&(!a||n[1]>a[0]&&n[1]<a[3])){u.label=n[1];break}if(6===n[0]&&u.label<a[1]){u.label=a[1],a=n;break}if(a&&u.label<a[2]){u.label=a[2],u.ops.push(n);break}a[2]&&u.ops.pop(),u.trys.pop();continue}n=e.call(t,u)}catch(t){n=[6,t],i=0}finally{o=a=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}var o,i,a,s,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s},u=function(){function t(){var t=this;this.commandMap={InsertWebPart:function(e,n,r,o){t.insertWebPart(e,n,r,o)},UploadWebPartToGallery:function(e,n,r,o){t.uploadWebPartToGallery(e,n,r,o)},Fetch:function(e,n,r,o){t.fetch(e,n,r,o)},Ping:function(t,e,n,o){r.a.postMessage(t,i({},o,{$$result:"success",data:"Pong"}))},Status:function(t,e,n,o){r.a.postMessage(t,i({},o,{$$result:"success",data:r.a.currentStatus}))},Eval:function(t,e,n,o){try{(0,eval)(o.code)}catch(o){r.a.postMessageError(t,e,n,o)}r.a.postMessage(t,{$$command:e,$$postMessageId:n,$$result:"success"})}},this.currentErrorHandler=function(t){},this.errorHandler=this.errorHandler.bind(this),this.messageHandler=this.messageHandler.bind(this)}return t.prototype.errorHandler=function(t){this.currentErrorHandler(t)},t.prototype.messageHandler=function(t){var e=t.origin||t.originalEvent.origin,n=t.data.$$command,o=t.data.$$postMessageId,i=t.source;if(e&&n&&o&&i){if(r.a.brightcoveConfig.trustedOriginAuthorities&&r.a.brightcoveConfig.trustedOriginAuthorities.length){for(var a=!1,s=0,u=r.a.brightcoveConfig.trustedOriginAuthorities;s<u.length;s++){var c=u[s];if(RegExp(c,"ig").test(e)){a=!0;break}}if(!a){var l="The specified origin is not trusted by the HostWebProxy: "+e,p={$$command:n,$$postMessageId:o,$$result:"error",message:l,invalidOrigin:e,url:window.location.href};throw r.a.postMessage(i,p),Error(l)}}this.processCommand(i,n,o,t.data)}},t.prototype.processCommand=function(t,e,n,o){if(this.commandMap[e])try{this.commandMap[e].call(this,t,e,n,o)}catch(o){r.a.postMessageError(t,e,n,o)}finally{return}r.a.postMessage(t,{$$command:e,$$postMessageId:n,$$result:"error",message:"Unknown or unsupported command: "+e})},t.prototype.insertWebPart=function(t,e,n,o){return a(this,void 0,void 0,function(){var i,a,u,c,l,p,f,h,d,y,g,v,m,b,_;return s(this,function(s){switch(s.label){case 0:if(s.trys.push([0,5,,6]),!o.hostWebUrl)throw Error("A hostWebUrl property must be specified as part of the request.");if(!o.webPartPageUrl)throw Error("A webPartPageUrl property must be specified as part of the request.");return i=new SP.ClientContext(o.hostWebUrl),a=i.get_web(),u=a.getFileByServerRelativeUrl(o.webPartPageUrl),c=u.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared),l=c.importWebPart(o.webPartXml),p=l.get_webPart(),f=c.addWebPart(p,o.zoneId||"wpz",o.zoneIndex||0),i.load(f),i.load(p),[4,r.a.executePendingQuery(i)];case 1:return s.sent(),h=f.get_id().toString(),d=void 0,!0===o.isWikiPage?d="WikiField":!0===o.isPublishingPag&&(d="PublishingPagecontent"),d?(y=\'<div class="ms-rtestate-read ms-rte-wpbox"><div class="ms-rtestate-notify  ms-rtestate-read \'+h+\'" id="div_\'+h+\'" unselectable="on"></div><div id="vid_\'+h+\'" unselectable="on" style="display&#58;none;"></div></div>\',g=a.getFileByServerRelativeUrl(o.webPartPageUrl),v=g.get_listItemAllFields(),i.load(v),[4,r.a.executePendingQuery(i)]):[3,4];case 2:return s.sent(),m=v.get_item(d),m=y+m,v.set_item(d,m),v.update(),[4,r.a.executePendingQuery(i)];case 3:s.sent(),s.label=4;case 4:return b={$$command:e,$$postMessageId:n,$$result:"success",data:{webPartId:h}},r.a.postMessage(t,b),[3,6];case 5:throw _=s.sent(),console.error(_),r.a.postMessageError(t,e,n,_),_;case 6:return[2]}})})},t.prototype.uploadWebPartToGallery=function(t,e,n,i){return a(this,void 0,void 0,function(){var a,u,c,l,p;return s(this,function(s){switch(s.label){case 0:if(s.trys.push([0,5,,6]),!i.hostWebUrl)throw Error("A hostWebUrl property must be specified as part of the request.");return a=new o.Web(i.hostWebUrl),[4,a.lists.getByTitle("Web Part Gallery").rootFolder.files.add(i.webPartFileName,i.webPartXml,!0)];case 1:return u=s.sent(),i.group?[4,u.file.getItem()]:[3,4];case 2:return c=s.sent(),[4,c.update({Group:i.group})];case 3:s.sent(),s.label=4;case 4:return l={$$command:e,$$postMessageId:n,$$result:"success",data:{result:u}},r.a.postMessage(t,l),[3,6];case 5:throw p=s.sent(),console.error(p),r.a.postMessageError(t,e,n,p),p;case 6:return[2]}})})},t.prototype.fetch=function(t,e,n,o){return a(this,void 0,void 0,function(){var i,a,u,c,l,p,f,h,d,y,g,v;return s(this,function(s){switch(s.label){case 0:if(i={cache:o.cache,credentials:o.credentials,method:o.method,mode:"same-origin"},o.headers)for(i.headers=new Headers,a=0,u=Object.keys(o.headers);a<u.length;a++)c=u[a],i.headers.append(c,o.headers[c]);"GET"!==o.method.toUpperCase()&&(i.body=o.body,i.bodyUsed=!0),s.label=1;case 1:return s.trys.push([1,4,,5]),[4,fetch(o.url,i)];case 2:return l=s.sent(),p={},"function"==typeof l.headers.forEach&&l.headers.forEach(function(t,e,n){p[e]=t}),h={$$command:e,$$postMessageId:n,$$result:"success",headers:p,data:void 0},[4,l.arrayBuffer()];case 3:for(h.transferrableData=s.sent(),f=h,d=0,y=["ok","redirected","status","statusText","type","url"];d<y.length;d++)g=y[d],f[g]=l[g];return r.a.postMessage(t,f),[3,5];case 4:return v=s.sent(),r.a.postMessageError(t,e,n,v),[3,5];case 5:return[2]}})})},t}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(54),o=function(){function t(){this._settings=new r.Dictionary}return t.prototype.add=function(t,e){this._settings.add(t,e)},t.prototype.addJSON=function(t,e){this._settings.add(t,JSON.stringify(e))},t.prototype.apply=function(t){var e=this;return new Promise(function(n,r){try{e._settings.merge(t),n()}catch(t){r(t)}})},t.prototype.load=function(t){var e=this;return new Promise(function(n,r){t.getConfiguration().then(function(t){e._settings.merge(t),n()}).catch(function(t){r(t)})})},t.prototype.get=function(t){return this._settings.get(t)},t.prototype.getJSON=function(t){var e=this.get(t);return void 0===e||null===e?e:JSON.parse(e)},t}();e.Settings=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(160),o=n(162),i=n(163),a=n(60),s=n(1),u=n(390),c=n(170),l=n(116),p=n(20),f=n(171),h=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=""),this._options=t,this._baseUrl=e}return t.prototype.configure=function(e,n){return void 0===n&&(n=""),new t(e,n)},t.prototype.searchSuggest=function(t){var e;return e="string"==typeof t?{querytext:t}:t,new o.SearchSuggest(this._baseUrl).configure(this._options).execute(e)},t.prototype.search=function(t){var e;return e="string"==typeof t?{Querytext:t}:t instanceof r.SearchQueryBuilder?t.toSearchQuery():t,new r.Search(this._baseUrl).configure(this._options).execute(e)},Object.defineProperty(t.prototype,"site",{get:function(){return new i.Site(this._baseUrl).configure(this._options)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"web",{get:function(){return new a.Web(this._baseUrl).configure(this._options)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"profiles",{get:function(){return new u.UserProfileQuery(this._baseUrl).configure(this._options)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"social",{get:function(){return new c.SocialQuery(this._baseUrl).configure(this._options)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"navigation",{get:function(){return new l.NavigationService},enumerable:!0,configurable:!0}),t.prototype.createBatch=function(){return this.web.createBatch()},Object.defineProperty(t.prototype,"utility",{get:function(){return new f.UtilityMethod(this._baseUrl,"").configure(this._options)},enumerable:!0,configurable:!0}),t.prototype.crossDomainSite=function(t,e){return this._cdImpl(i.Site,t,e,"site")},t.prototype.crossDomainWeb=function(t,e){return this._cdImpl(a.Web,t,e,"web")},t.prototype._cdImpl=function(t,e,n,r){if(!s.Util.isUrlAbsolute(e))throw new p.UrlException("The addInWebUrl parameter must be an absolute url.");if(!s.Util.isUrlAbsolute(n))throw new p.UrlException("The hostWebUrl parameter must be an absolute url.");var o=s.Util.combinePaths(e,"_api/SP.AppContextSite(@target)"),i=new t(o,r);return i.query.add("@target","\'"+encodeURIComponent(n)+"\'"),i.configure(this._options)},t}();e.SPRest=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(54),o=n(1),i=n(48),a=n(33),s=function(){function t(){}return t}();e.CachedDigest=s;var u=new r.Dictionary,c=function(){function t(t,e){void 0===e&&(e=u),this._httpClient=t,this._digests=e}return t.prototype.getDigest=function(t){var e=this,n=this._digests.get(t);if(null!==n&&new Date<n.expiration)return Promise.resolve(n.value);var r=o.Util.combinePaths(t,"/_api/contextinfo"),u={Accept:"application/json;odata=verbose","Content-Type":"application/json;odata=verbose;charset=utf-8"};return this._httpClient.fetchRaw(r,{cache:"no-cache",credentials:"same-origin",headers:o.Util.extend(u,a.RuntimeConfig.spHeaders,!0),method:"POST"}).then(function(t){return(new i.ODataDefaultParser).parse(t).then(function(t){return t.GetContextWebInformation})}).then(function(n){var r=new s;r.value=n.FormDigestValue;var o=n.FormDigestTimeoutSeconds,i=new Date;return i.setTime(i.getTime()+1e3*o),r.expiration=i,e._digests.add(t,r),r.value})},t.prototype.clear=function(){this._digests.clear()},t}();e.DigestCache=c},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(48),a=function(t){function e(e,n){return void 0===n&&(n="AttachmentFiles"),t.call(this,e,n)||this}return r(e,t),e.prototype.getByName=function(t){var e=new s(this);return e.concat("(\'"+t+"\')"),e},e.prototype.add=function(t,n){var r=this;return this.clone(e,"add(FileName=\'"+t+"\')",!1).postCore({body:n}).then(function(e){return{data:e,file:r.getByName(t)}})},e.prototype.addMultiple=function(t){var n=this;return t.reduce(function(t,r){return t.then(function(){return n.clone(e,"add(FileName=\'"+r.name+"\')",!1).postCore({body:r.content})})},Promise.resolve())},e.prototype.deleteMultiple=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.reduce(function(e,n){return e.then(function(){return t.getByName(n).delete()})},Promise.resolve())},e.prototype.recycleMultiple=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.reduce(function(e,n){return e.then(function(){return t.getByName(n).recycle()})},Promise.resolve())},e}(o.SharePointQueryableCollection);e.AttachmentFiles=a;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.getText=function(){return this.clone(e,"$value",!1).get(new i.TextFileParser)},e.prototype.getBlob=function(){return this.clone(e,"$value",!1).get(new i.BlobFileParser)},e.prototype.getBuffer=function(){return this.clone(e,"$value",!1).get(new i.BufferFileParser)},e.prototype.getJSON=function(){return this.clone(e,"$value",!1).get(new i.JSONFileParser)},e.prototype.setContent=function(t){var n=this;return this.clone(e,"$value",!1).postCore({body:t,headers:{"X-HTTP-Method":"PUT"}}).then(function(t){return new e(n)})},e.prototype.delete=function(t){return void 0===t&&(t="*"),this.postCore({headers:{"IF-Match":t,"X-HTTP-Method":"DELETE"}})},e.prototype.recycle=function(t){return void 0===t&&(t="*"),this.clone(e,"recycleObject").postCore({headers:{"IF-Match":t,"X-HTTP-Method":"DELETE"}})},e}(o.SharePointQueryableInstance);e.AttachmentFile=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(1),a=function(t){function e(e,n){return void 0===n&&(n="views"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new s(this);return e.concat("(\'"+t+"\')"),e},e.prototype.getByTitle=function(t){return new s(this,"getByTitle(\'"+t+"\')")},e.prototype.add=function(t,n,r){var o=this;void 0===n&&(n=!1),void 0===r&&(r={});var a=JSON.stringify(i.Util.extend({PersonalView:n,Title:t,__metadata:{type:"SP.View"}},r));return this.clone(e,null).postAsCore({body:a}).then(function(t){return{data:t,view:o.getById(t.Id)}})},e}(o.SharePointQueryableCollection);e.Views=a;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"fields",{get:function(){return new u(this)},enumerable:!0,configurable:!0}),e.prototype.update=function(t){var e=this,n=JSON.stringify(i.Util.extend({__metadata:{type:"SP.View"}},t));return this.postCore({body:n,headers:{"X-HTTP-Method":"MERGE"}}).then(function(t){return{data:t,view:e}})},e.prototype.delete=function(){return this.postCore({headers:{"X-HTTP-Method":"DELETE"}})},e.prototype.renderAsHtml=function(){return this.clone(o.SharePointQueryable,"renderashtml").get()},e}(o.SharePointQueryableInstance);e.View=s;var u=function(t){function e(e,n){return void 0===n&&(n="viewfields"),t.call(this,e,n)||this}return r(e,t),e.prototype.getSchemaXml=function(){return this.clone(o.SharePointQueryable,"schemaxml").get()},e.prototype.add=function(t){return this.clone(e,"addviewfield(\'"+t+"\')").postCore()},e.prototype.move=function(t,n){return this.clone(e,"moveviewfieldto").postCore({body:JSON.stringify({field:t,index:n})})},e.prototype.removeAll=function(){return this.clone(e,"removeallviewfields").postCore()},e.prototype.remove=function(t){return this.clone(e,"removeviewfield(\'"+t+"\')").postCore()},e}(o.SharePointQueryableCollection);e.ViewFields=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=function(t){function e(e,n){return void 0===n&&(n="forms"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new a(this);return e.concat("(\'"+t+"\')"),e},e}(o.SharePointQueryableCollection);e.Forms=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.SharePointQueryableInstance);e.Form=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=function(t){function e(e,n){return void 0===n&&(n="subscriptions"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){var e=new a(this);return e.concat("(\'"+t+"\')"),e},e.prototype.add=function(t,e,n){var r=this,o=JSON.stringify({clientState:n||"pnp-js-core-subscription",expirationDateTime:e,notificationUrl:t,resource:this.toUrl()});return this.postCore({body:o,headers:{"Content-Type":"application/json"}}).then(function(t){return{data:t,subscription:r.getById(t.id)}})},e}(o.SharePointQueryableCollection);e.Subscriptions=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.update=function(t){var e=this,n=JSON.stringify({expirationDateTime:t});return this.patchCore({body:n,headers:{"Content-Type":"application/json"}}).then(function(t){return{data:t,subscription:e}})},e.prototype.delete=function(){return t.prototype.deleteCore.call(this)},e}(o.SharePointQueryableInstance);e.Subscription=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(30),a=n(1),s=function(t){function e(e,n){return void 0===n&&(n="regionalsettings"),t.call(this,e,n)||this}return r(e,t),Object.defineProperty(e.prototype,"installedLanguages",{get:function(){return new u(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"globalInstalledLanguages",{get:function(){return new u(this,"globalinstalledlanguages")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timeZone",{get:function(){return new c(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"timeZones",{get:function(){return new l(this)},enumerable:!0,configurable:!0}),e}(o.SharePointQueryableInstance);e.RegionalSettings=s;var u=function(t){function e(e,n){return void 0===n&&(n="installedlanguages"),t.call(this,e,n)||this}return r(e,t),e}(o.SharePointQueryableCollection);e.InstalledLanguages=u;var c=function(t){function e(e,n){return void 0===n&&(n="timezone"),t.call(this,e,n)||this}return r(e,t),e.prototype.utcToLocalTime=function(t){var n;return n="string"==typeof t?t:t.toISOString(),this.clone(e,"utctolocaltime(\'"+n+"\')").postCore().then(function(t){return t.hasOwnProperty("UTCToLocalTime")?t.UTCToLocalTime:t})},e.prototype.localTimeToUTC=function(t){var n;return n="string"==typeof t?t:a.Util.dateAdd(t,"minute",-1*t.getTimezoneOffset()).toISOString(),this.clone(e,"localtimetoutc(\'"+n+"\')").postCore().then(function(t){return t.hasOwnProperty("LocalTimeToUTC")?t.LocalTimeToUTC:t})},e}(o.SharePointQueryableInstance);e.TimeZone=c;var l=function(t){function e(e,n){return void 0===n&&(n="timezones"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){return this.clone(e,"GetById("+t+")").postAsCore({},i.spODataEntity(c))},e}(o.SharePointQueryableCollection);e.TimeZones=l},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=function(t){function e(e,n){return void 0===n&&(n="_api/SP.RelatedItemManager"),t.call(this,e,n)||this}return r(e,t),e.FromUrl=function(t){if(null===t)return new e("");var n=t.indexOf("_api/");return new e(n>-1?t.substr(0,n):t)},e.prototype.getRelatedItems=function(t,n){var r=this.clone(e,null);return r.concat(".GetRelatedItems"),r.postCore({body:JSON.stringify({SourceItemID:n,SourceListName:t})})},e.prototype.getPageOneRelatedItems=function(t,n){var r=this.clone(e,null);return r.concat(".GetPageOneRelatedItems"),r.postCore({body:JSON.stringify({SourceItemID:n,SourceListName:t})})},e.prototype.addSingleLink=function(t,n,r,o,i,a,s){void 0===s&&(s=!1);var u=this.clone(e,null);return u.concat(".AddSingleLink"),u.postCore({body:JSON.stringify({SourceItemID:n,SourceListName:t,SourceWebUrl:r,TargetItemID:i,TargetListName:o,TargetWebUrl:a,TryAddReverseLink:s})})},e.prototype.addSingleLinkToUrl=function(t,n,r,o){void 0===o&&(o=!1);var i=this.clone(e,null);return i.concat(".AddSingleLinkToUrl"),i.postCore({body:JSON.stringify({SourceItemID:n,SourceListName:t,TargetItemUrl:r,TryAddReverseLink:o})})},e.prototype.addSingleLinkFromUrl=function(t,n,r,o){void 0===o&&(o=!1);var i=this.clone(e,null);return i.concat(".AddSingleLinkFromUrl"),i.postCore({body:JSON.stringify({SourceItemUrl:t,TargetItemID:r,TargetListName:n,TryAddReverseLink:o})})},e.prototype.deleteSingleLink=function(t,n,r,o,i,a,s){void 0===s&&(s=!1);var u=this.clone(e,null);return u.concat(".DeleteSingleLink"),u.postCore({body:JSON.stringify({SourceItemID:n,SourceListName:t,SourceWebUrl:r,TargetItemID:i,TargetListName:o,TargetWebUrl:a,TryDeleteReverseLink:s})})},e}(o.SharePointQueryable);e.RelatedItemManagerImpl=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),i=n(391),a=n(1),s=n(48),u=function(t){function e(e,n){void 0===n&&(n="_api/sp.userprofiles.peoplemanager");var r=t.call(this,e,n)||this;return r.clientPeoplePickerQuery=new l(e),r.profileLoader=new c(e),r}return r(e,t),Object.defineProperty(e.prototype,"editProfileLink",{get:function(){return this.clone(e,"EditProfileLink").getAs(s.ODataValue())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isMyPeopleListPublic",{get:function(){return this.clone(e,"IsMyPeopleListPublic").getAs(s.ODataValue())},enumerable:!0,configurable:!0}),e.prototype.amIFollowedBy=function(t){var n=this.clone(e,"amifollowedby(@v)");return n.query.add("@v","\'"+encodeURIComponent(t)+"\'"),n.get()},e.prototype.amIFollowing=function(t){var n=this.clone(e,"amifollowing(@v)");return n.query.add("@v","\'"+encodeURIComponent(t)+"\'"),n.get()},e.prototype.getFollowedTags=function(t){return void 0===t&&(t=20),this.clone(e,"getfollowedtags("+t+")").get()},e.prototype.getFollowersFor=function(t){var n=this.clone(e,"getfollowersfor(@v)");return n.query.add("@v","\'"+encodeURIComponent(t)+"\'"),n.get()},Object.defineProperty(e.prototype,"myFollowers",{get:function(){return new o.SharePointQueryableCollection(this,"getmyfollowers")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"myProperties",{get:function(){return new e(this,"getmyproperties")},enumerable:!0,configurable:!0}),e.prototype.getPeopleFollowedBy=function(t){var n=this.clone(e,"getpeoplefollowedby(@v)");return n.query.add("@v","\'"+encodeURIComponent(t)+"\'"),n.get()},e.prototype.getPropertiesFor=function(t){var n=this.clone(e,"getpropertiesfor(@v)");return n.query.add("@v","\'"+encodeURIComponent(t)+"\'"),n.get()},Object.defineProperty(e.prototype,"trendingTags",{get:function(){var t=this.clone(e,null);return t.concat(".gettrendingtags"),t.get()},enumerable:!0,configurable:!0}),e.prototype.getUserProfilePropertyFor=function(t,n){var r=this.clone(e,"getuserprofilepropertyfor(accountname=@v, propertyname=\'"+n+"\')");return r.query.add("@v","\'"+encodeURIComponent(t)+"\'"),r.get()},e.prototype.hideSuggestion=function(t){var n=this.clone(e,"hidesuggestion(@v)");return n.query.add("@v","\'"+encodeURIComponent(t)+"\'"),n.postCore()},e.prototype.isFollowing=function(t,n){var r=this.clone(e,null);return r.concat(".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)"),r.query.add("@v","\'"+encodeURIComponent(t)+"\'"),r.query.add("@y","\'"+encodeURIComponent(n)+"\'"),r.get()},e.prototype.setMyProfilePic=function(t){var n=this;return new Promise(function(r,o){i.readBlobAsArrayBuffer(t).then(function(t){new e(n,"setmyprofilepicture").postCore({body:String.fromCharCode.apply(null,new Uint16Array(t))}).then(function(t){return r()})}).catch(function(t){return o(t)})})},e.prototype.setSingleValueProfileProperty=function(t,n,r){var o=JSON.stringify({accountName:t,propertyName:n,propertyValue:r});return this.clone(e,"SetSingleValueProfileProperty").postCore({body:o})},e.prototype.setMultiValuedProfileProperty=function(t,n,r){var o=JSON.stringify({accountName:t,propertyName:n,propertyValues:r});return this.clone(e,"SetMultiValuedProfileProperty").postCore({body:o})},e.prototype.createPersonalSiteEnqueueBulk=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.profileLoader.createPersonalSiteEnqueueBulk(t)},Object.defineProperty(e.prototype,"ownerUserProfile",{get:function(){return this.profileLoader.ownerUserProfile},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userProfile",{get:function(){return this.profileLoader.userProfile},enumerable:!0,configurable:!0}),e.prototype.createPersonalSite=function(t){return void 0===t&&(t=!1),this.profileLoader.createPersonalSite(t)},e.prototype.shareAllSocialData=function(t){return this.profileLoader.shareAllSocialData(t)},e.prototype.clientPeoplePickerResolveUser=function(t){return this.clientPeoplePickerQuery.clientPeoplePickerResolveUser(t)},e.prototype.clientPeoplePickerSearchUser=function(t){return this.clientPeoplePickerQuery.clientPeoplePickerSearchUser(t)},e}(o.SharePointQueryableInstance);e.UserProfileQuery=u;var c=function(t){function e(e,n){return void 0===n&&(n="_api/sp.userprofiles.profileloader.getprofileloader"),t.call(this,e,n)||this}return r(e,t),e.prototype.createPersonalSiteEnqueueBulk=function(t){return this.clone(e,"createpersonalsiteenqueuebulk",!1).postCore({body:JSON.stringify({emailIDs:t})})},Object.defineProperty(e.prototype,"ownerUserProfile",{get:function(){var t=this.getParent(e,this.parentUrl,"_api/sp.userprofiles.profileloader.getowneruserprofile");return this.hasBatch&&(t=t.inBatch(this.batch)),t.postAsCore()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"userProfile",{get:function(){return this.clone(e,"getuserprofile").postAsCore()},enumerable:!0,configurable:!0}),e.prototype.createPersonalSite=function(t){return void 0===t&&(t=!1),this.clone(e,"getuserprofile/createpersonalsiteenque("+t+")").postCore()},e.prototype.shareAllSocialData=function(t){return this.clone(e,"getuserprofile/shareallsocialdata("+t+")").postCore()},e}(o.SharePointQueryable),l=function(t){function e(e,n){return void 0===n&&(n="_api/sp.ui.applicationpages.clientpeoplepickerwebserviceinterface"),t.call(this,e,n)||this}return r(e,t),e.prototype.clientPeoplePickerResolveUser=function(t){var n=this.clone(e,null);return n.concat(".clientpeoplepickerresolveuser"),n.postAsCore({body:this.createClientPeoplePickerQueryParametersRequestBody(t)}).then(function(t){return JSON.parse(t)})},e.prototype.clientPeoplePickerSearchUser=function(t){var n=this.clone(e,null);return n.concat(".clientpeoplepickersearchuser"),n.postAsCore({body:this.createClientPeoplePickerQueryParametersRequestBody(t)}).then(function(t){return JSON.parse(t)})},e.prototype.createClientPeoplePickerQueryParametersRequestBody=function(t){return JSON.stringify({queryParams:a.Util.extend({__metadata:{type:"SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters"}},t)})},e}(o.SharePointQueryable)},function(t,e,n){"use strict";function r(t){return i(t,"string")}function o(t){return i(t,"buffer")}function i(t,e){return new Promise(function(n,r){try{var o=new FileReader;switch(o.onload=function(t){n(t.target.result)},e){case"string":o.readAsText(t);break;case"buffer":o.readAsArrayBuffer(t)}}catch(t){r(t)}})}Object.defineProperty(e,"__esModule",{value:!0}),e.readBlobAsText=r,e.readBlobAsArrayBuffer=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(393),o=function(){function t(){}return Object.defineProperty(t.prototype,"v1",{get:function(){return new r.V1("")},enumerable:!0,configurable:!0}),t}();e.GraphRest=o},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(35),i=n(394),a=function(t){function e(e,n){return void 0===n&&(n="v1.0"),t.call(this,e,n)||this}return r(e,t),Object.defineProperty(e.prototype,"groups",{get:function(){return new i.Groups(this)},enumerable:!0,configurable:!0}),e}(o.GraphQueryable);e.V1=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(35),a=n(395),s=n(1),u=n(396),c=n(397),l=n(399),p=n(400);!function(t){t[t.Office365=0]="Office365",t[t.Dynamic=1]="Dynamic",t[t.Security=2]="Security"}(o=e.GroupType||(e.GroupType={}));var f=function(t){function e(e,n){return void 0===n&&(n="groups"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){return new h(this,t)},e.prototype.add=function(t,e,n,r){var i=this;void 0===r&&(r={});var a=s.Util.extend({displayName:t,mailEnabled:n===o.Office365,mailNickname:e,securityEnabled:n!==o.Office365},r);return n!==o.Security&&(a=s.Util.extend(a,{groupTypes:[n===o.Office365?"Unified":"DynamicMembership"]})),this.postCore({body:JSON.stringify(a)}).then(function(t){return{data:t,group:i.getById(t.id)}})},e}(i.GraphQueryableCollection);e.Groups=f;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"caldendar",{get:function(){return new u.Calendar(this,"calendar")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){return new u.Events(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"owners",{get:function(){return new a.Owners(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"plans",{get:function(){return new l.Plans(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"members",{get:function(){return new a.Members(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"conversations",{get:function(){return new c.Conversations(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"acceptedSenders",{get:function(){return new c.Senders(this,"acceptedsenders")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rejectedSenders",{get:function(){return new c.Senders(this,"rejectedsenders")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"photo",{get:function(){return new p.Photo(this)},enumerable:!0,configurable:!0}),e.prototype.addFavorite=function(){return this.clone(e,"addFavorite").postCore()},e.prototype.getMemberGroups=function(t){return void 0===t&&(t=!1),this.clone(e,"getMemberGroups").postCore({body:JSON.stringify({securityEnabledOnly:t})})},e.prototype.delete=function(){return this.deleteCore()},e.prototype.update=function(t){return this.patchCore({body:JSON.stringify(t)})},e.prototype.removeFavorite=function(){return this.clone(e,"removeFavorite").postCore()},e.prototype.resetUnseenCount=function(){return this.clone(e,"resetUnseenCount").postCore()},e.prototype.subscribeByMail=function(){return this.clone(e,"subscribeByMail").postCore()},e.prototype.unsubscribeByMail=function(){return this.clone(e,"unsubscribeByMail").postCore()},e.prototype.getCalendarView=function(t,n){var r=this.clone(e,"calendarView");return r.query.add("startDateTime",t.toISOString()),r.query.add("endDateTime",n.toISOString()),r.get()},e}(i.GraphQueryableInstance);e.Group=h},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(35),i=function(t){function e(e,n){return void 0===n&&(n="members"),t.call(this,e,n)||this}return r(e,t),e.prototype.add=function(t){return this.clone(e,"$ref").postCore({body:JSON.stringify({"@odata.id":t})})},e.prototype.getById=function(t){return new a(this,t)},e}(o.GraphQueryableCollection);e.Members=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.GraphQueryableInstance);e.Member=a;var s=function(t){function e(e,n){return void 0===n&&(n="owners"),t.call(this,e,n)||this}return r(e,t),e}(i);e.Owners=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(35),i=function(t){function e(e,n){return void 0===n&&(n="calendars"),t.call(this,e,n)||this}return r(e,t),e}(o.GraphQueryableCollection);e.Calendars=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"events",{get:function(){return new s(this)},enumerable:!0,configurable:!0}),e}(o.GraphQueryableInstance);e.Calendar=a;var s=function(t){function e(e,n){return void 0===n&&(n="events"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){return new u(this,t)},e.prototype.add=function(t){var e=this;return this.postCore({body:JSON.stringify(t)}).then(function(t){return{data:t,event:e.getById(t.id)}})},e}(o.GraphQueryableCollection);e.Events=s;var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.update=function(t){return this.patchCore({body:JSON.stringify(t)})},e.prototype.delete=function(){return this.deleteCore()},e}(o.GraphQueryableInstance);e.Event=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(35),i=n(398),a=function(t){function e(e,n){return void 0===n&&(n="conversations"),t.call(this,e,n)||this}return r(e,t),e.prototype.add=function(t){return this.postCore({body:JSON.stringify(t)})},e.prototype.getById=function(t){return new c(this,t)},e}(o.GraphQueryableCollection);e.Conversations=a;var s=function(t){function e(e,n){return void 0===n&&(n="threads"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){return new l(this,t)},e.prototype.add=function(t){return this.postCore({body:JSON.stringify(t)})},e}(o.GraphQueryableCollection);e.Threads=s;var u=function(t){function e(e,n){return void 0===n&&(n="posts"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){return new p(this,t)},e.prototype.add=function(t){return this.postCore({body:JSON.stringify(t)})},e}(o.GraphQueryableCollection);e.Posts=u;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"threads",{get:function(){return new s(this)},enumerable:!0,configurable:!0}),e.prototype.update=function(t){return this.patchCore({body:JSON.stringify(t)})},e.prototype.delete=function(){return this.deleteCore()},e}(o.GraphQueryableInstance);e.Conversation=c;var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"posts",{get:function(){return new u(this)},enumerable:!0,configurable:!0}),e.prototype.reply=function(t){return this.clone(e,"reply").postCore({body:JSON.stringify({post:t})})},e.prototype.delete=function(){return this.deleteCore()},e}(o.GraphQueryableInstance);e.Thread=l;var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),Object.defineProperty(e.prototype,"attachments",{get:function(){return new i.Attachments(this)},enumerable:!0,configurable:!0}),e.prototype.delete=function(){return this.deleteCore()},e.prototype.forward=function(t){return this.clone(e,"forward").postCore({body:JSON.stringify(t)})},e.prototype.reply=function(t){return this.clone(e,"reply").postCore({body:JSON.stringify({post:t})})},e}(o.GraphQueryableInstance);e.Post=p;var f=function(t){function e(e,n){return t.call(this,e,n)||this}return r(e,t),e.prototype.add=function(t){return this.clone(e,"$ref").postCore({body:JSON.stringify({"@odata.id":t})})},e.prototype.remove=function(t){var n=this.clone(e,"$ref");return n.query.add("$id",t),n.deleteCore()},e}(o.GraphQueryableCollection);e.Senders=f},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(35),i=function(t){function e(e,n){return void 0===n&&(n="attachments"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){return new a(this,t)},e.prototype.addFile=function(t,e){return this.postCore({body:JSON.stringify({"@odata.type":"#microsoft.graph.fileAttachment",contentBytes:e,name:t})})},e}(o.GraphQueryableCollection);e.Attachments=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.GraphQueryableInstance);e.Attachment=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(35),i=function(t){function e(e,n){return void 0===n&&(n="planner/plans"),t.call(this,e,n)||this}return r(e,t),e.prototype.getById=function(t){return new a(this,t)},e}(o.GraphQueryableCollection);e.Plans=i;var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(o.GraphQueryableInstance);e.Plan=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(35),i=n(48),a=function(t){function e(e,n){return void 0===n&&(n="photo"),t.call(this,e,n)||this}return r(e,t),e.prototype.getBlob=function(){return this.clone(e,"$value",!1).get(new i.BlobFileParser)},e.prototype.getBuffer=function(){return this.clone(e,"$value",!1).get(new i.BufferFileParser)},e.prototype.setContent=function(t){return this.clone(e,"$value",!1).patchCore({body:t})},e}(o.GraphQueryableInstance);e.Photo=a},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(402));var o=n(54);e.Dictionary=o.Dictionary;var i=n(1);e.Util=i.Util,r(n(34)),r(n(20)),r(n(76))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(173);e.CachingConfigurationProvider=r.default;var o=n(403);e.SPListConfigurationProvider=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(173),o=function(){function t(t,e){void 0===e&&(e="config"),this.sourceWeb=t,this.sourceListTitle=e}return Object.defineProperty(t.prototype,"web",{get:function(){return this.sourceWeb},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"listTitle",{get:function(){return this.sourceListTitle},enumerable:!0,configurable:!0}),t.prototype.getConfiguration=function(){return this.web.lists.getByTitle(this.listTitle).items.select("Title","Value").getAs().then(function(t){return t.reduce(function(t,e){return Object.defineProperty(t,e.Title,{configurable:!1,enumerable:!1,value:e.Value,writable:!1})},{})})},t.prototype.asCaching=function(){var t="splist_"+this.web.toUrl()+"+"+this.listTitle;return new r.default(this,t)},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(405))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(35);e.GraphQueryable=r.GraphQueryable,e.GraphQueryableCollection=r.GraphQueryableCollection,e.GraphQueryableInstance=r.GraphQueryableInstance,e.GraphQueryableSearchableCollection=r.GraphQueryableSearchableCollection},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(110);e.HttpClient=r.HttpClient;var o=n(407);e.SPRequestExecutorClient=o.SPRequestExecutorClient;var i=n(408);e.NodeFetchClient=i.NodeFetchClient;var a=n(159);e.FetchClient=a.FetchClient;var s=n(172);e.GraphHttpClient=s.GraphHttpClient},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=n(20),i=function(){function t(){this.convertToResponse=function(t){var e=new Headers;for(var n in t.headers)t.headers[n]&&e.append(n,t.headers[n]);var r=204===t.statusCode?null:t.body;return new Response(r,{headers:e,status:t.statusCode,statusText:t.statusText})}}return t.prototype.fetch=function(t,e){var n=this;if("undefined"==typeof SP||void 0===SP.RequestExecutor)throw new o.SPRequestExecutorUndefinedException;var i,a,s=t.substring(0,t.indexOf("/_api")),u=new SP.RequestExecutor(s),c={};if(e.headers&&e.headers instanceof Headers)for(i=e.headers.entries(),a=i.next();!a.done;)c[a.value[0]]=a.value[1],a=i.next();else c=e.headers;var l=["files/add","files/addTemplateFile","file/startUpload","file/continueUpload","file/finishUpload","attachmentfiles/add"],p=new RegExp(l.join("|"),"i").test(t);return new Promise(function(o,i){var a={error:function(t){i(n.convertToResponse(t))},headers:c,method:e.method,success:function(t){o(n.convertToResponse(t))},url:t};e.body&&(a=r.Util.extend(a,{body:e.body}),p&&(a=r.Util.extend(a,{binaryStringRequestBody:!0}))),u.executeAsync(a)})},t}();e.SPRequestExecutorClient=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(20),o=function(){function t(){}return t.prototype.fetch=function(){throw new r.NodeFetchClientUnsupportedException},t}();e.NodeFetchClient=o},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(77)),r(n(48)),r(n(161)),r(n(108))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(411))},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0});var o=n(168);e.AppCatalog=o.AppCatalog,e.App=o.App,r(n(169));var i=n(117);e.ODataBatch=i.ODataBatch;var a=n(114);e.Field=a.Field,e.Fields=a.Fields;var s=n(49);e.CheckinType=s.CheckinType,e.WebPartsPersonalizationScope=s.WebPartsPersonalizationScope,e.MoveOperations=s.MoveOperations,e.TemplateFileType=s.TemplateFileType,e.File=s.File,e.Files=s.Files;var u=n(81);e.Folder=u.Folder,e.Folders=u.Folders;var c=n(61);e.Item=c.Item,e.Items=c.Items,e.ItemVersion=c.ItemVersion,e.ItemVersions=c.ItemVersions,e.PagedItemCollection=c.PagedItemCollection;var l=n(116);e.NavigationNodes=l.NavigationNodes,e.NavigationNode=l.NavigationNode;var p=n(78);e.List=p.List,e.Lists=p.Lists;var f=n(30);e.spExtractODataId=f.spExtractODataId,e.spODataEntity=f.spODataEntity,e.spODataEntityArray=f.spODataEntityArray;var h=n(6);e.SharePointQueryable=h.SharePointQueryable,e.SharePointQueryableInstance=h.SharePointQueryableInstance,e.SharePointQueryableCollection=h.SharePointQueryableCollection;var d=n(111);e.RoleDefinitionBindings=d.RoleDefinitionBindings;var y=n(160);e.Search=y.Search,e.SearchQueryBuilder=y.SearchQueryBuilder,e.SearchResults=y.SearchResults,e.SortDirection=y.SortDirection,e.ReorderingRuleMatchType=y.ReorderingRuleMatchType,e.QueryPropertyValueType=y.QueryPropertyValueType,e.SearchBuiltInSourceId=y.SearchBuiltInSourceId;var g=n(162);e.SearchSuggest=g.SearchSuggest,e.SearchSuggestResult=g.SearchSuggestResult;var v=n(163);e.Site=v.Site,r(n(170)),r(n(80));var m=n(171);e.UtilityMethod=m.UtilityMethod;var b=n(166);e.WebPartDefinitions=b.WebPartDefinitions,e.WebPartDefinition=b.WebPartDefinition,e.WebPart=b.WebPart;var _=n(60);e.Web=_.Web}]);<\/script></body>\n\n</html>'},807:function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(808)),r(n(809))},808:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Manual="EXPLICIT",e.ActivatedDateOldestFirst="ACTIVATED_OLDEST_TO_NEWEST",e.ActivatedDateNewestFirst="ACTIVATED_NEWEST_TO_OLDEST",e.Alphabetical="ALPHABETICAL",e.TotalPlays="PLAYS_TOTAL",e.TrailingWeekPlays="PLAYS_TRAILING_WEEK",e.StartDateOldestFirst="START_DATE_OLDEST_TO_NEWEST",e.StartDateNewestFirst="START_DATE_NEWEST_TO_OLDEST"}(t.BCPlaylistType||(t.BCPlaylistType={}))},809:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Captions="captions",e.Subtitles="subtitles",e.Descriptions="descriptions",e.Chapters="chapters",e.Metadata="metadata"}(t.BCVideoTextTrackKind||(t.BCVideoTextTrackKind={}))},810:function(e,t,n){"use strict";var r=n(1),o=n(82),a=n(83),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(97),l=n(98),u=s(n(99)),p=function(){function e(t){o(this,e),this.accessTokenService=t}return a(e,[{key:"getThumbnailList",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(c.CmsEndpointUrl,"/").concat(e,"/videos/").concat(t,"/assets/thumbnail?").concat(l.getQueryString({})),n.next=6,u.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 6:if(204!==(i=n.sent).status){n.next=9;break}return n.abrupt("return",void 0);case 9:return n.abrupt("return",i.json());case 10:case"end":return n.stop()}}),n,this)})))}}]),e}();t.AssetsApi=p},811:function(e,t,n){"use strict";var r=n(82),o=n(83);Object.defineProperty(t,"__esModule",{value:!0});var a=n(54),i=function(){function e(t,n){if(r(this,e),!t)throw new Error("accessTokenService must be specified.");this._accessTokenService=t,this._errorCallback=n,this._assetsApi=new a.AssetsApi(this._accessTokenService),this._dynamicIngestApi=new a.DynamicIngestApi(this._accessTokenService),this._experiencesApi=new a.ExperiencesApi(this._accessTokenService),this._foldersApi=new a.FoldersApi(this._accessTokenService),this._ingestProfilesApi=new a.IngestProfilesApi(this._accessTokenService),this._playerManagementApi=new a.PlayerManagementApi(this._accessTokenService),this._playlistsApi=new a.PlaylistsApi(this._accessTokenService),this._videosApi=new a.VideosApi(this._accessTokenService)}return o(e,[{key:"accessTokenService",get:function(){return this._accessTokenService}},{key:"assetsApi",get:function(){return this._assetsApi}},{key:"dynamicIngestApi",get:function(){return this._dynamicIngestApi}},{key:"experiencesApi",get:function(){return this._experiencesApi}},{key:"foldersApi",get:function(){return this._foldersApi}},{key:"ingestProfilesApi",get:function(){return this._ingestProfilesApi}},{key:"playerManagementApi",get:function(){return this._playerManagementApi}},{key:"playlistsApi",get:function(){return this._playlistsApi}},{key:"videosApi",get:function(){return this._videosApi}}]),e}();t.BrightcoveApiGateway=i},812:function(e,t,n){"use strict";var r=n(1),o=n(82),a=n(83),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(97),l=s(n(99)),u=n(98),p=function(){function e(t){o(this,e),this.accessTokenService=t}return a(e,[{key:"getClientCredentialById",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,n.next=5,l.default("".concat(c.ClientCredentialsEndpointUrl,"/").concat(t,"?").concat(u.getQueryString({})),{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 5:return a=n.sent,n.abrupt("return",a.json());case 7:case"end":return n.stop()}}),n,this)})))}}]),e}();t.ClientCredentialsApi=p},813:function(e,t,n){"use strict";var r=n(1),o=n(82),a=n(83),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(97),l=s(n(814)).default.v4,u=n(6),p=s(n(99)),d=n(98),h=function(){function e(t){o(this,e),this.accessTokenService=t}return a(e,[{key:"getUploadUrls",value:function(e,t,n){return i(this,void 0,void 0,r.mark((function o(){var a,i,s;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return a=r.sent,n?(n=u.kebabCase(n),n=encodeURIComponent(n)):n=l(),i="".concat(c.IngestEndpointUrl,"/").concat(e,"/videos/").concat(t,"/upload-urls/bcsp-").concat(n,"?").concat(d.getQueryString({})),r.next=7,p.default(i,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(a.token_type," ").concat(a.access_token)}});case 7:return s=r.sent,r.abrupt("return",s.json());case 9:case"end":return r.stop()}}),o,this)})))}},{key:"makeIngestRequest",value:function(e,t,n,o){return i(this,void 0,void 0,r.mark((function a(){var i,s,l;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return i=r.sent,s="".concat(c.IngestEndpointUrl,"/").concat(e,"/videos/").concat(t,"/ingest-requests"),r.next=6,p.default(s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"".concat(i.token_type," ").concat(i.access_token)},body:JSON.stringify({master:{url:n},profile:o,"capture-images":!0})});case 6:return l=r.sent,r.abrupt("return",l.json());case 8:case"end":return r.stop()}}),a,this)})))}},{key:"addTextTracks",value:function(e,t,n){return i(this,void 0,void 0,r.mark((function o(){var a,i,s,l,u,d,h,f,m,y;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.accessTokenService.obtainAccessToken(e);case 2:for(a=r.sent,i="".concat(c.IngestEndpointUrl,"/").concat(e,"/videos/").concat(t,"/ingest-requests"),s=[],l=!0,u=!1,d=void 0,r.prev=8,h=n[Symbol.iterator]();!(l=(f=h.next()).done);l=!0)m=f.value,s.push({url:m.src||"",srclang:m.srclang||"",kind:m.kind||"",label:m.label||void 0,default:!!m.default});r.next=16;break;case 12:r.prev=12,r.t0=r.catch(8),u=!0,d=r.t0;case 16:r.prev=16,r.prev=17,l||null==h.return||h.return();case 19:if(r.prev=19,!u){r.next=22;break}throw d;case 22:return r.finish(19);case 23:return r.finish(16);case 24:return r.next=26,p.default(i,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"".concat(a.token_type," ").concat(a.access_token)},body:JSON.stringify({profile:"multi-platform-standard-static",text_tracks:s})});case 26:return y=r.sent,r.abrupt("return",y.json());case 28:case"end":return r.stop()}}),o,this,[[8,12,16,24],[17,,19,23]])})))}},{key:"addCustomImages",value:function(e,t,n,o){return i(this,void 0,void 0,r.mark((function a(){var i,s,l,u;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.accessTokenService.obtainAccessToken(e);case 2:if(i=r.sent,s="".concat(c.IngestEndpointUrl,"/").concat(e,"/videos/").concat(t,"/ingest-requests"),n||o){r.next=6;break}return r.abrupt("return");case 6:return l={profile:"multi-platform-standard-static"},n&&(l.poster={url:n,width:1280,height:720}),o&&(l.thumbnail={url:o,width:160,height:90}),r.next=11,p.default(s,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"".concat(i.token_type," ").concat(i.access_token)},body:JSON.stringify(l)});case 11:return u=r.sent,r.abrupt("return",u.json());case 13:case"end":return r.stop()}}),a,this)})))}}]),e}();t.DynamicIngestApi=h},817:function(e,t,n){"use strict";var r=n(1),o=n(82),a=n(83),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(97),l=s(n(99)),u=n(98),p=function(){function e(t){o(this,e),this.accessTokenService=t}return a(e,[{key:"getExperiences",value:function(e){return i(this,void 0,void 0,r.mark((function t(){var n,o,a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return n=t.sent,o="".concat(c.ExperiencesEndpointUrl,"/").concat(e,"/experiences?").concat(u.getQueryString({})),t.next=6,l.default(o,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(n.token_type," ").concat(n.access_token)}});case 6:return a=t.sent,t.abrupt("return",a.json());case 8:case"end":return t.stop()}}),t,this)})))}},{key:"getExperienceById",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(c.ExperiencesEndpointUrl,"/").concat(e,"/experiences/").concat(t,"?").concat(u.getQueryString({})),n.next=6,l.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 6:return i=n.sent,n.abrupt("return",i.json());case 8:case"end":return n.stop()}}),n,this)})))}},{key:"publishExperience",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(c.ExperiencesEndpointUrl,"/").concat(e,"/experiences/").concat(t,"/actions/publish"),n.next=6,l.default(a,{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 6:return i=n.sent,n.abrupt("return",i.json());case 8:case"end":return n.stop()}}),n,this)})))}}]),e}();t.ExperiencesApi=p},818:function(e,t,n){"use strict";var r=n(1),o=n(82),a=n(83),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(97),l=s(n(99)),u=n(98),p=function(){function e(t){o(this,e),this.accessTokenService=t}return a(e,[{key:"getFolders",value:function(e){return i(this,void 0,void 0,r.mark((function t(){var n,o,a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return n=t.sent,o="".concat(c.CmsEndpointUrl,"/").concat(e,"/folders?").concat(u.getQueryString({})),t.next=6,l.default(o,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(n.token_type," ").concat(n.access_token)}});case 6:return a=t.sent,t.abrupt("return",a.json());case 8:case"end":return t.stop()}}),t,this)})))}},{key:"addVideoToFolder",value:function(e,t,n){return i(this,void 0,void 0,r.mark((function o(){var a,i;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return a=r.sent,i="".concat(c.CmsEndpointUrl,"/").concat(e,"/folders/").concat(t,"/videos/").concat(n),r.next=6,l.default(i,{method:"PUT",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(a.token_type," ").concat(a.access_token)}});case 6:if(204===r.sent.status){r.next=9;break}throw new Error("An error occurred while adding the video to the specified folder.");case 9:case"end":return r.stop()}}),o,this)})))}},{key:"getVideosInFolder",value:function(e,t,n){return i(this,void 0,void 0,r.mark((function n(){var o,a;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(c.CmsEndpointUrl,"/").concat(e,"/folders/").concat(t,"/videos"),n.next=6,l.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 6:if(204===n.sent.status){n.next=9;break}throw new Error("An error occurred while adding the video to the specified folder.");case 9:case"end":return n.stop()}}),n,this)})))}}]),e}();t.FoldersApi=p},819:function(e,t,n){"use strict";var r=n(1),o=n(82),a=n(83),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(97),l=s(n(99)),u=n(98),p=function(){function e(t){o(this,e),this.accessTokenService=t}return a(e,[{key:"getDefaultProfile",value:function(e){return i(this,void 0,void 0,r.mark((function t(){var n,o,a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return n=t.sent,o="".concat(c.IngestProfilesEndpointUrl,"/").concat(e,"/configuration?").concat(u.getQueryString({})),t.next=6,l.default(o,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(n.token_type," ").concat(n.access_token)}});case 6:return a=t.sent,t.abrupt("return",a.json());case 8:case"end":return t.stop()}}),t,this)})))}},{key:"getAllIngestProfiles",value:function(e){return i(this,void 0,void 0,r.mark((function t(){var n,o,a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return n=t.sent,o="".concat(c.IngestProfilesEndpointUrl,"/").concat(e,"/profiles?").concat(u.getQueryString({})),t.next=6,l.default(o,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(n.token_type," ").concat(n.access_token)}});case 6:return a=t.sent,t.abrupt("return",a.json());case 8:case"end":return t.stop()}}),t,this)})))}}]),e}();t.IngestProfilesApi=p},820:function(e,t,n){"use strict";var r=n(1),o=n(82),a=n(83),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(97),l=s(n(99)),u=n(98),p=function(){function e(t){o(this,e),this.accessTokenService=t}return a(e,[{key:"getAllPlayers",value:function(e){return i(this,void 0,void 0,r.mark((function t(){var n,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return n=t.sent,t.next=5,l.default("".concat(c.PlayerManagementEndpointUrl,"/").concat(e,"/players?").concat(u.getQueryString({})),{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(n.token_type," ").concat(n.access_token)}});case 5:return o=t.sent,t.abrupt("return",o.json());case 7:case"end":return t.stop()}}),t,this)})))}},{key:"getPlayerEmbeds",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,n.next=5,l.default("".concat(c.PlayerManagementEndpointUrl,"/").concat(e,"/players/").concat(t,"/embeds?").concat(u.getQueryString({})),{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 5:return a=n.sent,n.abrupt("return",a.json());case 7:case"end":return n.stop()}}),n,this)})))}}]),e}();t.PlayerManagementApi=p},821:function(e,t,n){"use strict";var r=n(1),o=n(82),a=n(83),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=n(54),l=n(97),u=n(98),p=s(n(99)),d=n(6),h=function(){function e(t){o(this,e),this.accessTokenService=t}return a(e,[{key:"createPlaylist",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i,s;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(l.CmsEndpointUrl,"/").concat(e,"/playlists"),i=t.type===c.BCPlaylistType.Manual?d.pick(t,["name","description","favorite","reference_id","type","video_ids"]):d.pick(t,["name","description","favorite","reference_id","type","search","limit"]),n.next=7,p.default(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)},body:JSON.stringify(i)});case 7:return s=n.sent,n.abrupt("return",s.json());case 9:case"end":return n.stop()}}),n,this)})))}},{key:"getPlaylists",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(l.CmsEndpointUrl,"/").concat(e,"/playlists"),t&&(a+="?"+u.getQueryString(t)),n.next=7,p.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 7:return i=n.sent,n.abrupt("return",i.json());case 9:case"end":return n.stop()}}),n,this)})))}},{key:"getPlaylistById",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(l.CmsEndpointUrl,"/").concat(e,"/playlists/").concat(t,"?").concat(u.getQueryString({})),n.next=6,p.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 6:return i=n.sent,n.abrupt("return",i.json());case 8:case"end":return n.stop()}}),n,this)})))}},{key:"getVideosInPlaylist",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(l.CmsEndpointUrl,"/").concat(e,"/playlists/").concat(t,"/videos?").concat(u.getQueryString({})),n.next=6,p.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 6:return i=n.sent,n.abrupt("return",i.json());case 8:case"end":return n.stop()}}),n,this)})))}},{key:"updatePlaylist",value:function(e,t,n){return i(this,void 0,void 0,r.mark((function o(){var a,i,s,u;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return a=r.sent,i="".concat(l.CmsEndpointUrl,"/").concat(e,"/playlists/").concat(t),s=n.type===c.BCPlaylistType.Manual?d.pick(n,["name","description","favorite","reference_id","type","video_ids"]):d.pick(n,["name","description","favorite","reference_id","type","search","limit"]),r.next=7,p.default(i,{method:"PATCH",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(a.token_type," ").concat(a.access_token)},body:JSON.stringify(s)});case 7:return u=r.sent,r.abrupt("return",u.json());case 9:case"end":return r.stop()}}),o,this)})))}},{key:"deletePlaylist",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(l.CmsEndpointUrl,"/").concat(e,"/playlists/").concat(t),n.next=6,p.default(a,{method:"DELETE",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 6:case"end":return n.stop()}}),n,this)})))}}]),e}();t.PlaylistsApi=h},822:function(e,t,n){"use strict";var r=n(1),o=n(82),a=n(83),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{c(r.next(e))}catch(t){a(t)}}function s(e){try{c(r.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}c((r=r.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var c=s(n(99)),l=n(97),u=n(98),p=function(){function e(t){o(this,e),this.accessTokenService=t}return a(e,[{key:"createVideo",value:function(e,t,n){return i(this,void 0,void 0,r.mark((function o(){var a,i,s;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return a=r.sent,i="".concat(l.CmsEndpointUrl,"/").concat(e,"/videos"),r.next=6,c.default(i,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"".concat(a.token_type," ").concat(a.access_token)},body:JSON.stringify({name:t,tags:n})});case 6:return s=r.sent,r.abrupt("return",s.json());case 8:case"end":return r.stop()}}),o,this)})))}},{key:"getVideos",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(l.CmsEndpointUrl,"/").concat(e,"/videos"),t&&(a+="?"+u.getQueryString(t)),n.next=7,c.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 7:return i=n.sent,n.abrupt("return",i.json());case 9:case"end":return n.stop()}}),n,this)})))}},{key:"getVideoById",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(l.CmsEndpointUrl,"/").concat(e,"/videos/").concat(t,"?").concat(u.getQueryString({})),n.next=6,c.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 6:return i=n.sent,n.abrupt("return",i.json());case 8:case"end":return n.stop()}}),n,this)})))}},{key:"updateVideo",value:function(e,t,n){return i(this,void 0,void 0,r.mark((function o(){var a,i,s;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return a=r.sent,i="".concat(l.CmsEndpointUrl,"/").concat(e,"/videos/").concat(t),r.next=6,c.default(i,{method:"PATCH",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(a.token_type," ").concat(a.access_token)},body:JSON.stringify(n)});case 6:return s=r.sent,r.abrupt("return",s.json());case 8:case"end":return r.stop()}}),o,this)})))}},{key:"getVideoInjestJobs",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(l.CmsEndpointUrl,"/").concat(e,"/videos/").concat(t,"/ingest_jobs?").concat(u.getQueryString({})),n.next=6,c.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 6:return i=n.sent,n.abrupt("return",i.json());case 8:case"end":return n.stop()}}),n,this)})))}},{key:"getVideoIngestJobStatus",value:function(e,t,n){return i(this,void 0,void 0,r.mark((function o(){var a,i,s;return r.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return a=r.sent,i="".concat(l.CmsEndpointUrl,"/").concat(e,"/videos/").concat(t,"/ingest_jobs/").concat(n,"?").concat(u.getQueryString({})),r.next=6,c.default(i,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(a.token_type," ").concat(a.access_token)}});case 6:return s=r.sent,r.abrupt("return",s.json());case 8:case"end":return r.stop()}}),o,this)})))}},{key:"getVideoCount",value:function(e,t){return i(this,void 0,void 0,r.mark((function n(){var o,a,i;return r.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return o=n.sent,a="".concat(l.CmsEndpointUrl,"/").concat(e,"/counts/videos"),t&&(a+="?"+u.getQueryString(t)),n.next=7,c.default(a,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(o.token_type," ").concat(o.access_token)}});case 7:return i=n.sent,n.abrupt("return",i.json());case 9:case"end":return n.stop()}}),n,this)})))}},{key:"getCustomFields",value:function(e){return i(this,void 0,void 0,r.mark((function t(){var n,o,a;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.accessTokenService.obtainAccessToken(e);case 2:return n=t.sent,o="".concat(l.CmsEndpointUrl,"/").concat(e,"/video_fields?").concat(u.getQueryString({})),t.next=6,c.default(o,{method:"GET",cache:"no-cache",headers:{"Content-Type":"application/json",Authorization:"".concat(n.token_type," ").concat(n.access_token)}});case 6:return a=t.sent,t.abrupt("return",a.json());case 8:case"end":return t.stop()}}),t,this)})))}}]),e}();t.VideosApi=p},97:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessTokenEndpointUrl="https://oauth.brightcove.com/v4/access_token",t.ClientCredentialsEndpointUrl="https://oauth.brightcove.com/v4/client_credentials",t.CmsEndpointUrl="https://cms.api.brightcove.com/v1/accounts",t.IngestEndpointUrl="https://ingest.api.brightcove.com/v1/accounts",t.PlayerManagementEndpointUrl="https://players.api.brightcove.com/v2/accounts",t.ExperiencesEndpointUrl="https://experiences.api.brightcove.com/v1/accounts",t.IngestProfilesEndpointUrl="https://ingestion.api.brightcove.com/v1/accounts"},98:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQueryString=function(e){for(var t=[],n=encodeURIComponent,r=0,o=Object.keys(e);r<o.length;r++){var a=o[r],i=e[a];void 0!==i&&null!==i&&""!==i&&t.push("".concat(n(a),"=").concat(n(i)))}return t.push("v=".concat((new Date).getTime())),t.join("&")}}},[[456,1,2]]]);
  //# sourceMappingURL=main.8f7a4d34.chunk.js.map