@clickview/curator 1.0.15-rc.3 → 1.0.15-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("_"),require("Yup"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","_","Yup","ReactBootstrap","Backbone","ReactRedux","Marionette","FontAwesome","DOMPurify","SortableHOC","ReactDOM","ReactTransitionGroup","Polyglot","Cropper","Handlebars"],t):"object"==typeof exports?exports["@clickview/curator"]=t(require("React"),require("_"),require("Yup"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):e["@clickview/curator"]=t(e.React,e._,e.Yup,e.ReactBootstrap,e.Backbone,e.ReactRedux,e.Marionette,e.FontAwesome,e.DOMPurify,e.SortableHOC,e.ReactDOM,e.ReactTransitionGroup,e.Polyglot,e.Cropper,e.Handlebars)}(window,(function(e,t,n,r,i,a,o,s,c,l,u,p,f,d,m){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=182)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=a},function(e,t,n){"use strict";var r=n(19),i="object"==typeof self&&self&&self.Object===Object&&self,a=r.a||i||Function("return this")();t.a=a},function(e,t){e.exports=o},function(e,t,n){e.exports={tree:"_1abau",text:"f13wK",chevron:"_25eVA",disabled:"_1qyCo",parentOfSelected:"_1fgN6",selected:"cVZit",actions:"_2BGWp",node:"rJVbQ",collapsed:"vc2by"}},function(e,t,n){e.exports={alertItem:"_3ppPT",alertBox:"_2gPqV",alertList:"_1_wrK",icon:"_2gpnl",alertContent:"_1akpi",heading:"_3jnJY"}},function(e,t,n){"use strict";(function(e){var r=n(19),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i&&r.a.process,s=function(){try{var e=a&&a.require&&a.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();t.a=s}).call(this,n(26)(e))},function(e,t,n){e.exports={draggableVideoItem:"_1JMCe",draggedVideoItem:"_3jjle"}},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,a=Object.prototype.hasOwnProperty,o="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var s,c,l,u=r(t),p=r(n);if(u&&p){if((c=t.length)!=n.length)return!1;for(s=c;0!=s--;)if(!e(t[s],n[s]))return!1;return!0}if(u!=p)return!1;var f=t instanceof Date,d=n instanceof Date;if(f!=d)return!1;if(f&&d)return t.getTime()==n.getTime();var m=t instanceof RegExp,h=n instanceof RegExp;if(m!=h)return!1;if(m&&h)return t.toString()==n.toString();var g=i(t);if((c=g.length)!==i(n).length)return!1;for(s=c;0!=s--;)if(!a.call(n,g[s]))return!1;if(o&&t instanceof Element&&n instanceof Element)return t===n;for(s=c;0!=s--;)if(!("_owner"===(l=g[s])&&t.$$typeof||e(t[l],n[l])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,o={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},s=e=>o[e];const c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function l(e){return e.replace(c,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const u=/(^|[^\[])\^/g;const p=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const d={},m=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(e,t){d[" "+e]||(m.test(e)?d[" "+e]=e+"/":d[" "+e]=v(e,"/",!0));const n=-1===(e=d[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(h,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(g,"$1")+t:e+t}function v(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const a=e.charAt(r-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.substr(0,r-i)}e.exports={escape:function(e,t){if(t){if(n.test(e))return e.replace(r,s)}else if(i.test(e))return e.replace(a,s);return e},unescape:l,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(u,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(l(n)).replace(p,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!f.test(n)&&(n=y(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:y,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:v,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}}},function(e,t,n){e.exports={input:"_3MysI",suggestionsContainerOpen:"ahMdW",sectionContainer:"xstWL",suggestionHighlighted:"_3YTCa"}},function(e,t){e.exports=s},function(e,t,n){e.exports=n(168)()},function(e,t){function n(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1},getDefaults:n,changeDefaults:function(t){e.exports.defaults=t}}},function(e,t,n){e.exports={svg:"_3OUhC",iconButton:"_3t3VL",iconWithText:"_2KLHo",iconOnly:"_2rQWb"}},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(166))},function(e,t,n){"use strict";(function(e){var r=n(6),i=n(122),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a?r.a.Buffer:void 0,c=(s?s.isBuffer:void 0)||i.a;t.a=c}).call(this,n(26)(e))},function(e,t){e.exports=c},function(e,t,n){e.exports={buttonList:"_2v9CT",dropdownToggle:"AYBvQ"}},function(e,t){e.exports=l},function(e,t){e.exports=u},function(e,t,n){e.exports={curatorLayout:"XayF7",topNavRegion:"_3ewaZ",leftNavRegion:"_2c2o6"}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);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}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!0;var o={},s=void 0,c=void 0;for(s=0,c=n.length;s<c;s++)o[n[s]]=!0;for(s=0,c=i.length;s<c;s++){var l=i[s],u=e[l],p=t[l];if(u!==p){if(!o[l]||null===u||null===p||"object"!==(void 0===u?"undefined":r(u))||"object"!==(void 0===p?"undefined":r(p)))return!0;var f=Object.keys(u),d=Object.keys(p);if(f.length!==d.length)return!0;for(var m=0,h=f.length;m<h;m++){var g=f[m];if(u[g]!==p[g])return!0}}}return!1}},function(e,t,n){const{defaults:r}=n(17),{cleanUrl:i,escape:a}=n(13);e.exports=class{constructor(e){this.options=e||r}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return r?'<pre><code class="'+this.options.langPrefix+a(r,!0)+'">'+(n?e:a(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:a(e,!0))+"</code></pre>"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+a(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">",r}text(e){return e}}},function(e,t,n){"use strict";e.exports=n(163)},function(e,t,n){"use strict";var r=n(164),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var i=d(n);i&&i!==m&&e(t,i,r)}var o=u(n);p&&(o=o.concat(p(n)));for(var s=c(t),h=c(n),g=0;g<o.length;++g){var y=o[g];if(!(a[y]||r&&r[y]||h&&h[y]||s&&s[y])){var v=f(n,y);try{l(t,y,v)}catch(e){}}}}return t}},function(e,t){e.exports=p},function(e,t){e.exports={prefix:"cv",iconName:"add-to-playlist",icon:["24","24",[],"","M20.1 16.4h1.8a.6.6 0 1 1 0 1.2h-1.8v1.8a.6.6 0 1 1-1.2 0v-1.8h-1.8a.6.6 0 1 1 0-1.2h1.8v-1.8a.6.6 0 0 1 1.2 0v1.8zM10.5 9a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm5.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V12a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16zm-8-2.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-7a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM8 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close",icon:["24","24",[],"","M11.959 10.641l4.402-4.296a.964.964 0 0 1 1.358 0 .951.951 0 0 1 0 1.35l-4.403 4.297 4.403 4.378a.951.951 0 0 1 0 1.35.964.964 0 0 1-1.358 0l-4.402-4.378-4.32 4.378a.964.964 0 0 1-1.358 0 .951.951 0 0 1 0-1.35l4.32-4.378-4.32-4.362a.951.951 0 0 1 0-1.35.964.964 0 0 1 1.358 0l4.32 4.361z"]}},function(e,t){e.exports={prefix:"cv",iconName:"delete",icon:["24","24",[],"","M14.5 7h4a.5.5 0 1 1 0 1h-1.14a1 1 0 0 1-.005.09l-.909 10a1 1 0 0 1-.996.91h-6.9a1 1 0 0 1-.996-.91l-.91-10A1.013 1.013 0 0 1 6.64 8H5.5a.5.5 0 0 1 0-1h4A1.5 1.5 0 0 1 11 5.5h2A1.5 1.5 0 0 1 14.5 7zm-1 0a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5h3zm-4 3a.463.463 0 0 0-.462.499L9.462 16a.54.54 0 0 0 .574.498.463.463 0 0 0 .426-.498l-.424-5.502A.54.54 0 0 0 9.5 10zm2.5 0a.5.5 0 0 0-.5.5V16a.5.5 0 1 0 1 0v-5.5a.5.5 0 0 0-.5-.5zm2.5 0a.54.54 0 0 0-.538.499L13.538 16a.463.463 0 0 0 .462.5.54.54 0 0 0 .538-.499l.424-5.502A.463.463 0 0 0 14.5 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit",icon:["24","24",[],"","M7.636 17.834l8.746-8.745-1.414-1.414-8.8 8.8 1.468 1.36zm-2.42.973c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zm2.614-1.906l.707.707a1.5 1.5 0 0 1 0 2.121L7.45 19.435c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L16.167 5.06a1.5 1.5 0 0 1 2.122 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"expand",icon:["24","24",[],"","M14.06 21.28l-.353.354-.707-.707.354-.354 7.22-7.22.353-.353.707.707-.354.354-7.22 7.22zm4 .465l-.353.353-.707-.707.354-.353 3.684-3.684.353-.354.707.707-.353.354-3.684 3.684z"]}},function(e,t){e.exports={prefix:"cv",iconName:"minus",icon:["24","24",[],"",""]}},function(e,t){e.exports={prefix:"cv",iconName:"more",icon:["24","24",[],"","M12 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 5.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"new-window",icon:["24","24",[],"","M17.395 5.526h-3.244a.763.763 0 0 1 0-1.526h5.086a.76.76 0 0 1 .763.763v5.086a.763.763 0 0 1-1.526 0V6.605l-5.172 5.172a.763.763 0 1 1-1.079-1.08l5.172-5.171zM8.5 5.5a.75.75 0 0 1 0 1.5H6.75a.25.25 0 0 0-.25.25v10c0 .138.112.25.25.25h10a.25.25 0 0 0 .25-.25V15.5a.75.75 0 1 1 1.5 0v1.75A1.75 1.75 0 0 1 16.75 19h-10A1.75 1.75 0 0 1 5 17.25v-10c0-.966.784-1.75 1.75-1.75H8.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"plus",icon:["24","24",[],"","M11 11V7.002a.999.999 0 1 1 2 0V11h3.998a.999.999 0 1 1 0 2H13v3.998a.999.999 0 1 1-2 0V13H7.002a.999.999 0 1 1 0-2H11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"preview",icon:["24","24",[],"","M17.278 17.333a3.056 3.056 0 1 0 0-6.11 3.056 3.056 0 0 0 0 6.11zm3.53-.637c.03.022.06.048.087.076l1.729 1.728a.794.794 0 1 1-1.124 1.124l-1.728-1.729a.801.801 0 0 1-.076-.088 4.278 4.278 0 1 1 1.112-1.112zM7.713 9C7.32 9 7 8.776 7 8.5s.32-.5.714-.5h8.572c.394 0 .714.224.714.5s-.32.5-.714.5H7.714zm-.357 3.5C7.16 12.5 7 12.276 7 12s.16-.5.357-.5h4.286c.197 0 .357.224.357.5s-.16.5-.357.5H7.357zM7.5 16a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm8.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V9a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"search",icon:["24","24",[],"","M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"]}},function(e,t){e.exports={prefix:"cv",iconName:"share",icon:["24","24",[],"","M15.091 15.463a2.187 2.187 0 1 1-.392.782L8.91 13.35a2.187 2.187 0 1 1-.1-2.82l5.88-2.812a2.187 2.187 0 1 1 .378.79l-5.811 2.778a2.184 2.184 0 0 1 .045 1.281l5.79 2.896z"]}},function(e,t){e.exports={prefix:"cv",iconName:"upload",icon:["24","24",[],"","M5.5 18.5h13v-2.75a.75.75 0 1 1 1.5 0V19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3.25a.75.75 0 1 1 1.5 0v2.75zm7.249-11.796v8.57c0 .401-.35.726-.781.726-.432 0-.781-.325-.781-.725V6.704L7.89 9.658a.869.869 0 0 1-1.145 0 .692.692 0 0 1-.009-1.05l4.66-4.174a.869.869 0 0 1 1.144 0l4.66 4.174a.69.69 0 0 1 0 1.042.871.871 0 0 1-1.155.008L12.75 6.704z"]}},function(e,t){e.exports={prefix:"cv",iconName:"down",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"right",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"up-down",icon:["24","24",[],"","M8 14l8 .014L12 18l-4-4zm0-4l4-4 4 3.986L8 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"no-edit",icon:["24","24",[],"","M11.321 14.15l.707.707-4.578 4.578c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L9.2 12.028l.707.707-3.739 3.74 1.468 1.36 3.685-3.685zm2.828-2.829l2.233-2.232-1.414-1.414-2.233 2.232-.707-.707 4.14-4.14a1.5 1.5 0 0 1 2.12 0l.708.708a1.5 1.5 0 0 1 0 2.121l-4.14 4.14-.707-.708zm-8.933 7.486c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zM4.646 5.355a.5.5 0 0 1 .708-.708L19.496 18.79a.5.5 0 1 1-.707.707L4.646 5.354z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit-clickview",icon:["20","20",[],"","M17.6404852,5.71727477 L18.2297408,6.30653042 C18.7178962,6.79468579 18.7178962,7.58614201 18.2297408,8.07429738 L8.60812289,17.6959153 C6.71135346,18.0295451 5.75309028,18.1864816 5.73333333,18.1667246 C5.71357639,18.1469677 5.88616537,17.2043571 6.25110029,15.3388927 L15.8727182,5.71727477 C16.3608736,5.22911941 17.1523298,5.22911941 17.6404852,5.71727477 Z M8.7636789,16.361848 L16.05144,9.07408693 L14.8729287,7.89557563 L7.54002172,15.2284826 L8.7636789,16.361848 Z M6.74626541,17.1725049 C7.12145752,17.1092038 7.58975231,17.0283895 8.15085565,16.9301078 L6.99799308,15.862313 C6.89682248,16.3819093 6.8128974,16.8187273 6.74626541,17.1725049 Z M15.4621843,7.30631998 L16.6406956,8.48483128 L17.6404852,7.48504173 C17.8032036,7.32232327 17.8032036,7.05850453 17.6404852,6.89578608 L17.0512295,6.30653042 C16.8885111,6.14381197 16.6246923,6.14381197 16.4619739,6.30653042 L15.4621843,7.30631998 Z M6.33566019,14.9908489 C6.2812423,14.9851574 6.22594201,14.9756491 6.16991424,14.9622805 C5.78045547,14.8577915 5.5109401,14.5829916 5.41684139,14.197065 L5.16924027,13.2272939 L4.21481414,13.4992408 C3.82064978,13.614606 3.44283804,13.5120571 3.186267,13.236167 C2.88681965,12.9560388 2.78427075,12.578227 2.89864522,12.187493 L3.17158282,11.2296365 L2.20423564,10.9826478 C1.82188543,10.8870603 1.55144636,10.6218219 1.4331146,10.2152085 C1.34005988,9.82437875 1.44481708,9.45772856 1.72601896,9.19546209 L2.43808286,8.49887783 L1.73450689,7.81040417 C1.44481706,7.54002697 1.34005989,7.17337687 1.439649,6.75790801 C1.55144635,6.37593371 1.82188539,6.11069542 2.20181175,6.01572028 L3.17158282,5.76811916 L2.89963593,4.81369299 C2.78427075,4.41952863 2.88681965,4.04171689 3.16270985,3.78514587 C3.442838,3.48569854 3.82064974,3.38314964 4.2113838,3.49752411 L5.16924027,3.77046171 L5.41554008,2.80590417 C5.51183431,2.41109782 5.78619407,2.13673807 6.15902913,2.0463353 C6.55319349,1.93097012 6.93100525,2.03351902 7.20467421,2.32619001 L7.89999894,3.04211696 L8.594506,2.32703389 C8.87243071,2.03952554 9.24209506,1.93918808 9.61899753,2.04044384 C10.0138038,2.13673809 10.2881636,2.41109789 10.3831565,2.80069064 L10.6307576,3.77046171 L11.5851838,3.49851482 C11.9793481,3.38314964 12.3571599,3.48569854 12.6137309,3.76158875 C12.9131782,4.04171689 13.0157271,4.41952857 12.9013527,4.8102627 L12.6284151,5.76811916 L13.5957624,6.01510789 C13.9781125,6.11069542 14.2485515,6.37593369 14.3668833,6.78254721 C14.3761095,6.82129727 14.3833912,6.85980963 14.3887491,6.89800613 L12.4311686,8.86525019 C12.2885501,8.50246788 12.3664513,8.07377489 12.6626209,7.7840438 L13.3831727,7.07934901 C13.4057811,7.05824779 13.4051218,7.06055538 13.4006115,7.03880681 C13.3874896,6.9939735 13.3872742,6.99376225 13.3508029,6.98463799 L12.3810318,6.73703687 L12.3543769,6.72983797 C11.8232342,6.57849086 11.5153491,6.0252236 11.6666962,5.49408097 L11.9406245,4.53279433 C11.9501787,4.50015106 11.9538346,4.51362027 11.9070166,4.46830299 C11.8852565,4.44504217 11.8987257,4.44869811 11.8626522,4.45924293 L10.9047957,4.73218053 L10.8781408,4.73937942 C10.3430223,4.87600541 9.79846586,4.55296343 9.66183987,4.01784495 L9.41293742,3.04286026 C9.40513226,3.0108591 9.4140425,3.01976934 9.37095513,3.00912543 C9.33213613,2.99871057 9.33745796,2.99726608 9.31267674,3.02289983 L8.61735201,3.73882678 L8.59670876,3.75947002 C8.2005256,4.14425223 7.56742808,4.13500994 7.18264587,3.73882678 L6.48086195,3.01612347 C6.45910183,2.99286265 6.4725711,2.9965186 6.4179566,3.01196417 C6.38595535,3.01976935 6.39486559,3.01085911 6.3857591,3.04807388 L6.13815798,4.01784495 L6.13095909,4.04449986 C5.97961199,4.5756425 5.42634475,4.88352762 4.89520211,4.73218053 L3.93391535,4.45825223 C3.90127212,4.44869811 3.91474139,4.44504217 3.86942412,4.49186014 C3.84616328,4.51362028 3.84981922,4.50015102 3.86036404,4.53622453 L4.13330164,5.494081 L4.14050053,5.52073591 C4.27712653,6.05585439 3.95408454,6.60041087 3.41896607,6.73703687 L2.44677117,6.98525039 C2.41272371,6.99376225 2.41250834,6.99397349 2.40592081,7.01416766 C2.3948761,7.06055542 2.39421677,7.05824776 2.42531312,7.08745955 L3.13737702,7.78404381 L3.15291688,7.79958367 C3.53912638,8.1943756 3.53216895,8.82750235 3.13737702,9.21371185 L2.41682511,9.91840678 C2.39421677,9.93950789 2.3948761,9.93720022 2.3993864,9.95894886 C2.41250834,10.0037822 2.41272371,10.0039934 2.44919499,10.0131176 L3.41896606,10.2607188 L3.44562098,10.2679177 C3.97676362,10.4192648 4.28464874,10.972532 4.13330164,11.5036746 L3.85937334,12.4649614 C3.84981922,12.4976046 3.84616328,12.4841354 3.89298124,12.5294526 C3.91474137,12.5527135 3.90127209,12.5490575 3.93734565,12.5385127 L4.89520212,12.2655751 L4.92185702,12.2583762 C5.4569755,12.1217502 6.00153199,12.4447922 6.13815798,12.9799107 L6.38706042,13.9548953 C6.3957598,13.9905628 6.39169395,13.9864172 6.41528883,13.9929559 C6.46167656,14.0040006 6.45936885,14.00466 6.48858067,13.9735636 L7.18516493,13.2614997 L7.20070477,13.2459599 C7.4952939,12.9577749 7.92258715,12.888504 8.28097421,13.0359319 L6.33566019,14.9908489 Z M6.70489207,8.77616163 L9.31429327,6.16676041 C9.44212761,6.03892605 9.65593967,6.03389908 9.78471434,6.16267377 L10.2815938,6.65955323 C10.4116803,6.78963968 10.4085388,6.9989426 10.2775071,7.12997428 L6.95925927,10.4482222 C6.89767261,10.5098088 6.81613041,10.5428917 6.73375541,10.5462414 C6.63512454,10.5601257 6.53103126,10.5287286 6.45266973,10.450367 L4.80169873,8.79939603 C4.67185163,8.66954896 4.66967053,8.4612063 4.79975698,8.33111983 L5.29663643,7.83424043 C5.42541113,7.7054657 5.63211299,7.70338256 5.76491261,7.83618216 L6.70489207,8.77616163 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"caret",icon:["24","24",[],"","M8 10 16 10.0136253 12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-up",icon:["24","24",[],"","M12.733 8.305l5.963 5.906a1.046 1.046 0 0 1 0 1.473l-.01.011a1.034 1.034 0 0 1-1.467 0L12 10.526l-5.22 5.17a1.034 1.034 0 0 1-1.465 0l-.011-.012a1.046 1.046 0 0 1 0-1.473l5.963-5.906a1.034 1.034 0 0 1 1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-down",icon:["24","24",[],"","M11.267 15.695L5.304 9.79a1.046 1.046 0 0 1 0-1.473l.01-.011a1.034 1.034 0 0 1 1.467 0L12 13.474l5.22-5.17a1.034 1.034 0 0 1 1.465 0l.011.012a1.046 1.046 0 0 1 0 1.473l-5.963 5.906a1.034 1.034 0 0 1-1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-left",icon:["24","24",[],"","M8.305 11.267l5.906-5.963a1.046 1.046 0 0 1 1.473 0l.011.01a1.034 1.034 0 0 1 0 1.467L10.526 12l5.17 5.22c.406.41.406 1.055 0 1.465l-.012.011a1.046 1.046 0 0 1-1.473 0l-5.906-5.963a1.034 1.034 0 0 1 0-1.466z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-right",icon:["24","24",[],"","M15.695 11.267c.407.41.407 1.056 0 1.466L9.79 18.696a1.046 1.046 0 0 1-1.474 0l-.01-.01a1.034 1.034 0 0 1 0-1.467L13.474 12l-5.17-5.22a1.034 1.034 0 0 1 0-1.465l.012-.011a1.046 1.046 0 0 1 1.474 0l5.905 5.963z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-left",icon:["24","24",[],"","M7.182 11h11.89c.512 0 .928.448.928 1s-.416 1-.929 1H7.181l3.781 4.22a1.11 1.11 0 0 1 0 1.465c-.36.403-.943.418-1.311.045a.952.952 0 0 1-.032-.034l-5.343-5.963a1.112 1.112 0 0 1 0-1.466l5.343-5.963a.883.883 0 0 1 1.333 0c.378.421.378 1.066.01 1.477L7.182 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-right",icon:["24","24",[],"","M16.818 11H4.928C4.417 11 4 11.448 4 12s.416 1 .929 1h11.89l-3.781 4.22a1.112 1.112 0 0 0 0 1.465c.36.403.943.418 1.311.045a.952.952 0 0 0 .032-.034l5.343-5.963a1.112 1.112 0 0 0 0-1.466l-5.343-5.963a.883.883 0 0 0-1.333 0 1.115 1.115 0 0 0-.01 1.477L16.818 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"enter",icon:["24","24",[],"","M5.613 13.959a.599.599 0 0 1-.213-.46c0-.155.058-.309.176-.426l3.75-3.75a.6.6 0 0 1 .848.848L7.446 12.9H13.5A3.9 3.9 0 0 0 17.4 9V6.747a.6.6 0 0 1 1.2 0V9a5.1 5.1 0 0 1-5.1 5.1H7.452l2.722 2.723a.6.6 0 0 1-.848.848L5.613 13.96z"]}},function(e,t){e.exports={prefix:"cv",iconName:"archive",icon:["24","24",[],"","M19.64 10.28a.55.55 0 1 1 1.1 0v6.878c0 1.582-1.386 2.842-3.07 2.842H6.33c-1.684 0-3.07-1.26-3.07-2.842V10.28a.55.55 0 1 1 1.1 0v6.877c0 .95.87 1.742 1.97 1.742h11.34c1.1 0 1.97-.793 1.97-1.742V10.28zM20.19 4c.99 0 1.81.747 1.81 1.696V7.99a.55.55 0 0 1-.55.55H2.55A.55.55 0 0 1 2 7.99V5.696C2 4.747 2.821 4 3.81 4h16.38zm.71 1.696c0-.317-.307-.596-.71-.596H3.81c-.403 0-.71.28-.71.596v1.742h17.8V5.696zm-5.83 5.73c0 .95-.821 1.697-1.81 1.697h-2.52c-.989 0-1.81-.747-1.81-1.696 0-.95.821-1.696 1.81-1.696h2.52c.989 0 1.81.747 1.81 1.696zm-1.1 0c0-.316-.307-.595-.71-.595h-2.52c-.403 0-.71.28-.71.596 0 .317.307.596.71.596h2.52c.403 0 .71-.28.71-.596z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bell",icon:["24","24",[],"","M9.588 17.995H6.152c-.636 0-1.152-.53-1.152-1.182 0-.221.06-.438.175-.626l2.128-2.92V9.722c0-2.187 1.447-4.027 3.411-4.567v-.012A1.143 1.143 0 0 1 13 5.128c2.017.502 3.515 2.369 3.515 4.594v3.545l2.303 2.92a1.2 1.2 0 0 1-.366 1.628 1.13 1.13 0 0 1-.61.18h-3.716a2.286 2.286 0 0 1-4.538 0zm1.161 0a1.143 1.143 0 0 0 2.216 0H10.75zm4.615-4.31V9.723c0-1.958-1.547-3.546-3.455-3.546-1.908 0-3.454 1.588-3.454 3.546v3.939l-.23.314-2.073 2.838H17.83l-2.467-3.127z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bookmark",icon:["24","24",[],"","M8.5 5h7A1.5 1.5 0 0 1 17 6.5v12.131a.2.2 0 0 1-.309.168L12 15.75 7.309 18.8A.2.2 0 0 1 7 18.63V6.5A1.5 1.5 0 0 1 8.5 5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"broadcast",icon:["24","24",[],"","M4.571 19C4.256 19 4 18.776 4 18.5s.256-.5.571-.5H19.43c.315 0 .571.224.571.5s-.256.5-.571.5H4.57zM4.125 5h15.75C20.496 5 21 5.537 21 6.2v9.6c0 .663-.504 1.2-1.125 1.2H4.125C3.504 17 3 16.463 3 15.8V6.2C3 5.537 3.504 5 4.125 5zM4 6v10h16V6H4zm6 2.35a.192.192 0 0 1 .295-.162l4.164 2.65a.192.192 0 0 1 0 .324l-4.164 2.65A.192.192 0 0 1 10 13.65v-5.3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"calendar",icon:["24","24",[],"","M6.2 10.2V17a.8.8 0 0 0 .8.8h10a.8.8 0 0 0 .8-.8v-6.8H6.2zM16 5.5h2a1 1 0 0 1 1 1V17a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6.5a1 1 0 0 1 1-1h2v-.875a.625.625 0 1 1 1.25 0V5.5h5.5v-.875a.625.625 0 1 1 1.25 0V5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"cog",icon:["24","24",[],"","M18.458 12c0 .944.514 1.722 1.542 2.333a10.98 10.98 0 0 1-.667 1.584c-.944-.223-1.805.055-2.583.833-.694.694-.917 1.556-.667 2.583A10.98 10.98 0 0 1 14.5 20c-.611-1.028-1.444-1.542-2.5-1.542s-1.889.514-2.5 1.542c-.5-.167-1.042-.389-1.625-.667.25-1.055.042-1.916-.625-2.583-.667-.667-1.528-.875-2.583-.625C4.389 15.542 4.167 15 4 14.5c1.028-.611 1.542-1.444 1.542-2.5 0-.944-.514-1.722-1.542-2.333a8.484 8.484 0 0 1 .667-1.584c.944.223 1.805-.055 2.583-.833.667-.667.875-1.528.625-2.583C8.458 4.389 9 4.167 9.5 4c.611 1.028 1.444 1.542 2.5 1.542S13.889 5.028 14.5 4c.5.167 1.042.389 1.625.667-.25 1.055-.042 1.916.625 2.583.778.778 1.639 1.056 2.583.833.306.611.528 1.14.667 1.584-1.028.61-1.542 1.389-1.542 2.333zM12 16.083c1.111 0 2.07-.402 2.875-1.208.806-.806 1.208-1.764 1.208-2.875s-.402-2.07-1.208-2.875c-.806-.806-1.764-1.208-2.875-1.208s-2.07.402-2.875 1.208c-.806.806-1.208 1.764-1.208 2.875s.402 2.07 1.208 2.875c.806.806 1.764 1.208 2.875 1.208z"]}},function(e,t){e.exports={prefix:"cv",iconName:"folder",icon:["24","24",[],"","M12.685 6H18.5A1.5 1.5 0 0 1 20 7.5v11a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 18.5v-13A1.5 1.5 0 0 1 5.5 4h4.66a1.5 1.5 0 0 1 1.095.474L12.685 6zM5.5 5a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-6.248l-1.727-1.842A.5.5 0 0 0 10.161 5H5.5zM5 10V9h14v1H5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"handle",icon:["16","16",[],"","M1 0h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7.4a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1V15a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-1.2a1 1 0 0 1 1-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c4.001-4.053 1.158-11.055-4.532-11.055-3.417 0-4.985 2.511-5.596 2.98-.614-.471-2.172-2.98-5.596-2.98-5.672 0-8.55 6.984-4.531 11.055z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart-outline",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c2.491-2.523 2.491-6.63 0-9.154-1.21-1.226-2.819-1.901-4.532-1.901s-3.321.675-4.531 1.9l-1.065 1.08-1.065-1.079c-1.21-1.226-2.819-1.901-4.531-1.901-1.713 0-3.322.675-4.532 1.901-2.491 2.524-2.491 6.631 0 9.153zm-8.527-17.822c.926-.937 2.157-1.454 3.464-1.454 1.308 0 2.538.517 3.463 1.455l1.599 1.62c.281.285.786.285 1.067 0l1.599-1.621c.928-.937 2.158-1.454 3.465-1.454 1.308 0 2.538.517 3.464 1.454 1.917 1.943 1.917 5.104 0 7.048l-9.06 9.181-9.061-9.182c-1.917-1.942-1.917-5.104 0-7.047z"]}},function(e,t){e.exports={prefix:"cv",iconName:"interactive",icon:["24","24",[],"","M5.978 13.65l7.525-9.99a.2.2 0 0 1 .357.154l-1.289 7.5 5.194-1.04a.2.2 0 0 1 .198.318l-7.447 9.733a.2.2 0 0 1-.355-.16l1.268-6.566-5.277.37a.2.2 0 0 1-.174-.32z"]}},function(e,t){e.exports={prefix:"cv",iconName:"link",icon:["24","24",[],"","M17 10c2.2 0 4 1.8 4 4s-1.8 4-4 4h-5a3.99 3.99 0 0 1-3-1.367v-.028a4.447 4.447 0 0 1-.889-2.679c0-.698.162-1.356.443-1.94A4 4 0 0 1 12 10h1.872v.098c0 .573-.322 1.081-.818 1.402H12c-.722 0-1.368.316-1.824.811-.453.418-.732.976-.732 1.591v.196c0 .575.244 1.1.645 1.508.46.545 1.146.894 1.911.894h5c1.375 0 2.5-1.125 2.5-2.5s-1.125-2.5-2.5-2.5h-.686a5.22 5.22 0 0 0 .24-1.5H17zm-9.556 3.926l.002.074H7c-2.2 0-4-1.8-4-4s1.8-4 4-4h5c1.462 0 2.743.797 3.441 1.975a4.48 4.48 0 0 1-.44 4.63v.024a3.982 3.982 0 0 1-3 1.37h-1.873v-.096c0-.574.322-1.082.817-1.403H12c.722 0 1.368-.316 1.824-.811.452-.418.731-.976.731-1.591v-.195c0-.576-.244-1.101-.645-1.51A2.496 2.496 0 0 0 12 7.5H7A2.507 2.507 0 0 0 4.5 10c0 1.375 1.125 2.5 2.5 2.5h.642c-.128.452-.198.93-.198 1.426z"]}},function(e,t){e.exports={prefix:"cv",iconName:"playlist",icon:["24","24",[],"","M4,19.0049107 C4,19.5548349 4.44525903,20 4.99508929,20 L19.0049107,20 C19.5548349,20 20,19.554741 20,19.0049107 L20,4.99508929 C20,4.44516513 19.554741,4 19.0049107,4 L4.99508929,4 C4.44516513,4 4,4.44525903 4,4.99508929 L4,19.0049107 Z M4.99508929,3 L19.0049107,3 C20.1067681,3 21,3.8926228 21,4.99508929 L21,19.0049107 C21,20.1067681 20.1073772,21 19.0049107,21 L4.99508929,21 C3.8932319,21 3,20.1073772 3,19.0049107 L3,4.99508929 C3,3.8932319 3.8926228,3 4.99508929,3 Z M17.5,17.3 C17.7761424,17.3 18,17.0761424 18,16.8 C18,16.5238576 17.7761424,16.3 17.5,16.3 L9.5,16.3 C9.22385763,16.3 9,16.5238576 9,16.8 C9,17.0761424 9.22385763,17.3 9.5,17.3 L17.5,17.3 Z M17.5,12.7 C17.7761424,12.7 18,12.4761424 18,12.2 C18,11.9238576 17.7761424,11.7 17.5,11.7 L9.5,11.7 C9.22385763,11.7 9,11.9238576 9,12.2 C9,12.4761424 9.22385763,12.7 9.5,12.7 L17.5,12.7 Z M8.07195299,7.22930174 L6.86542219,6.50538326 C6.38401051,6.21653625 6,6.43413716 6,6.98678206 L6,8.51032805 C6,9.06455544 6.38746271,9.27850253 6.86542219,8.99172685 L8.07195299,8.26780837 C8.55336467,7.97896136 8.54991246,7.51607743 8.07195299,7.22930174 Z M8.07195299,11.7293017 L6.86542219,11.0053833 C6.38401051,10.7165363 6,10.9341372 6,11.4867821 L6,13.010328 C6,13.5645554 6.38746271,13.7785025 6.86542219,13.4917268 L8.07195299,12.7678084 C8.55336467,12.4789614 8.54991246,12.0160774 8.07195299,11.7293017 Z M8.07195299,16.2293017 L6.86542219,15.5053833 C6.38401051,15.2165363 6,15.4341372 6,15.9867821 L6,17.510328 C6,18.0645554 6.38746271,18.2785025 6.86542219,17.9917268 L8.07195299,17.2678084 C8.55336467,16.9789614 8.54991246,16.5160774 8.07195299,16.2293017 Z M17.5,8.3 C17.7761424,8.3 18,8.07614237 18,7.8 C18,7.52385763 17.7761424,7.3 17.5,7.3 L9.5,7.3 C9.22385763,7.3 9,7.52385763 9,7.8 C9,8.07614237 9.22385763,8.3 9.5,8.3 L17.5,8.3 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"publisher-archive",icon:["24","24",[],"","M19.6403207,10.2808023 C19.6403207,9.97696656 19.8864872,9.73065903 20.1901489,9.73065903 C20.4938106,9.73065903 20.7399771,9.97696656 20.7399771,10.2808023 L20.7399771,17.1575931 C20.7399771,18.7397289 19.3544729,20 17.6701031,20 L6.32989691,20 C4.64552709,20 3.26002291,18.7397289 3.26002291,17.1575931 L3.26002291,10.2808023 C3.26002291,9.97696656 3.50618937,9.73065903 3.80985109,9.73065903 C4.11351281,9.73065903 4.35967927,9.97696656 4.35967927,10.2808023 L4.35967927,17.1575931 C4.35967927,18.1074218 5.23070097,18.8997135 6.32989691,18.8997135 L17.6701031,18.8997135 C18.769299,18.8997135 19.6403207,18.1074218 19.6403207,17.1575931 L19.6403207,10.2808023 Z M20.1901489,4 C21.1786273,4 22,4.74713037 22,5.69627507 L22,7.98853868 C22,8.29237442 21.7538335,8.53868195 21.4501718,8.53868195 L2.54982818,8.53868195 C2.24616646,8.53868195 2,8.29237442 2,7.98853868 L2,5.69627507 C2,4.74713037 2.82137271,4 3.80985109,4 L20.1901489,4 Z M20.9003436,5.69627507 C20.9003436,5.37943754 20.5934534,5.10028653 20.1901489,5.10028653 L3.80985109,5.10028653 C3.40654659,5.10028653 3.09965636,5.37943754 3.09965636,5.69627507 L3.09965636,7.43839542 L20.9003436,7.43839542 L20.9003436,5.69627507 Z M15.069874,11.4269341 C15.069874,12.3760788 14.2485013,13.1232092 13.2600229,13.1232092 L10.7399771,13.1232092 C9.75149871,13.1232092 8.930126,12.3760788 8.930126,11.4269341 C8.930126,10.4777894 9.75149871,9.73065903 10.7399771,9.73065903 L13.2600229,9.73065903 C14.2485013,9.73065903 15.069874,10.4777894 15.069874,11.4269341 Z M13.9702176,11.4269341 C13.9702176,11.1100966 13.6633274,10.8309456 13.2600229,10.8309456 L10.7399771,10.8309456 C10.3366726,10.8309456 10.0297824,11.1100966 10.0297824,11.4269341 C10.0297824,11.7437716 10.3366726,12.0229226 10.7399771,12.0229226 L13.2600229,12.0229226 C13.6633274,12.0229226 13.9702176,11.7437716 13.9702176,11.4269341 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"resources",icon:["24","24",[],"","M4 6.83c0-.523.423-.948.948-.948H17.17c.524 0 .949.423.949.949v12.22a.947.947 0 0 1-.949.949H4.95a.947.947 0 0 1-.95-.948V6.83zm.941 12.222c0 .005 12.228.007 12.228.007.005 0 .007-12.228.007-12.228 0-.005-12.228-.007-12.228-.007-.005 0-.007 12.228-.007 12.228zm2.353-9.405a.47.47 0 1 1 0-.941h7.588a.47.47 0 1 1 0 .941H7.294zm0 2.824a.47.47 0 1 1 0-.942h7.588a.47.47 0 1 1 0 .942H7.294zm0 2.823a.47.47 0 1 1 0-.941h2.88a.47.47 0 1 1 0 .941h-2.88zM6.353 4.941a.47.47 0 1 1 0-.941h11.766C19.155 4 20 4.848 20 5.88v12.232a.47.47 0 1 1-.941 0V5.88a.945.945 0 0 0-.94-.938H6.353z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star-o",icon:["24","24",[],"","M11.64 16.055a.768.768 0 0 1 .72 0l3.767 1.998-.806-4.602 3.357-3.249-4.626-.654L12 5.35 9.948 9.548l-4.626.654 3.357 3.25-.807 4.601 3.768-1.998zm-3.75 3.148a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star",icon:["24","24",[],"","M7.89 19.203a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"tag",icon:["24","24",[],"","M9.85651379,4 C10.5597673,4 11.2342681,4.27911643 11.7318501,4.77635695 L11.7318501,4.77635695 L19.5192508,12.5634018 C20.1602555,13.2045708 20.1602555,14.2439177 19.5192159,14.8851217 L19.5192159,14.8851217 L14.8855145,19.5192848 C14.2443321,20.1602442 13.2049876,20.1602442 12.5637184,19.519198 L12.5637184,19.519198 L4.7762613,11.7314233 C4.27913559,11.2340016 4,10.5595161 4,9.85635067 L4,9.85635067 L4,5.64191268 C4,4.7351029 4.73513649,4 5.64195885,4 L5.64195885,4 L9.85651379,4 Z M9.85658948,5.26315824 L5.64195885,5.26315824 C5.4327466,5.26315824 5.26315823,5.43273884 5.26315823,5.64191268 L5.26315823,5.64191268 L5.26315823,9.85642637 C5.26315823,10.2247328 5.40935021,10.5779817 5.66959105,10.8383776 L5.66959105,10.8383776 L13.4568376,18.6259418 C13.6047616,18.7738142 13.8445582,18.7738142 13.9923822,18.6260417 L13.9923822,18.6260417 L18.6259486,13.9920135 C18.7738119,13.8441123 18.7738119,13.6043763 18.6260161,13.4565426 L18.6260161,13.4565426 L10.8388259,5.6697082 C10.5782887,5.40934993 10.2250082,5.26315824 9.85658948,5.26315824 L9.85658948,5.26315824 Z M7.78947471,6.10526373 C8.71963876,6.10526373 9.4736857,6.85931068 9.4736857,7.78947472 C9.4736857,8.71963876 8.71963876,9.4736857 7.78947471,9.4736857 C6.85931067,9.4736857 6.10526373,8.71963876 6.10526373,7.78947472 C6.10526373,6.85931068 6.85931067,6.10526373 7.78947471,6.10526373 Z M7.78947471,7.36842197 C7.5569337,7.36842197 7.36842197,7.55693371 7.36842197,7.78947472 C7.36842197,8.02201573 7.5569337,8.21052747 7.78947471,8.21052747 C8.02201572,8.21052747 8.21052746,8.02201573 8.21052746,7.78947472 C8.21052746,7.55693371 8.02201572,7.36842197 7.78947471,7.36842197 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"time",icon:["24","24",[],"","M12 4c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 1.077a6.88 6.88 0 0 0-4.896 2.027A6.877 6.877 0 0 0 5.077 12c0 1.85.72 3.588 2.027 4.896A6.877 6.877 0 0 0 12 18.923a6.88 6.88 0 0 0 4.896-2.027A6.877 6.877 0 0 0 18.923 12a6.88 6.88 0 0 0-2.027-4.896A6.877 6.877 0 0 0 12 5.077zm2.524 9.599a.6.6 0 0 1-.848.848l-2.5-2.5A.6.6 0 0 1 11 12.6V8.624a.6.6 0 0 1 1.2 0v3.727l2.324 2.325z"]}},function(e,t){e.exports={prefix:"cv",iconName:"video",icon:["24","24",[],"","M4.5 6a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-15zm0-1h15A1.5 1.5 0 0 1 21 6.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 17.5v-11A1.5 1.5 0 0 1 4.5 5zM10 9.26v5.48a.256.256 0 0 0 .39.218l4.482-2.74a.256.256 0 0 0 0-.436l-4.483-2.74a.256.256 0 0 0-.389.219z"]}},function(e,t){e.exports={prefix:"cv",iconName:"subject",icon:["24","24",[],"","M19.15,21.08H5.1c-1.09,0-1.98-0.89-1.98-1.98V5.06c0-1.09,0.89-1.98,1.98-1.98h14.04c1.09,0,1.98,0.89,1.98,1.98V19.1 C21.12,20.19,20.24,21.08,19.15,21.08z M20.12,19.16V5c0-0.51-0.41-0.92-0.92-0.92H7.04C6.54,4.08,6.12,4.49,6.12,5v14.16 c0,0.51,0.41,0.92,0.92,0.92h12.16C19.71,20.08,20.12,19.67,20.12,19.16z M19.12,6.95V6.81c0-0.36-0.29-0.65-0.65-0.65H8.78 c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69C18.83,7.6,19.12,7.31,19.12,6.95z M19.12,9.95V9.81 c0-0.36-0.29-0.65-0.65-0.65H8.78c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69 C18.83,10.6,19.12,10.31,19.12,9.95z"]}},function(e,t){e.exports={prefix:"cv",iconName:"series",icon:["24","24",[],"","M20.49,3.51c0.97,0,1.76,0.79,1.76,1.76v9.27c0,0.77-0.49,1.42-1.18,1.66l0.09-10.84c0-0.39-0.3-0.7-0.68-0.7l-14.27,0 C6.46,3.99,7.1,3.51,7.85,3.51H20.49z M18.38,5.56c0.97,0,1.76,0.79,1.76,1.75v9.27c0.01,0.77-0.49,1.42-1.17,1.66l0.09-10.86 c0-0.38-0.3-0.68-0.68-0.68l-14.28,0c0.25-0.67,0.89-1.14,1.64-1.14H18.38z M16.15,7.7c0.97,0,1.75,0.79,1.75,1.76v9.27 c0,0.97-0.79,1.75-1.75,1.75H3.5c-0.97,0-1.75-0.79-1.75-1.75V9.46c0-0.97,0.79-1.76,1.75-1.76H16.15z M16.14,8.85H3.51 c-0.38,0-0.68,0.3-0.68,0.68l0,0v9.13c0,0.38,0.3,0.68,0.68,0.68l0,0h12.62c0.38,0,0.68-0.3,0.68-0.68l0,0V9.53 C16.82,9.15,16.52,8.85,16.14,8.85L16.14,8.85z M8.46,12.41v3.37c0,0.18,0.21,0.28,0.35,0.18l2.31-1.69c0.12-0.09,0.12-0.27,0-0.35 L8.8,12.23C8.66,12.13,8.46,12.23,8.46,12.41"]}},function(e,t){e.exports={prefix:"cv",iconName:"white-wave",icon:["1200","244",[],"","M1104.19651,33.5198863 C1084.14716,45.4511816 1067.10689,82.9623447 1047.23647,124.40502 C1023.86518,173.149287 924.725009,160.996474 830.060105,199.668011 C735.395201,238.339548 706.121292,249.351671 618.615175,241.737466 C531.109058,234.12326 495.404437,207.34459 432.2827,199.668011 C370.933901,192.207048 283.214734,200.240922 234.995453,186.264588 C153.311618,162.588569 167.948341,80.4093241 122.421855,59.9864363 C102.62311,51.1048469 61.8158253,37.3273576 0,18.6539685 L0,0 L1200,0 C1161.79495,7.07406031 1129.86046,18.2473557 1104.19651,33.5198863 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"compass",icon:["24","24",[],"","M12,-1.71862524e-13 C13.3893905,-1.71862524e-13 14.5197317,1.12166968 14.5197317,2.50040137 C14.5197317,2.8215332 14.4594938,3.13263028 14.3442115,3.42156921 C16.2349366,3.84633285 17.9748233,4.78862459 19.3866372,6.17539419 L19.4316433,6.22680193 C21.3267651,8.11265804 22.5,10.713205 22.5,13.5805516 C22.5,19.3258216 17.7897333,24 12,24 L12,24 C6.21026669,24 1.5,19.3258216 1.5,13.5805516 L1.50006052,13.5243182 C1.50002021,13.5212739 1.5,13.5182249 1.5,13.5151711 L1.501,13.503 L1.50378159,13.2988768 C1.57785421,10.543134 2.73548466,8.05071265 4.56835673,6.22680193 L4.61336276,6.17539419 C6.02517671,4.78862459 7.76506343,3.84633285 9.65748913,3.42018903 C9.54056383,3.13263028 9.48031555,2.8215332 9.48031555,2.50040137 C9.48031555,1.12166968 10.6106095,-1.71862524e-13 12,-1.71862524e-13 Z M12,4.52624116 L11.6809164,4.53170146 C11.6454989,4.53291535 11.610132,4.53433052 11.5748169,4.53594584 L11.6816694,4.53162088 C11.5883913,4.53477816 11.4953516,4.53932139 11.4025747,4.54524062 L11.5748169,4.53594584 C11.4679256,4.54083509 11.3615084,4.54755809 11.2555967,4.55608379 L11.4025747,4.54524062 C11.3068176,4.55134999 11.2113405,4.55892518 11.1161702,4.56795525 L11.2555967,4.55608379 C11.095392,4.56897997 10.9363438,4.5860008 10.7785603,4.60703883 C10.7467123,4.6104578 10.7154515,4.61475211 10.6842289,4.61920452 L10.7785603,4.60703883 C10.6768565,4.62059949 10.5756781,4.63582921 10.4750543,4.65269924 L10.6842289,4.61920452 C10.600263,4.63117821 10.5165735,4.64429522 10.4331795,4.65854779 L10.4750543,4.65269924 C9.11485909,4.88074187 7.85598275,5.40850943 6.77005357,6.16492738 L8.00490498,7.39068924 C8.27354347,7.65726684 8.27354347,8.0894535 8.00490498,8.35612485 C7.87046765,8.48939021 7.69450873,8.55604633 7.5184081,8.55604633 C7.34230747,8.55604633 7.16634856,8.48943709 7.03200569,8.35612485 L5.70204148,7.03485023 C4.13204115,8.52299364 3.09475895,10.5601022 2.90659433,12.8322227 L4.30759576,12.8325787 C4.68743083,12.8325787 4.99546522,13.1382031 4.99546522,13.5151711 C4.99546522,13.892186 4.68747807,14.1977635 4.30764299,14.1977635 L2.89670934,14.1976473 C3.02371908,16.0609257 3.72135566,17.7714185 4.81716961,19.1579915 L4.97167812,19.3482139 C5.26113447,19.6949337 5.57609243,20.0199666 5.91367078,20.3204536 L7.03200569,19.2111609 C7.30069142,18.9445833 7.73612479,18.9445833 8.00490498,19.2111609 C8.27354347,19.4777385 8.27354347,19.9099252 8.00490498,20.1765497 L7.01386949,21.160078 C8.44796715,22.0922041 10.1613427,22.6346745 12,22.6346745 L12,22.6346745 C13.8583409,22.6346745 15.5887033,22.0805272 17.0320921,21.1300078 L16.0701299,20.1765497 C15.8014914,19.909972 15.8014914,19.4777854 16.0701299,19.2111609 C16.3388156,18.9445833 16.774249,18.9445833 17.042982,19.2111609 L18.1252566,20.2856043 C18.4481451,19.9948825 18.7500205,19.681572 19.0283219,19.3482139 L19.1828304,19.1579915 C20.2466397,17.8119151 20.9351906,16.1605635 21.0907063,14.3605101 L21.1032907,14.1976527 L21.1032907,14.1976527 L19.4302507,14.1977635 C19.0504157,14.1977635 18.7423813,13.8921391 18.7423813,13.5151711 C18.7423813,13.1381562 19.0504157,12.8325787 19.4302507,12.8325787 L21.0934057,12.8322227 C20.9067892,10.5787961 19.8849698,8.55653016 18.3366017,7.07169263 L17.0430292,8.35607798 C16.9085919,8.48943709 16.732633,8.55604633 16.5565323,8.55604633 C16.3804317,8.55604633 16.2044728,8.48943709 16.0701299,8.35612485 C15.8014914,8.08954725 15.8014914,7.65736059 16.0701299,7.39068924 L17.2742569,6.19598696 C16.1894526,5.4308071 14.9295636,4.89482891 13.5669368,4.65983993 C13.5528409,4.65615858 13.538853,4.65380129 13.5248569,4.65147595 L13.5669368,4.65983993 C13.4834378,4.64544029 13.3995531,4.63217086 13.3152992,4.62004816 L13.5248569,4.65147595 C13.4243139,4.63477151 13.3233471,4.61971567 13.2219896,4.60632197 L13.3152992,4.62004816 C13.1723723,4.59948341 13.0283832,4.58221861 12.8834131,4.56833442 C12.8374466,4.56355426 12.7909906,4.55949885 12.7444647,4.55579028 L12.8834131,4.56833442 C12.7886701,4.55926062 12.6935082,4.5516307 12.5979499,4.54546716 L12.7444647,4.55579028 C12.6381278,4.54731418 12.5314263,4.5406499 12.4243976,4.53581255 L12.5979499,4.54546716 C12.5053597,4.53949506 12.4123973,4.53489967 12.3190836,4.53170146 L12.4243976,4.53581255 C12.2834709,4.52944313 12.1419768,4.52624116 12,4.52624116 Z M12.2098775,18.4456908 C12.3524617,18.4551964 12.4902931,18.464702 12.6328773,18.4884661 C12.6851582,18.4932189 12.7421919,18.5074773 12.7944727,18.5169829 C12.8039783,18.5169829 12.813484,18.5169829 12.8229896,18.5217357 C12.8990345,18.5692638 12.984585,18.5740166 13.0701355,18.5930278 C13.0938996,18.5977806 13.1224164,18.6025334 13.1509332,18.612039 C13.1746973,18.6215447 13.1984613,18.6310503 13.2174725,18.6500615 C13.2364838,18.6690727 13.255495,18.6833311 13.2887647,18.688084 C13.3172815,18.6928368 13.3362927,18.7213536 13.3362927,18.7546232 C13.3362927,18.7831401 13.3315399,18.8116569 13.3267871,18.835421 C13.3077759,18.9304771 13.2887647,19.030286 13.2650006,19.1253422 C13.2602478,19.153859 13.2507422,19.1823759 13.2412366,19.2108927 C13.2174725,19.277432 13.2127197,19.3487241 13.1937085,19.4152634 C13.1794501,19.4532859 13.1746973,19.4960611 13.1556861,19.5340836 C13.1414276,19.5673532 13.131922,19.6006229 13.1034052,19.6386453 C13.0891468,19.6529038 13.084394,19.6766678 13.0796411,19.7004318 C13.0606299,19.7527127 13.0321131,19.7717239 12.9750794,19.7622183 L12.9750794,19.7622183 L12.960821,19.7622183 C12.8562592,19.7384543 12.7564503,19.7194431 12.6566413,19.6909262 C12.5473268,19.6624094 12.4380122,19.6529038 12.3286977,19.6576566 C12.3001808,19.6576566 12.271664,19.6671622 12.2431471,19.6766678 C12.2051247,19.6909262 12.1956191,19.7194431 12.1956191,19.7574655 C12.1956191,19.7764767 12.2003719,19.7907352 12.2193831,19.795488 C12.2811696,19.8287576 12.3382033,19.8620273 12.419001,19.8762857 C12.442765,19.8810385 12.4617762,19.8952969 12.4807875,19.9048025 C12.5045515,19.9190609 12.5235627,19.9285666 12.542574,19.9380722 C12.689911,20.0093643 12.8467536,20.0711508 12.9798322,20.1709597 C13.084394,20.2422518 13.1604389,20.3325551 13.2032141,20.4513753 L13.2032141,20.4513753 L13.3077759,20.7745662 C13.3410455,20.8933864 13.3362927,21.0217122 13.3315399,21.1452851 C13.3267871,21.2403413 13.3125287,21.3401502 13.279259,21.4304535 C13.2745062,21.4352064 13.2745062,21.4399592 13.2745062,21.4494648 C13.2840118,21.5587793 13.2507422,21.6585883 13.1889557,21.7441388 C13.084394,21.8962286 12.9513154,22.0293072 12.7897199,22.1291162 C12.6851582,22.1956555 12.5710908,22.2336779 12.4475178,22.257442 C12.3239448,22.281206 12.1956191,22.3144756 12.0672933,22.3287341 C11.9579787,22.3429925 11.8486642,22.3429925 11.7441024,22.3382397 C11.6157766,22.3239812 11.4922036,22.3002172 11.3638778,22.2764532 C11.3448666,22.2764532 11.3258554,22.2669476 11.3068442,22.2621948 C11.2165408,22.2194195 11.1262375,22.2051611 11.0311814,22.1956555 C10.9076084,22.1766442 10.7887882,22.1481274 10.6652152,22.1243634 C10.6366984,22.1196106 10.6081815,22.0958465 10.6081815,22.0625769 C10.6081815,21.9675207 10.5844175,21.8677118 10.5986759,21.7726556 C10.6129344,21.6015546 10.62244,21.4257007 10.6414512,21.2545997 C10.6509568,21.1642964 10.6747208,21.073993 10.6984849,20.9789369 C10.7127433,20.9219032 10.7507658,20.8981392 10.8125522,20.902892 C10.9028556,20.9123976 10.9931589,20.9171504 11.0787094,20.9314088 C11.188024,20.9456672 11.2925857,20.9599257 11.3971475,20.9931953 C11.4541812,21.0074537 11.5112149,21.0169593 11.5682485,21.0217122 C11.6633047,21.026465 11.753608,21.026465 11.8439113,21.026465 C11.8866866,21.026465 11.9294619,20.9836897 11.9342147,20.9456672 C11.9389675,20.9123976 11.9152034,20.8696223 11.8724282,20.8553639 C11.8391585,20.8458583 11.7963833,20.8363527 11.7583608,20.8315999 C11.7345968,20.8268471 11.7108328,20.8220943 11.6870687,20.8220943 C11.6015182,20.8173415 11.5254733,20.7935774 11.4446756,20.7650606 C11.3638778,20.7317909 11.2783273,20.7127797 11.1975296,20.6795101 C11.088215,20.6414876 10.9884061,20.5797011 10.8981028,20.508409 C10.817305,20.4466225 10.7792826,20.361072 10.7507658,20.2707687 C10.7079905,20.1234316 10.6937321,19.9713418 10.7127433,19.819252 C10.7270017,19.7051846 10.7317545,19.5911173 10.7507658,19.4818027 C10.793541,19.2441624 10.8885972,19.030286 11.0596982,18.859185 C11.2070352,18.711848 11.3876419,18.612039 11.5920126,18.5550054 C11.7060799,18.5217357 11.8249001,18.4932189 11.9437203,18.4694548 C12.0340236,18.4551964 12.124327,18.4551964 12.2098775,18.4456908 Z M14.7328664,9.61765309 C15.1590885,9.61765309 15.5675493,9.84298078 15.7988231,10.2056519 C16.0296718,10.5678544 16.0563136,11.0171504 15.8699625,11.4074308 L14.1147664,15.0838768 C13.9903906,15.3443138 13.7774449,15.5556727 13.5149472,15.6790944 L9.80998461,17.4209191 C9.63676546,17.5022939 9.45419332,17.5435907 9.2670864,17.5435907 C8.84086431,17.5435907 8.43240343,17.3182631 8.20112965,16.9555919 C7.97028099,16.5933895 7.94363916,16.1440935 8.12999028,15.753813 L9.88518638,12.077367 C10.0095622,11.81693 10.2225079,11.6055242 10.4850055,11.4821494 L14.1899681,9.74032473 C14.3631873,9.65894988 14.5457594,9.61765309 14.7328664,9.61765309 Z M14.4894526,11.1101033 L11.1110414,12.6984127 L9.51045294,16.050953 L12.8888641,14.4626436 L14.4894526,11.1101033 Z M13.0226075,6.1644377 C13.0938996,6.1691905 13.1651917,6.1691905 13.2364838,6.1691905 L13.2364838,6.1691905 L13.5121466,6.18344892 C13.5596746,6.18344892 13.5929443,6.21196577 13.5976971,6.26424664 C13.6309667,6.56842629 13.6547308,6.87260593 13.6357196,7.17678557 C13.5976971,7.72335837 13.6262139,8.27468397 13.6167083,8.82125677 C13.6167083,9.03513308 13.6214611,9.24900939 13.6452252,9.46763851 L13.6452252,9.46763851 L13.6452252,9.59121149 C13.6404724,9.6625036 13.6024499,9.69102044 13.5359106,9.68626763 C13.526405,9.68626763 13.5121466,9.69102044 13.502641,9.69102044 C13.4836297,9.69577324 13.4598657,9.70527886 13.4408545,9.70052605 C13.3695624,9.68626763 13.2935175,9.69102044 13.2222254,9.69102044 C13.1414276,9.68626763 13.0606299,9.69577324 12.9798322,9.70052605 C12.837248,9.71003166 12.689911,9.71953728 12.542574,9.72429009 C12.4997987,9.72904289 12.4760347,9.70527886 12.4570234,9.6672564 L12.4570234,9.6672564 L12.271664,9.34881834 C12.1195741,9.07315554 11.9532259,8.81175116 11.8201473,8.52658274 L11.8201473,8.52658274 L11.8011361,8.49331309 L11.8011361,8.53608835 C11.7916305,8.81650396 11.777372,9.09216676 11.7821249,9.37258237 C11.7821249,9.4628857 11.777372,9.55318904 11.7726192,9.64349237 C11.7678664,9.71478447 11.729844,9.75280693 11.6585519,9.76231254 L11.6585519,9.76231254 L11.5112149,9.77657096 C11.4066531,9.78607658 11.3068442,9.76231254 11.2070352,9.75280693 L11.2070352,9.75280693 L10.8077994,9.75280693 C10.7555186,9.75280693 10.6747208,9.78132377 10.6557096,9.72429009 C10.646204,9.70527886 10.6414512,9.69102044 10.646204,9.61972833 C10.646204,9.58170588 10.6509568,9.56269465 10.6509568,9.51991939 L10.6509568,9.51991939 L10.6604624,9.31079588 L10.6794736,8.66441414 C10.6889793,8.33171766 10.7032377,7.99902117 10.6937321,7.66632469 C10.6889793,7.45720118 10.6794736,7.24807768 10.669968,7.04370698 C10.669968,7.03420136 10.669968,7.01994294 10.6652152,7.01043733 C10.6319456,6.81081944 10.6366984,6.60644874 10.6557096,6.40207804 C10.6604624,6.39257243 10.6557096,6.37831401 10.6604624,6.36405559 C10.6604624,6.32603313 10.6984849,6.28801068 10.7365073,6.28325787 C10.769777,6.28325787 10.8077994,6.28801068 10.8410691,6.28801068 L10.8410691,6.28801068 L10.8838443,6.28801068 C11.0216757,6.26424664 11.1595071,6.24048261 11.3020914,6.24523541 L11.3020914,6.24523541 L11.458934,6.2357298 C11.5444845,6.23097699 11.630035,6.22622419 11.7155856,6.22622419 C11.729844,6.22622419 11.7488552,6.23097699 11.7631136,6.24048261 C11.7821249,6.25474103 11.8011361,6.25949384 11.8249001,6.25474103 C11.877181,6.24523541 11.9056978,6.25949384 11.9247091,6.30702191 C11.9864956,6.47812295 12.0767989,6.63971839 12.171855,6.79180821 C12.2478999,6.91538119 12.3001808,7.04370698 12.3477089,7.17678557 C12.3952369,7.29085294 12.4475178,7.4001675 12.5093043,7.50948206 L12.5093043,7.50948206 L12.5235627,7.52849329 C12.5235627,7.52849329 12.5283155,7.52849329 12.5330683,7.52374048 L12.5330683,7.52374048 L12.5330683,7.50472925 C12.5330683,7.28134733 12.5330683,7.0579654 12.5283155,6.83458347 C12.5283155,6.69199927 12.5188099,6.55416787 12.5188099,6.41633646 L12.5188099,6.41633646 L12.5188099,6.38781962 C12.5093043,6.30702191 12.5473268,6.24998822 12.6091133,6.20721296 C12.6328773,6.18344892 12.6613941,6.17394331 12.689911,6.17869612 C12.8039783,6.18344892 12.9132929,6.1644377 13.0226075,6.1644377 Z M12,1.36518483 C11.3691932,1.36518483 10.8560545,1.87443384 10.8560545,2.50035449 C10.8560545,2.7121822 10.9139202,2.91435368 11.0223297,3.09018146 C11.3472278,3.06046277 11.6746768,3.04536905 12,3.04536905 C12.3250871,3.04536905 12.6524415,3.06046277 12.977623,3.09027521 C13.0860798,2.91444743 13.1439455,2.7121822 13.1439455,2.50035449 C13.1439455,1.87438696 12.6308068,1.36518483 12,1.36518483 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"history",icon:["24","24",[],"","M12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 C0,5.372583 5.372583,0 12,0 Z M12,2.05714286 C6.50871163,2.05714286 2.05714286,6.50871163 2.05714286,12 C2.05714286,17.4912884 6.50871163,21.9428571 12,21.9428571 C17.4912884,21.9428571 21.9428571,17.4912884 21.9428571,12 C21.9428571,6.50871163 17.4912884,2.05714286 12,2.05714286 Z M12,5.82857143 C12.5680643,5.82857143 13.0285714,6.28907854 13.0285714,6.85714286 L13.0285714,11.5739518 L17.0130241,15.5584045 C17.4147062,15.9600866 17.4147062,16.611342 17.0130241,17.0130241 C16.611342,17.4147062 15.9600866,17.4147062 15.5584045,17.0130241 L11.2726902,12.7273098 C11.0797956,12.5344153 10.9714286,12.2727941 10.9714286,12 L10.9714286,6.85714286 C10.9714286,6.28907854 11.4319357,5.82857143 12,5.82857143 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file",icon:["24","24",[],"","M6 4h7l6 5v10a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm6.586 1H6v14h12V9.414L12.586 5zM13 10h3.5a.5.5 0 1 1 0 1h-4a.5.5 0 0 1-.5-.5v-4a.5.5 0 1 1 1 0V10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-pdf",icon:["24","24",[],"","M9.833 15.006c-.328.765-.657 1.316-.997 1.619-.35.312-.762.394-1.138.15a1.345 1.345 0 0 1-.358-.322c-.298-.402-.194-.843.165-1.2.228-.227.563-.433.983-.63.226-.106.466-.204.706-.292.142-.358.286-.762.43-1.205a41.787 41.787 0 0 0 .866-3.123c-.435-.563-.75-1.057-.924-1.473-.28-.67-.211-1.242.372-1.494.56-.24 1.047-.086 1.307.391.17.312.234.736.231 1.26a7.96 7.96 0 0 1-.086 1.088c.158.195.33.398.513.606a30.903 30.903 0 0 0 1.73 1.81 14.011 14.011 0 0 0 .863.761c.464-.07.87-.106 1.213-.105.947.002 1.554.319 1.415 1.079-.107.585-.514.888-1.06.834-.365-.036-.781-.224-1.259-.532a8.753 8.753 0 0 1-.538-.38 21.15 21.15 0 0 0-.944.191c-.39.087-.798.188-1.22.3a45.345 45.345 0 0 0-2.27.667zM6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm4.43 8.39c-.07.21-.138.412-.207.606l.055-.016a46.181 46.181 0 0 1 1.608-.459 33.869 33.869 0 0 1 1.538-.37 15.994 15.994 0 0 1-.378-.35 31.732 31.732 0 0 1-1.882-1.98l-.083.32a38.471 38.471 0 0 1-.652 2.248zm-2.157 2.603c.12-.107.248-.279.382-.51a2.35 2.35 0 0 0-.553.37c-.092.092-.09.086-.083.096a.54.54 0 0 0 .138.116c.017.01.025.01.116-.072zm7.434-2.3c-.047 0-.095 0-.146.002.242.132.443.209.585.223.11.011.118.005.146-.145.005-.027-.095-.079-.585-.08zm-5.36-5.49c.065.156.16.334.283.53v-.05c.003-.393-.044-.696-.128-.85-.046-.086-.063-.091-.23-.02-.04.018-.05.092.075.39z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-img",icon:["24","24",[],"","M5 6v12h14V6H5zm0-1h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm2.4 10.3a.5.5 0 0 1-.8-.6l3-4a.5.5 0 0 1 .754-.054l.579.58 1.765-2.513a.5.5 0 0 1 .83.015l3.891 6a.5.5 0 0 1-.838.544l-3.49-5.379-1.682 2.394a.5.5 0 0 1-.763.067l-.592-.593L7.4 15.3zm.6-4.8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-ppt",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.07 6.96h1.22c.18 0 .353-.013.52-.04a1.21 1.21 0 0 0 .44-.155.844.844 0 0 0 .305-.325c.077-.14.115-.323.115-.55 0-.227-.038-.41-.115-.55a.844.844 0 0 0-.305-.325 1.21 1.21 0 0 0-.44-.155 3.288 3.288 0 0 0-.52-.04h-1.22v2.14zM9.5 8.6h3.22c.447 0 .827.065 1.14.195.313.13.568.302.765.515.197.213.34.457.43.73a2.715 2.715 0 0 1 0 1.695c-.09.277-.233.522-.43.735a2.133 2.133 0 0 1-.765.515c-.313.13-.693.195-1.14.195h-1.65v2.56H9.5V8.6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-word",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm8.77 10.74h-1.56L12 10.88h-.02l-1.19 4.86H9.2L7.31 8.6h1.57l1.13 4.86h.02l1.24-4.86h1.47l1.22 4.92h.02l1.17-4.92h1.54l-1.92 7.14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-zip",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5 0h1v1h-1V5zm1 1h1v1h-1V6zm-1 1h1v1h-1V7zm1 1h1v1h-1V8zm-1 1h1v1h-1V9zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-excel",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.09 7l-2.3-3.4h1.82l1.4 2.28 1.45-2.28h1.72l-2.29 3.41 2.49 3.73h-1.87l-1.56-2.47-1.59 2.47H8.6L11.09 12z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-240",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm1 4.818C4 9.644 4.94 8.8 6.261 8.8c1.272 0 2.182.777 2.182 1.81 0 .76-.45 1.334-1.285 2.178L5.58 14.347v.022h2.96v.932H4.062v-.769L6.407 12.2c.724-.737.923-1.064.923-1.54 0-.526-.473-.946-1.104-.946-.663 0-1.157.468-1.157 1.1v.017H4v-.013zm8.426 4.483v-1.206h-3.18v-.98c.553-1.043 1.264-2.178 2.646-4.187h1.62v4.235h.857v.932h-.856v1.206h-1.087zm-2.146-2.142v.03h2.164V9.773h-.018c-1.029 1.492-1.638 2.433-2.146 3.387zm7.234 2.27c-1.564 0-2.496-1.277-2.496-3.321 0-2.036.941-3.308 2.496-3.308 1.55 0 2.486 1.263 2.486 3.303s-.927 3.326-2.486 3.326zm0-.932c.843 0 1.333-.888 1.333-2.39 0-1.488-.499-2.375-1.333-2.375-.84 0-1.347.896-1.347 2.371 0 1.502.499 2.394 1.347 2.394z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-480",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm3.964 9.269v-1.2H3.8v-.976c.55-1.037 1.257-2.166 2.632-4.166h1.613v4.215h.853v.927h-.853v1.2h-1.08zm-2.136-2.132v.031h2.154V9.767h-.018c-1.024 1.485-1.63 2.421-2.136 3.37zm7.185 2.26c-1.467 0-2.47-.761-2.47-1.842 0-.822.58-1.468 1.442-1.63v-.022c-.72-.185-1.19-.743-1.19-1.433 0-.962.926-1.67 2.218-1.67 1.297 0 2.215.703 2.215 1.674 0 .681-.466 1.235-1.186 1.429v.022c.861.167 1.446.813 1.446 1.63 0 1.085-1.016 1.841-2.475 1.841zm0-.867c.76 0 1.297-.448 1.297-1.059 0-.62-.536-1.063-1.297-1.063-.76 0-1.296.448-1.296 1.063 0 .611.536 1.06 1.296 1.06zm0-2.988c.638 0 1.095-.395 1.095-.94 0-.55-.453-.945-1.095-.945-.646 0-1.098.395-1.098.945 0 .545.452.94 1.098.94zm5.709 3.854c-1.556 0-2.483-1.27-2.483-3.304 0-2.026.936-3.292 2.483-3.292 1.542 0 2.474 1.257 2.474 3.287 0 2.03-.923 3.31-2.474 3.31zm0-.927c.84 0 1.327-.883 1.327-2.377 0-1.481-.497-2.365-1.327-2.365-.835 0-1.34.892-1.34 2.36 0 1.494.496 2.382 1.34 2.382z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-hd",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm2 2.25h1.31v2.976h3.406V8.25h1.31v7.482h-1.31v-3.374H6.31v3.374H5V8.25zm7.597 0H15.7c.573 0 1.069.098 1.488.293.42.196.762.463 1.027.802.266.339.463.735.592 1.19.13.454.194.939.194 1.456a5.3 5.3 0 0 1-.194 1.457 3.43 3.43 0 0 1-.592 1.189 2.765 2.765 0 0 1-1.027.802c-.419.195-.915.293-1.488.293h-3.102V8.25zm1.31 6.413h1.29c.51 0 .927-.068 1.251-.204.325-.136.58-.325.765-.566.185-.241.311-.524.378-.849.066-.325.1-.676.1-1.053 0-.377-.034-.728-.1-1.053a2.043 2.043 0 0 0-.378-.849 1.832 1.832 0 0 0-.765-.566c-.324-.136-.742-.204-1.252-.204h-1.289v5.344z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm5.486 9.759c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C6.635 8.337 7.548 8 8.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397zm7 0c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C13.635 8.337 14.548 8 15.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397z"]}},function(e,t){e.exports={prefix:"cv",iconName:"contract",icon:["24","24",[],"","M8.5 8.5V5H10v5H5V8.5h3.5zm0 7H5V14h5v5H8.5v-3.5zm7-7H19V10h-5V5h1.5v3.5zm0 7V19H14v-5h5v1.5h-3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"full-screen",icon:["24","24",[],"","M6.5 6.5V10H5V5h5v1.5H6.5zm0 11H10V19H5v-5h1.5v3.5zm11-11H14V5h5v5h-1.5V6.5zm0 11V14H19v5h-5v-1.5h3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"mute",icon:["24","24",[],"","M16.733 12.018l-1.57-1.57a.555.555 0 1 1 .785-.785l1.57 1.57 1.57-1.57a.555.555 0 1 1 .785.785l-1.57 1.57 1.57 1.57a.555.555 0 1 1-.785.785l-1.57-1.57-1.57 1.57a.555.555 0 1 1-.785-.785l1.57-1.57zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"next",icon:["24","24",[],"","M16 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11zm-10.86.005a.5.5 0 0 1 .761-.427l9.003 5.5a.5.5 0 0 1 0 .853l-9.003 5.5a.5.5 0 0 1-.76-.426v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play",icon:["24","24",[],"","M7.5 6.505v11l9.002-5.5-9.002-5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play-circle",icon:["24","24",[],"","M0,12 C0,5.372583 5.372583,0 12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 Z M23,12 C23,5.92486775 18.0751322,1 12,1 C5.92486775,1 1,5.92486775 1,12 C1,18.0751322 5.92486775,23 12,23 C18.0751322,23 23,18.0751322 23,12 Z M9,7.49836245 C9,6.94698209 9.38671875,6.74169922 9.84669815,7.02918634 L17.1533018,11.5958137 C17.6209203,11.8880752 17.6132812,12.3666992 17.1533018,12.6541863 L9.84669815,17.2208137 C9.37907967,17.5130752 9,17.2950531 9,16.7516375 L9,7.49836245 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"pause",icon:["24","24",[],"","M8 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 8 17.5v-11zm6 0c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"previous",icon:["24","24",[],"","M5 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 5 17.5v-11zm13.602.005v11a.5.5 0 0 1-.76.426l-9.003-5.5a.5.5 0 0 1 0-.853l9.002-5.5a.5.5 0 0 1 .761.427z"]}},function(e,t){e.exports={prefix:"cv",iconName:"volume",icon:["24","24",[],"","M15.8 11.25c-.137-.815-.44-1.549-.727-2.009a.48.48 0 0 1 .167-.67.507.507 0 0 1 .687.163c.35.56.7 1.41.86 2.359.24 1.439.001 2.866-.866 4.183a.508.508 0 0 1-.691.147.48.48 0 0 1-.15-.674c.724-1.1.922-2.285.72-3.5zm1.86 5.959c1.856-3.7 1.676-7.108 0-10.416a.558.558 0 0 1 .201-.728.483.483 0 0 1 .678.215c1.828 3.61 2.028 7.398.001 11.438a.483.483 0 0 1-.677.218.557.557 0 0 1-.203-.727zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm3.186 5.646l-4.723 5.18-1.683-1.615a.772.772 0 0 0-1.06 0 .7.7 0 0 0 0 1.018l2.25 2.16a.771.771 0 0 0 1.094-.035l5.25-5.76a.7.7 0 0 0-.07-1.016.772.772 0 0 0-1.058.068z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle-o",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm0 1.212a7.737 7.737 0 0 0-5.508 2.28A7.737 7.737 0 0 0 4.212 12c0 2.081.809 4.037 2.28 5.508A7.737 7.737 0 0 0 12 19.788a7.737 7.737 0 0 0 5.508-2.28A7.737 7.737 0 0 0 19.788 12a7.737 7.737 0 0 0-2.28-5.508A7.737 7.737 0 0 0 12 4.212zm3.186 4.434a.772.772 0 0 1 1.058-.068.7.7 0 0 1 .07 1.016l-5.25 5.76a.771.771 0 0 1-1.094.035l-2.25-2.16a.7.7 0 0 1 0-1.018.772.772 0 0 1 1.06 0l1.683 1.616 4.723-5.181z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check",icon:["24","24",[],"","M16.247 7.341a1 1 0 0 1 1.506 1.318l-7 8a1 1 0 0 1-1.46.048l-3-3a1 1 0 0 1 1.414-1.414l2.244 2.244 6.296-7.196z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption-badge",icon:["24","24",[],"","M7.5 5A2.5 2.5 0 0 0 5 7.5v9A2.5 2.5 0 0 0 7.5 19h9a2.5 2.5 0 0 0 2.5-2.5v-9A2.5 2.5 0 0 0 16.5 5h-9zm0-1h9A3.5 3.5 0 0 1 20 7.5v9a3.5 3.5 0 0 1-3.5 3.5h-9A3.5 3.5 0 0 1 4 16.5v-9A3.5 3.5 0 0 1 7.5 4zM11 9a.5.5 0 1 1 0 1H9.5A1.5 1.5 0 0 0 8 11.5v1A1.5 1.5 0 0 0 9.5 14H11a.5.5 0 1 1 0 1H9.5A2.5 2.5 0 0 1 7 12.5v-1A2.5 2.5 0 0 1 9.5 9H11zm5 0a.5.5 0 1 1 0 1h-1.5a1.5 1.5 0 0 0-1.5 1.5v1a1.5 1.5 0 0 0 1.5 1.5H16a.5.5 0 1 1 0 1h-1.5a2.5 2.5 0 0 1-2.5-2.5v-1A2.5 2.5 0 0 1 14.5 9H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"question",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zM8.142 9.17c0 .247.103.476.309.687.206.212.46.318.76.318.508 0 .854-.303 1.036-.908.193-.579.428-1.017.707-1.314.278-.297.712-.446 1.302-.446.503 0 .914.147 1.233.442.319.294.478.656.478 1.085 0 .22-.052.423-.157.61a2.305 2.305 0 0 1-.385.51c-.153.153-.4.38-.744.68-.39.342-.701.638-.932.887-.23.25-.415.539-.554.868-.14.33-.209.72-.209 1.17 0 .358.095.629.285.81.19.183.425.274.703.274.536 0 .855-.279.956-.836a12.2 12.2 0 0 1 .133-.55c.03-.104.071-.209.125-.313.053-.105.135-.22.245-.346.11-.126.255-.272.438-.438a48.078 48.078 0 0 0 1.37-1.257c.254-.25.474-.545.658-.888.185-.343.278-.742.278-1.197a2.87 2.87 0 0 0-.486-1.608c-.325-.492-.784-.882-1.378-1.169-.595-.286-1.28-.43-2.057-.43-.836 0-1.567.172-2.194.515s-1.104.775-1.43 1.297c-.327.523-.49 1.038-.49 1.547zm3.868 9.579c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797a1.073 1.073 0 0 0-.793-.324c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"info",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zm-10-.38V15a2.5 2.5 0 0 0 2.5 2.5h.75a1 1 0 0 0 0-2h-.75a.5.5 0 0 1-.5-.5v-3.75a1.75 1.75 0 0 0-1.75-1.75h-.75a1 1 0 1 0 0 2h.5zm.636-3.25c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797A1.073 1.073 0 0 0 11.636 6c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"lock",icon:["24","24",[],"","M7.01 9.5C7.156 5.97 8.87 4 12 4s4.844 1.97 4.99 5.5h1.51a.5.5 0 0 1 .5.5v9.5a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5V10a.5.5 0 0 1 .5-.5h1.51zm2 0h5.98C14.88 7.037 13.932 6 12 6c-1.933 0-2.88 1.037-2.99 3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"verified",icon:["24","24",[],"","M10.407 12.368l-1.22-1.22a.49.49 0 0 0-.698.004l-.583.583a.494.494 0 0 0-.004.697l2.135 2.135c.107.108.25.154.388.142a.488.488 0 0 0 .352-.143l4.362-4.362a.494.494 0 0 0-.004-.698l-.582-.582a.495.495 0 0 0-.698-.004l-3.448 3.448zm7.922-.37l1.437 1.406c.208.194.277.437.208.728a.716.716 0 0 1-.541.531l-1.957.5.551 1.936a.671.671 0 0 1-.197.729.671.671 0 0 1-.73.198l-1.935-.552-.5 1.957a.716.716 0 0 1-.53.541 1.28 1.28 0 0 1-.199.021.686.686 0 0 1-.53-.229L12 18.328l-1.405 1.436c-.195.208-.437.278-.729.208a.696.696 0 0 1-.53-.541l-.5-1.957-1.937.552a.671.671 0 0 1-.728-.198.671.671 0 0 1-.198-.729l.551-1.936-1.957-.5a.716.716 0 0 1-.54-.53c-.07-.292 0-.535.207-.73l1.437-1.405-1.437-1.405c-.208-.194-.277-.437-.208-.729a.716.716 0 0 1 .541-.53l1.957-.5-.551-1.936a.671.671 0 0 1 .198-.73.671.671 0 0 1 .728-.197l1.936.552.5-1.957a.675.675 0 0 1 .531-.531.671.671 0 0 1 .729.198L12 5.68l1.405-1.447a.697.697 0 0 1 .73-.198c.284.07.46.246.53.53l.5 1.958L17.1 5.97a.671.671 0 0 1 .729.198.671.671 0 0 1 .197.729l-.551 1.936 1.957.5a.715.715 0 0 1 .541.53c.07.292 0 .535-.208.73l-1.437 1.404z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning-o",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 5L3.5 19h17L12 5zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm.75-3.677a.689.689 0 0 1-.7.677.689.689 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677.387 0 .7.303.7.677v5.646z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm.75-3.677V8.677a.689.689 0 0 0-.7-.677c-.387 0-.7.303-.7.677v5.646c0 .374.313.677.7.677.387 0 .7-.303.7-.677z"]}},function(e,t,n){const{noopTest:r,edit:i,merge:a}=n(13),o={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:r,table:r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};o.def=i(o.def).replace("label",o._label).replace("title",o._title).getRegex(),o.bullet=/(?:[*+-]|\d{1,9}\.)/,o.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,o.item=i(o.item,"gm").replace(/bull/g,o.bullet).getRegex(),o.list=i(o.list).replace(/bull/g,o.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+o.def.source+")").getRegex(),o._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",o._comment=/<!--(?!-?>)[\s\S]*?-->/,o.html=i(o.html,"i").replace("comment",o._comment).replace("tag",o._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),o.paragraph=i(o._paragraph).replace("hr",o.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",o._tag).getRegex(),o.blockquote=i(o.blockquote).replace("paragraph",o.paragraph).getRegex(),o.normal=a({},o),o.gfm=a({},o.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),o.pedantic=a({},o.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",o._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:r,paragraph:i(o.normal._paragraph).replace("hr",o.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",o.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const s={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~"};s.em=i(s.em).replace(/punctuation/g,s._punctuation).getRegex(),s._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,s._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,s._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,s.autolink=i(s.autolink).replace("scheme",s._scheme).replace("email",s._email).getRegex(),s._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,s.tag=i(s.tag).replace("comment",o._comment).replace("attribute",s._attribute).getRegex(),s._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,s._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,s._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,s.link=i(s.link).replace("label",s._label).replace("href",s._href).replace("title",s._title).getRegex(),s.reflink=i(s.reflink).replace("label",s._label).getRegex(),s.normal=a({},s),s.pedantic=a({},s.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",s._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",s._label).getRegex()}),s.gfm=a({},s.normal,{escape:i(s.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),s.gfm.url=i(s.gfm.url,"i").replace("email",s.gfm._extended_email).getRegex(),s.breaks=a({},s.gfm,{br:i(s.br).replace("{2,}","*").getRegex(),text:i(s.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),e.exports={block:o,inline:s}},function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},function(e,t,n){const r=n(28),{defaults:i}=n(17),{inline:a}=n(117),{findClosingBracket:o,escape:s}=n(13);e.exports=class e{constructor(e,t){if(this.options=t||i,this.links=e,this.rules=a.normal,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=a.pedantic:this.options.gfm&&(this.options.breaks?this.rules=a.breaks:this.rules=a.gfm)}static get rules(){return a}static output(t,n,r){return new e(n,r).output(t)}output(t){let n,r,i,a,c,l,u="";for(;t;)if(c=this.rules.escape.exec(t))t=t.substring(c[0].length),u+=s(c[1]);else if(c=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(c[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(c[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(c[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(c[0])&&(this.inRawBlock=!1),t=t.substring(c[0].length),u+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0];else if(c=this.rules.link.exec(t)){const r=o(c[2],"()");if(r>-1){const e=(0===c[0].indexOf("!")?5:4)+c[1].length+r;c[2]=c[2].substring(0,r),c[0]=c[0].substring(0,e).trim(),c[3]=""}t=t.substring(c[0].length),this.inLink=!0,i=c[2],this.options.pedantic?(n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i),n?(i=n[1],a=n[3]):a=""):a=c[3]?c[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),u+=this.outputLink(c,{href:e.escapes(i),title:e.escapes(a)}),this.inLink=!1}else if((c=this.rules.reflink.exec(t))||(c=this.rules.nolink.exec(t))){if(t=t.substring(c[0].length),n=(c[2]||c[1]).replace(/\s+/g," "),n=this.links[n.toLowerCase()],!n||!n.href){u+=c[0].charAt(0),t=c[0].substring(1)+t;continue}this.inLink=!0,u+=this.outputLink(c,n),this.inLink=!1}else if(c=this.rules.strong.exec(t))t=t.substring(c[0].length),u+=this.renderer.strong(this.output(c[4]||c[3]||c[2]||c[1]));else if(c=this.rules.em.exec(t))t=t.substring(c[0].length),u+=this.renderer.em(this.output(c[6]||c[5]||c[4]||c[3]||c[2]||c[1]));else if(c=this.rules.code.exec(t))t=t.substring(c[0].length),u+=this.renderer.codespan(s(c[2].trim(),!0));else if(c=this.rules.br.exec(t))t=t.substring(c[0].length),u+=this.renderer.br();else if(c=this.rules.del.exec(t))t=t.substring(c[0].length),u+=this.renderer.del(this.output(c[1]));else if(c=this.rules.autolink.exec(t))t=t.substring(c[0].length),"@"===c[2]?(r=s(this.mangle(c[1])),i="mailto:"+r):(r=s(c[1]),i=r),u+=this.renderer.link(i,null,r);else if(this.inLink||!(c=this.rules.url.exec(t))){if(c=this.rules.text.exec(t))t=t.substring(c[0].length),this.inRawBlock?u+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0]):u+=this.renderer.text(s(this.smartypants(c[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else{if("@"===c[2])r=s(c[0]),i="mailto:"+r;else{do{l=c[0],c[0]=this.rules._backpedal.exec(c[0])[0]}while(l!==c[0]);r=s(c[0]),i="www."===c[1]?"http://"+r:r}t=t.substring(c[0].length),u+=this.renderer.link(i,null,r)}return u}static escapes(t){return t?t.replace(e.rules._escapes,"$1"):t}outputLink(e,t){const n=t.href,r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))}smartypants(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e}mangle(e){if(!this.options.mangle)return e;const t=e.length;let n,r="",i=0;for(;i<t;i++)n=e.charCodeAt(i),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}}},function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}},function(e,t,n){var r=n(162);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t,n){"use strict";t.a=function(){return!1}},function(e,t,n){"use strict";(function(e){var r=n(6),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.a.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(26)(e))},function(e,t){e.exports=f},function(e,t,n){"use strict";e.exports=n(167).default},function(e,t){e.exports=d},function(e,t,n){e.exports={navContainer:"_11O8h"}},function(e,t,n){e.exports={navContainer:"_3vLoN"}},function(e,t,n){const r=n(180),i=n(181),a=n(28),o=n(120),s=n(119),c=n(118),{merge:l,checkSanitizeDeprecation:u,escape:p}=n(13),{getDefaults:f,changeDefaults:d,defaults:m}=n(17);function h(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null),t=l({},h.defaults,t||{}),u(t);const a=t.highlight;let o,s,c=0;try{o=r.lex(e,t)}catch(e){return n(e)}s=o.length;const p=function(e){if(e)return t.highlight=a,n(e);let r;try{r=i.parse(o,t)}catch(t){e=t}return t.highlight=a,e?n(e):n(null,r)};if(!a||a.length<3)return p();if(delete t.highlight,!s)return p();for(;c<o.length;c++)!function(e){"code"!==e.type?--s||p():a(e.text,e.lang,(function(t,n){return t?p(t):null==n||n===e.text?--s||p():(e.text=n,e.escaped=!0,void(--s||p()))}))}(o[c])}else try{return t=l({},h.defaults,t||{}),u(t),i.parse(r.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||h.defaults).silent)return"<p>An error occurred:</p><pre>"+p(e.message+"",!0)+"</pre>";throw e}}h.options=h.setOptions=function(e){return l(h.defaults,e),d(h.defaults),h},h.getDefaults=f,h.defaults=m,h.Parser=i,h.parser=i.parse,h.Renderer=a,h.TextRenderer=o,h.Lexer=r,h.lexer=r.lex,h.InlineLexer=s,h.inlineLexer=s.output,h.Slugger=c,h.parse=h,e.exports=h},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e,t){e.exports=m},function(e,t,n){"use strict";
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("_"),require("Yup"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","_","Yup","ReactBootstrap","Backbone","ReactRedux","Marionette","FontAwesome","DOMPurify","SortableHOC","ReactDOM","ReactTransitionGroup","Polyglot","Cropper","Handlebars"],t):"object"==typeof exports?exports["@clickview/curator"]=t(require("React"),require("_"),require("Yup"),require("ReactBootstrap"),require("Backbone"),require("ReactRedux"),require("Marionette"),require("FontAwesome"),require("DOMPurify"),require("SortableHOC"),require("ReactDOM"),require("ReactTransitionGroup"),require("Polyglot"),require("Cropper"),require("Handlebars")):e["@clickview/curator"]=t(e.React,e._,e.Yup,e.ReactBootstrap,e.Backbone,e.ReactRedux,e.Marionette,e.FontAwesome,e.DOMPurify,e.SortableHOC,e.ReactDOM,e.ReactTransitionGroup,e.Polyglot,e.Cropper,e.Handlebars)}(window,(function(e,t,n,r,i,o,a,c,u,s,l,f,p,d,m){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=182)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=i},function(e,t){e.exports=o},function(e,t,n){"use strict";var r=n(19),i="object"==typeof self&&self&&self.Object===Object&&self,o=r.a||i||Function("return this")();t.a=o},function(e,t){e.exports=a},function(e,t,n){e.exports={tree:"_1abau",text:"f13wK",chevron:"_25eVA",disabled:"_1qyCo",parentOfSelected:"_1fgN6",selected:"cVZit",actions:"_2BGWp",node:"rJVbQ",collapsed:"vc2by"}},function(e,t,n){e.exports={alertItem:"_3ppPT",alertBox:"_2gPqV",alertList:"_1_wrK",icon:"_2gpnl",alertContent:"_1akpi",heading:"_3jnJY"}},function(e,t,n){"use strict";(function(e){var r=n(19),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.a.process,c=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();t.a=c}).call(this,n(26)(e))},function(e,t,n){e.exports={draggableVideoItem:"_1JMCe",draggedVideoItem:"_3jjle"}},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty,a="undefined"!=typeof Element;e.exports=function(e,t){try{return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var c,u,s,l=r(t),f=r(n);if(l&&f){if((u=t.length)!=n.length)return!1;for(c=u;0!=c--;)if(!e(t[c],n[c]))return!1;return!0}if(l!=f)return!1;var p=t instanceof Date,d=n instanceof Date;if(p!=d)return!1;if(p&&d)return t.getTime()==n.getTime();var m=t instanceof RegExp,h=n instanceof RegExp;if(m!=h)return!1;if(m&&h)return t.toString()==n.toString();var y=i(t);if((u=y.length)!==i(n).length)return!1;for(c=u;0!=c--;)if(!o.call(n,y[c]))return!1;if(a&&t instanceof Element&&n instanceof Element)return t===n;for(c=u;0!=c--;)if(!("_owner"===(s=y[c])&&t.$$typeof||e(t[s],n[s])))return!1;return!0}return t!=t&&n!=n}(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}},function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},c=e=>a[e];const u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function s(e){return e.replace(u,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const l=/(^|[^\[])\^/g;const f=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;const d={},m=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(e,t){d[" "+e]||(m.test(e)?d[" "+e]=e+"/":d[" "+e]=b(e,"/",!0));const n=-1===(e=d[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(h,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(y,"$1")+t:e+t}function b(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.substr(0,r-i)}e.exports={escape:function(e,t){if(t){if(n.test(e))return e.replace(r,c)}else if(i.test(e))return e.replace(o,c);return e},unescape:s,edit:function(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=(r=r.source||r).replace(l,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n},cleanUrl:function(e,t,n){if(e){let e;try{e=decodeURIComponent(s(n)).replace(f,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!p.test(n)&&(n=v(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n},resolveUrl:v,noopTest:{exec:function(){}},merge:function(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},splitCells:function(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n},rtrim:b,findClosingBracket:function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1},checkSanitizeDeprecation:function(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}}},function(e,t,n){e.exports={input:"_3MysI",suggestionsContainerOpen:"ahMdW",sectionContainer:"xstWL",suggestionHighlighted:"_3YTCa"}},function(e,t){e.exports=c},function(e,t,n){e.exports=n(168)()},function(e,t){function n(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1},getDefaults:n,changeDefaults:function(t){e.exports.defaults=t}}},function(e,t,n){e.exports={svg:"_3OUhC",iconButton:"_3t3VL",iconWithText:"_2KLHo",iconOnly:"_2rQWb"}},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(166))},function(e,t,n){"use strict";(function(e){var r=n(6),i=n(122),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,c=a&&a.exports===o?r.a.Buffer:void 0,u=(c?c.isBuffer:void 0)||i.a;t.a=u}).call(this,n(26)(e))},function(e,t){e.exports=u},function(e,t,n){e.exports={buttonList:"_2v9CT",dropdownToggle:"AYBvQ"}},function(e,t){e.exports=s},function(e,t){e.exports=l},function(e,t,n){e.exports={curatorLayout:"XayF7",topNavRegion:"_3ewaZ",leftNavRegion:"_2c2o6"}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);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}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!0;var a={},c=void 0,u=void 0;for(c=0,u=n.length;c<u;c++)a[n[c]]=!0;for(c=0,u=i.length;c<u;c++){var s=i[c],l=e[s],f=t[s];if(l!==f){if(!a[s]||null===l||null===f||"object"!==(void 0===l?"undefined":r(l))||"object"!==(void 0===f?"undefined":r(f)))return!0;var p=Object.keys(l),d=Object.keys(f);if(p.length!==d.length)return!0;for(var m=0,h=p.length;m<h;m++){var y=p[m];if(l[y]!==f[y])return!0}}}return!1}},function(e,t,n){const{defaults:r}=n(17),{cleanUrl:i,escape:o}=n(13);e.exports=class{constructor(e){this.options=e||r}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return r?'<pre><code class="'+this.options.langPrefix+o(r,!0)+'">'+(n?e:o(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:o(e,!0))+"</code></pre>"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<a href="'+o(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;let r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">",r}text(e){return e}}},function(e,t,n){"use strict";e.exports=n(163)},function(e,t,n){"use strict";var r=n(164),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},c={};function u(e){return r.isMemo(e)?a:c[e.$$typeof]||i}c[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},c[r.Memo]=a;var s=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var i=d(n);i&&i!==m&&e(t,i,r)}var a=l(n);f&&(a=a.concat(f(n)));for(var c=u(t),h=u(n),y=0;y<a.length;++y){var v=a[y];if(!(o[v]||r&&r[v]||h&&h[v]||c&&c[v])){var b=p(n,v);try{s(t,v,b)}catch(e){}}}}return t}},function(e,t){e.exports=f},function(e,t){e.exports={prefix:"cv",iconName:"add-to-playlist",icon:["24","24",[],"","M20.1 16.4h1.8a.6.6 0 1 1 0 1.2h-1.8v1.8a.6.6 0 1 1-1.2 0v-1.8h-1.8a.6.6 0 1 1 0-1.2h1.8v-1.8a.6.6 0 0 1 1.2 0v1.8zM10.5 9a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h6a.5.5 0 1 1 0 1h-6zm0 3.5a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm5.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V12a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16zm-8-2.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm0-7a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM8 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close",icon:["24","24",[],"","M11.959 10.641l4.402-4.296a.964.964 0 0 1 1.358 0 .951.951 0 0 1 0 1.35l-4.403 4.297 4.403 4.378a.951.951 0 0 1 0 1.35.964.964 0 0 1-1.358 0l-4.402-4.378-4.32 4.378a.964.964 0 0 1-1.358 0 .951.951 0 0 1 0-1.35l4.32-4.378-4.32-4.362a.951.951 0 0 1 0-1.35.964.964 0 0 1 1.358 0l4.32 4.361z"]}},function(e,t){e.exports={prefix:"cv",iconName:"delete",icon:["24","24",[],"","M14.5 7h4a.5.5 0 1 1 0 1h-1.14a1 1 0 0 1-.005.09l-.909 10a1 1 0 0 1-.996.91h-6.9a1 1 0 0 1-.996-.91l-.91-10A1.013 1.013 0 0 1 6.64 8H5.5a.5.5 0 0 1 0-1h4A1.5 1.5 0 0 1 11 5.5h2A1.5 1.5 0 0 1 14.5 7zm-1 0a.5.5 0 0 0-.5-.5h-2a.5.5 0 0 0-.5.5h3zm-4 3a.463.463 0 0 0-.462.499L9.462 16a.54.54 0 0 0 .574.498.463.463 0 0 0 .426-.498l-.424-5.502A.54.54 0 0 0 9.5 10zm2.5 0a.5.5 0 0 0-.5.5V16a.5.5 0 1 0 1 0v-5.5a.5.5 0 0 0-.5-.5zm2.5 0a.54.54 0 0 0-.538.499L13.538 16a.463.463 0 0 0 .462.5.54.54 0 0 0 .538-.499l.424-5.502A.463.463 0 0 0 14.5 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit",icon:["24","24",[],"","M7.636 17.834l8.746-8.745-1.414-1.414-8.8 8.8 1.468 1.36zm-2.42.973c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zm2.614-1.906l.707.707a1.5 1.5 0 0 1 0 2.121L7.45 19.435c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L16.167 5.06a1.5 1.5 0 0 1 2.122 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"expand",icon:["24","24",[],"","M14.06 21.28l-.353.354-.707-.707.354-.354 7.22-7.22.353-.353.707.707-.354.354-7.22 7.22zm4 .465l-.353.353-.707-.707.354-.353 3.684-3.684.353-.354.707.707-.353.354-3.684 3.684z"]}},function(e,t){e.exports={prefix:"cv",iconName:"minus",icon:["24","24",[],"",""]}},function(e,t){e.exports={prefix:"cv",iconName:"more",icon:["24","24",[],"","M12 13.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0 5.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-11a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"new-window",icon:["24","24",[],"","M17.395 5.526h-3.244a.763.763 0 0 1 0-1.526h5.086a.76.76 0 0 1 .763.763v5.086a.763.763 0 0 1-1.526 0V6.605l-5.172 5.172a.763.763 0 1 1-1.079-1.08l5.172-5.171zM8.5 5.5a.75.75 0 0 1 0 1.5H6.75a.25.25 0 0 0-.25.25v10c0 .138.112.25.25.25h10a.25.25 0 0 0 .25-.25V15.5a.75.75 0 1 1 1.5 0v1.75A1.75 1.75 0 0 1 16.75 19h-10A1.75 1.75 0 0 1 5 17.25v-10c0-.966.784-1.75 1.75-1.75H8.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"plus",icon:["24","24",[],"","M11 11V7.002a.999.999 0 1 1 2 0V11h3.998a.999.999 0 1 1 0 2H13v3.998a.999.999 0 1 1-2 0V13H7.002a.999.999 0 1 1 0-2H11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"preview",icon:["24","24",[],"","M17.278 17.333a3.056 3.056 0 1 0 0-6.11 3.056 3.056 0 0 0 0 6.11zm3.53-.637c.03.022.06.048.087.076l1.729 1.728a.794.794 0 1 1-1.124 1.124l-1.728-1.729a.801.801 0 0 1-.076-.088 4.278 4.278 0 1 1 1.112-1.112zM7.713 9C7.32 9 7 8.776 7 8.5s.32-.5.714-.5h8.572c.394 0 .714.224.714.5s-.32.5-.714.5H7.714zm-.357 3.5C7.16 12.5 7 12.276 7 12s.16-.5.357-.5h4.286c.197 0 .357.224.357.5s-.16.5-.357.5H7.357zM7.5 16a.5.5 0 1 1 0-1h4a.5.5 0 1 1 0 1h-4zm8.5 3a.5.5 0 1 1 0 1H6.5A2.5 2.5 0 0 1 4 17.5v-11A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5V9a.5.5 0 1 1-1 0V6.5A1.5 1.5 0 0 0 17.5 5h-11A1.5 1.5 0 0 0 5 6.5v11A1.5 1.5 0 0 0 6.5 19H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"search",icon:["24","24",[],"","M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"]}},function(e,t){e.exports={prefix:"cv",iconName:"share",icon:["24","24",[],"","M15.091 15.463a2.187 2.187 0 1 1-.392.782L8.91 13.35a2.187 2.187 0 1 1-.1-2.82l5.88-2.812a2.187 2.187 0 1 1 .378.79l-5.811 2.778a2.184 2.184 0 0 1 .045 1.281l5.79 2.896z"]}},function(e,t){e.exports={prefix:"cv",iconName:"upload",icon:["24","24",[],"","M5.5 18.5h13v-2.75a.75.75 0 1 1 1.5 0V19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3.25a.75.75 0 1 1 1.5 0v2.75zm7.249-11.796v8.57c0 .401-.35.726-.781.726-.432 0-.781-.325-.781-.725V6.704L7.89 9.658a.869.869 0 0 1-1.145 0 .692.692 0 0 1-.009-1.05l4.66-4.174a.869.869 0 0 1 1.144 0l4.66 4.174a.69.69 0 0 1 0 1.042.871.871 0 0 1-1.155.008L12.75 6.704z"]}},function(e,t){e.exports={prefix:"cv",iconName:"down",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"right",icon:["24","24",[],"","M8 10l8 .014L12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"up-down",icon:["24","24",[],"","M8 14l8 .014L12 18l-4-4zm0-4l4-4 4 3.986L8 10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"no-edit",icon:["24","24",[],"","M11.321 14.15l.707.707-4.578 4.578c-2.276.4-3.426.589-3.45.565-.024-.024.183-1.155.621-3.393L9.2 12.028l.707.707-3.739 3.74 1.468 1.36 3.685-3.685zm2.828-2.829l2.233-2.232-1.414-1.414-2.233 2.232-.707-.707 4.14-4.14a1.5 1.5 0 0 1 2.12 0l.708.708a1.5 1.5 0 0 1 0 2.121l-4.14 4.14-.707-.708zm-8.933 7.486c.45-.076 1.012-.173 1.685-.29l-1.383-1.282a173.71 173.71 0 0 0-.302 1.572zm10.459-11.84l1.414 1.415 1.2-1.2a.5.5 0 0 0 0-.707l-.708-.707a.5.5 0 0 0-.707 0l-1.2 1.2zM4.646 5.355a.5.5 0 0 1 .708-.708L19.496 18.79a.5.5 0 1 1-.707.707L4.646 5.354z"]}},function(e,t){e.exports={prefix:"cv",iconName:"edit-clickview",icon:["20","20",[],"","M17.6404852,5.71727477 L18.2297408,6.30653042 C18.7178962,6.79468579 18.7178962,7.58614201 18.2297408,8.07429738 L8.60812289,17.6959153 C6.71135346,18.0295451 5.75309028,18.1864816 5.73333333,18.1667246 C5.71357639,18.1469677 5.88616537,17.2043571 6.25110029,15.3388927 L15.8727182,5.71727477 C16.3608736,5.22911941 17.1523298,5.22911941 17.6404852,5.71727477 Z M8.7636789,16.361848 L16.05144,9.07408693 L14.8729287,7.89557563 L7.54002172,15.2284826 L8.7636789,16.361848 Z M6.74626541,17.1725049 C7.12145752,17.1092038 7.58975231,17.0283895 8.15085565,16.9301078 L6.99799308,15.862313 C6.89682248,16.3819093 6.8128974,16.8187273 6.74626541,17.1725049 Z M15.4621843,7.30631998 L16.6406956,8.48483128 L17.6404852,7.48504173 C17.8032036,7.32232327 17.8032036,7.05850453 17.6404852,6.89578608 L17.0512295,6.30653042 C16.8885111,6.14381197 16.6246923,6.14381197 16.4619739,6.30653042 L15.4621843,7.30631998 Z M6.33566019,14.9908489 C6.2812423,14.9851574 6.22594201,14.9756491 6.16991424,14.9622805 C5.78045547,14.8577915 5.5109401,14.5829916 5.41684139,14.197065 L5.16924027,13.2272939 L4.21481414,13.4992408 C3.82064978,13.614606 3.44283804,13.5120571 3.186267,13.236167 C2.88681965,12.9560388 2.78427075,12.578227 2.89864522,12.187493 L3.17158282,11.2296365 L2.20423564,10.9826478 C1.82188543,10.8870603 1.55144636,10.6218219 1.4331146,10.2152085 C1.34005988,9.82437875 1.44481708,9.45772856 1.72601896,9.19546209 L2.43808286,8.49887783 L1.73450689,7.81040417 C1.44481706,7.54002697 1.34005989,7.17337687 1.439649,6.75790801 C1.55144635,6.37593371 1.82188539,6.11069542 2.20181175,6.01572028 L3.17158282,5.76811916 L2.89963593,4.81369299 C2.78427075,4.41952863 2.88681965,4.04171689 3.16270985,3.78514587 C3.442838,3.48569854 3.82064974,3.38314964 4.2113838,3.49752411 L5.16924027,3.77046171 L5.41554008,2.80590417 C5.51183431,2.41109782 5.78619407,2.13673807 6.15902913,2.0463353 C6.55319349,1.93097012 6.93100525,2.03351902 7.20467421,2.32619001 L7.89999894,3.04211696 L8.594506,2.32703389 C8.87243071,2.03952554 9.24209506,1.93918808 9.61899753,2.04044384 C10.0138038,2.13673809 10.2881636,2.41109789 10.3831565,2.80069064 L10.6307576,3.77046171 L11.5851838,3.49851482 C11.9793481,3.38314964 12.3571599,3.48569854 12.6137309,3.76158875 C12.9131782,4.04171689 13.0157271,4.41952857 12.9013527,4.8102627 L12.6284151,5.76811916 L13.5957624,6.01510789 C13.9781125,6.11069542 14.2485515,6.37593369 14.3668833,6.78254721 C14.3761095,6.82129727 14.3833912,6.85980963 14.3887491,6.89800613 L12.4311686,8.86525019 C12.2885501,8.50246788 12.3664513,8.07377489 12.6626209,7.7840438 L13.3831727,7.07934901 C13.4057811,7.05824779 13.4051218,7.06055538 13.4006115,7.03880681 C13.3874896,6.9939735 13.3872742,6.99376225 13.3508029,6.98463799 L12.3810318,6.73703687 L12.3543769,6.72983797 C11.8232342,6.57849086 11.5153491,6.0252236 11.6666962,5.49408097 L11.9406245,4.53279433 C11.9501787,4.50015106 11.9538346,4.51362027 11.9070166,4.46830299 C11.8852565,4.44504217 11.8987257,4.44869811 11.8626522,4.45924293 L10.9047957,4.73218053 L10.8781408,4.73937942 C10.3430223,4.87600541 9.79846586,4.55296343 9.66183987,4.01784495 L9.41293742,3.04286026 C9.40513226,3.0108591 9.4140425,3.01976934 9.37095513,3.00912543 C9.33213613,2.99871057 9.33745796,2.99726608 9.31267674,3.02289983 L8.61735201,3.73882678 L8.59670876,3.75947002 C8.2005256,4.14425223 7.56742808,4.13500994 7.18264587,3.73882678 L6.48086195,3.01612347 C6.45910183,2.99286265 6.4725711,2.9965186 6.4179566,3.01196417 C6.38595535,3.01976935 6.39486559,3.01085911 6.3857591,3.04807388 L6.13815798,4.01784495 L6.13095909,4.04449986 C5.97961199,4.5756425 5.42634475,4.88352762 4.89520211,4.73218053 L3.93391535,4.45825223 C3.90127212,4.44869811 3.91474139,4.44504217 3.86942412,4.49186014 C3.84616328,4.51362028 3.84981922,4.50015102 3.86036404,4.53622453 L4.13330164,5.494081 L4.14050053,5.52073591 C4.27712653,6.05585439 3.95408454,6.60041087 3.41896607,6.73703687 L2.44677117,6.98525039 C2.41272371,6.99376225 2.41250834,6.99397349 2.40592081,7.01416766 C2.3948761,7.06055542 2.39421677,7.05824776 2.42531312,7.08745955 L3.13737702,7.78404381 L3.15291688,7.79958367 C3.53912638,8.1943756 3.53216895,8.82750235 3.13737702,9.21371185 L2.41682511,9.91840678 C2.39421677,9.93950789 2.3948761,9.93720022 2.3993864,9.95894886 C2.41250834,10.0037822 2.41272371,10.0039934 2.44919499,10.0131176 L3.41896606,10.2607188 L3.44562098,10.2679177 C3.97676362,10.4192648 4.28464874,10.972532 4.13330164,11.5036746 L3.85937334,12.4649614 C3.84981922,12.4976046 3.84616328,12.4841354 3.89298124,12.5294526 C3.91474137,12.5527135 3.90127209,12.5490575 3.93734565,12.5385127 L4.89520212,12.2655751 L4.92185702,12.2583762 C5.4569755,12.1217502 6.00153199,12.4447922 6.13815798,12.9799107 L6.38706042,13.9548953 C6.3957598,13.9905628 6.39169395,13.9864172 6.41528883,13.9929559 C6.46167656,14.0040006 6.45936885,14.00466 6.48858067,13.9735636 L7.18516493,13.2614997 L7.20070477,13.2459599 C7.4952939,12.9577749 7.92258715,12.888504 8.28097421,13.0359319 L6.33566019,14.9908489 Z M6.70489207,8.77616163 L9.31429327,6.16676041 C9.44212761,6.03892605 9.65593967,6.03389908 9.78471434,6.16267377 L10.2815938,6.65955323 C10.4116803,6.78963968 10.4085388,6.9989426 10.2775071,7.12997428 L6.95925927,10.4482222 C6.89767261,10.5098088 6.81613041,10.5428917 6.73375541,10.5462414 C6.63512454,10.5601257 6.53103126,10.5287286 6.45266973,10.450367 L4.80169873,8.79939603 C4.67185163,8.66954896 4.66967053,8.4612063 4.79975698,8.33111983 L5.29663643,7.83424043 C5.42541113,7.7054657 5.63211299,7.70338256 5.76491261,7.83618216 L6.70489207,8.77616163 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"caret",icon:["24","24",[],"","M8 10 16 10.0136253 12 14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-up",icon:["24","24",[],"","M12.733 8.305l5.963 5.906a1.046 1.046 0 0 1 0 1.473l-.01.011a1.034 1.034 0 0 1-1.467 0L12 10.526l-5.22 5.17a1.034 1.034 0 0 1-1.465 0l-.011-.012a1.046 1.046 0 0 1 0-1.473l5.963-5.906a1.034 1.034 0 0 1 1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-down",icon:["24","24",[],"","M11.267 15.695L5.304 9.79a1.046 1.046 0 0 1 0-1.473l.01-.011a1.034 1.034 0 0 1 1.467 0L12 13.474l5.22-5.17a1.034 1.034 0 0 1 1.465 0l.011.012a1.046 1.046 0 0 1 0 1.473l-5.963 5.906a1.034 1.034 0 0 1-1.466 0z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-left",icon:["24","24",[],"","M8.305 11.267l5.906-5.963a1.046 1.046 0 0 1 1.473 0l.011.01a1.034 1.034 0 0 1 0 1.467L10.526 12l5.17 5.22c.406.41.406 1.055 0 1.465l-.012.011a1.046 1.046 0 0 1-1.473 0l-5.906-5.963a1.034 1.034 0 0 1 0-1.466z"]}},function(e,t){e.exports={prefix:"cv",iconName:"chevron-right",icon:["24","24",[],"","M15.695 11.267c.407.41.407 1.056 0 1.466L9.79 18.696a1.046 1.046 0 0 1-1.474 0l-.01-.01a1.034 1.034 0 0 1 0-1.467L13.474 12l-5.17-5.22a1.034 1.034 0 0 1 0-1.465l.012-.011a1.046 1.046 0 0 1 1.474 0l5.905 5.963z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-left",icon:["24","24",[],"","M7.182 11h11.89c.512 0 .928.448.928 1s-.416 1-.929 1H7.181l3.781 4.22a1.11 1.11 0 0 1 0 1.465c-.36.403-.943.418-1.311.045a.952.952 0 0 1-.032-.034l-5.343-5.963a1.112 1.112 0 0 1 0-1.466l5.343-5.963a.883.883 0 0 1 1.333 0c.378.421.378 1.066.01 1.477L7.182 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"arrow-right",icon:["24","24",[],"","M16.818 11H4.928C4.417 11 4 11.448 4 12s.416 1 .929 1h11.89l-3.781 4.22a1.112 1.112 0 0 0 0 1.465c.36.403.943.418 1.311.045a.952.952 0 0 0 .032-.034l5.343-5.963a1.112 1.112 0 0 0 0-1.466l-5.343-5.963a.883.883 0 0 0-1.333 0 1.115 1.115 0 0 0-.01 1.477L16.818 11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"enter",icon:["24","24",[],"","M5.613 13.959a.599.599 0 0 1-.213-.46c0-.155.058-.309.176-.426l3.75-3.75a.6.6 0 0 1 .848.848L7.446 12.9H13.5A3.9 3.9 0 0 0 17.4 9V6.747a.6.6 0 0 1 1.2 0V9a5.1 5.1 0 0 1-5.1 5.1H7.452l2.722 2.723a.6.6 0 0 1-.848.848L5.613 13.96z"]}},function(e,t){e.exports={prefix:"cv",iconName:"archive",icon:["24","24",[],"","M19.64 10.28a.55.55 0 1 1 1.1 0v6.878c0 1.582-1.386 2.842-3.07 2.842H6.33c-1.684 0-3.07-1.26-3.07-2.842V10.28a.55.55 0 1 1 1.1 0v6.877c0 .95.87 1.742 1.97 1.742h11.34c1.1 0 1.97-.793 1.97-1.742V10.28zM20.19 4c.99 0 1.81.747 1.81 1.696V7.99a.55.55 0 0 1-.55.55H2.55A.55.55 0 0 1 2 7.99V5.696C2 4.747 2.821 4 3.81 4h16.38zm.71 1.696c0-.317-.307-.596-.71-.596H3.81c-.403 0-.71.28-.71.596v1.742h17.8V5.696zm-5.83 5.73c0 .95-.821 1.697-1.81 1.697h-2.52c-.989 0-1.81-.747-1.81-1.696 0-.95.821-1.696 1.81-1.696h2.52c.989 0 1.81.747 1.81 1.696zm-1.1 0c0-.316-.307-.595-.71-.595h-2.52c-.403 0-.71.28-.71.596 0 .317.307.596.71.596h2.52c.403 0 .71-.28.71-.596z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bell",icon:["24","24",[],"","M9.588 17.995H6.152c-.636 0-1.152-.53-1.152-1.182 0-.221.06-.438.175-.626l2.128-2.92V9.722c0-2.187 1.447-4.027 3.411-4.567v-.012A1.143 1.143 0 0 1 13 5.128c2.017.502 3.515 2.369 3.515 4.594v3.545l2.303 2.92a1.2 1.2 0 0 1-.366 1.628 1.13 1.13 0 0 1-.61.18h-3.716a2.286 2.286 0 0 1-4.538 0zm1.161 0a1.143 1.143 0 0 0 2.216 0H10.75zm4.615-4.31V9.723c0-1.958-1.547-3.546-3.455-3.546-1.908 0-3.454 1.588-3.454 3.546v3.939l-.23.314-2.073 2.838H17.83l-2.467-3.127z"]}},function(e,t){e.exports={prefix:"cv",iconName:"bookmark",icon:["24","24",[],"","M8.5 5h7A1.5 1.5 0 0 1 17 6.5v12.131a.2.2 0 0 1-.309.168L12 15.75 7.309 18.8A.2.2 0 0 1 7 18.63V6.5A1.5 1.5 0 0 1 8.5 5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"broadcast",icon:["24","24",[],"","M4.571 19C4.256 19 4 18.776 4 18.5s.256-.5.571-.5H19.43c.315 0 .571.224.571.5s-.256.5-.571.5H4.57zM4.125 5h15.75C20.496 5 21 5.537 21 6.2v9.6c0 .663-.504 1.2-1.125 1.2H4.125C3.504 17 3 16.463 3 15.8V6.2C3 5.537 3.504 5 4.125 5zM4 6v10h16V6H4zm6 2.35a.192.192 0 0 1 .295-.162l4.164 2.65a.192.192 0 0 1 0 .324l-4.164 2.65A.192.192 0 0 1 10 13.65v-5.3z"]}},function(e,t){e.exports={prefix:"cv",iconName:"calendar",icon:["24","24",[],"","M6.2 10.2V17a.8.8 0 0 0 .8.8h10a.8.8 0 0 0 .8-.8v-6.8H6.2zM16 5.5h2a1 1 0 0 1 1 1V17a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6.5a1 1 0 0 1 1-1h2v-.875a.625.625 0 1 1 1.25 0V5.5h5.5v-.875a.625.625 0 1 1 1.25 0V5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"cog",icon:["24","24",[],"","M18.458 12c0 .944.514 1.722 1.542 2.333a10.98 10.98 0 0 1-.667 1.584c-.944-.223-1.805.055-2.583.833-.694.694-.917 1.556-.667 2.583A10.98 10.98 0 0 1 14.5 20c-.611-1.028-1.444-1.542-2.5-1.542s-1.889.514-2.5 1.542c-.5-.167-1.042-.389-1.625-.667.25-1.055.042-1.916-.625-2.583-.667-.667-1.528-.875-2.583-.625C4.389 15.542 4.167 15 4 14.5c1.028-.611 1.542-1.444 1.542-2.5 0-.944-.514-1.722-1.542-2.333a8.484 8.484 0 0 1 .667-1.584c.944.223 1.805-.055 2.583-.833.667-.667.875-1.528.625-2.583C8.458 4.389 9 4.167 9.5 4c.611 1.028 1.444 1.542 2.5 1.542S13.889 5.028 14.5 4c.5.167 1.042.389 1.625.667-.25 1.055-.042 1.916.625 2.583.778.778 1.639 1.056 2.583.833.306.611.528 1.14.667 1.584-1.028.61-1.542 1.389-1.542 2.333zM12 16.083c1.111 0 2.07-.402 2.875-1.208.806-.806 1.208-1.764 1.208-2.875s-.402-2.07-1.208-2.875c-.806-.806-1.764-1.208-2.875-1.208s-2.07.402-2.875 1.208c-.806.806-1.208 1.764-1.208 2.875s.402 2.07 1.208 2.875c.806.806 1.764 1.208 2.875 1.208z"]}},function(e,t){e.exports={prefix:"cv",iconName:"folder",icon:["24","24",[],"","M12.685 6H18.5A1.5 1.5 0 0 1 20 7.5v11a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 18.5v-13A1.5 1.5 0 0 1 5.5 4h4.66a1.5 1.5 0 0 1 1.095.474L12.685 6zM5.5 5a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-6.248l-1.727-1.842A.5.5 0 0 0 10.161 5H5.5zM5 10V9h14v1H5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"handle",icon:["16","16",[],"","M1 0h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1v1.2a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7.4a1 1 0 0 1 1-1zm0 6.4h14a1 1 0 0 1 1 1V15a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1v-1.2a1 1 0 0 1 1-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c4.001-4.053 1.158-11.055-4.532-11.055-3.417 0-4.985 2.511-5.596 2.98-.614-.471-2.172-2.98-5.596-2.98-5.672 0-8.55 6.984-4.531 11.055z"]}},function(e,t){e.exports={prefix:"cv",iconName:"heart-outline",icon:["24","24",[],"","m11.466 22.776c.141.144.333.224.534.224s.393-.08.534-.224l9.594-9.721c2.491-2.523 2.491-6.63 0-9.154-1.21-1.226-2.819-1.901-4.532-1.901s-3.321.675-4.531 1.9l-1.065 1.08-1.065-1.079c-1.21-1.226-2.819-1.901-4.531-1.901-1.713 0-3.322.675-4.532 1.901-2.491 2.524-2.491 6.631 0 9.153zm-8.527-17.822c.926-.937 2.157-1.454 3.464-1.454 1.308 0 2.538.517 3.463 1.455l1.599 1.62c.281.285.786.285 1.067 0l1.599-1.621c.928-.937 2.158-1.454 3.465-1.454 1.308 0 2.538.517 3.464 1.454 1.917 1.943 1.917 5.104 0 7.048l-9.06 9.181-9.061-9.182c-1.917-1.942-1.917-5.104 0-7.047z"]}},function(e,t){e.exports={prefix:"cv",iconName:"interactive",icon:["24","24",[],"","M5.978 13.65l7.525-9.99a.2.2 0 0 1 .357.154l-1.289 7.5 5.194-1.04a.2.2 0 0 1 .198.318l-7.447 9.733a.2.2 0 0 1-.355-.16l1.268-6.566-5.277.37a.2.2 0 0 1-.174-.32z"]}},function(e,t){e.exports={prefix:"cv",iconName:"link",icon:["24","24",[],"","M17 10c2.2 0 4 1.8 4 4s-1.8 4-4 4h-5a3.99 3.99 0 0 1-3-1.367v-.028a4.447 4.447 0 0 1-.889-2.679c0-.698.162-1.356.443-1.94A4 4 0 0 1 12 10h1.872v.098c0 .573-.322 1.081-.818 1.402H12c-.722 0-1.368.316-1.824.811-.453.418-.732.976-.732 1.591v.196c0 .575.244 1.1.645 1.508.46.545 1.146.894 1.911.894h5c1.375 0 2.5-1.125 2.5-2.5s-1.125-2.5-2.5-2.5h-.686a5.22 5.22 0 0 0 .24-1.5H17zm-9.556 3.926l.002.074H7c-2.2 0-4-1.8-4-4s1.8-4 4-4h5c1.462 0 2.743.797 3.441 1.975a4.48 4.48 0 0 1-.44 4.63v.024a3.982 3.982 0 0 1-3 1.37h-1.873v-.096c0-.574.322-1.082.817-1.403H12c.722 0 1.368-.316 1.824-.811.452-.418.731-.976.731-1.591v-.195c0-.576-.244-1.101-.645-1.51A2.496 2.496 0 0 0 12 7.5H7A2.507 2.507 0 0 0 4.5 10c0 1.375 1.125 2.5 2.5 2.5h.642c-.128.452-.198.93-.198 1.426z"]}},function(e,t){e.exports={prefix:"cv",iconName:"playlist",icon:["24","24",[],"","M4,19.0049107 C4,19.5548349 4.44525903,20 4.99508929,20 L19.0049107,20 C19.5548349,20 20,19.554741 20,19.0049107 L20,4.99508929 C20,4.44516513 19.554741,4 19.0049107,4 L4.99508929,4 C4.44516513,4 4,4.44525903 4,4.99508929 L4,19.0049107 Z M4.99508929,3 L19.0049107,3 C20.1067681,3 21,3.8926228 21,4.99508929 L21,19.0049107 C21,20.1067681 20.1073772,21 19.0049107,21 L4.99508929,21 C3.8932319,21 3,20.1073772 3,19.0049107 L3,4.99508929 C3,3.8932319 3.8926228,3 4.99508929,3 Z M17.5,17.3 C17.7761424,17.3 18,17.0761424 18,16.8 C18,16.5238576 17.7761424,16.3 17.5,16.3 L9.5,16.3 C9.22385763,16.3 9,16.5238576 9,16.8 C9,17.0761424 9.22385763,17.3 9.5,17.3 L17.5,17.3 Z M17.5,12.7 C17.7761424,12.7 18,12.4761424 18,12.2 C18,11.9238576 17.7761424,11.7 17.5,11.7 L9.5,11.7 C9.22385763,11.7 9,11.9238576 9,12.2 C9,12.4761424 9.22385763,12.7 9.5,12.7 L17.5,12.7 Z M8.07195299,7.22930174 L6.86542219,6.50538326 C6.38401051,6.21653625 6,6.43413716 6,6.98678206 L6,8.51032805 C6,9.06455544 6.38746271,9.27850253 6.86542219,8.99172685 L8.07195299,8.26780837 C8.55336467,7.97896136 8.54991246,7.51607743 8.07195299,7.22930174 Z M8.07195299,11.7293017 L6.86542219,11.0053833 C6.38401051,10.7165363 6,10.9341372 6,11.4867821 L6,13.010328 C6,13.5645554 6.38746271,13.7785025 6.86542219,13.4917268 L8.07195299,12.7678084 C8.55336467,12.4789614 8.54991246,12.0160774 8.07195299,11.7293017 Z M8.07195299,16.2293017 L6.86542219,15.5053833 C6.38401051,15.2165363 6,15.4341372 6,15.9867821 L6,17.510328 C6,18.0645554 6.38746271,18.2785025 6.86542219,17.9917268 L8.07195299,17.2678084 C8.55336467,16.9789614 8.54991246,16.5160774 8.07195299,16.2293017 Z M17.5,8.3 C17.7761424,8.3 18,8.07614237 18,7.8 C18,7.52385763 17.7761424,7.3 17.5,7.3 L9.5,7.3 C9.22385763,7.3 9,7.52385763 9,7.8 C9,8.07614237 9.22385763,8.3 9.5,8.3 L17.5,8.3 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"publisher-archive",icon:["24","24",[],"","M19.6403207,10.2808023 C19.6403207,9.97696656 19.8864872,9.73065903 20.1901489,9.73065903 C20.4938106,9.73065903 20.7399771,9.97696656 20.7399771,10.2808023 L20.7399771,17.1575931 C20.7399771,18.7397289 19.3544729,20 17.6701031,20 L6.32989691,20 C4.64552709,20 3.26002291,18.7397289 3.26002291,17.1575931 L3.26002291,10.2808023 C3.26002291,9.97696656 3.50618937,9.73065903 3.80985109,9.73065903 C4.11351281,9.73065903 4.35967927,9.97696656 4.35967927,10.2808023 L4.35967927,17.1575931 C4.35967927,18.1074218 5.23070097,18.8997135 6.32989691,18.8997135 L17.6701031,18.8997135 C18.769299,18.8997135 19.6403207,18.1074218 19.6403207,17.1575931 L19.6403207,10.2808023 Z M20.1901489,4 C21.1786273,4 22,4.74713037 22,5.69627507 L22,7.98853868 C22,8.29237442 21.7538335,8.53868195 21.4501718,8.53868195 L2.54982818,8.53868195 C2.24616646,8.53868195 2,8.29237442 2,7.98853868 L2,5.69627507 C2,4.74713037 2.82137271,4 3.80985109,4 L20.1901489,4 Z M20.9003436,5.69627507 C20.9003436,5.37943754 20.5934534,5.10028653 20.1901489,5.10028653 L3.80985109,5.10028653 C3.40654659,5.10028653 3.09965636,5.37943754 3.09965636,5.69627507 L3.09965636,7.43839542 L20.9003436,7.43839542 L20.9003436,5.69627507 Z M15.069874,11.4269341 C15.069874,12.3760788 14.2485013,13.1232092 13.2600229,13.1232092 L10.7399771,13.1232092 C9.75149871,13.1232092 8.930126,12.3760788 8.930126,11.4269341 C8.930126,10.4777894 9.75149871,9.73065903 10.7399771,9.73065903 L13.2600229,9.73065903 C14.2485013,9.73065903 15.069874,10.4777894 15.069874,11.4269341 Z M13.9702176,11.4269341 C13.9702176,11.1100966 13.6633274,10.8309456 13.2600229,10.8309456 L10.7399771,10.8309456 C10.3366726,10.8309456 10.0297824,11.1100966 10.0297824,11.4269341 C10.0297824,11.7437716 10.3366726,12.0229226 10.7399771,12.0229226 L13.2600229,12.0229226 C13.6633274,12.0229226 13.9702176,11.7437716 13.9702176,11.4269341 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"resources",icon:["24","24",[],"","M4 6.83c0-.523.423-.948.948-.948H17.17c.524 0 .949.423.949.949v12.22a.947.947 0 0 1-.949.949H4.95a.947.947 0 0 1-.95-.948V6.83zm.941 12.222c0 .005 12.228.007 12.228.007.005 0 .007-12.228.007-12.228 0-.005-12.228-.007-12.228-.007-.005 0-.007 12.228-.007 12.228zm2.353-9.405a.47.47 0 1 1 0-.941h7.588a.47.47 0 1 1 0 .941H7.294zm0 2.824a.47.47 0 1 1 0-.942h7.588a.47.47 0 1 1 0 .942H7.294zm0 2.823a.47.47 0 1 1 0-.941h2.88a.47.47 0 1 1 0 .941h-2.88zM6.353 4.941a.47.47 0 1 1 0-.941h11.766C19.155 4 20 4.848 20 5.88v12.232a.47.47 0 1 1-.941 0V5.88a.945.945 0 0 0-.94-.938H6.353z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star-o",icon:["24","24",[],"","M11.64 16.055a.768.768 0 0 1 .72 0l3.767 1.998-.806-4.602 3.357-3.249-4.626-.654L12 5.35 9.948 9.548l-4.626.654 3.357 3.25-.807 4.601 3.768-1.998zm-3.75 3.148a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"star",icon:["24","24",[],"","M7.89 19.203a.768.768 0 0 1-1.116-.811l.804-4.583-3.344-3.235a.768.768 0 0 1 .426-1.312l4.607-.652 2.043-4.18a.768.768 0 0 1 1.38 0l2.043 4.18 4.607.652a.768.768 0 0 1 .426 1.312l-3.344 3.235.804 4.583a.768.768 0 0 1-1.116.81L12 17.023l-4.11 2.18z"]}},function(e,t){e.exports={prefix:"cv",iconName:"tag",icon:["24","24",[],"","M9.85651379,4 C10.5597673,4 11.2342681,4.27911643 11.7318501,4.77635695 L11.7318501,4.77635695 L19.5192508,12.5634018 C20.1602555,13.2045708 20.1602555,14.2439177 19.5192159,14.8851217 L19.5192159,14.8851217 L14.8855145,19.5192848 C14.2443321,20.1602442 13.2049876,20.1602442 12.5637184,19.519198 L12.5637184,19.519198 L4.7762613,11.7314233 C4.27913559,11.2340016 4,10.5595161 4,9.85635067 L4,9.85635067 L4,5.64191268 C4,4.7351029 4.73513649,4 5.64195885,4 L5.64195885,4 L9.85651379,4 Z M9.85658948,5.26315824 L5.64195885,5.26315824 C5.4327466,5.26315824 5.26315823,5.43273884 5.26315823,5.64191268 L5.26315823,5.64191268 L5.26315823,9.85642637 C5.26315823,10.2247328 5.40935021,10.5779817 5.66959105,10.8383776 L5.66959105,10.8383776 L13.4568376,18.6259418 C13.6047616,18.7738142 13.8445582,18.7738142 13.9923822,18.6260417 L13.9923822,18.6260417 L18.6259486,13.9920135 C18.7738119,13.8441123 18.7738119,13.6043763 18.6260161,13.4565426 L18.6260161,13.4565426 L10.8388259,5.6697082 C10.5782887,5.40934993 10.2250082,5.26315824 9.85658948,5.26315824 L9.85658948,5.26315824 Z M7.78947471,6.10526373 C8.71963876,6.10526373 9.4736857,6.85931068 9.4736857,7.78947472 C9.4736857,8.71963876 8.71963876,9.4736857 7.78947471,9.4736857 C6.85931067,9.4736857 6.10526373,8.71963876 6.10526373,7.78947472 C6.10526373,6.85931068 6.85931067,6.10526373 7.78947471,6.10526373 Z M7.78947471,7.36842197 C7.5569337,7.36842197 7.36842197,7.55693371 7.36842197,7.78947472 C7.36842197,8.02201573 7.5569337,8.21052747 7.78947471,8.21052747 C8.02201572,8.21052747 8.21052746,8.02201573 8.21052746,7.78947472 C8.21052746,7.55693371 8.02201572,7.36842197 7.78947471,7.36842197 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"time",icon:["24","24",[],"","M12 4c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 1.077a6.88 6.88 0 0 0-4.896 2.027A6.877 6.877 0 0 0 5.077 12c0 1.85.72 3.588 2.027 4.896A6.877 6.877 0 0 0 12 18.923a6.88 6.88 0 0 0 4.896-2.027A6.877 6.877 0 0 0 18.923 12a6.88 6.88 0 0 0-2.027-4.896A6.877 6.877 0 0 0 12 5.077zm2.524 9.599a.6.6 0 0 1-.848.848l-2.5-2.5A.6.6 0 0 1 11 12.6V8.624a.6.6 0 0 1 1.2 0v3.727l2.324 2.325z"]}},function(e,t){e.exports={prefix:"cv",iconName:"video",icon:["24","24",[],"","M4.5 6a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5h-15zm0-1h15A1.5 1.5 0 0 1 21 6.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 17.5v-11A1.5 1.5 0 0 1 4.5 5zM10 9.26v5.48a.256.256 0 0 0 .39.218l4.482-2.74a.256.256 0 0 0 0-.436l-4.483-2.74a.256.256 0 0 0-.389.219z"]}},function(e,t){e.exports={prefix:"cv",iconName:"subject",icon:["24","24",[],"","M19.15,21.08H5.1c-1.09,0-1.98-0.89-1.98-1.98V5.06c0-1.09,0.89-1.98,1.98-1.98h14.04c1.09,0,1.98,0.89,1.98,1.98V19.1 C21.12,20.19,20.24,21.08,19.15,21.08z M20.12,19.16V5c0-0.51-0.41-0.92-0.92-0.92H7.04C6.54,4.08,6.12,4.49,6.12,5v14.16 c0,0.51,0.41,0.92,0.92,0.92h12.16C19.71,20.08,20.12,19.67,20.12,19.16z M19.12,6.95V6.81c0-0.36-0.29-0.65-0.65-0.65H8.78 c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69C18.83,7.6,19.12,7.31,19.12,6.95z M19.12,9.95V9.81 c0-0.36-0.29-0.65-0.65-0.65H8.78c-0.36,0-0.65,0.29-0.65,0.65v0.13c0,0.36,0.29,0.65,0.65,0.65h9.69 C18.83,10.6,19.12,10.31,19.12,9.95z"]}},function(e,t){e.exports={prefix:"cv",iconName:"series",icon:["24","24",[],"","M20.49,3.51c0.97,0,1.76,0.79,1.76,1.76v9.27c0,0.77-0.49,1.42-1.18,1.66l0.09-10.84c0-0.39-0.3-0.7-0.68-0.7l-14.27,0 C6.46,3.99,7.1,3.51,7.85,3.51H20.49z M18.38,5.56c0.97,0,1.76,0.79,1.76,1.75v9.27c0.01,0.77-0.49,1.42-1.17,1.66l0.09-10.86 c0-0.38-0.3-0.68-0.68-0.68l-14.28,0c0.25-0.67,0.89-1.14,1.64-1.14H18.38z M16.15,7.7c0.97,0,1.75,0.79,1.75,1.76v9.27 c0,0.97-0.79,1.75-1.75,1.75H3.5c-0.97,0-1.75-0.79-1.75-1.75V9.46c0-0.97,0.79-1.76,1.75-1.76H16.15z M16.14,8.85H3.51 c-0.38,0-0.68,0.3-0.68,0.68l0,0v9.13c0,0.38,0.3,0.68,0.68,0.68l0,0h12.62c0.38,0,0.68-0.3,0.68-0.68l0,0V9.53 C16.82,9.15,16.52,8.85,16.14,8.85L16.14,8.85z M8.46,12.41v3.37c0,0.18,0.21,0.28,0.35,0.18l2.31-1.69c0.12-0.09,0.12-0.27,0-0.35 L8.8,12.23C8.66,12.13,8.46,12.23,8.46,12.41"]}},function(e,t){e.exports={prefix:"cv",iconName:"white-wave",icon:["1200","244",[],"","M1104.19651,33.5198863 C1084.14716,45.4511816 1067.10689,82.9623447 1047.23647,124.40502 C1023.86518,173.149287 924.725009,160.996474 830.060105,199.668011 C735.395201,238.339548 706.121292,249.351671 618.615175,241.737466 C531.109058,234.12326 495.404437,207.34459 432.2827,199.668011 C370.933901,192.207048 283.214734,200.240922 234.995453,186.264588 C153.311618,162.588569 167.948341,80.4093241 122.421855,59.9864363 C102.62311,51.1048469 61.8158253,37.3273576 0,18.6539685 L0,0 L1200,0 C1161.79495,7.07406031 1129.86046,18.2473557 1104.19651,33.5198863 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"compass",icon:["24","24",[],"","M12,-1.71862524e-13 C13.3893905,-1.71862524e-13 14.5197317,1.12166968 14.5197317,2.50040137 C14.5197317,2.8215332 14.4594938,3.13263028 14.3442115,3.42156921 C16.2349366,3.84633285 17.9748233,4.78862459 19.3866372,6.17539419 L19.4316433,6.22680193 C21.3267651,8.11265804 22.5,10.713205 22.5,13.5805516 C22.5,19.3258216 17.7897333,24 12,24 L12,24 C6.21026669,24 1.5,19.3258216 1.5,13.5805516 L1.50006052,13.5243182 C1.50002021,13.5212739 1.5,13.5182249 1.5,13.5151711 L1.501,13.503 L1.50378159,13.2988768 C1.57785421,10.543134 2.73548466,8.05071265 4.56835673,6.22680193 L4.61336276,6.17539419 C6.02517671,4.78862459 7.76506343,3.84633285 9.65748913,3.42018903 C9.54056383,3.13263028 9.48031555,2.8215332 9.48031555,2.50040137 C9.48031555,1.12166968 10.6106095,-1.71862524e-13 12,-1.71862524e-13 Z M12,4.52624116 L11.6809164,4.53170146 C11.6454989,4.53291535 11.610132,4.53433052 11.5748169,4.53594584 L11.6816694,4.53162088 C11.5883913,4.53477816 11.4953516,4.53932139 11.4025747,4.54524062 L11.5748169,4.53594584 C11.4679256,4.54083509 11.3615084,4.54755809 11.2555967,4.55608379 L11.4025747,4.54524062 C11.3068176,4.55134999 11.2113405,4.55892518 11.1161702,4.56795525 L11.2555967,4.55608379 C11.095392,4.56897997 10.9363438,4.5860008 10.7785603,4.60703883 C10.7467123,4.6104578 10.7154515,4.61475211 10.6842289,4.61920452 L10.7785603,4.60703883 C10.6768565,4.62059949 10.5756781,4.63582921 10.4750543,4.65269924 L10.6842289,4.61920452 C10.600263,4.63117821 10.5165735,4.64429522 10.4331795,4.65854779 L10.4750543,4.65269924 C9.11485909,4.88074187 7.85598275,5.40850943 6.77005357,6.16492738 L8.00490498,7.39068924 C8.27354347,7.65726684 8.27354347,8.0894535 8.00490498,8.35612485 C7.87046765,8.48939021 7.69450873,8.55604633 7.5184081,8.55604633 C7.34230747,8.55604633 7.16634856,8.48943709 7.03200569,8.35612485 L5.70204148,7.03485023 C4.13204115,8.52299364 3.09475895,10.5601022 2.90659433,12.8322227 L4.30759576,12.8325787 C4.68743083,12.8325787 4.99546522,13.1382031 4.99546522,13.5151711 C4.99546522,13.892186 4.68747807,14.1977635 4.30764299,14.1977635 L2.89670934,14.1976473 C3.02371908,16.0609257 3.72135566,17.7714185 4.81716961,19.1579915 L4.97167812,19.3482139 C5.26113447,19.6949337 5.57609243,20.0199666 5.91367078,20.3204536 L7.03200569,19.2111609 C7.30069142,18.9445833 7.73612479,18.9445833 8.00490498,19.2111609 C8.27354347,19.4777385 8.27354347,19.9099252 8.00490498,20.1765497 L7.01386949,21.160078 C8.44796715,22.0922041 10.1613427,22.6346745 12,22.6346745 L12,22.6346745 C13.8583409,22.6346745 15.5887033,22.0805272 17.0320921,21.1300078 L16.0701299,20.1765497 C15.8014914,19.909972 15.8014914,19.4777854 16.0701299,19.2111609 C16.3388156,18.9445833 16.774249,18.9445833 17.042982,19.2111609 L18.1252566,20.2856043 C18.4481451,19.9948825 18.7500205,19.681572 19.0283219,19.3482139 L19.1828304,19.1579915 C20.2466397,17.8119151 20.9351906,16.1605635 21.0907063,14.3605101 L21.1032907,14.1976527 L21.1032907,14.1976527 L19.4302507,14.1977635 C19.0504157,14.1977635 18.7423813,13.8921391 18.7423813,13.5151711 C18.7423813,13.1381562 19.0504157,12.8325787 19.4302507,12.8325787 L21.0934057,12.8322227 C20.9067892,10.5787961 19.8849698,8.55653016 18.3366017,7.07169263 L17.0430292,8.35607798 C16.9085919,8.48943709 16.732633,8.55604633 16.5565323,8.55604633 C16.3804317,8.55604633 16.2044728,8.48943709 16.0701299,8.35612485 C15.8014914,8.08954725 15.8014914,7.65736059 16.0701299,7.39068924 L17.2742569,6.19598696 C16.1894526,5.4308071 14.9295636,4.89482891 13.5669368,4.65983993 C13.5528409,4.65615858 13.538853,4.65380129 13.5248569,4.65147595 L13.5669368,4.65983993 C13.4834378,4.64544029 13.3995531,4.63217086 13.3152992,4.62004816 L13.5248569,4.65147595 C13.4243139,4.63477151 13.3233471,4.61971567 13.2219896,4.60632197 L13.3152992,4.62004816 C13.1723723,4.59948341 13.0283832,4.58221861 12.8834131,4.56833442 C12.8374466,4.56355426 12.7909906,4.55949885 12.7444647,4.55579028 L12.8834131,4.56833442 C12.7886701,4.55926062 12.6935082,4.5516307 12.5979499,4.54546716 L12.7444647,4.55579028 C12.6381278,4.54731418 12.5314263,4.5406499 12.4243976,4.53581255 L12.5979499,4.54546716 C12.5053597,4.53949506 12.4123973,4.53489967 12.3190836,4.53170146 L12.4243976,4.53581255 C12.2834709,4.52944313 12.1419768,4.52624116 12,4.52624116 Z M12.2098775,18.4456908 C12.3524617,18.4551964 12.4902931,18.464702 12.6328773,18.4884661 C12.6851582,18.4932189 12.7421919,18.5074773 12.7944727,18.5169829 C12.8039783,18.5169829 12.813484,18.5169829 12.8229896,18.5217357 C12.8990345,18.5692638 12.984585,18.5740166 13.0701355,18.5930278 C13.0938996,18.5977806 13.1224164,18.6025334 13.1509332,18.612039 C13.1746973,18.6215447 13.1984613,18.6310503 13.2174725,18.6500615 C13.2364838,18.6690727 13.255495,18.6833311 13.2887647,18.688084 C13.3172815,18.6928368 13.3362927,18.7213536 13.3362927,18.7546232 C13.3362927,18.7831401 13.3315399,18.8116569 13.3267871,18.835421 C13.3077759,18.9304771 13.2887647,19.030286 13.2650006,19.1253422 C13.2602478,19.153859 13.2507422,19.1823759 13.2412366,19.2108927 C13.2174725,19.277432 13.2127197,19.3487241 13.1937085,19.4152634 C13.1794501,19.4532859 13.1746973,19.4960611 13.1556861,19.5340836 C13.1414276,19.5673532 13.131922,19.6006229 13.1034052,19.6386453 C13.0891468,19.6529038 13.084394,19.6766678 13.0796411,19.7004318 C13.0606299,19.7527127 13.0321131,19.7717239 12.9750794,19.7622183 L12.9750794,19.7622183 L12.960821,19.7622183 C12.8562592,19.7384543 12.7564503,19.7194431 12.6566413,19.6909262 C12.5473268,19.6624094 12.4380122,19.6529038 12.3286977,19.6576566 C12.3001808,19.6576566 12.271664,19.6671622 12.2431471,19.6766678 C12.2051247,19.6909262 12.1956191,19.7194431 12.1956191,19.7574655 C12.1956191,19.7764767 12.2003719,19.7907352 12.2193831,19.795488 C12.2811696,19.8287576 12.3382033,19.8620273 12.419001,19.8762857 C12.442765,19.8810385 12.4617762,19.8952969 12.4807875,19.9048025 C12.5045515,19.9190609 12.5235627,19.9285666 12.542574,19.9380722 C12.689911,20.0093643 12.8467536,20.0711508 12.9798322,20.1709597 C13.084394,20.2422518 13.1604389,20.3325551 13.2032141,20.4513753 L13.2032141,20.4513753 L13.3077759,20.7745662 C13.3410455,20.8933864 13.3362927,21.0217122 13.3315399,21.1452851 C13.3267871,21.2403413 13.3125287,21.3401502 13.279259,21.4304535 C13.2745062,21.4352064 13.2745062,21.4399592 13.2745062,21.4494648 C13.2840118,21.5587793 13.2507422,21.6585883 13.1889557,21.7441388 C13.084394,21.8962286 12.9513154,22.0293072 12.7897199,22.1291162 C12.6851582,22.1956555 12.5710908,22.2336779 12.4475178,22.257442 C12.3239448,22.281206 12.1956191,22.3144756 12.0672933,22.3287341 C11.9579787,22.3429925 11.8486642,22.3429925 11.7441024,22.3382397 C11.6157766,22.3239812 11.4922036,22.3002172 11.3638778,22.2764532 C11.3448666,22.2764532 11.3258554,22.2669476 11.3068442,22.2621948 C11.2165408,22.2194195 11.1262375,22.2051611 11.0311814,22.1956555 C10.9076084,22.1766442 10.7887882,22.1481274 10.6652152,22.1243634 C10.6366984,22.1196106 10.6081815,22.0958465 10.6081815,22.0625769 C10.6081815,21.9675207 10.5844175,21.8677118 10.5986759,21.7726556 C10.6129344,21.6015546 10.62244,21.4257007 10.6414512,21.2545997 C10.6509568,21.1642964 10.6747208,21.073993 10.6984849,20.9789369 C10.7127433,20.9219032 10.7507658,20.8981392 10.8125522,20.902892 C10.9028556,20.9123976 10.9931589,20.9171504 11.0787094,20.9314088 C11.188024,20.9456672 11.2925857,20.9599257 11.3971475,20.9931953 C11.4541812,21.0074537 11.5112149,21.0169593 11.5682485,21.0217122 C11.6633047,21.026465 11.753608,21.026465 11.8439113,21.026465 C11.8866866,21.026465 11.9294619,20.9836897 11.9342147,20.9456672 C11.9389675,20.9123976 11.9152034,20.8696223 11.8724282,20.8553639 C11.8391585,20.8458583 11.7963833,20.8363527 11.7583608,20.8315999 C11.7345968,20.8268471 11.7108328,20.8220943 11.6870687,20.8220943 C11.6015182,20.8173415 11.5254733,20.7935774 11.4446756,20.7650606 C11.3638778,20.7317909 11.2783273,20.7127797 11.1975296,20.6795101 C11.088215,20.6414876 10.9884061,20.5797011 10.8981028,20.508409 C10.817305,20.4466225 10.7792826,20.361072 10.7507658,20.2707687 C10.7079905,20.1234316 10.6937321,19.9713418 10.7127433,19.819252 C10.7270017,19.7051846 10.7317545,19.5911173 10.7507658,19.4818027 C10.793541,19.2441624 10.8885972,19.030286 11.0596982,18.859185 C11.2070352,18.711848 11.3876419,18.612039 11.5920126,18.5550054 C11.7060799,18.5217357 11.8249001,18.4932189 11.9437203,18.4694548 C12.0340236,18.4551964 12.124327,18.4551964 12.2098775,18.4456908 Z M14.7328664,9.61765309 C15.1590885,9.61765309 15.5675493,9.84298078 15.7988231,10.2056519 C16.0296718,10.5678544 16.0563136,11.0171504 15.8699625,11.4074308 L14.1147664,15.0838768 C13.9903906,15.3443138 13.7774449,15.5556727 13.5149472,15.6790944 L9.80998461,17.4209191 C9.63676546,17.5022939 9.45419332,17.5435907 9.2670864,17.5435907 C8.84086431,17.5435907 8.43240343,17.3182631 8.20112965,16.9555919 C7.97028099,16.5933895 7.94363916,16.1440935 8.12999028,15.753813 L9.88518638,12.077367 C10.0095622,11.81693 10.2225079,11.6055242 10.4850055,11.4821494 L14.1899681,9.74032473 C14.3631873,9.65894988 14.5457594,9.61765309 14.7328664,9.61765309 Z M14.4894526,11.1101033 L11.1110414,12.6984127 L9.51045294,16.050953 L12.8888641,14.4626436 L14.4894526,11.1101033 Z M13.0226075,6.1644377 C13.0938996,6.1691905 13.1651917,6.1691905 13.2364838,6.1691905 L13.2364838,6.1691905 L13.5121466,6.18344892 C13.5596746,6.18344892 13.5929443,6.21196577 13.5976971,6.26424664 C13.6309667,6.56842629 13.6547308,6.87260593 13.6357196,7.17678557 C13.5976971,7.72335837 13.6262139,8.27468397 13.6167083,8.82125677 C13.6167083,9.03513308 13.6214611,9.24900939 13.6452252,9.46763851 L13.6452252,9.46763851 L13.6452252,9.59121149 C13.6404724,9.6625036 13.6024499,9.69102044 13.5359106,9.68626763 C13.526405,9.68626763 13.5121466,9.69102044 13.502641,9.69102044 C13.4836297,9.69577324 13.4598657,9.70527886 13.4408545,9.70052605 C13.3695624,9.68626763 13.2935175,9.69102044 13.2222254,9.69102044 C13.1414276,9.68626763 13.0606299,9.69577324 12.9798322,9.70052605 C12.837248,9.71003166 12.689911,9.71953728 12.542574,9.72429009 C12.4997987,9.72904289 12.4760347,9.70527886 12.4570234,9.6672564 L12.4570234,9.6672564 L12.271664,9.34881834 C12.1195741,9.07315554 11.9532259,8.81175116 11.8201473,8.52658274 L11.8201473,8.52658274 L11.8011361,8.49331309 L11.8011361,8.53608835 C11.7916305,8.81650396 11.777372,9.09216676 11.7821249,9.37258237 C11.7821249,9.4628857 11.777372,9.55318904 11.7726192,9.64349237 C11.7678664,9.71478447 11.729844,9.75280693 11.6585519,9.76231254 L11.6585519,9.76231254 L11.5112149,9.77657096 C11.4066531,9.78607658 11.3068442,9.76231254 11.2070352,9.75280693 L11.2070352,9.75280693 L10.8077994,9.75280693 C10.7555186,9.75280693 10.6747208,9.78132377 10.6557096,9.72429009 C10.646204,9.70527886 10.6414512,9.69102044 10.646204,9.61972833 C10.646204,9.58170588 10.6509568,9.56269465 10.6509568,9.51991939 L10.6509568,9.51991939 L10.6604624,9.31079588 L10.6794736,8.66441414 C10.6889793,8.33171766 10.7032377,7.99902117 10.6937321,7.66632469 C10.6889793,7.45720118 10.6794736,7.24807768 10.669968,7.04370698 C10.669968,7.03420136 10.669968,7.01994294 10.6652152,7.01043733 C10.6319456,6.81081944 10.6366984,6.60644874 10.6557096,6.40207804 C10.6604624,6.39257243 10.6557096,6.37831401 10.6604624,6.36405559 C10.6604624,6.32603313 10.6984849,6.28801068 10.7365073,6.28325787 C10.769777,6.28325787 10.8077994,6.28801068 10.8410691,6.28801068 L10.8410691,6.28801068 L10.8838443,6.28801068 C11.0216757,6.26424664 11.1595071,6.24048261 11.3020914,6.24523541 L11.3020914,6.24523541 L11.458934,6.2357298 C11.5444845,6.23097699 11.630035,6.22622419 11.7155856,6.22622419 C11.729844,6.22622419 11.7488552,6.23097699 11.7631136,6.24048261 C11.7821249,6.25474103 11.8011361,6.25949384 11.8249001,6.25474103 C11.877181,6.24523541 11.9056978,6.25949384 11.9247091,6.30702191 C11.9864956,6.47812295 12.0767989,6.63971839 12.171855,6.79180821 C12.2478999,6.91538119 12.3001808,7.04370698 12.3477089,7.17678557 C12.3952369,7.29085294 12.4475178,7.4001675 12.5093043,7.50948206 L12.5093043,7.50948206 L12.5235627,7.52849329 C12.5235627,7.52849329 12.5283155,7.52849329 12.5330683,7.52374048 L12.5330683,7.52374048 L12.5330683,7.50472925 C12.5330683,7.28134733 12.5330683,7.0579654 12.5283155,6.83458347 C12.5283155,6.69199927 12.5188099,6.55416787 12.5188099,6.41633646 L12.5188099,6.41633646 L12.5188099,6.38781962 C12.5093043,6.30702191 12.5473268,6.24998822 12.6091133,6.20721296 C12.6328773,6.18344892 12.6613941,6.17394331 12.689911,6.17869612 C12.8039783,6.18344892 12.9132929,6.1644377 13.0226075,6.1644377 Z M12,1.36518483 C11.3691932,1.36518483 10.8560545,1.87443384 10.8560545,2.50035449 C10.8560545,2.7121822 10.9139202,2.91435368 11.0223297,3.09018146 C11.3472278,3.06046277 11.6746768,3.04536905 12,3.04536905 C12.3250871,3.04536905 12.6524415,3.06046277 12.977623,3.09027521 C13.0860798,2.91444743 13.1439455,2.7121822 13.1439455,2.50035449 C13.1439455,1.87438696 12.6308068,1.36518483 12,1.36518483 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"history",icon:["24","24",[],"","M12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 C0,5.372583 5.372583,0 12,0 Z M12,2.05714286 C6.50871163,2.05714286 2.05714286,6.50871163 2.05714286,12 C2.05714286,17.4912884 6.50871163,21.9428571 12,21.9428571 C17.4912884,21.9428571 21.9428571,17.4912884 21.9428571,12 C21.9428571,6.50871163 17.4912884,2.05714286 12,2.05714286 Z M12,5.82857143 C12.5680643,5.82857143 13.0285714,6.28907854 13.0285714,6.85714286 L13.0285714,11.5739518 L17.0130241,15.5584045 C17.4147062,15.9600866 17.4147062,16.611342 17.0130241,17.0130241 C16.611342,17.4147062 15.9600866,17.4147062 15.5584045,17.0130241 L11.2726902,12.7273098 C11.0797956,12.5344153 10.9714286,12.2727941 10.9714286,12 L10.9714286,6.85714286 C10.9714286,6.28907854 11.4319357,5.82857143 12,5.82857143 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file",icon:["24","24",[],"","M6 4h7l6 5v10a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm6.586 1H6v14h12V9.414L12.586 5zM13 10h3.5a.5.5 0 1 1 0 1h-4a.5.5 0 0 1-.5-.5v-4a.5.5 0 1 1 1 0V10z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-pdf",icon:["24","24",[],"","M9.833 15.006c-.328.765-.657 1.316-.997 1.619-.35.312-.762.394-1.138.15a1.345 1.345 0 0 1-.358-.322c-.298-.402-.194-.843.165-1.2.228-.227.563-.433.983-.63.226-.106.466-.204.706-.292.142-.358.286-.762.43-1.205a41.787 41.787 0 0 0 .866-3.123c-.435-.563-.75-1.057-.924-1.473-.28-.67-.211-1.242.372-1.494.56-.24 1.047-.086 1.307.391.17.312.234.736.231 1.26a7.96 7.96 0 0 1-.086 1.088c.158.195.33.398.513.606a30.903 30.903 0 0 0 1.73 1.81 14.011 14.011 0 0 0 .863.761c.464-.07.87-.106 1.213-.105.947.002 1.554.319 1.415 1.079-.107.585-.514.888-1.06.834-.365-.036-.781-.224-1.259-.532a8.753 8.753 0 0 1-.538-.38 21.15 21.15 0 0 0-.944.191c-.39.087-.798.188-1.22.3a45.345 45.345 0 0 0-2.27.667zM6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm4.43 8.39c-.07.21-.138.412-.207.606l.055-.016a46.181 46.181 0 0 1 1.608-.459 33.869 33.869 0 0 1 1.538-.37 15.994 15.994 0 0 1-.378-.35 31.732 31.732 0 0 1-1.882-1.98l-.083.32a38.471 38.471 0 0 1-.652 2.248zm-2.157 2.603c.12-.107.248-.279.382-.51a2.35 2.35 0 0 0-.553.37c-.092.092-.09.086-.083.096a.54.54 0 0 0 .138.116c.017.01.025.01.116-.072zm7.434-2.3c-.047 0-.095 0-.146.002.242.132.443.209.585.223.11.011.118.005.146-.145.005-.027-.095-.079-.585-.08zm-5.36-5.49c.065.156.16.334.283.53v-.05c.003-.393-.044-.696-.128-.85-.046-.086-.063-.091-.23-.02-.04.018-.05.092.075.39z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-img",icon:["24","24",[],"","M5 6v12h14V6H5zm0-1h14a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm2.4 10.3a.5.5 0 0 1-.8-.6l3-4a.5.5 0 0 1 .754-.054l.579.58 1.765-2.513a.5.5 0 0 1 .83.015l3.891 6a.5.5 0 0 1-.838.544l-3.49-5.379-1.682 2.394a.5.5 0 0 1-.763.067l-.592-.593L7.4 15.3zm.6-4.8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm0-1a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-ppt",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.07 6.96h1.22c.18 0 .353-.013.52-.04a1.21 1.21 0 0 0 .44-.155.844.844 0 0 0 .305-.325c.077-.14.115-.323.115-.55 0-.227-.038-.41-.115-.55a.844.844 0 0 0-.305-.325 1.21 1.21 0 0 0-.44-.155 3.288 3.288 0 0 0-.52-.04h-1.22v2.14zM9.5 8.6h3.22c.447 0 .827.065 1.14.195.313.13.568.302.765.515.197.213.34.457.43.73a2.715 2.715 0 0 1 0 1.695c-.09.277-.233.522-.43.735a2.133 2.133 0 0 1-.765.515c-.313.13-.693.195-1.14.195h-1.65v2.56H9.5V8.6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-word",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm8.77 10.74h-1.56L12 10.88h-.02l-1.19 4.86H9.2L7.31 8.6h1.57l1.13 4.86h.02l1.24-4.86h1.47l1.22 4.92h.02l1.17-4.92h1.54l-1.92 7.14z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-zip",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5 0h1v1h-1V5zm1 1h1v1h-1V6zm-1 1h1v1h-1V7zm1 1h1v1h-1V8zm-1 1h1v1h-1V9zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1zm-1 1h1v1h-1v-1zm1 1h1v1h-1v-1z"]}},function(e,t){e.exports={prefix:"cv",iconName:"file-excel",icon:["24","24",[],"","M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm0 1v14h12V5H6zm5.09 7l-2.3-3.4h1.82l1.4 2.28 1.45-2.28h1.72l-2.29 3.41 2.49 3.73h-1.87l-1.56-2.47-1.59 2.47H8.6L11.09 12z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-240",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm1 4.818C4 9.644 4.94 8.8 6.261 8.8c1.272 0 2.182.777 2.182 1.81 0 .76-.45 1.334-1.285 2.178L5.58 14.347v.022h2.96v.932H4.062v-.769L6.407 12.2c.724-.737.923-1.064.923-1.54 0-.526-.473-.946-1.104-.946-.663 0-1.157.468-1.157 1.1v.017H4v-.013zm8.426 4.483v-1.206h-3.18v-.98c.553-1.043 1.264-2.178 2.646-4.187h1.62v4.235h.857v.932h-.856v1.206h-1.087zm-2.146-2.142v.03h2.164V9.773h-.018c-1.029 1.492-1.638 2.433-2.146 3.387zm7.234 2.27c-1.564 0-2.496-1.277-2.496-3.321 0-2.036.941-3.308 2.496-3.308 1.55 0 2.486 1.263 2.486 3.303s-.927 3.326-2.486 3.326zm0-.932c.843 0 1.333-.888 1.333-2.39 0-1.488-.499-2.375-1.333-2.375-.84 0-1.347.896-1.347 2.371 0 1.502.499 2.394 1.347 2.394z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-480",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm3.964 9.269v-1.2H3.8v-.976c.55-1.037 1.257-2.166 2.632-4.166h1.613v4.215h.853v.927h-.853v1.2h-1.08zm-2.136-2.132v.031h2.154V9.767h-.018c-1.024 1.485-1.63 2.421-2.136 3.37zm7.185 2.26c-1.467 0-2.47-.761-2.47-1.842 0-.822.58-1.468 1.442-1.63v-.022c-.72-.185-1.19-.743-1.19-1.433 0-.962.926-1.67 2.218-1.67 1.297 0 2.215.703 2.215 1.674 0 .681-.466 1.235-1.186 1.429v.022c.861.167 1.446.813 1.446 1.63 0 1.085-1.016 1.841-2.475 1.841zm0-.867c.76 0 1.297-.448 1.297-1.059 0-.62-.536-1.063-1.297-1.063-.76 0-1.296.448-1.296 1.063 0 .611.536 1.06 1.296 1.06zm0-2.988c.638 0 1.095-.395 1.095-.94 0-.55-.453-.945-1.095-.945-.646 0-1.098.395-1.098.945 0 .545.452.94 1.098.94zm5.709 3.854c-1.556 0-2.483-1.27-2.483-3.304 0-2.026.936-3.292 2.483-3.292 1.542 0 2.474 1.257 2.474 3.287 0 2.03-.923 3.31-2.474 3.31zm0-.927c.84 0 1.327-.883 1.327-2.377 0-1.481-.497-2.365-1.327-2.365-.835 0-1.34.892-1.34 2.36 0 1.494.496 2.382 1.34 2.382z"]}},function(e,t){e.exports={prefix:"cv",iconName:"quality-hd",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm2 2.25h1.31v2.976h3.406V8.25h1.31v7.482h-1.31v-3.374H6.31v3.374H5V8.25zm7.597 0H15.7c.573 0 1.069.098 1.488.293.42.196.762.463 1.027.802.266.339.463.735.592 1.19.13.454.194.939.194 1.456a5.3 5.3 0 0 1-.194 1.457 3.43 3.43 0 0 1-.592 1.189 2.765 2.765 0 0 1-1.027.802c-.419.195-.915.293-1.488.293h-3.102V8.25zm1.31 6.413h1.29c.51 0 .927-.068 1.251-.204.325-.136.58-.325.765-.566.185-.241.311-.524.378-.849.066-.325.1-.676.1-1.053 0-.377-.034-.728-.1-1.053a2.043 2.043 0 0 0-.378-.849 1.832 1.832 0 0 0-.765-.566c-.324-.136-.742-.204-1.252-.204h-1.289v5.344z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption",icon:["24","24",[],"","M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm0 1v12h18V6H3zm5.486 9.759c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C6.635 8.337 7.548 8 8.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397zm7 0c-1.002 0-1.834-.372-2.495-1.114-.66-.743-.991-1.68-.991-2.81 0-1.208.327-2.149.981-2.823C13.635 8.337 14.548 8 15.719 8c.579 0 1.226.08 1.941.24v1.127c-.76-.223-1.38-.335-1.86-.335-.687 0-1.24.259-1.657.776-.417.517-.625 1.207-.625 2.068 0 .834.214 1.508.642 2.023.429.515.99.773 1.682.773.615 0 1.248-.157 1.9-.472v1.162c-.87.265-1.622.397-2.256.397z"]}},function(e,t){e.exports={prefix:"cv",iconName:"contract",icon:["24","24",[],"","M8.5 8.5V5H10v5H5V8.5h3.5zm0 7H5V14h5v5H8.5v-3.5zm7-7H19V10h-5V5h1.5v3.5zm0 7V19H14v-5h5v1.5h-3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"full-screen",icon:["24","24",[],"","M6.5 6.5V10H5V5h5v1.5H6.5zm0 11H10V19H5v-5h1.5v3.5zm11-11H14V5h5v5h-1.5V6.5zm0 11V14H19v5h-5v-1.5h3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"mute",icon:["24","24",[],"","M16.733 12.018l-1.57-1.57a.555.555 0 1 1 .785-.785l1.57 1.57 1.57-1.57a.555.555 0 1 1 .785.785l-1.57 1.57 1.57 1.57a.555.555 0 1 1-.785.785l-1.57-1.57-1.57 1.57a.555.555 0 1 1-.785-.785l1.57-1.57zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"next",icon:["24","24",[],"","M16 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11zm-10.86.005a.5.5 0 0 1 .761-.427l9.003 5.5a.5.5 0 0 1 0 .853l-9.003 5.5a.5.5 0 0 1-.76-.426v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play",icon:["24","24",[],"","M7.5 6.505v11l9.002-5.5-9.002-5.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"play-circle",icon:["24","24",[],"","M0,12 C0,5.372583 5.372583,0 12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 Z M23,12 C23,5.92486775 18.0751322,1 12,1 C5.92486775,1 1,5.92486775 1,12 C1,18.0751322 5.92486775,23 12,23 C18.0751322,23 23,18.0751322 23,12 Z M9,7.49836245 C9,6.94698209 9.38671875,6.74169922 9.84669815,7.02918634 L17.1533018,11.5958137 C17.6209203,11.8880752 17.6132812,12.3666992 17.1533018,12.6541863 L9.84669815,17.2208137 C9.37907967,17.5130752 9,17.2950531 9,16.7516375 L9,7.49836245 Z"]}},function(e,t){e.exports={prefix:"cv",iconName:"pause",icon:["24","24",[],"","M8 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 8 17.5v-11zm6 0c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01a.501.501 0 0 1-.495-.5v-11z"]}},function(e,t){e.exports={prefix:"cv",iconName:"previous",icon:["24","24",[],"","M5 6.5c0-.276.216-.5.495-.5h2.01c.273 0 .495.229.495.5v11c0 .276-.216.5-.495.5h-2.01A.501.501 0 0 1 5 17.5v-11zm13.602.005v11a.5.5 0 0 1-.76.426l-9.003-5.5a.5.5 0 0 1 0-.853l9.002-5.5a.5.5 0 0 1 .761.427z"]}},function(e,t){e.exports={prefix:"cv",iconName:"volume",icon:["24","24",[],"","M15.8 11.25c-.137-.815-.44-1.549-.727-2.009a.48.48 0 0 1 .167-.67.507.507 0 0 1 .687.163c.35.56.7 1.41.86 2.359.24 1.439.001 2.866-.866 4.183a.508.508 0 0 1-.691.147.48.48 0 0 1-.15-.674c.724-1.1.922-2.285.72-3.5zm1.86 5.959c1.856-3.7 1.676-7.108 0-10.416a.558.558 0 0 1 .201-.728.483.483 0 0 1 .678.215c1.828 3.61 2.028 7.398.001 11.438a.483.483 0 0 1-.677.218.557.557 0 0 1-.203-.727zM4 10.03c0-.557.443-1.01 1.01-1.01H8l4.284-4.246c.395-.393.716-.253.716.282v13.879c0 .548-.324.682-.721.303L7.814 14.97H5.002A1.003 1.003 0 0 1 4 13.96v-3.93z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm3.186 5.646l-4.723 5.18-1.683-1.615a.772.772 0 0 0-1.06 0 .7.7 0 0 0 0 1.018l2.25 2.16a.771.771 0 0 0 1.094-.035l5.25-5.76a.7.7 0 0 0-.07-1.016.772.772 0 0 0-1.058.068z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check-circle-o",icon:["24","24",[],"","M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9zm0 1.212a7.737 7.737 0 0 0-5.508 2.28A7.737 7.737 0 0 0 4.212 12c0 2.081.809 4.037 2.28 5.508A7.737 7.737 0 0 0 12 19.788a7.737 7.737 0 0 0 5.508-2.28A7.737 7.737 0 0 0 19.788 12a7.737 7.737 0 0 0-2.28-5.508A7.737 7.737 0 0 0 12 4.212zm3.186 4.434a.772.772 0 0 1 1.058-.068.7.7 0 0 1 .07 1.016l-5.25 5.76a.771.771 0 0 1-1.094.035l-2.25-2.16a.7.7 0 0 1 0-1.018.772.772 0 0 1 1.06 0l1.683 1.616 4.723-5.181z"]}},function(e,t){e.exports={prefix:"cv",iconName:"check",icon:["24","24",[],"","M16.247 7.341a1 1 0 0 1 1.506 1.318l-7 8a1 1 0 0 1-1.46.048l-3-3a1 1 0 0 1 1.414-1.414l2.244 2.244 6.296-7.196z"]}},function(e,t){e.exports={prefix:"cv",iconName:"close-caption-badge",icon:["24","24",[],"","M7.5 5A2.5 2.5 0 0 0 5 7.5v9A2.5 2.5 0 0 0 7.5 19h9a2.5 2.5 0 0 0 2.5-2.5v-9A2.5 2.5 0 0 0 16.5 5h-9zm0-1h9A3.5 3.5 0 0 1 20 7.5v9a3.5 3.5 0 0 1-3.5 3.5h-9A3.5 3.5 0 0 1 4 16.5v-9A3.5 3.5 0 0 1 7.5 4zM11 9a.5.5 0 1 1 0 1H9.5A1.5 1.5 0 0 0 8 11.5v1A1.5 1.5 0 0 0 9.5 14H11a.5.5 0 1 1 0 1H9.5A2.5 2.5 0 0 1 7 12.5v-1A2.5 2.5 0 0 1 9.5 9H11zm5 0a.5.5 0 1 1 0 1h-1.5a1.5 1.5 0 0 0-1.5 1.5v1a1.5 1.5 0 0 0 1.5 1.5H16a.5.5 0 1 1 0 1h-1.5a2.5 2.5 0 0 1-2.5-2.5v-1A2.5 2.5 0 0 1 14.5 9H16z"]}},function(e,t){e.exports={prefix:"cv",iconName:"question",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zM8.142 9.17c0 .247.103.476.309.687.206.212.46.318.76.318.508 0 .854-.303 1.036-.908.193-.579.428-1.017.707-1.314.278-.297.712-.446 1.302-.446.503 0 .914.147 1.233.442.319.294.478.656.478 1.085 0 .22-.052.423-.157.61a2.305 2.305 0 0 1-.385.51c-.153.153-.4.38-.744.68-.39.342-.701.638-.932.887-.23.25-.415.539-.554.868-.14.33-.209.72-.209 1.17 0 .358.095.629.285.81.19.183.425.274.703.274.536 0 .855-.279.956-.836a12.2 12.2 0 0 1 .133-.55c.03-.104.071-.209.125-.313.053-.105.135-.22.245-.346.11-.126.255-.272.438-.438a48.078 48.078 0 0 0 1.37-1.257c.254-.25.474-.545.658-.888.185-.343.278-.742.278-1.197a2.87 2.87 0 0 0-.486-1.608c-.325-.492-.784-.882-1.378-1.169-.595-.286-1.28-.43-2.057-.43-.836 0-1.567.172-2.194.515s-1.104.775-1.43 1.297c-.327.523-.49 1.038-.49 1.547zm3.868 9.579c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797a1.073 1.073 0 0 0-.793-.324c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"info",icon:["24","24",[],"","M21 11.88c.026 2.49-.824 4.62-2.552 6.387-1.727 1.768-3.837 2.679-6.327 2.732-2.491.027-4.62-.823-6.388-2.55C3.965 16.72 3.054 14.61 3 12.12c-.027-2.491.823-4.62 2.55-6.388C7.28 3.965 9.39 3.054 11.88 3c2.491-.027 4.62.823 6.388 2.55 1.767 1.73 2.678 3.84 2.732 6.33zm-10-.38V15a2.5 2.5 0 0 0 2.5 2.5h.75a1 1 0 0 0 0-2h-.75a.5.5 0 0 1-.5-.5v-3.75a1.75 1.75 0 0 0-1.75-1.75h-.75a1 1 0 1 0 0 2h.5zm.636-3.25c.294 0 .553-.1.778-.301.224-.2.336-.477.336-.828 0-.316-.107-.582-.321-.797A1.073 1.073 0 0 0 11.636 6c-.319 0-.588.108-.807.324a1.07 1.07 0 0 0-.329.797c0 .356.113.634.34.832.227.198.492.297.796.297z"]}},function(e,t){e.exports={prefix:"cv",iconName:"lock",icon:["24","24",[],"","M7.01 9.5C7.156 5.97 8.87 4 12 4s4.844 1.97 4.99 5.5h1.51a.5.5 0 0 1 .5.5v9.5a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5V10a.5.5 0 0 1 .5-.5h1.51zm2 0h5.98C14.88 7.037 13.932 6 12 6c-1.933 0-2.88 1.037-2.99 3.5z"]}},function(e,t){e.exports={prefix:"cv",iconName:"verified",icon:["24","24",[],"","M10.407 12.368l-1.22-1.22a.49.49 0 0 0-.698.004l-.583.583a.494.494 0 0 0-.004.697l2.135 2.135c.107.108.25.154.388.142a.488.488 0 0 0 .352-.143l4.362-4.362a.494.494 0 0 0-.004-.698l-.582-.582a.495.495 0 0 0-.698-.004l-3.448 3.448zm7.922-.37l1.437 1.406c.208.194.277.437.208.728a.716.716 0 0 1-.541.531l-1.957.5.551 1.936a.671.671 0 0 1-.197.729.671.671 0 0 1-.73.198l-1.935-.552-.5 1.957a.716.716 0 0 1-.53.541 1.28 1.28 0 0 1-.199.021.686.686 0 0 1-.53-.229L12 18.328l-1.405 1.436c-.195.208-.437.278-.729.208a.696.696 0 0 1-.53-.541l-.5-1.957-1.937.552a.671.671 0 0 1-.728-.198.671.671 0 0 1-.198-.729l.551-1.936-1.957-.5a.716.716 0 0 1-.54-.53c-.07-.292 0-.535.207-.73l1.437-1.405-1.437-1.405c-.208-.194-.277-.437-.208-.729a.716.716 0 0 1 .541-.53l1.957-.5-.551-1.936a.671.671 0 0 1 .198-.73.671.671 0 0 1 .728-.197l1.936.552.5-1.957a.675.675 0 0 1 .531-.531.671.671 0 0 1 .729.198L12 5.68l1.405-1.447a.697.697 0 0 1 .73-.198c.284.07.46.246.53.53l.5 1.958L17.1 5.97a.671.671 0 0 1 .729.198.671.671 0 0 1 .197.729l-.551 1.936 1.957.5a.715.715 0 0 1 .541.53c.07.292 0 .535-.208.73l-1.437 1.404z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-off",icon:["24","24",[],"","M15.293 6.609l-.793.79A8.794 8.794 0 0 0 11.997 7C8.006 6.978 4 10.17 4 12c0 .925 1.062 2.216 2.63 3.254l-.715.714C4.174 14.76 3 13.228 3 12c0-2.44 4.5-6.025 9.003-6 1.119.006 2.239.234 3.29.609zm2.802 1.442C19.833 9.26 21 10.786 21 12c0 2.45-4.504 6-9 6-1.112 0-2.23-.223-3.279-.595l.794-.792A8.659 8.659 0 0 0 12 17c3.989 0 8-3.161 8-5 0-.911-1.055-2.196-2.62-3.235l.715-.714zm-7.65 7.635l.787-.785A3.005 3.005 0 0 0 15 12c0-.264-.034-.52-.098-.763l.787-.785a4 4 0 0 1-5.245 5.235zM8.318 13.57a4 4 0 0 1 5.257-5.246l-.785.782a3.003 3.003 0 0 0-3.687 3.68l-.785.784zm-3.466 6.285a.5.5 0 1 1-.706-.708l15-14.971a.5.5 0 1 1 .706.708l-15 14.97z"]}},function(e,t){e.exports={prefix:"cv",iconName:"visible-on",icon:["24","24",[],"","M3 12c0-2.44 4.5-6.025 9.003-6C16.494 6.025 21 9.614 21 12c0 2.45-4.504 6-9 6-4.466 0-9-3.586-9-6zm1 0c0 1.804 4.042 5 8 5 3.989 0 8-3.161 8-5 0-1.778-4.017-4.977-8.003-5C8.006 6.978 4 10.17 4 12zm8 4a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm0-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning-o",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 5L3.5 19h17L12 5zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm.75-3.677a.689.689 0 0 1-.7.677.689.689 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677.387 0 .7.303.7.677v5.646z"]}},function(e,t){e.exports={prefix:"cv",iconName:"warning",icon:["24","24",[],"","M13.026 4.377l8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0zM12 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm.75-3.677V8.677a.689.689 0 0 0-.7-.677c-.387 0-.7.303-.7.677v5.646c0 .374.313.677.7.677.387 0 .7-.303.7-.677z"]}},function(e,t,n){const{noopTest:r,edit:i,merge:o}=n(13),a={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}|~{3,})([^`~\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:r,table:r,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};a.def=i(a.def).replace("label",a._label).replace("title",a._title).getRegex(),a.bullet=/(?:[*+-]|\d{1,9}\.)/,a.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,a.item=i(a.item,"gm").replace(/bull/g,a.bullet).getRegex(),a.list=i(a.list).replace(/bull/g,a.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+a.def.source+")").getRegex(),a._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",a._comment=/<!--(?!-?>)[\s\S]*?-->/,a.html=i(a.html,"i").replace("comment",a._comment).replace("tag",a._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a.paragraph=i(a._paragraph).replace("hr",a.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",a._tag).getRegex(),a.blockquote=i(a.blockquote).replace("paragraph",a.paragraph).getRegex(),a.normal=o({},a),a.gfm=o({},a.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),a.pedantic=o({},a.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",a._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:r,paragraph:i(a.normal._paragraph).replace("hr",a.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",a.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const c={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+,\\-./:;<=>?@\\[^_{|}~"};c.em=i(c.em).replace(/punctuation/g,c._punctuation).getRegex(),c._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,c._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,c._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,c.autolink=i(c.autolink).replace("scheme",c._scheme).replace("email",c._email).getRegex(),c._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,c.tag=i(c.tag).replace("comment",a._comment).replace("attribute",c._attribute).getRegex(),c._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,c._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,c._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,c.link=i(c.link).replace("label",c._label).replace("href",c._href).replace("title",c._title).getRegex(),c.reflink=i(c.reflink).replace("label",c._label).getRegex(),c.normal=o({},c),c.pedantic=o({},c.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",c._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",c._label).getRegex()}),c.gfm=o({},c.normal,{escape:i(c.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),c.gfm.url=i(c.gfm.url,"i").replace("email",c.gfm._extended_email).getRegex(),c.breaks=o({},c.gfm,{br:i(c.br).replace("{2,}","*").getRegex(),text:i(c.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),e.exports={block:a,inline:c}},function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},function(e,t,n){const r=n(28),{defaults:i}=n(17),{inline:o}=n(117),{findClosingBracket:a,escape:c}=n(13);e.exports=class e{constructor(e,t){if(this.options=t||i,this.links=e,this.rules=o.normal,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.pedantic?this.rules=o.pedantic:this.options.gfm&&(this.options.breaks?this.rules=o.breaks:this.rules=o.gfm)}static get rules(){return o}static output(t,n,r){return new e(n,r).output(t)}output(t){let n,r,i,o,u,s,l="";for(;t;)if(u=this.rules.escape.exec(t))t=t.substring(u[0].length),l+=c(u[1]);else if(u=this.rules.tag.exec(t))!this.inLink&&/^<a /i.test(u[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(u[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(u[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(u[0])&&(this.inRawBlock=!1),t=t.substring(u[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(u[0]):c(u[0]):u[0];else if(u=this.rules.link.exec(t)){const r=a(u[2],"()");if(r>-1){const e=(0===u[0].indexOf("!")?5:4)+u[1].length+r;u[2]=u[2].substring(0,r),u[0]=u[0].substring(0,e).trim(),u[3]=""}t=t.substring(u[0].length),this.inLink=!0,i=u[2],this.options.pedantic?(n=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i),n?(i=n[1],o=n[3]):o=""):o=u[3]?u[3].slice(1,-1):"",i=i.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(u,{href:e.escapes(i),title:e.escapes(o)}),this.inLink=!1}else if((u=this.rules.reflink.exec(t))||(u=this.rules.nolink.exec(t))){if(t=t.substring(u[0].length),n=(u[2]||u[1]).replace(/\s+/g," "),n=this.links[n.toLowerCase()],!n||!n.href){l+=u[0].charAt(0),t=u[0].substring(1)+t;continue}this.inLink=!0,l+=this.outputLink(u,n),this.inLink=!1}else if(u=this.rules.strong.exec(t))t=t.substring(u[0].length),l+=this.renderer.strong(this.output(u[4]||u[3]||u[2]||u[1]));else if(u=this.rules.em.exec(t))t=t.substring(u[0].length),l+=this.renderer.em(this.output(u[6]||u[5]||u[4]||u[3]||u[2]||u[1]));else if(u=this.rules.code.exec(t))t=t.substring(u[0].length),l+=this.renderer.codespan(c(u[2].trim(),!0));else if(u=this.rules.br.exec(t))t=t.substring(u[0].length),l+=this.renderer.br();else if(u=this.rules.del.exec(t))t=t.substring(u[0].length),l+=this.renderer.del(this.output(u[1]));else if(u=this.rules.autolink.exec(t))t=t.substring(u[0].length),"@"===u[2]?(r=c(this.mangle(u[1])),i="mailto:"+r):(r=c(u[1]),i=r),l+=this.renderer.link(i,null,r);else if(this.inLink||!(u=this.rules.url.exec(t))){if(u=this.rules.text.exec(t))t=t.substring(u[0].length),this.inRawBlock?l+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(u[0]):c(u[0]):u[0]):l+=this.renderer.text(c(this.smartypants(u[0])));else if(t)throw new Error("Infinite loop on byte: "+t.charCodeAt(0))}else{if("@"===u[2])r=c(u[0]),i="mailto:"+r;else{do{s=u[0],u[0]=this.rules._backpedal.exec(u[0])[0]}while(s!==u[0]);r=c(u[0]),i="www."===u[1]?"http://"+r:r}t=t.substring(u[0].length),l+=this.renderer.link(i,null,r)}return l}static escapes(t){return t?t.replace(e.rules._escapes,"$1"):t}outputLink(e,t){const n=t.href,r=t.title?c(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,c(e[1]))}smartypants(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e}mangle(e){if(!this.options.mangle)return e;const t=e.length;let n,r="",i=0;for(;i<t;i++)n=e.charCodeAt(i),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}}},function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}},function(e,t,n){var r=n(162);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="layout-region"></div>'},useData:!0})},function(e,t,n){"use strict";t.a=function(){return!1}},function(e,t,n){"use strict";(function(e){var r=n(6),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i?r.a.Buffer:void 0,c=a?a.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(26)(e))},function(e,t){e.exports=p},function(e,t,n){"use strict";e.exports=n(167).default},function(e,t){e.exports=d},function(e,t,n){e.exports={navContainer:"_11O8h"}},function(e,t,n){e.exports={navContainer:"_3vLoN"}},function(e,t,n){const r=n(180),i=n(181),o=n(28),a=n(120),c=n(119),u=n(118),{merge:s,checkSanitizeDeprecation:l,escape:f}=n(13),{getDefaults:p,changeDefaults:d,defaults:m}=n(17);function h(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if(n||"function"==typeof t){n||(n=t,t=null),t=s({},h.defaults,t||{}),l(t);const o=t.highlight;let a,c,u=0;try{a=r.lex(e,t)}catch(e){return n(e)}c=a.length;const f=function(e){if(e)return t.highlight=o,n(e);let r;try{r=i.parse(a,t)}catch(t){e=t}return t.highlight=o,e?n(e):n(null,r)};if(!o||o.length<3)return f();if(delete t.highlight,!c)return f();for(;u<a.length;u++)!function(e){"code"!==e.type?--c||f():o(e.text,e.lang,(function(t,n){return t?f(t):null==n||n===e.text?--c||f():(e.text=n,e.escaped=!0,void(--c||f()))}))}(a[u])}else try{return t=s({},h.defaults,t||{}),l(t),i.parse(r.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||h.defaults).silent)return"<p>An error occurred:</p><pre>"+f(e.message+"",!0)+"</pre>";throw e}}h.options=h.setOptions=function(e){return s(h.defaults,e),d(h.defaults),h},h.getDefaults=p,h.defaults=m,h.Parser=i,h.parser=i.parse,h.Renderer=o,h.TextRenderer=a,h.Lexer=r,h.lexer=r.lex,h.InlineLexer=c,h.inlineLexer=c.output,h.Slugger=u,h.parse=h,e.exports=h},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e,t){e.exports=m},function(e,t,n){"use strict";
2
2
  /** @license React v0.17.0
3
3
  * scheduler.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var r,i,a,o,s;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,l=null,u=function(){if(null!==c)try{var e=t.unstable_now();c(!0,e),c=null}catch(e){throw setTimeout(u,0),e}},p=Date.now();t.unstable_now=function(){return Date.now()-p},r=function(e){null!==c?setTimeout(r,0,e):(c=e,setTimeout(u,0))},i=function(e,t){l=setTimeout(e,t)},a=function(){clearTimeout(l)},o=function(){return!1},s=t.unstable_forceFrameRate=function(){}}else{var f=window.performance,d=window.Date,m=window.setTimeout,h=window.clearTimeout,g=window.requestAnimationFrame,y=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof g&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof y&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof f&&"function"==typeof f.now)t.unstable_now=function(){return f.now()};else{var v=d.now();t.unstable_now=function(){return d.now()-v}}var b=!1,S=null,E=-1,C=5,O=0;o=function(){return t.unstable_now()>=O},s=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):C=0<e?Math.floor(1e3/e):33.33};var I=new MessageChannel,j=I.port2;I.port1.onmessage=function(){if(null!==S){var e=t.unstable_now();O=e+C;try{S(!0,e)?j.postMessage(null):(b=!1,S=null)}catch(e){throw j.postMessage(null),e}}else b=!1},r=function(e){S=e,b||(b=!0,j.postMessage(null))},i=function(e,n){E=m((function(){e(t.unstable_now())}),n)},a=function(){h(E),E=-1}}function A(e,t){var n=e.length;e.push(t);e:for(;;){var r=Math.floor((n-1)/2),i=e[r];if(!(void 0!==i&&0<L(i,t)))break e;e[r]=t,e[n]=i,n=r}}function T(e){return void 0===(e=e[0])?null:e}function w(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var a=2*(r+1)-1,o=e[a],s=a+1,c=e[s];if(void 0!==o&&0>L(o,n))void 0!==c&&0>L(c,o)?(e[r]=c,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==c&&0>L(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function L(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var k=[],_=[],x=1,P=null,N=3,D=!1,R=!1,F=!1;function M(e){for(var t=T(_);null!==t;){if(null===t.callback)w(_);else{if(!(t.startTime<=e))break;w(_),t.sortIndex=t.expirationTime,A(k,t)}t=T(_)}}function U(e){if(F=!1,M(e),!R)if(null!==T(k))R=!0,r(V);else{var t=T(_);null!==t&&i(U,t.startTime-e)}}function V(e,n){R=!1,F&&(F=!1,a()),D=!0;var r=N;try{for(M(n),P=T(k);null!==P&&(!(P.expirationTime>n)||e&&!o());){var s=P.callback;if(null!==s){P.callback=null,N=P.priorityLevel;var c=s(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof c?P.callback=c:P===T(k)&&w(k),M(n)}else w(k);P=T(k)}if(null!==P)var l=!0;else{var u=T(_);null!==u&&i(U,u.startTime-n),l=!1}return l}finally{P=null,N=r,D=!1}}function B(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var z=s;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_scheduleCallback=function(e,n,o){var s=t.unstable_now();if("object"==typeof o&&null!==o){var c=o.delay;c="number"==typeof c&&0<c?s+c:s,o="number"==typeof o.timeout?o.timeout:B(e)}else o=B(e),c=s;return e={id:x++,callback:n,priorityLevel:e,startTime:c,expirationTime:o=c+o,sortIndex:-1},c>s?(e.sortIndex=c,A(_,e),null===T(k)&&e===T(_)&&(F?a():F=!0,i(U,c-s))):(e.sortIndex=o,A(k,e),R||D||(R=!0,r(V))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_shouldYield=function(){var e=t.unstable_now();M(e);var n=T(k);return n!==P&&null!==P&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<P.expirationTime||o()},t.unstable_requestPaint=z,t.unstable_continueExecution=function(){R||D||(R=!0,r(V))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return T(k)},t.unstable_Profiling=null},function(e,t,n){"use strict";e.exports=n(165)},function(e,t,n){"use strict";
9
+ */var r,i,o,a,c;if(Object.defineProperty(t,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,s=null,l=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(e){throw setTimeout(l,0),e}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(l,0))},i=function(e,t){s=setTimeout(e,t)},o=function(){clearTimeout(s)},a=function(){return!1},c=t.unstable_forceFrameRate=function(){}}else{var p=window.performance,d=window.Date,m=window.setTimeout,h=window.clearTimeout,y=window.requestAnimationFrame,v=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof p&&"function"==typeof p.now)t.unstable_now=function(){return p.now()};else{var b=d.now();t.unstable_now=function(){return d.now()-b}}var g=!1,S=null,E=-1,O=5,j=0;a=function(){return t.unstable_now()>=j},c=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):O=0<e?Math.floor(1e3/e):33.33};var C=new MessageChannel,w=C.port2;C.port1.onmessage=function(){if(null!==S){var e=t.unstable_now();j=e+O;try{S(!0,e)?w.postMessage(null):(g=!1,S=null)}catch(e){throw w.postMessage(null),e}}else g=!1},r=function(e){S=e,g||(g=!0,w.postMessage(null))},i=function(e,n){E=m((function(){e(t.unstable_now())}),n)},o=function(){h(E),E=-1}}function A(e,t){var n=e.length;e.push(t);e:for(;;){var r=Math.floor((n-1)/2),i=e[r];if(!(void 0!==i&&0<k(i,t)))break e;e[r]=t,e[n]=i,n=r}}function I(e){return void 0===(e=e[0])?null:e}function T(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],c=o+1,u=e[c];if(void 0!==a&&0>k(a,n))void 0!==u&&0>k(u,a)?(e[r]=u,e[c]=n,r=c):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==u&&0>k(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}return null}function k(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var _=[],P=[],L=1,x=null,N=3,R=!1,D=!1,M=!1;function U(e){for(var t=I(P);null!==t;){if(null===t.callback)T(P);else{if(!(t.startTime<=e))break;T(P),t.sortIndex=t.expirationTime,A(_,t)}t=I(P)}}function F(e){if(M=!1,U(e),!D)if(null!==I(_))D=!0,r(V);else{var t=I(P);null!==t&&i(F,t.startTime-e)}}function V(e,n){D=!1,M&&(M=!1,o()),R=!0;var r=N;try{for(U(n),x=I(_);null!==x&&(!(x.expirationTime>n)||e&&!a());){var c=x.callback;if(null!==c){x.callback=null,N=x.priorityLevel;var u=c(x.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?x.callback=u:x===I(_)&&T(_),U(n)}else T(_);x=I(_)}if(null!==x)var s=!0;else{var l=I(P);null!==l&&i(F,l.startTime-n),s=!1}return s}finally{x=null,N=r,R=!1}}function z(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var B=c;t.unstable_ImmediatePriority=1,t.unstable_UserBlockingPriority=2,t.unstable_NormalPriority=3,t.unstable_IdlePriority=5,t.unstable_LowPriority=4,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=N;N=e;try{return t()}finally{N=n}},t.unstable_next=function(e){switch(N){case 1:case 2:case 3:var t=3;break;default:t=N}var n=N;N=t;try{return e()}finally{N=n}},t.unstable_scheduleCallback=function(e,n,a){var c=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?c+u:c,a="number"==typeof a.timeout?a.timeout:z(e)}else a=z(e),u=c;return e={id:L++,callback:n,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>c?(e.sortIndex=u,A(P,e),null===I(_)&&e===I(P)&&(M?o():M=!0,i(F,u-c))):(e.sortIndex=a,A(_,e),D||R||(D=!0,r(V))),e},t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_wrapCallback=function(e){var t=N;return function(){var n=N;N=t;try{return e.apply(this,arguments)}finally{N=n}}},t.unstable_getCurrentPriorityLevel=function(){return N},t.unstable_shouldYield=function(){var e=t.unstable_now();U(e);var n=I(_);return n!==x&&null!==x&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<x.expirationTime||a()},t.unstable_requestPaint=B,t.unstable_continueExecution=function(){D||R||(D=!0,r(V))},t.unstable_pauseExecution=function(){},t.unstable_getFirstCallbackNode=function(){return I(_)},t.unstable_Profiling=null},function(e,t,n){"use strict";e.exports=n(165)},function(e,t,n){"use strict";
10
10
  /** @license React v16.13.1
11
11
  * react-is.production.min.js
12
12
  *
@@ -14,4 +14,4 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,S=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case p:case f:case o:case c:case s:case m:return e;default:switch(e=e&&e.$$typeof){case u:case d:case y:case g:case l:return e;default:return t}}case a:return t}}}function O(e){return C(e)===f}t.AsyncMode=p,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=i,t.ForwardRef=d,t.Fragment=o,t.Lazy=y,t.Memo=g,t.Portal=a,t.Profiler=c,t.StrictMode=s,t.Suspense=m,t.isAsyncMode=function(e){return O(e)||C(e)===p},t.isConcurrentMode=O,t.isContextConsumer=function(e){return C(e)===u},t.isContextProvider=function(e){return C(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return C(e)===d},t.isFragment=function(e){return C(e)===o},t.isLazy=function(e){return C(e)===y},t.isMemo=function(e){return C(e)===g},t.isPortal=function(e){return C(e)===a},t.isProfiler=function(e){return C(e)===c},t.isStrictMode=function(e){return C(e)===s},t.isSuspense=function(e){return C(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===f||e===c||e===s||e===m||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===g||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===b||e.$$typeof===S||e.$$typeof===E||e.$$typeof===v)},t.typeOf=C},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=p(a),s=p(n(16)),c=p(n(170)),l=p(n(171)),u=n(179);function p(e){return e&&e.__esModule?e:{default:e}}var f=function(){return!0},d=function(e){function t(e){var n=e.alwaysRenderSuggestions;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return m.call(r),r.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},r.justPressedUpDown=!1,r.justMouseEntered=!1,r.pressedSuggestion=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,c.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,i=n.onSuggestionHighlighted,a=n.highlightFirstSuggestion;if(!(0,c.default)(r,e.suggestions)&&r.length>0&&a)this.highlightFirstSuggestion();else if(i){var o=this.getHighlightedSuggestion();o!=t.highlightedSuggestion&&i({suggestion:o})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(i){var a=i.valueBeforeUpDown;return null===t?a=null:null===a&&void 0!==n&&(a=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:a}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,i=n.multiSection,a=n.getSectionSuggestions;return i?a(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,i=r.value,a=r.onChange;t!==i&&a(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,r=e.shouldRenderSuggestions,i=n.value;return t.length>0&&r(i)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,i=t.renderInputComponent,a=t.onSuggestionsFetchRequested,s=t.renderSuggestion,c=t.inputProps,p=t.multiSection,d=t.renderSectionTitle,m=t.id,h=t.getSectionSuggestions,g=t.theme,y=t.getSuggestionValue,v=t.alwaysRenderSuggestions,b=t.highlightFirstSuggestion,S=this.state,E=S.isFocused,C=S.isCollapsed,O=S.highlightedSectionIndex,I=S.highlightedSuggestionIndex,j=S.valueBeforeUpDown,A=v?f:this.props.shouldRenderSuggestions,T=c.value,w=c.onFocus,L=c.onKeyDown,k=this.willRenderSuggestions(this.props),_=v||E&&!C&&k,x=_?n:[],P=r({},c,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=A(T);e.setState({isFocused:!0,isCollapsed:!n}),w&&w(t),n&&a({value:T,reason:"input-focused"})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,i=A(n);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(r({},b?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!i})),i?a({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var i=t.keyCode;switch(i){case 40:case 38:if(C)A(T)&&(a({value:T,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var o=r.newHighlightedSectionIndex,s=r.newHighlightedItemIndex,c=void 0;c=null===s?null===j?T:j:e.getSuggestionValueByIndex(o,s),e.updateHighlightedSuggestion(o,s,T),e.maybeCallOnChange(t,c,40===i?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var l=e.getHighlightedSuggestion();if(_&&!v&&e.closeSuggestions(),null!=l){var u=y(l);e.maybeCallOnChange(t,u,"enter"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:u,suggestionIndex:I,sectionIndex:O,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:_&&t.preventDefault();var p=_&&!v;if(null===j){if(!p){e.maybeCallOnChange(t,"","escape"),A("")?a({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,j,"escape");p?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}L&&L(t)}}),N={query:this.getQuery()};return o.default.createElement(l.default,{multiSection:p,items:x,renderInputComponent:i,renderItemsContainer:this.renderSuggestionsContainer,renderItem:s,renderItemData:N,renderSectionTitle:d,getSectionItems:h,highlightedSectionIndex:O,highlightedItemIndex:I,inputProps:P,itemProps:this.itemProps,theme:(0,u.mapToAutowhateverTheme)(g),id:m,ref:this.storeAutowhateverRef})}}]),t}(a.Component);d.propTypes={suggestions:s.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){var n=e[t];if("function"!=typeof n)throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},onSuggestionSelected:s.default.func,onSuggestionHighlighted:s.default.func,renderInputComponent:s.default.func,renderSuggestionsContainer:s.default.func,getSuggestionValue:s.default.func.isRequired,renderSuggestion:s.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:s.default.func,alwaysRenderSuggestions:s.default.bool,multiSection:s.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:s.default.bool,highlightFirstSuggestion:s.default.bool,theme:s.default.object,id:s.default.string},d.defaultProps={renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return o.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:u.defaultTheme,id:"1"};var m=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var r=n.sectionIndex,i=n.itemIndex;e.updateHighlightedSuggestion(r,i),t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!0),e.justMouseEntered=!0,setTimeout((function(){e.justMouseEntered=!1}))},this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(e.props.multiSection?0:null,0)},this.onDocumentMouseUp=function(){e.pressedSuggestion&&!e.justSelectedSuggestion&&e.input.focus(),e.pressedSuggestion=null},this.onSuggestionMouseDown=function(t){e.justSelectedSuggestion||(e.justSelectedSuggestion=!0,e.pressedSuggestion=t.target)},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var r=e.props,i=r.alwaysRenderSuggestions,a=r.onSuggestionSelected,o=r.onSuggestionsFetchRequested;a&&a(t,n),i?o({value:n.suggestionValue,reason:"suggestion-selected"}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,r=n.alwaysRenderSuggestions,i=n.focusInputOnSuggestionClick,a=e.getSuggestionIndices(e.findSuggestionElement(t.target)),o=a.sectionIndex,s=a.suggestionIndex,c=e.getSuggestion(o,s),l=e.props.getSuggestionValue(c);e.maybeCallOnChange(t,l,"click"),e.onSuggestionSelected(t,{suggestion:c,suggestionValue:l,suggestionIndex:s,sectionIndex:o,method:"click"}),r||e.closeSuggestions(),!0===i?e.input.focus():e.onBlur(),setTimeout((function(){e.justSelectedSuggestion=!1}))},this.onBlur=function(){var t=e.props,n=t.inputProps,r=t.shouldRenderSuggestions,i=n.value,a=n.onBlur,o=e.getHighlightedSuggestion(),s=r(i);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),a&&a(e.blurEvent,{highlightedSuggestion:o})},this.onSuggestionMouseLeave=function(t){e.resetHighlightedSuggestion(!1),e.justSelectedSuggestion&&t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!1)},this.onSuggestionTouchStart=function(){e.justSelectedSuggestion=!0},this.onSuggestionTouchMove=function(){e.justSelectedSuggestion=!1,e.pressedSuggestion=null,e.input.focus()},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.onSuggestionMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionTouchStart,onTouchMove:e.onSuggestionTouchMove,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,r=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:r,query:e.getQuery()})}};t.default=d},function(e,t,n){"use strict";var r=n(169);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){"use strict";e.exports=n(172).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),s=d(o),c=d(n(16)),l=d(n(173)),u=d(n(174)),p=d(n(176)),f=d(n(177));function d(e){return e&&e.__esModule?e:{default:e}}var m={},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},n.onKeyDown=function(e){var t=n.props,r=t.inputProps,a=t.highlightedSectionIndex,o=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var s="ArrowDown"===e.key?"next":"prev",c=n.sectionIterator[s]([a,o]),l=i(c,2),u=l[0],p=l[1];r.onKeyDown(e,{newHighlightedSectionIndex:u,newHighlightedItemIndex:p});break;default:r.onKeyDown(e,{highlightedSectionIndex:a,highlightedItemIndex:o})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,l.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,u.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,i=n.items,a=n.renderItem,o=n.renderItemData,c=n.renderSectionTitle,l=n.highlightedSectionIndex,u=n.highlightedItemIndex,d=n.itemProps;return i.map((function(n,i){var m="react-autowhatever-"+r+"-",h=m+"section-"+i+"-",g=0===i;return s.default.createElement("div",t(h+"container","sectionContainer",g&&"sectionContainerFirst"),s.default.createElement(p.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:h}),s.default.createElement(f.default,{items:e.sectionsItems[i],itemProps:d,renderItem:a,renderItemData:o,sectionIndex:i,highlightedItemIndex:l===i?u:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:m,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,r=n.id,i=n.renderItem,a=n.renderItemData,o=n.highlightedSectionIndex,c=n.highlightedItemIndex,l=n.itemProps;return s.default.createElement(f.default,{items:e,itemProps:l,renderItem:i,renderItemData:a,highlightedItemIndex:null===o?c:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+r+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,i=t.multiSection,a=t.renderInputComponent,o=t.renderItemsContainer,c=t.highlightedSectionIndex,l=t.highlightedItemIndex,u=this.state.isInputFocused,p=i?this.renderSections():this.renderItems(),f=null!==p,d=this.getItemId(c,l),m="react-autowhatever-"+n,h=r({role:"combobox","aria-haspopup":"listbox","aria-owns":m,"aria-expanded":f},e("react-autowhatever-"+n+"-container","container",f&&"containerOpen"),this.props.containerProps),g=a(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":m,"aria-activedescendant":d},e("react-autowhatever-"+n+"-input","input",f&&"inputOpen",u&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),y=o({containerProps:r({id:m,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",f&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:p});return s.default.createElement("div",h,g,y)}}]),t}(o.Component);h.propTypes={id:c.default.string,multiSection:c.default.bool,renderInputComponent:c.default.func,renderItemsContainer:c.default.func,items:c.default.array.isRequired,renderItem:c.default.func,renderItemData:c.default.object,renderSectionTitle:c.default.func,getSectionItems:c.default.func,containerProps:c.default.object,inputProps:c.default.object,itemProps:c.default.oneOfType([c.default.object,c.default.func]),highlightedSectionIndex:c.default.number,highlightedItemIndex:c.default.number,theme:c.default.oneOfType([c.default.object,c.default.array])},h.defaultProps={id:"1",multiSection:!1,renderInputComponent:function(e){return s.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return s.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:m,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:m,inputProps:m,itemProps:m,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}},t.default=h},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var t=e.data,n=e.multiSection;function i(e){var i=r(e,2),a=i[0],o=i[1];return n?null===o||o===t[a]-1?null===(a=function(e){for(null===e?e=0:e++;e<t.length&&0===t[e];)e++;return e===t.length?null:e}(a))?[null,null]:[a,0]:[a,o+1]:0===t||o===t-1?[null,null]:null===o?[null,0]:[null,o+1]}return{next:i,prev:function(e){var i=r(e,2),a=i[0],o=i[1];return n?null===o||0===o?null===(a=function(e){for(null===e?e=t.length-1:e--;e>=0&&0===t[e];)e--;return-1===e?null:e}(a))?[null,null]:[a,t[a]-1]:[a,o-1]:0===t||0===o?[null,null]:null===o?[null,t-1]:[null,o-1]},isLast:function(e){return null===i(e)[1]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a,o=n(175),s=(a=o)&&a.__esModule?a:{default:a},c=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),a=n[0],o=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var l=n.map((function(e){return a[e]})).filter(c);return"string"==typeof l[0]||"function"==typeof o?{key:e,className:o?o.apply(void 0,i(l)):l.join(" ")}:{key:e,style:s.default.apply(void 0,[{}].concat(i(l)))}}},e.exports=t.default},function(e,t,n){"use strict";var r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function a(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter((function(t){return r.call(e,t)}))}e.exports=Object.assign||function(e,t){for(var n,r,o=i(e),s=1;s<arguments.length;s++){n=arguments[s],r=a(Object(n));for(var c=0;c<r.length;c++)o[r[c]]=n[r[c]]}return o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),a=c(i),o=c(n(16)),s=c(n(27));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){return l(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){return(0,s.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,i=e.sectionKeyPrefix,o=n(t);return o?a.default.createElement("div",r(i+"title","sectionTitle"),o):null}}]),t}(i.Component);p.propTypes={section:o.default.any.isRequired,renderSectionTitle:o.default.func.isRequired,theme:o.default.func.isRequired,sectionKeyPrefix:o.default.string.isRequired},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=u(a),s=u(n(16)),c=u(n(178)),l=u(n(27));function u(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;p(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.storeHighlightedItemReference=function(e){r.props.onHighlightedItemChange(null===e?null:e.item)},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,l.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,i=t.itemProps,a=t.renderItem,s=t.renderItemData,l=t.sectionIndex,u=t.highlightedItemIndex,p=t.getItemId,f=t.theme,d=t.keyPrefix,m=null===l?d:d+"section-"+l+"-",h="function"==typeof i;return o.default.createElement("ul",r({role:"listbox"},f(m+"items-list","itemsList")),n.map((function(t,n){var d=0===n,g=n===u,y=m+"item-"+n,v=h?i({sectionIndex:l,itemIndex:n}):i,b=r({id:p(l,n),"aria-selected":g},f(y,"item",d&&"itemFirst",g&&"itemHighlighted"),v);return g&&(b.ref=e.storeHighlightedItemReference),o.default.createElement(c.default,r({},b,{sectionIndex:l,isHighlighted:g,itemIndex:n,item:t,renderItem:a,renderItemData:s}))})))}}]),t}(a.Component);d.propTypes={items:s.default.array.isRequired,itemProps:s.default.oneOfType([s.default.object,s.default.func]),renderItem:s.default.func.isRequired,renderItemData:s.default.object.isRequired,sectionIndex:s.default.number,highlightedItemIndex:s.default.number,onHighlightedItemChange:s.default.func.isRequired,getItemId:s.default.func.isRequired,theme:s.default.func.isRequired,keyPrefix:s.default.string.isRequired},d.defaultProps={sectionIndex:null},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=l(a),s=l(n(16)),c=l(n(27));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){var e,n,r;u(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.storeItemReference=function(e){null!==e&&(r.item=e)},r.onMouseEnter=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseEnter(e,{sectionIndex:n,itemIndex:i})},r.onMouseLeave=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseLeave(e,{sectionIndex:n,itemIndex:i})},r.onMouseDown=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseDown(e,{sectionIndex:n,itemIndex:i})},r.onClick=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onClick(e,{sectionIndex:n,itemIndex:i})},p(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,c.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,i=e.renderItem,a=e.renderItemData,s=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete s.sectionIndex,delete s.itemIndex,"function"==typeof s.onMouseEnter&&(s.onMouseEnter=this.onMouseEnter),"function"==typeof s.onMouseLeave&&(s.onMouseLeave=this.onMouseLeave),"function"==typeof s.onMouseDown&&(s.onMouseDown=this.onMouseDown),"function"==typeof s.onClick&&(s.onClick=this.onClick),o.default.createElement("li",r({role:"option"},s,{ref:this.storeItemReference}),i(n,r({isHighlighted:t},a)))}}]),t}(a.Component);f.propTypes={sectionIndex:s.default.number,isHighlighted:s.default.bool.isRequired,itemIndex:s.default.number.isRequired,item:s.default.any.isRequired,renderItem:s.default.func.isRequired,renderItemData:s.default.object.isRequired,onMouseEnter:s.default.func,onMouseLeave:s.default.func,onMouseDown:s.default.func,onClick:s.default.func},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},function(e,t,n){const{defaults:r}=n(17),{block:i}=n(117),{rtrim:a,splitCells:o,escape:s}=n(13);e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.rules=i.normal,this.options.pedantic?this.rules=i.pedantic:this.options.gfm&&(this.rules=i.gfm)}static get rules(){return i}static lex(t,n){return new e(n).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.token(e,!0)}token(e,t){let n,r,c,l,u,p,f,d,m,h,g,y,v,b,S,E;for(e=e.replace(/^ +$/gm,"");e;)if((c=this.rules.newline.exec(e))&&(e=e.substring(c[0].length),c[0].length>1&&this.tokens.push({type:"space"})),c=this.rules.code.exec(e)){const t=this.tokens[this.tokens.length-1];e=e.substring(c[0].length),t&&"paragraph"===t.type?t.text+="\n"+c[0].trimRight():(c=c[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?c:a(c,"\n")}))}else if(c=this.rules.fences.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"code",lang:c[2]?c[2].trim():c[2],text:c[3]||""});else if(c=this.rules.heading.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"heading",depth:c[1].length,text:c[2]});else if((c=this.rules.nptable.exec(e))&&(p={type:"table",header:o(c[1].replace(/^ *| *\| *$/g,"")),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3]?c[3].replace(/\n$/,"").split("\n"):[]},p.header.length===p.align.length)){for(e=e.substring(c[0].length),g=0;g<p.align.length;g++)/^ *-+: *$/.test(p.align[g])?p.align[g]="right":/^ *:-+: *$/.test(p.align[g])?p.align[g]="center":/^ *:-+ *$/.test(p.align[g])?p.align[g]="left":p.align[g]=null;for(g=0;g<p.cells.length;g++)p.cells[g]=o(p.cells[g],p.header.length);this.tokens.push(p)}else if(c=this.rules.hr.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"hr"});else if(c=this.rules.blockquote.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"blockquote_start"}),c=c[0].replace(/^ *> ?/gm,""),this.token(c,t),this.tokens.push({type:"blockquote_end"});else if(c=this.rules.list.exec(e)){for(e=e.substring(c[0].length),l=c[2],b=l.length>1,f={type:"list_start",ordered:b,start:b?+l:"",loose:!1},this.tokens.push(f),c=c[0].match(this.rules.item),d=[],n=!1,v=c.length,g=0;g<v;g++)p=c[g],h=p.length,p=p.replace(/^ *([*+-]|\d+\.) */,""),~p.indexOf("\n ")&&(h-=p.length,p=this.options.pedantic?p.replace(/^ {1,4}/gm,""):p.replace(new RegExp("^ {1,"+h+"}","gm"),"")),g!==v-1&&(u=i.bullet.exec(c[g+1])[0],(l.length>1?1===u.length:u.length>1||this.options.smartLists&&u!==l)&&(e=c.slice(g+1).join("\n")+e,g=v-1)),r=n||/\n\n(?!\s*$)/.test(p),g!==v-1&&(n="\n"===p.charAt(p.length-1),r||(r=n)),r&&(f.loose=!0),S=/^\[[ xX]\] /.test(p),E=void 0,S&&(E=" "!==p[1],p=p.replace(/^\[[ xX]\] +/,"")),m={type:"list_item_start",task:S,checked:E,loose:r},d.push(m),this.tokens.push(m),this.token(p,!1),this.tokens.push({type:"list_item_end"});if(f.loose)for(v=d.length,g=0;g<v;g++)d[g].loose=!0;this.tokens.push({type:"list_end"})}else if(c=this.rules.html.exec(e))e=e.substring(c[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===c[1]||"script"===c[1]||"style"===c[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(c[0]):s(c[0]):c[0]});else if(t&&(c=this.rules.def.exec(e)))e=e.substring(c[0].length),c[3]&&(c[3]=c[3].substring(1,c[3].length-1)),y=c[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[y]||(this.tokens.links[y]={href:c[2],title:c[3]});else if((c=this.rules.table.exec(e))&&(p={type:"table",header:o(c[1].replace(/^ *| *\| *$/g,"")),align:c[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:c[3]?c[3].replace(/\n$/,"").split("\n"):[]},p.header.length===p.align.length)){for(e=e.substring(c[0].length),g=0;g<p.align.length;g++)/^ *-+: *$/.test(p.align[g])?p.align[g]="right":/^ *:-+: *$/.test(p.align[g])?p.align[g]="center":/^ *:-+ *$/.test(p.align[g])?p.align[g]="left":p.align[g]=null;for(g=0;g<p.cells.length;g++)p.cells[g]=o(p.cells[g].replace(/^ *\| *| *\| *$/g,""),p.header.length);this.tokens.push(p)}else if(c=this.rules.lheading.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"heading",depth:"="===c[2].charAt(0)?1:2,text:c[1]});else if(t&&(c=this.rules.paragraph.exec(e)))e=e.substring(c[0].length),this.tokens.push({type:"paragraph",text:"\n"===c[1].charAt(c[1].length-1)?c[1].slice(0,-1):c[1]});else if(c=this.rules.text.exec(e))e=e.substring(c[0].length),this.tokens.push({type:"text",text:c[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens}}},function(e,t,n){const r=n(28),i=n(118),a=n(119),o=n(120),{defaults:s}=n(17),{merge:c,unescape:l}=n(13);e.exports=class e{constructor(e){this.tokens=[],this.token=null,this.options=e||s,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new i}static parse(t,n){return new e(n).parse(t)}parse(e){this.inline=new a(e.links,this.options),this.inlineText=new a(e.links,c({},this.options,{renderer:new o})),this.tokens=e.reverse();let t="";for(;this.next();)t+=this.tok();return t}next(){return this.token=this.tokens.pop(),this.token}peek(){return this.tokens[this.tokens.length-1]||0}parseText(){let e=this.token.text;for(;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)}tok(){let e="";switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,l(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":{let t,n,r,i,a="";for(r="",t=0;t<this.token.header.length;t++)r+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(a+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=this.token.cells[t],r="",i=0;i<n.length;i++)r+=this.renderer.tablecell(this.inline.output(n[i]),{header:!1,align:this.token.align[i]});e+=this.renderer.tablerow(r)}return this.renderer.table(a,e)}case"blockquote_start":for(e="";"blockquote_end"!==this.next().type;)e+=this.tok();return this.renderer.blockquote(e);case"list_start":{e="";const t=this.token.ordered,n=this.token.start;for(;"list_end"!==this.next().type;)e+=this.tok();return this.renderer.list(e,t,n)}case"list_item_start":{e="";const t=this.token.loose,n=this.token.checked,r=this.token.task;if(this.token.task)if(t)if("text"===this.peek().type){const e=this.peek();e.text=this.renderer.checkbox(n)+" "+e.text}else this.tokens.push({type:"text",text:this.renderer.checkbox(n)});else e+=this.renderer.checkbox(n);for(;"list_item_end"!==this.next().type;)e+=t||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(e,r,n)}case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:{const e='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(e);console.log(e)}}}}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"AppLinkHelper",(function(){return j})),n.d(r,"AppLinkUtility",(function(){return O})),n.d(r,"Application",(function(){return P})),n.d(r,"AppRouter",(function(){return F})),n.d(r,"Behavior",(function(){return M})),n.d(r,"Collection",(function(){return U})),n.d(r,"CollectionView",(function(){return V})),n.d(r,"ComponentCollection",(function(){return V})),n.d(r,"Error",(function(){return L})),n.d(r,"ErrorHelper",(function(){return x})),n.d(r,"SilentError",(function(){return k})),n.d(r,"LayoutView",(function(){return J})),n.d(r,"NestedModel",(function(){return Y})),n.d(r,"Service",(function(){return G})),n.d(r,"Model",(function(){return K})),n.d(r,"View",(function(){return H})),n.d(r,"Component",(function(){return q})),n.d(r,"EventNames",(function(){return g})),n.d(r,"LayoutService",(function(){return W})),n.d(r,"Middleware",(function(){return N})),n.d(r,"LocationUtils",(function(){return v})),n.d(r,"Shell",(function(){return Q}));var i={};n.r(i),n.d(i,"emptyResponse",(function(){return Ot})),n.d(i,"getResponse",(function(){return It})),n.d(i,"getFetch",(function(){return jt})),n.d(i,"fetch",(function(){return At})),n.d(i,"useGetFetch",(function(){return Tt})),n.d(i,"useGetResponse",(function(){return wt})),n.d(i,"useBasicFetch",(function(){return Lt})),n.d(i,"createMiddleware",(function(){return Nt})),n.d(i,"FlightReducer",(function(){return Ft})),n.d(i,"Simulator",(function(){return zt})),n.d(i,"Actions",(function(){return et})),n.d(i,"RequestStatus",(function(){return tt})),n.d(i,"ajaxRequest",(function(){return at})),n.d(i,"normalize",(function(){return ut})),n.d(i,"denormalize",(function(){return dt}));n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161);var a={UPLOAD_IMAGE:"upload:image"},o={Subjects:Object.assign({SUBJECTS:"subjects",NEW_SUBJECT:"new:subject",EDIT_SUBJECT:"edit:subject",EDIT_SUBJECT_PLAYLISTS:"edit:subject:playlists",EDIT_SUBJECT_SERIES:"edit:subject:series",EDIT_SUBJECT_VIDEOS:"edit:subject:videos",SUBJECT_CLASSIFICATIONS:"subject:classifications",DELETE_SUBJECT:"delete:subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_SUBJECT_MEMBER:"remove:subject:member",CLASSIFICATIONS:"classifications",PRESENTATION_CLASSIFICATIONS:"presentation:classifications",NEW_CLASSIFICATION:"new:classification",EDIT_CLASSIFICATION:"edit:classification",EDIT_CLASSIFICATION_PLAYLISTS:"edit:classification:playlists",EDIT_CLASSIFICATION_SERIES:"edit:classification:series",EDIT_CLASSIFICATION_VIDEOS:"edit:classification:videos",DELETE_CLASSIFICATION:"delete:classification",REMOVE_CLASSIFICATION_MEMBER:"remove:classification:member",LEVELS:"levels",NEW_LEVEL:"new:level",EDIT_LEVEL:"edit:level",AUDIENCES:"audiences",PRESENTATION_AUDIENCES:"presentation:audiences",NEW_AUDIENCE:"new:audience",EDIT_AUDIENCE:"edit:audience",DELETE_AUDIENCE:"delete:audience",PRESENTATIONS:"presentations",NEW_PRESENTATION:"new:presentation",EDIT_PRESENTATION:"edit:presentation"},a),Playlists:Object.assign({PLAYLISTS:"index",SEARCH_PLAYLISTS:"search:playlists",NEW_PLAYLIST:"new:playlist",EDIT_PLAYLIST:"edit:playlist",EDIT_PLAYLIST_VIDEOS:"edit:playlist:videos",EDIT_PLAYLIST_SUBJECTS:"edit:playlist:subjects",EDIT_PLAYLIST_AUDIENCES:"edit:playlist:audiences",DELETE_PLAYLIST:"delete:playlist",REMOVE_VIDEO:"remove:video",REMOVE_FROM_SUBJECT:"remove:from:subject"},a),Series:Object.assign({EDIT_SERIES:"edit:series",EDIT_SERIES_VIDEOS:"edit:series:videos",EDIT_SERIES_SUBJECTS:"edit:series:subjects",EDIT_SERIES_AUDIENCES:"edit:series:audiences",LEGACY_EDIT_SERIES:"legacy:edit:series"},a),Videos:Object.assign({EDIT_VIDEO:"edit:video",EDIT_VIDEO_AUDIENCES:"edit:video:audiences",EDIT_VIDEO_SUBJECTS:"edit:video:subjects",EDIT_VIDEO_ALIASES:"edit:video:aliases",LEGACY_EDIT_VIDEO:"legacy:edit:video"},a),DomainOptions:{DOMAIN_OPTIONS:"domain:options",NEW_DOMAIN_OPTION:"new:domain:option",EDIT_DOMAIN_OPTION:"edit:domain:option",DELETE_DOMAIN_OPTION:"delete:domain:option"},People:{PEOPLE:"people",NEW_PERSON:"new:person",EDIT_PERSON:"edit:person"},Companies:{COMPANIES:"companies",NEW_COMPANY:"new:company",EDIT_COMPANY:"edit:company"},Themes:Object.assign({THEMES:"themes",NEW_THEME:"new:theme",EDIT_THEME:"edit:theme",DELETE_THEME:"delete:theme"},a)},s={SUBJECT:"subject",SUBJECTS:"subjects",UPDATE_SUBJECT:"update:subject",DELETE_SUBJECT:"delete:subject",UPDATE_OBJECT_SUBJECTS:"update:object:subjects",ADD_TO_SUBJECT:"add:to:subject",REMOVE_FROM_SUBJECT:"remove:from:subject",CLASSIFICATION:"classification",CLASSIFICATIONS:"classifications",UPDATE_CLASSIFICATION:"update:classification",DELETE_CLASSIFICATION:"delete:classification",UPDATE_OBJECT_CLASSIFICATIONS:"update:object:classifications",ADD_TO_CLASSIFICATION:"add:to:classification",REMOVE_FROM_CLASSIFICATION:"remove:from:classification",PRESENTATION:"presentation",PRESENTATIONS:"presentations",UPDATE_PRESENTATION:"update:presentation",LEVEL:"level",LEVELS:"levels",UPDATE_LEVEL:"update:level",ADD_TO_LEVEL:"add:to:level",REMOVE_FROM_LEVEL:"remove:from:level",UPDATE_OBJECT_LEVELS:"update:object:levels",AUDIENCE:"audience",AUDIENCES:"audiences",UPDATE_AUDIENCE:"update:audience",DELETE_AUDIENCE:"delete:audience",UPDATE_OBJECT_AUDIENCES:"update:object:audiences",PLAYLIST:"playlist",PLAYLISTS:"playlists",UPDATE_PLAYLIST:"update:playlist",DELETE_PLAYLIST:"delete:playlist",PLAYLIST_VIDEOS:"playlist:videos",REORDER_PLAYLIST_VIDEOS:"reorder:playlist:videos",REMOVE_PLAYLIST_VIDEO:"remove:playlist:video",VIDEO:"video",SERIES:"series",SERIES_BY_ID:"series:by:id",UPDATE_SERIES:"update:series",CURRENT_USER:"current:user",UPLOAD_IMAGE:"upload:image",LOCALE:"locale",PHRASES:"PHRASES"},c={IMAGES:".".concat(["jpg","tif","png","bmp","gif","jpeg"].join(",."))},l={CURATOR_LAYOUT:"CuratorLayout"},u={COMPANIES:"companies:application",DOMAIN_OPTIONS:"domain:options:application",PEOPLE:"people:application",PLAYLISTS:"playlists:application",SERIES:"series:application",SUBJECTS:"subjects:application",THEMES:"themes:application",VIDEOS:"videos:application"},p={IMAGE_UPLOAD:"image:upload:data:service",SUBJECT:"subject:data:service",LANGUAGE:"language:data:service"},f={IMAGE_UPLOAD:"ImageUploadDataService",SUBJECT:"SubjectDataService",LANGUAGE:"LanguageDataService"},d=n(0),m=n(1),h=n(4);const g={SHOW_POPUP:"show:popup",ROUTE:"route",LOCK_NAV:"lock:nav",UNLOCK_NAV:"unlock:nav",NAV_IS_LOCKED:"navigation:islocked",NAV_UNLOCKED_BY_USER:"navigation:unlocked:by:user",ROUTING_START:"routing:start",ROUTING_END:"routing:end",HAS_ACTIVE_ROUTE:"has:active:route",ROUTE_LOOKUP:"route:look:up",URL_CHANGE:"url:change",ERROR:"error",CURRENT_ROUTE:"route:current"},y={SHELL:"global:shell",ALERT:"global:alert",POPUP:"global:popup"},v={GetQuery:()=>v.DeserializeQueryParams(window.location.search.substring(1)),UpdateQuery(e){if(!e)return;const t=v.GetQuery();let n=v.SerializeQueryParams(m.extend(t,e));n&&(n="?"+n),v.UpdateUrl(`${v.GetCurrentPath()}${n}`,null,{replace:!0,trigger:!1})},UpdateUrl(e,t,n){const r=j.buildRoute(e,t);h.history.navigate(r,n),h.Radio.channel(y.SHELL).trigger(g.URL_CHANGE,t,n)},SerializeQueryParams:e=>e?"string"==typeof e?e:$.param(e,!0):"",DeserializeQueryParams:e=>e?m.reduce(e.split("&"),(e,t)=>{const n=t.split("="),r=n[0],i=n.length>0?decodeURIComponent(n[1]):"";return e[r]?e[r]instanceof Array?(e[r].push(i),e):(e[r]=[e[r],i],e):(e[r]=i,e)},{}):{},StartHistory(){h.History.started&&h.history.stop(),h.history.start({pushState:!0})},PageLoad(e,t=!1){t?window.open(e,"_blank"):window.location.href=e},Redirect(e,t=!0){const n=()=>t?window.location.replace(e):window.location.href=e;O.hasActiveRoute()?h.Radio.channel(y.SHELL).once("routing:end",n):n()},Reload(e=!0){window.location.reload(e)},GetCurrentPath:()=>window.location.pathname,GetCurrentQueryString:()=>window.location.search,GetCurrentUrl:()=>window.location.href,GetCurrentReferrer:()=>document.referrer,SetPageTitle(e){document.title=e}},b=/((\(\?)?:\w+)|(\*\w+)/,S=/[\(\)]/g,E=/\(\/\)/g,C=/\/$/,O={routingStarted(){h.Radio.channel(y.SHELL).trigger(g.ROUTING_START)},routingEnded(){if(!O.hasActiveRoute())return;h.Radio.channel(y.SHELL).trigger(g.ROUTING_END)},hasActiveRoute:()=>h.Radio.channel(y.SHELL).request(g.HAS_ACTIVE_ROUTE)},I=(e,t={})=>{t.usedHelper=!0;const{application:n,action:r}=e;h.Radio.channel(n).trigger(r,e,t)},j={getHref(e){if(!e)return"";const{application:t,action:n,args:r,params:i}=e;return"/"+h.Radio.channel(y.SHELL).request(g.ROUTE_LOOKUP,`${t}:${n}`,r,i)},buildRoute(e,t){if(!t)return e;let n=t.args,r=t.params;if(m.each(n,t=>{e=e.replace(b,t||"")}),e=(e=(e=e.replace(E,"")).replace(S,"")).replace(C,""),!r)return e;const i=v.SerializeQueryParams(r);return i.length?`${e}?${i}`:e},trigger(e,t){if(!e)return;if(!O.hasActiveRoute())return void I(e,t);h.Radio.channel(y.SHELL).once("routing:end",()=>{I(e,t)})},getCurrentAppLink:()=>h.Radio.channel(y.SHELL).request(g.CURRENT_ROUTE)};var A=n(7);function T(e,t,n,r){let i=e;return"string"==typeof e&&(i=h.Radio.channel(e)),r.call(this,i,t,n)}const w=class{constructor(){this.variables={}}static get Instance(){return this.instance||(this.instance=new this)}get name(){return"EnvironmentVariables"}get isDevelopment(){return this.variables.isDevelopment}get(e){return this.variables[e]}setUpVariables(e){this.variables=e}}.Instance;class L extends Error{constructor(e){super(e)}}class k extends L{get name(){return"SilentError"}}class _ extends Error{get name(){return"CoreError"}}const x={throw(e){if(h.Radio.channel(y.SHELL).trigger(g.ERROR,e),!(e instanceof k||w.isDevelopment))throw e}};class P extends A.Application{constructor(e){super(e),this.mergeOptions(e,[...this.defaultProps,...this.props||[]]),m.result(this,"name")||x.throw(new _("BaseApplication must define a name")),m.result(this,"channelName")||x.throw(new _("BaseApplication must define a channelName")),this.listenTo(this.getGlobalRadioChannel("popup"),g.SHOW_POPUP,this.onShowPopup),this.listenTo(this.getGlobalRadioChannel("alert"),"show:alert",this.onShowAlert)}get defaultProps(){return["shell","layoutService"]}getGlobalRadioChannel(e){const t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||x.throw(new _(`Global channel ${t} does not exist`)),h.Radio.channel(t)}onLoadLayout(){if(this.layoutOptions&&this.layoutOptions.name){var e=m.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(m.extend(this.layoutOptions,{options:e})),this.layout||x.throw(new _(`Layout: ${this.layoutOptions.name} does not exist or was not registered`)),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}onShowPopup(e){this.layout.getRegion("popup")||x.throw(new _("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}onShowAlert(e){const{ctor:t,collection:n}=e,r=this.layout.getRegion("alert");r||x.throw(new _("Your application layout must define an alert region")),r.hasView()||this.layout.showChildView("alert",new t({collection:n}))}setDefaultQueryParams(e){this.defaultQueryParams&&(e=m.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}getAndClearDefaultQueryParams(){const e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class N{use(e){var t;this.go=(t=this.go,(n,r)=>t(n,()=>e(n,r)))}go(e,t){t(e)}}const D=/([A-Z])/g,R=/(^|:)(\w)/gi;class F extends A.AppRouter{constructor(e){super(e),this.bindDisposal(),this.processInternalRoutes(),this.processExternalRoutes(),this.processAppLinks()}bindDisposal(){this.listenTo(y.SHELL,g.ROUTE,e=>{e.application!==this.channelName&&this.destroyApp()})}addRouteLookup(e,t){this.options.shell.addRouteLookup(`${this.channelName}:${e}`,(n,r)=>j.buildRoute(t,{application:this.channelName,action:e,args:n,params:r}))}processInternalRoutes(){m.each(m.keys(this.appRoutes),e=>{const t=this.appRoutes[e],n=this.toEventName(t);this.addRouteLookup(n,e),this.listenTo(this.channelName,n,(t,n)=>{n&&n.usedHelper||x.throw(new _("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),this.executeRoute(t,{isAppRoute:!0},()=>{const r=m.extend({},this.controller.getAndClearDefaultQueryParams(),t.params);t.params=r,v.UpdateUrl(e,t,n)})})})}processExternalRoutes(){this.externalRoutes&&m.each(m.keys(this.externalRoutes),e=>{const t=this.externalRoutes[e],n=this.toEventName(t);this.addRouteLookup(n,e),this.listenTo(this.channelName,n,(e,t)=>{t&&t.usedHelper||x.throw(new _("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),v.PageLoad(j.getHref(e))})})}processAppLinks(){this.appLinks&&m.each(this.appLinks,e=>{const t=this.toEventName(e);this.listenTo(this.channelName,t,(e,t)=>{t&&t.usedHelper||x.throw(new _("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),this.executeRoute(e,{isAppRoute:!1})})})}executeRoute(e,t,n){this.validateAppLink(e);const r=this.toMethodName(e.action);O.routingStarted();const i=h.Radio.channel(y.SHELL);if(this.options.shell.isNavLocked())return i.trigger(g.NAV_IS_LOCKED,e),void O.routingEnded();const a=new N;m.each(this.filters,e=>a.use(e)),a.go(e,()=>{i.trigger(g.ROUTE,e,t),this.createApp();const a=this.controller;if(m.isFunction(a[r])||(O.routingEnded(),x.throw(new _(`${r} does not exist on the ${m.result(a,"name")}.`))),!1===a.triggerMethod("before:action"))return a.triggerMethod("action:cancelled"),void O.routingEnded();a.triggerMethod("load:layout"),a[r].apply(a,[...e.args||[],e.params||{}]),m.isFunction(n)&&n(),O.routingEnded()})}createApp(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}destroyApp(){if(!this.controller)return;this.controller.destroy(),delete this.controller}_addAppRoute(e,t,n){this.route(t,n,(...e)=>{const t={application:this.channelName,action:this.toEventName(n),args:e.slice(0,e.length-1),params:v.DeserializeQueryParams(e[e.length-1])};this.executeRoute(t,{isAppRoute:!0},()=>{v.UpdateQuery(m.extend(this.controller.getAndClearDefaultQueryParams(),t.params))})})}toEventName(e){return e.replace(D,":$1").toLowerCase()}toMethodName(e){const t=e.replace(R,(e,t,n)=>n.toUpperCase());return t[0].toLowerCase()+t.slice(1,t.length)}validateAppLink(e){e.application&&e.action||(O.routingEnded(),x.throw(new _("Invalid AppLink")))}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class M extends A.Behavior{listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class U extends h.Collection{listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class V extends A.CollectionView{constructor(e){super(e),m.result(this,"name")||x.throw(new _(`Error: View with cid:${this.cid} requires a name.`))}serializeModel(){return this.model?this.model.toJSON():{}}serializeCollection(){return this.collection?this.collection.toJSON():[]}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class B extends L{get name(){return"DevError"}}class z extends A.View{constructor(e){super(e);const t=[...this.defaultProps,...this.props||[]];this.mergeOptions(e,t),m.result(this,"name")||x.throw(new _(`Error: View with cid:${this.cid} requires a name.`))}get defaultProps(){return["shell","layoutService"]}_setOptions(e){this.options=m.extend({},m.result(this,"defaults"),e)}_setAttributes(e){w.isDevelopment&&m.extend(e,{"cv-classname":this.name}),this.$el.attr(e)}get ui(){return this.uiStorage||(this.uiStorage=this.elements),this.uiStorage}set ui(e){this.uiStorage=e}get elements(){return null}static AddViewDataExtension(e){z.ViewDataExtensions.push(e)}serializeModel(){return this.model?this.model.toJSON():{}}serializeCollection(){return this.collection?this.collection.toJSON():[]}resetClassName(){this.$el.attr("class",m.result(this,"className"))}serializeData(){const e=super.serializeData(),t=m.result(this,"viewOptions"),n=m.extend({},e,{options:t});return z.ViewDataExtensions.length?m.extend(n,...m.map(z.ViewDataExtensions,e=>e instanceof Function?e(this):e)):n}viewOptions(){return this.options}undelegateAppLinks(){this.$el&&this.$el.off(".appLinks"+this.cid)}renderAppLinks(){let e=this.appLinks;e&&(e=this.normalizeUIKeys(e),this.undelegateAppLinks(),m.each(m.keys(e),t=>{let n=t;const r=e[t],i=j.getHref(r);"[this]"===n&&(n=null);const a=n?this.$el.find(t):this.$el;(a.is("a")||a.is("button"))&&(i&&"/"!==i&&a.attr("href",i),this.delegate("click.appLinks"+this.cid,n,(function(e){e.preventDefault(),j.trigger(r)})))}))}hasPartialLoadingRegions(){const e=this;return void 0!==e._hasPartialLoadingRegions||(e._hasPartialLoadingRegions=m.some(e.regions,e=>m.has(e,"partialLoading"))),e._hasPartialLoadingRegions}renderPartialLoading(e){h.Radio.channel(y.SHELL).trigger("render:partial:loading",this,e)}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}render(){const e=this;if(e._isDestroyed)return this;let t=this.processRequriedResources(!0);return t&&(t=e.triggerMethod("before:render",this)),!1!==t&&(t=!0),t=t&&this.processRequriedResources(!1),!1===t?(e._partialLoadingRendered||!e.hasPartialLoadingRegions()||(e._partialLoadingRendered=!0,e._reInitRegions(),e._renderTemplate(),e.renderPartialLoading()),this):((e._isRendered||e._partialLoadingRendered)&&e._reInitRegions(),this.setTitle(),e._renderTemplate(),e.bindUIElements(),this.renderAppLinks(),e._partialLoadingRendered=!1,e._isRendered=!0,e.triggerMethod("render",this),this)}processRequriedResources(e){return!0}setTitle(){}}z.ViewDataExtensions=[];class H extends z{constructor(e){super(e),this.boundListeners={},this.resourceInstances={}}processRequriedResources(e){const t=m.keys(this.requiredResources);if(!t.length)return!0;const n=this;let r=!0;return m.each(t,t=>{const i=this.requiredResources[t];if(i.beforeOnBeforeRender!==e)return;const a=i.dataServiceName;this.resourceInstances[a]||(this.resourceInstances[a]=i.getInstance(this)),this.boundListeners[`${a}:${i.eventName}`]||(this.listenTo(this.resourceInstances[a].channelName,i.eventName,this.render),this.boundListeners[`${a}:${i.eventName}`]=!0),n[t]=i.getData(this.resourceInstances[a]),r=r&&!!n[t]}),r}setTitle(){m.isString(this.title)||!1===this.title||x.throw(new B(`Must define a title for ${this.name}.`));h.Radio.channel(y.SHELL).trigger("set:page:title",this.title)}}class q extends z{}class J extends H{constructor(e){super(e)}static getCacheKey(e){x.throw(new B(`Must define getCacheKey for ${this.name}.`))}unmountRegion(e){this.trigger("unmount:"+e)}}class K extends h.Model{mixin(e){const t=this;for(let n in e){if(t.hasOwnProperty(n)){const r=t[n];return void(t[n]=m.extend({},r,e[n]))}t[n]=e[n]}}addValidation(e){this.mixin({validation:e})}validate(e,t){super.validate.call(this,e,t)}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class Y extends K{set(e,t,n){let r,i;if(null===e)return this;for(r in"object"==typeof e?(i=e,n=t):(i={},i[e]=t),n||(n={}),i)m.has(this.associations,r)&&(i[r]=this.setAssociation(r,i[r],n));return super.set.call(this,i,n)}get(e){var t=e.indexOf(".");if(-1===t)return super.get.call(this,e);const n=e.substr(0,t),r=this.attributes[n];if(!r||!m.isFunction(r.get))return super.get.call(this,e);const i=e.substr(t+1);return r.get(i)}setAssociation(e,t,n){const r=this.associations[e],i=this.attributes[e];if(!m.isFunction(r))return t;if(n.unset)return i&&delete i.parent,delete this[e],i;if(i)return i instanceof K&&i.set(t,n),i instanceof U&&i.set(t,n),n.silent||this.trigger("change:"+e,this,t,n),i;const a=t instanceof K?t:new r(t,{parse:!0});return a.parent=this,this[e]=a,a}toJSON(...e){const t=super.toJSON.apply(this,e);return m.each(this.associations,(e,n)=>{m.has(t,n)&&m.isFunction(t[n].toJSON)?t[n]=t[n].toJSON():t[n]=(new e).toJSON()}),t}toFlatJSON(...e){return m.omit(super.toJSON.apply(this,e),m.keys(this.associations))}}class G extends A.Object{constructor(e){super(e),this.name||x.throw(new _("Your service must be named."))}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class W extends A.Object{constructor(e){super(e),this.layouts={},this.requiredRegions=e.requiredRegions}clearLayout(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}registerLayout(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}getLayout(e){const{name:t,options:n={}}=e;this.layouts[t]||x.throw(new _(t+" was not registered as a template."));const r=this.layouts[t].getCacheKey(n);return this.currentLayoutCacheKey===r&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",n),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=r,this.currentLayout=new this.layouts[t](n),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}checkRequiredRegions(e){m.each(this.requiredRegions,t=>{m.has(m.result(e.prototype,"regions"),t)||x.throw(new _(`Layout: ${e.prototype.name} must define an ${t} region.`))})}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}class Z{constructor(e,t){this.application=e,this.options=t||{}}get Application(){return this.application}get Options(){return this.options}}class Q extends A.Application{initialize(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}bindListeners(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}bindNavLockListeners(){this.listenTo(y.SHELL,g.LOCK_NAV,()=>this.shellState.navLock=!0),this.listenTo(y.SHELL,g.UNLOCK_NAV,()=>this.shellState.navLock=!1)}bindAppLinkListeners(){this.listenTo(y.SHELL,g.ROUTING_START,()=>this.shellState.activeRoute=!0),this.listenTo(y.SHELL,g.ROUTING_END,()=>this.shellState.activeRoute=!1),this.listenTo(y.SHELL,g.ROUTE,e=>this.shellState.currentAppLink=e);const e=h.Radio.channel(y.SHELL);e.reply(g.HAS_ACTIVE_ROUTE,m.bind(this.hasActiveRoute,this)),e.reply(g.CURRENT_ROUTE,()=>this.shellState.currentAppLink)}bindErrorHandlers(){window.addEventListener("error",()=>{O.routingEnded()})}bindErrorListener(){const e=h.Radio.channel(y.SHELL);this.listenTo(e,g.ERROR,this.handleError)}bindRouteLookup(){h.Radio.channel(y.SHELL).reply(g.ROUTE_LOOKUP,(e,t,n)=>this.routeLookup[e]?this.routeLookup[e](t,n):"",this)}addRouteLookup(e,t){this.routeLookup[e]=t}registerApplication(e,t){return this.applications.push(new Z(e,t)),this}getGlobalRadioChannels(){return y}isNavLocked(){return this.shellState.navLock}start(e){e||(e={}),this.runInitializationSteps(this,(t,n)=>{this.runStartUpSteps(this,e,(t,n,r)=>{super.start(e)})})}hasActiveRoute(){return this.shellState.activeRoute}onStart(){m.each(this.applications,e=>{const t={appConstructor:e.Application,shell:this,appOptions:Object.assign({region:"",shell:this,layoutService:this.layoutService},e.Options)};new e.Application.router(t)}),this.bindListeners(),v.StartHistory()}addInitializationStep(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,(n,r)=>t(n,()=>e(n,r))),this}runInitializationSteps(e,t){t(e)}addStartUpStep(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,(n,r,i)=>t(n,r,()=>e(n,r,i))),this}runStartUpSteps(e,t,n){n(e,t)}registerLayout(e,t){return this.layoutService.registerLayout(e,t),this}registerErrorHandler(e,t){return e||x.throw(new _("An error must have a name in order to register a handler for it.")),m.any(this.errorHandlers,t=>t.errorType===e)&&x.throw(new _(`An error handler for ${e.prototype.name} has already been defined.`)),this.errorHandlers.push({errorType:e,handler:t}),this}handleError(e){const t=m.find(this.errorHandlers,t=>e instanceof t.errorType);t&&t.handler&&t.handler(e)}registerStore(e){this.store=e}listenTo(...e){return T.call(this,e[0],e[1],e[2],super.listenTo)}}const X={debounce:(e,t,n)=>m.debounce(e,t,n),throttle:(e,t,n)=>m.throttle(e,t,n),isFunction:e=>m.isFunction(e),useIdentity:()=>m.identity,memoize:(e,t)=>m.memoize(e,t)};var ee=n(24),te=n(5);class ne extends J{isReactComponent(e){return d&&d.isValidElement(e)}showChildView(e,t){this.isReactComponent(t)&&this.showChildReactComponent(e,t)}showChildReactComponent(e,t){this.isAttached()?this.renderChildReactComponent(e,t):this.listenToOnce(this,"attach",()=>this.renderChildReactComponent(e,t))}renderChildReactComponent(e,t){const n=this.getRegion(e),r=this.$el.find(n.el);r&&r.length&&(n.trigger("before:show"),ee.render(t,r[0],()=>n.trigger("show")),this.listenToOnce(this,"unmount:"+e,()=>ee.unmountComponentAtNode(r[0])),this.listenToOnce(this,"before:destroy",()=>ee.unmountComponentAtNode(r[0])))}wrapWithStore(e){return d.createElement(te.Provider,{store:this.options.store},e)}}const re="top:nav",ie="left:nav",ae="content",oe="popup",se="alert";var ce=n(121),le=n.n(ce),ue=n(25),pe=n.n(ue);function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function me(e,t,n){return(me="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ve(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function he(e,t){return(he=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ve(e);if(t){var i=ve(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ye(this,n)}}function ye(e,t){return!t||"object"!==fe(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&he(e,t)}(o,e);var t,n,i,a=ge(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=a.call(this,e)).childComponents={},t}return t=o,i=[{key:"getCacheKey",value:function(e){var t="".concat(this.name),n=[];return Object.keys(e).forEach((function(t){n.push("".concat(t,":").concat(e[t]))})),n.length&&(n.sort(),t+=":".concat(n.join(":"))),t}}],(n=[{key:"regions",value:function(){return{layout:".layout-region"}}},{key:"getChildComponents",value:function(){return{topNav:{component:this.childComponents[re],className:pe.a.topNavRegion},leftNav:{component:this.childComponents[ie],className:"py-3 ".concat(pe.a.leftNavRegion)},content:{component:this.childComponents[ae],className:"position-relative container py-3"},popup:{component:this.childComponents[oe]},alert:{component:this.childComponents[se]}}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"renderTopNav",value:function(){X.isFunction(this.options.getTopNavView)&&(this.childComponents[re]=this.options.getTopNavView(r.AppLinkHelper.getCurrentAppLink()))}},{key:"hideLeftNav",value:function(){this.unsetRegion(ie)}},{key:"closePopup",value:function(){this.unsetRegion(oe)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderTopNav(),this.renderLayout()}},{key:"renderLayout",value:function(){var e=Object.assign({provider:this.options.provider},this.getChildComponents());me(ve(o.prototype),"showChildView",this).call(this,"layout",this.wrapWithStore(d.createElement(Ie,Object.assign({},e))))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"CuratorLayoutView"}},{key:"template",get:function(){return le.a}},{key:"className",get:function(){return"container-fluid ".concat(pe.a.curatorLayout)}}])&&de(t.prototype,n),i&&de(t,i),o}(ne),Se=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Ee=function(e){var t=e.className,n=e.children;return d.createElement("div",{className:t},n)},Ce=function(e,t){return"".concat(e).concat(t?" ".concat(t):"")},Oe=function(e){var t=e.topNav,n=e.leftNav,r=e.content,i=e.popup,a=e.alert;return d.createElement(d.Fragment,null,d.createElement("div",{className:"position-relative"},!!t.component&&d.createElement(Ee,{className:Ce("top-nav-region",t.className)},t.component),!!n.component&&d.createElement(Ee,{className:Ce("left-nav-region",n.className)},n.component),!!r.component&&d.createElement("div",{className:"content-container"},d.createElement(Ee,{className:Ce("content-region",r.className)},r.component))),!!i.component&&d.createElement(Ee,{className:Ce("popup-region",i.className)},i.component),!!a.component&&d.createElement(Ee,{className:Ce("alert-region",a.className)},a.component))},Ie=function(e){var t=e.provider,n=Se(e,["provider"]);return t?d.createElement(t,null,d.createElement(Oe,Object.assign({},n))):d.createElement(Oe,Object.assign({},n))};function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ae(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Te(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function we(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ke(e,t){return(ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pe(e);if(t){var i=Pe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xe(this,n)}}function xe(e,t){return!t||"object"!==je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ke(e,t)}(o,e);var t,n,i,a=_e(o);function o(){return we(this,o),a.apply(this,arguments)}return t=o,(n=[{key:"initialize",value:function(){this.listenTo(y.SHELL,r.EventNames.ROUTING_END,this.updateNav)}},{key:"updateNav",value:function(){var e=this,t=r.AppLinkHelper.getCurrentAppLink().application;if(t!==this.currentApplication){this.currentApplication=t;var n=this.options.navItemMappings[t];if(n){var i=document.querySelector(this.options.navSelector);i&&i.children&&Ae(i.children).forEach((function(t){var r=t.querySelector("a");r&&(r.classList.remove(e.options.currentItemClassName),r.text===n&&r.classList.add(e.options.currentItemClassName))}))}}}},{key:"name",get:function(){return"CuratorAppNavService"}}])&&Le(t.prototype,n),i&&Le(t,i),o}(r.Service);class De extends G{constructor(e){super(e),m.result(this,"name")||x.throw(new B("Must provide a name when extending BaseDataService")),m.result(this,"channelName")||x.throw(new B("Must provide a channelName for "+m.result(this,"name")));const t=[...this.defaultProps,...this.props||[]];this.dataRequestSignatures={},this.mergeOptions(e,t)}get defaultProps(){return["dataProvider","cache","bootstrapData","defaultErrorHandler","alertService"]}getCursors(e){const t=this.cache.get(e);return t?t.cursors:{}}clearCacheAndGet(e){const{callback:t,errorCallback:n,eventPrefix:r}=e,{syncEvent:i,errorEvent:a}=this.getEventNames(r),o=this.cache.get(r);if(o&&o.openRequest){const e=e=>{m.isFunction(n)&&this.stopListening(this.getChannel(),a,n),m.isFunction(t)&&t(e)},r=()=>{m.isFunction(t)&&this.stopListening(this.getChannel(),i,t),m.isFunction(n)&&n()};return this.listenToOnce(this.getChannel(),i,e),void this.listenToOnce(this.getChannel(),a,r)}this.cache.remove(e.eventPrefix),this.get(e)}get(e){const{callback:t,errorCallback:n,eventPrefix:r,resource:i,formatData:a,expiryTime:o,successHandler:s,errorHandler:c,bootstrapName:l}=e,{syncEvent:u,requestEvent:p,successEvent:f,errorEvent:d}=this.getEventNames(r),h=this.getChannel(),g=this.currentTimestamp();this.bootstrapData&&this.bootstrapData[l]&&(this.cacheData(r,this.bootstrapData[l],a,{openRequest:!1,timestamp:g}),delete this.bootstrapData[l]);const y=this.cache.get(r);let v;y&&(v=y.data);const b=y&&y.openRequest,S=this.isExpired(r,o);if(b){const e=e=>{m.isFunction(n)&&this.stopListening(this.getChannel(),d,n),m.isFunction(t)&&t(e)},r=()=>{m.isFunction(t)&&this.stopListening(this.getChannel(),u,t),m.isFunction(n)&&n()};this.listenToOnce(h,u,e),this.listenToOnce(h,d,r)}if(this.cache.has(r)&&!S||(h.trigger(p),this.listenToResponse({eventPrefix:r,formatData:a,cacheOptions:{timestamp:g},callback:t,errorCallback:n,successHandler:s,errorHandler:c}),this.cacheData(r,null,null,{openRequest:!0,timestamp:g}),this.dataProvider.read(i,{channel:this.getTransportChannel(),successEvent:f,errorEvent:d})),v&&m.isFunction(t)&&!S&&t(v),v)return v}create(e){const{eventPrefix:t,resource:n,data:r,formatData:i,callback:a,errorCallback:o,invalidationKeys:s,successHandler:c,errorHandler:l}=e,{requestEvent:u,successEvent:p,errorEvent:f}=this.getEventNames(e.eventPrefix),d=this.getChannel(),m=this.getTransportChannel();d.trigger(u),this.listenToResponse({eventPrefix:t,formatData:i,invalidationKeys:s,callback:a,errorCallback:o,successHandler:c,errorHandler:l}),this.dataProvider.create(n,r,{channel:m,successEvent:p,errorEvent:f})}update(e){const{data:t,callback:n,errorCallback:r,resource:i,formatData:a,eventPrefix:o,invalidationKeys:s,errorHandler:c,successHandler:l}=e,{requestEvent:u,successEvent:p,errorEvent:f}=this.getEventNames(e.eventPrefix),d=this.getChannel(),m=this.getTransportChannel();d.trigger(u),this.listenToResponse({eventPrefix:o,formatData:a,invalidationKeys:s,callback:n,errorCallback:r,successHandler:l,errorHandler:c}),this.dataProvider.update(i,t,{channel:m,successEvent:p,errorEvent:f})}delete(e){const{eventPrefix:t,resource:n,callback:r,errorCallback:i,invalidationKeys:a,successHandler:o,errorHandler:s}=e,{successEvent:c,errorEvent:l}=this.getEventNames(t),u=this.getTransportChannel();this.listenToResponse({eventPrefix:t,invalidationKeys:a,callback:r,errorCallback:i,cacheOptions:{noCache:!0,clearCacheKey:!0},successHandler:o,errorHandler:s}),this.dataProvider.delete(n,{channel:u,successEvent:c,errorEvent:l})}listenToResponse(e){const{eventPrefix:t,formatData:n,callback:r,errorCallback:i,successHandler:a,errorHandler:o,invalidationKeys:s,cacheOptions:c={}}=e,{syncEvent:l,requestEvent:u,successEvent:p,errorEvent:f,successAlertEvent:d,errorAlertEvent:h}=this.getEventNames(t),g=this.getChannel(),y=this.getTransportChannel(),v=this.getAlertChannel();if(m.isFunction(r)&&this.listenToOnce(g,l,r),m.isFunction(i)&&this.listenToOnce(g,f,i),this.stopListening(v,d),this.stopListening(v,h),m.isFunction(a)&&this.listenToOnce(v,d,a),m.isFunction(o)&&this.listenToOnce(v,h,o),!m.isFunction(o)&&!1!==o&&m.isFunction(this.defaultErrorHandler)&&this.listenToOnce(v,h,this.defaultErrorHandler),this.hasRequestSignature(t))return;this.setRequestSignature(t);this.listenTo(y,p,(e,...r)=>{this.stopListening(g,f,i),v.trigger(d,e,...r);const a=c.noCache?this.formatData(e,n):this.cacheData(t,e,n);c.clearCacheKey&&this.cache.remove(t),g.trigger(l,a),s&&s.length&&this.cache.invalidate(s,e=>g.trigger(e+":invalidate"))}),this.listenTo(y,f,(...e)=>{this.stopListening(g,l,r);const n=this.dataProvider.parseError(...e);v.trigger(h,n),g.trigger(f,n),c.noCache||this.cacheData(t,null,null)})}cacheData(e,t,n,r={}){let{openRequest:i=!1,timestamp:a}=r;a||(a=this.currentTimestamp());const o=this.processPagination(t),s=this.formatData(t,n);return this.cache.set(e,{data:s,timestamp:a,cursors:o,openRequest:i}),s}processPagination(e){if(!e)return;const{pagination:t}=e;return t?t.cursors?t.cursors:m.isUndefined(t.offset)||m.isUndefined(t.pageSize)?t.page?this.convertLegacyPaginationToCursors(t):void 0:this.convertOffsetPaginationToCursors(t):void 0}formatData(e,t){return m.isFunction(t)?t(e):e}chain(){const e=[],t=(e,t)=>{m.isFunction(e)&&e(t)},n=(n,i)=>(e.push(()=>{const r=n.callback;n.callback=n=>{t(r,n),t(e.shift())},this[i](n)}),r),r={func:t=>(e.push(()=>{t(e.shift()||(()=>{}))}),r),get:e=>n(e,"get"),create:e=>n(e,"create"),update:e=>n(e,"update"),delete:e=>n(e,"delete"),run(){t(e.shift())}};return r}invalidateCache(e){e&&e.length&&this.cache.invalidate(e)}currentTimestamp(){return(new Date).valueOf()}isExpired(e,t){if(!t)return!1;const n=this.cache.get(e);if(!n||!n.timestamp)return!0;const r=1e3*t;return n.timestamp<this.currentTimestamp()-r}getEventNames(e){return{syncEvent:e+":sync",requestEvent:e+":request",successEvent:e+":success",errorEvent:e+":error",successAlertEvent:e+":success:alert",errorAlertEvent:e+":error:alert"}}getTransportChannel(){return h.Radio.channel(this.channelName+":transport")}getAlertChannel(){return h.Radio.channel(this.channelName+":alert")}setRequestSignature(e){this.dataRequestSignatures[e]=e}hasRequestSignature(e){return!!this.dataRequestSignatures[e]}convertOffsetPaginationToCursors(e){const{offset:t,pageSize:n,totalItems:r}=e,i=r>0&&t<r&&t+n,a=r>0&&t>0&&Math.max(t-n,0);let o={};if(i&&i<r&&(o.next=i.toString()),m.isNumber(a)&&(o.previous=a.toString()),!m.isEmpty(o))return o}convertLegacyPaginationToCursors(e){const{page:t,totalPages:n}=e,r=m.isNumber(t)&&t>0&&t<n&&t+1,i=m.isNumber(t)&&t>1&&t-1;let a={};if(r&&r<=n&&(a.next=r.toString()),i&&(a.previous=i.toString()),!m.isEmpty(a))return a}}function Re(e){return(Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ue(e,t){return(Ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ze(e);if(t){var i=ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Be(this,n)}}function Be(e,t){return!t||"object"!==Re(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ze(e){return(ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var He=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ue(e,t)}(a,e);var t,n,r,i=Ve(a);function a(){return Fe(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"uploadBase64Image",value:function(e,t,n,r){return this.create({resource:"/api/image/upload?type=".concat(t),eventPrefix:s.UPLOAD_IMAGE,data:e,callback:n,errorCallback:r})}},{key:"name",get:function(){return f.IMAGE_UPLOAD}},{key:"channelName",get:function(){return p.IMAGE_UPLOAD}}])&&Me(t.prototype,n),r&&Me(t,r),a}(De);class qe{constructor(e){this.value=e}increment(){this.value+=1}decrement(){this.value-=1}getValue(){return this.value}}const Je={SHORT:120,STANDARD:600};function $e(e){return($e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ge(e,t){return(Ge=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function We(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qe(e);if(t){var i=Qe(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ze(this,n)}}function Ze(e,t){return!t||"object"!==$e(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Qe(e){return(Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ge(e,t)}(a,e);var t,n,r,i=We(a);function a(){return Ke(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"getLanguageConfig",value:function(e){var t={locale:"en",phrases:{}},n=new qe(3),r=function(){n.decrement(),n.getValue()>0||e(t)};this.get({resource:"/api/locale",eventPrefix:s.LOCALE,expiryTime:Je.STANDARD,callback:function(e){t.locale=e,r()}}),this.get({resource:"/api/phrases/shared",eventPrefix:"".concat(s.PHRASES,":shared"),expiryTime:Je.STANDARD,callback:function(e){null===e.shared&&(e.shared={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}}),this.get({resource:"/api/phrases/subjects",eventPrefix:"".concat(s.PHRASES,":subjects"),expiryTime:Je.STANDARD,callback:function(e){null===e.subjects&&(e.subjects={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}})}},{key:"name",get:function(){return f.LANGUAGE}},{key:"channelName",get:function(){return p.LANGUAGE}}])&&Ye(t.prototype,n),r&&Ye(t,r),a}(De);const et={API_REQUEST:"API_REQUEST",API_REPONSE:"API_RESPONSE",API_ERROR:"API_ERROR",INVALIDATE:"INVALIDATE",UPDATE:"UPDATE"};var tt,nt;function rt(e){const{getResponseHeader:t,responseJSON:n,status:r}=e;return{getResponseHeader:t,responseJSON:n,status:r}}!function(e){e.None="None",e.Fetching="Fetching",e.Success="Success",e.Error="Error"}(tt||(tt={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(nt||(nt={}));const it=[nt.POST,nt.PUT];function at(e){const{resource:t,type:n,success:r,error:i,always:a}=e,o={url:t,method:n};it.includes(n)&&e.data&&(o.data=JSON.stringify(e.data)),$.ajax(o).done((e,t,n)=>{r&&r(e,rt(n))}).fail((e,t,n)=>{i&&i(rt(e))}).always(()=>{a&&a()})}const ot="id";function st(e,t={}){const{idAttribute:n=ot,namespace:r=""}=t;return e[n]||x.throw(new B("There was an issue during normalization. Object did not have an id attribute.")),`${r}__${e[n]}`}function ct(e,t,n={}){const{idAttribute:r=ot}=n,i=[];return e.forEach(e=>{e[r]&&i.push(st(e,n)),lt(e,t,n)}),i}function lt(e,t,n={}){if(e)return Array.isArray(e)?ct(e,t,n):"object"==typeof e?function e(t,n,r={}){const{idAttribute:i=ot}=r,a=Object.assign({},t);if(Object.keys(t).forEach(o=>{const s=t[o];if(s)if(Array.isArray(s)){var c=ct(s,n,r);c.length&&(a[o]=c)}else if("object"==typeof s){var l=e(s,n,r);s[i]?a[o]=st(s,r):a[o]=l}}),t[i]){const e=st(t,r);return n[e]=a,e}return a}(e,t,n):e}function ut(e,t){const n={};return{result:lt(e,n,t),entities:n}}const pt={isEmpty:e=>m.isEmpty(e),values:e=>m.values(e),keys:e=>m.keys(e),deepClone:e=>(m.isArray(e)?m.map:m.mapObject)(e,e=>m.isObject(e)||m.isArray(e)?pt.deepClone(e):e),getEnumKeys:e=>Object.keys(e).filter(e=>!(parseInt(e)>=0)),isObject:e=>m.isObject(e),isEqual:(e,t)=>m.isEqual(e,t),omit:(e,t)=>m.omit(e,t)};function ft(e,t,n){if(e){if("string"==typeof e)return function(e,t,n){if(n[e])return n[e];n[e]={};const r=ft(t[e],t,n);return Object.assign(n[e],r),pt.isEmpty(n[e])&&delete n[e],n[e]}(e,t,n);if(Array.isArray(e))return e.map(e=>ft(e,t,n));if("object"==typeof e){const r={};return Object.keys(e).forEach(i=>{r[i]=ft(e[i],t,n)||e[i]}),r}}}function dt(e,t){return ft(e,t,{})}function mt(e,t){return e===t}function ht(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}function gt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mt,n=null,r=null;return function(){return ht(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}function yt(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function vt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var a=0,o=r.pop(),s=yt(r),c=e.apply(void 0,[function(){return a++,o.apply(null,arguments)}].concat(n)),l=e((function(){for(var e=[],t=s.length,n=0;n<t;n++)e.push(s[n].apply(null,arguments));return c.apply(null,e)}));return l.resultFunc=o,l.dependencies=s,l.recomputations=function(){return a},l.resetRecomputations=function(){return a=0},l}}var bt=vt(gt);const St={currentTimestamp:()=>(new Date).valueOf(),isExpired(e,t){if(!t)return!1;const n=1e3*t;return e<St.currentTimestamp()-n},currentTimeOfDay(e){e||(e=new Date);const t=e.getHours();return t>=12&&t<18?"afternoon":t>=18?"evening":"morning"}};class Et{constructor(e){this.status=e.status,this.requestTime=e.requestTime,this.cacheDuration=e.cacheDuration,this.data=e.data,this.statusCode=e.statusCode}get shouldFetch(){return this.status===tt.None||this.isExpired}get isExpired(){return St.isExpired(this.requestTime,this.cacheDuration)}get isFetching(){return this.status===tt.Fetching}get hasError(){return this.status===tt.Error}get isComplete(){return this.status===tt.Success||this.status===tt.Error}}function Ct(e,t,n){if(!e||!t)return Ot();let r=t.response;return!1!==t.request.normalize&&(r=dt(t.response,n)),new Et({status:t.status,statusCode:t.statusCode,requestTime:t.timestamp,cacheDuration:t.request.expiryTime,data:r})}function Ot(){return new Et({status:tt.None})}function It(e,t){return Ct(t,e.flightData.resources[t],e.flightData.entities)}function jt(e,t){return()=>{At(e,t)}}function At(e,t){e({type:et.API_REQUEST,request:t})}function Tt(e){return jt(Object(te.useDispatch)(),e)}function wt(e,t){const n=Object(d.useMemo)(()=>{var n;return(null===(n=t)||void 0===n?void 0:n.optimize)?function(e){return vt(gt,(e,t)=>{const n=["response","request"];return pt.isEqual(pt.omit(e,n),pt.omit(t,n))})(t=>t.flightData.resources[e],t=>{var n;const r=t.flightData.resources[e];return(null===(n=r)||void 0===n?void 0:n.entityIds)?r.entityIds.reduce((e,n)=>(e[n]=t.flightData.entities[n],e),{}):{}},(t,n)=>Ct(e,t,n))}(e):function(e){return bt(t=>t.flightData.resources[e],e=>e.flightData.entities,(t,n)=>Ct(e,t,n))}(e)},[e]);return Object(te.useSelector)(e=>n(e))}function Lt(e,t){const n=Object(te.useDispatch)(),r=wt(e&&e.key,t),i=jt(n,e);return e&&r.shouldFetch&&i(),r}const kt={getMatchingKeyMap(e,t,n){const r=Array.isArray(t)?t:[t];let i=[];return r.forEach(t=>{const n=new RegExp(t,"i"),r=Object.keys(e.resources).filter(e=>n.test(e));i.push(...r)}),n&&(i=i.filter(e=>e!==n)),i.reduce((e,t)=>(e[t]=!0,e),{})}};var _t;!function(e){e[e.Ok=200]="Ok",e[e.NoContent=204]="NoContent",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.Conflict=409]="Conflict",e[e.InternalServer=500]="InternalServer"}(_t||(_t={}));const xt={isSimulated(e){const t=e;return!!(t.successResponse||t.errorResponse||t.noResponse)},simulateFetchData(e,t){const{success:n,error:r,always:i}=e,a=t;window.setTimeout(()=>{a.noResponse||(a.successResponse?n(a.successResponse(),{status:_t.Ok,getResponseHeader:e=>""}):a.errorResponse&&r(a.errorResponse()),i())},function(e){const t=e.timeout||300;return t/2+(Math.floor(Math.random()*t/2)+1)}(t))}};var Pt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Nt(e){const{fetchData:t,bootstrappedData:n,defaultExpiryTime:r}=e,i=Object.freeze({key:null,url:null,type:nt.GET,normalize:!0,formatData:e=>e,expiryTime:r});return function(e){return r=>a=>{if(a.type!==et.API_REQUEST)return void r(a);const o=e.getState(),s=Object.assign({},i,a.request),{success:c,error:l,always:u,formatData:p}=s,f=Pt(s,["success","error","always","formatData"]),d=o.flightData.resources[f.key];if(r(a),d&&d.status===tt.Fetching)return;if(f.bootstrapName&&n[a.request.bootstrapName])return h(n[a.request.bootstrapName]),g(),void delete n[a.request.bootstrapName];const m={resource:f.url,type:f.type,data:f.data,success:h,error:function(t){e.dispatch({type:et.API_ERROR,errorResponse:t.responseJSON,request:a.request,timestamp:St.currentTimestamp(),xhr:t}),l&&l(t)},always:g};return void(xt.isSimulated(f)?xt.simulateFetchData(m,f):t(m));function h(t,n){const r=p(t);let i={result:r,entities:{}};if(f.normalize&&(i=ut(r,f.normalizeOptions)),e.dispatch({type:et.API_REPONSE,result:i.result,entities:i.entities,request:f,timestamp:St.currentTimestamp(),xhr:n}),f.updateState){(Array.isArray(f.updateState)?f.updateState:[f.updateState]).forEach(t=>{!function(t){const n=kt.getMatchingKeyMap(o.flightData,t.keys),r=Object.assign({},Object.keys(o.flightData.resources).filter(e=>n[e]).reduce((e,t)=>{const n=o.flightData.resources[t];let r=n.response;return n.request.normalize&&(r=dt(n.response,o.flightData.entities)),e[t]=r,e},{})),i=t.updateData(r);Object.keys(i).forEach(t=>{const n=o.flightData.resources[t],r=i[t];let a={result:r,entities:{}};n.request.normalize&&(a=ut(r,n.request.normalizeOptions)),e.dispatch({type:et.UPDATE,result:a.result,entities:a.entities,request:n.request})})}(t)})}if(!c)return;let a=i.result;f.normalize&&(a=dt(i.result,Object.assign(Object.assign({},o.flightData.entities),i.entities))),c(a)}function g(){f.invalidationKeys&&e.dispatch({type:et.INVALIDATE,keys:f.invalidationKeys,request:f}),u&&u()}}}}function Dt(e,t){const n=Object.assign({},e);return Object.keys(t).forEach(r=>{e[r]?n[r]=Object.assign(Object.assign({},e[r]),t[r]):n[r]=t[r]}),n}const Rt={resources:{},entities:{}};function Ft(e=Rt,t){switch(t.type){case et.API_REQUEST:return function(e,t){const n=e.resources[t.request.key];return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:tt.Fetching,response:n?n.response:null,entityIds:n?n.entityIds:null}})}}(e,t);case et.API_REPONSE:return function(e,t){var n;const r=t.entities?Object.keys(t.entities):[];return{entities:Dt(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:tt.Success,response:t.result,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status,entityIds:r}})}}(e,t);case et.API_ERROR:return function(e,t){var n;return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:{request:t.request,status:tt.Error,errorResponse:t.errorResponse,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status}})}}(e,t);case et.INVALIDATE:return function(e,t){var n;const r=kt.getMatchingKeyMap(e,t.keys,null===(n=t.request)||void 0===n?void 0:n.key);return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),Object.keys(e.resources).filter(e=>r[e]).reduce((t,n)=>{const r=e.resources[n];return t[n]=Object.assign({},r,{status:tt.None}),t},{}))}}(e,t);case et.UPDATE:return function(e=Rt,t){const n=t.entities?Object.keys(t.entities):[];return{entities:Dt(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),{[t.request.key]:Object.assign(Object.assign({},e.resources[t.request.key]),{request:t.request,response:t.result,entityIds:n})})}}(e,t)}return e}const Mt={first:e=>m.first(e),firstFew:(e,t)=>m.first(e,t),last:e=>m.last(e),lastFew:(e,t)=>m.last(e,t),max:(e,t)=>m.max(e,t),cloneAndReplaceAtIdx(e,t,n,r=null){let i=e&&e.length?e.slice():[];return t+1>i.length&&(i=[...i,...Array(t+1-i.length).fill(r)]),i.splice(t,1,n),i},moveItem(e,t,n){const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r},isEmpty:e=>e&&!e.length,findIndex:(e,t)=>m.findIndex(e,t),where:(e,t)=>m.where(e,t),groupBy:(e,t)=>m.groupBy(e,t),flatten:(e,t)=>m.flatten(e,t),intersection:(...e)=>m.intersection(...e),addOrRemove(e,t){const n=e.indexOf(t);return-1===n?e.push(t):e.splice(n,1),e},addOrRemoveImmutable(e,t){const n=e.indexOf(t),r=pt.deepClone(e);return-1===n?[...r,t]:[...r.slice(0,n),...r.slice(n+1)]},sortBy:(e,t)=>m.sortBy(e,t),chunk:(e,t)=>m.chunk(e,t),uniq:e=>m.uniq(e)},Ut="id";function Vt(e,t){return localStorage.setItem(e,JSON.stringify(t)),t}function Bt(e){const t=localStorage.getItem(e);return t?JSON.parse(t):null}const zt={getAll(e,t){let n=Bt(e);return n&&n.length?n:!n&&t?(t.forEach(t=>zt.create(e,t)),Bt(e)):[]},get(e,t){const n=zt.getAll(e);return n.length?n.find(e=>e[Ut]===t):null},create(e,t){const n=zt.getAll(e),r=Object.assign(Object.assign({},t),{[Ut]:t[Ut]||(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)+1).toString()});return n.push(r),Vt(e,n),r},update(e,t){const n=zt.getAll(e);if(!n.length)return t;const r=n.findIndex(e=>e[Ut]===t[Ut]);return n[r]=t,Vt(e,n),t},delete(e,t){const n=zt.getAll(e);n.length&&(Array.isArray(t)||(t=[t]),t.forEach(e=>{const t=n.findIndex(t=>t[Ut]===e);n.splice(t,1)}),Vt(e,n))},assoc(e,t,n,r,i){const a=Array.isArray(i);let o=a?i:[i];"string"==typeof Mt.first(o)&&(o=zt.getAll(r).filter(e=>o.includes(e.id)));const s=o.map(e=>e.id?e:zt.create(r,e));let c=zt.getAll(e);if(!c.length)return;let l=c.find(e=>e.id===t);return l?(s.forEach(e=>{if(l[n])if(Array.isArray(l[n])){if(l[n].find(t=>t.id===e.id))return;l[n].push(e)}else l[n]=e;else l[n]=a?[e]:e}),c=c.map(e=>e.id!==l.id?e:l),Vt(e,c),a?s:Mt.first(s)):void 0},dissoc(e,t,n,r){let i=zt.getAll(e);if(!i.length)return;let a=i.find(e=>e.id===t);if(!a)return;let o=a[n];return o?(Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]),r.forEach(e=>{const t=o.findIndex(t=>t.id===e);o.splice(t,1)}),a[n]=o,i=i.map(e=>e.id!==a.id?e:a),Vt(e,i),i):void 0}};var Ht=function(e){var t="/api/master/v2/companies";return e?"".concat(t,"?cursor=").concat(e):t},qt=function(e){return"/api/master/v2/objects/".concat(e)},Jt=function(){return"/api/master/v2/companies"},$t=function(e){return"/api/master/v2/objects/".concat(e)},Kt="companies",Yt="company",Gt="update:company",Wt=function(e){return{key:"".concat(Kt).concat(e?":".concat(e):""),url:Ht(e)}},Zt=function(e){return{key:"".concat(Yt,":").concat(e),url:qt(e)}},Qt=function(e,t,n){return{key:Yt,url:Jt(),data:e,type:nt.POST,success:t,error:n,invalidationKeys:[Kt]}},Xt=function(e,t,n){return{key:"".concat(Gt,":").concat(e),url:$t(e),data:t,type:nt.PUT,always:n}},en=n(12),tn=n.n(en),nn=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===rn}(e)}(e)};var rn="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function an(e,t){return!1!==t.clone&&t.isMergeableObject(e)?sn((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function on(e,t,n){return e.concat(t).map((function(e){return an(e,n)}))}function sn(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||on,n.isMergeableObject=n.isMergeableObject||nn;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=an(e[t],n)})),Object.keys(t).forEach((function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=sn(e[i],t[i],n):r[i]=an(t[i],n)})),r}(e,t,n):an(t,n)}sn.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return sn(e,n,t)}),{})};var cn=sn,ln=n(6),un=ln.a.Symbol,pn=Object.prototype,fn=pn.hasOwnProperty,dn=pn.toString,mn=un?un.toStringTag:void 0;var hn=function(e){var t=fn.call(e,mn),n=e[mn];try{e[mn]=void 0;var r=!0}catch(e){}var i=dn.call(e);return r&&(t?e[mn]=n:delete e[mn]),i},gn=Object.prototype.toString;var yn=function(e){return gn.call(e)},vn=un?un.toStringTag:void 0;var bn=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":vn&&vn in Object(e)?hn(e):yn(e)};var Sn=function(e,t){return function(n){return e(t(n))}},En=Sn(Object.getPrototypeOf,Object);var Cn=function(e){return null!=e&&"object"==typeof e},On=Function.prototype,In=Object.prototype,jn=On.toString,An=In.hasOwnProperty,Tn=jn.call(Object);var wn=function(e){if(!Cn(e)||"[object Object]"!=bn(e))return!1;var t=En(e);if(null===t)return!0;var n=An.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&jn.call(n)==Tn};var Ln=function(){this.__data__=[],this.size=0};var kn=function(e,t){return e===t||e!=e&&t!=t};var _n=function(e,t){for(var n=e.length;n--;)if(kn(e[n][0],t))return n;return-1},xn=Array.prototype.splice;var Pn=function(e){var t=this.__data__,n=_n(t,e);return!(n<0)&&(n==t.length-1?t.pop():xn.call(t,n,1),--this.size,!0)};var Nn=function(e){var t=this.__data__,n=_n(t,e);return n<0?void 0:t[n][1]};var Dn=function(e){return _n(this.__data__,e)>-1};var Rn=function(e,t){var n=this.__data__,r=_n(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Fn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Fn.prototype.clear=Ln,Fn.prototype.delete=Pn,Fn.prototype.get=Nn,Fn.prototype.has=Dn,Fn.prototype.set=Rn;var Mn=Fn;var Un=function(){this.__data__=new Mn,this.size=0};var Vn=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Bn=function(e){return this.__data__.get(e)};var zn=function(e){return this.__data__.has(e)};var Hn=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var qn,Jn=function(e){if(!Hn(e))return!1;var t=bn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},$n=ln.a["__core-js_shared__"],Kn=(qn=/[^.]+$/.exec($n&&$n.keys&&$n.keys.IE_PROTO||""))?"Symbol(src)_1."+qn:"";var Yn=function(e){return!!Kn&&Kn in e},Gn=Function.prototype.toString;var Wn=function(e){if(null!=e){try{return Gn.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Zn=/^\[object .+?Constructor\]$/,Qn=Function.prototype,Xn=Object.prototype,er=Qn.toString,tr=Xn.hasOwnProperty,nr=RegExp("^"+er.call(tr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var rr=function(e){return!(!Hn(e)||Yn(e))&&(Jn(e)?nr:Zn).test(Wn(e))};var ir=function(e,t){return null==e?void 0:e[t]};var ar=function(e,t){var n=ir(e,t);return rr(n)?n:void 0},or=ar(ln.a,"Map"),sr=ar(Object,"create");var cr=function(){this.__data__=sr?sr(null):{},this.size=0};var lr=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ur=Object.prototype.hasOwnProperty;var pr=function(e){var t=this.__data__;if(sr){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ur.call(t,e)?t[e]:void 0},fr=Object.prototype.hasOwnProperty;var dr=function(e){var t=this.__data__;return sr?void 0!==t[e]:fr.call(t,e)};var mr=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=sr&&void 0===t?"__lodash_hash_undefined__":t,this};function hr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}hr.prototype.clear=cr,hr.prototype.delete=lr,hr.prototype.get=pr,hr.prototype.has=dr,hr.prototype.set=mr;var gr=hr;var yr=function(){this.size=0,this.__data__={hash:new gr,map:new(or||Mn),string:new gr}};var vr=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var br=function(e,t){var n=e.__data__;return vr(t)?n["string"==typeof t?"string":"hash"]:n.map};var Sr=function(e){var t=br(this,e).delete(e);return this.size-=t?1:0,t};var Er=function(e){return br(this,e).get(e)};var Cr=function(e){return br(this,e).has(e)};var Or=function(e,t){var n=br(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Ir(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ir.prototype.clear=yr,Ir.prototype.delete=Sr,Ir.prototype.get=Er,Ir.prototype.has=Cr,Ir.prototype.set=Or;var jr=Ir;var Ar=function(e,t){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!or||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new jr(r)}return n.set(e,t),this.size=n.size,this};function Tr(e){var t=this.__data__=new Mn(e);this.size=t.size}Tr.prototype.clear=Un,Tr.prototype.delete=Vn,Tr.prototype.get=Bn,Tr.prototype.has=zn,Tr.prototype.set=Ar;var wr=Tr;var Lr=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},kr=function(){try{var e=ar(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var _r=function(e,t,n){"__proto__"==t&&kr?kr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},xr=Object.prototype.hasOwnProperty;var Pr=function(e,t,n){var r=e[t];xr.call(e,t)&&kn(r,n)&&(void 0!==n||t in e)||_r(e,t,n)};var Nr=function(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;void 0===c&&(c=e[s]),i?_r(n,s,c):Pr(n,s,c)}return n};var Dr=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Rr=function(e){return Cn(e)&&"[object Arguments]"==bn(e)},Fr=Object.prototype,Mr=Fr.hasOwnProperty,Ur=Fr.propertyIsEnumerable,Vr=Rr(function(){return arguments}())?Rr:function(e){return Cn(e)&&Mr.call(e,"callee")&&!Ur.call(e,"callee")},Br=Array.isArray,zr=n(20),Hr=/^(?:0|[1-9]\d*)$/;var qr=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Hr.test(e))&&e>-1&&e%1==0&&e<t};var Jr=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},$r={};$r["[object Float32Array]"]=$r["[object Float64Array]"]=$r["[object Int8Array]"]=$r["[object Int16Array]"]=$r["[object Int32Array]"]=$r["[object Uint8Array]"]=$r["[object Uint8ClampedArray]"]=$r["[object Uint16Array]"]=$r["[object Uint32Array]"]=!0,$r["[object Arguments]"]=$r["[object Array]"]=$r["[object ArrayBuffer]"]=$r["[object Boolean]"]=$r["[object DataView]"]=$r["[object Date]"]=$r["[object Error]"]=$r["[object Function]"]=$r["[object Map]"]=$r["[object Number]"]=$r["[object Object]"]=$r["[object RegExp]"]=$r["[object Set]"]=$r["[object String]"]=$r["[object WeakMap]"]=!1;var Kr=function(e){return Cn(e)&&Jr(e.length)&&!!$r[bn(e)]};var Yr=function(e){return function(t){return e(t)}},Gr=n(10),Wr=Gr.a&&Gr.a.isTypedArray,Zr=Wr?Yr(Wr):Kr,Qr=Object.prototype.hasOwnProperty;var Xr=function(e,t){var n=Br(e),r=!n&&Vr(e),i=!n&&!r&&Object(zr.a)(e),a=!n&&!r&&!i&&Zr(e),o=n||r||i||a,s=o?Dr(e.length,String):[],c=s.length;for(var l in e)!t&&!Qr.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||qr(l,c))||s.push(l);return s},ei=Object.prototype;var ti=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ei)},ni=Sn(Object.keys,Object),ri=Object.prototype.hasOwnProperty;var ii=function(e){if(!ti(e))return ni(e);var t=[];for(var n in Object(e))ri.call(e,n)&&"constructor"!=n&&t.push(n);return t};var ai=function(e){return null!=e&&Jr(e.length)&&!Jn(e)};var oi=function(e){return ai(e)?Xr(e):ii(e)};var si=function(e,t){return e&&Nr(t,oi(t),e)};var ci=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},li=Object.prototype.hasOwnProperty;var ui=function(e){if(!Hn(e))return ci(e);var t=ti(e),n=[];for(var r in e)("constructor"!=r||!t&&li.call(e,r))&&n.push(r);return n};var pi=function(e){return ai(e)?Xr(e,!0):ui(e)};var fi=function(e,t){return e&&Nr(t,pi(t),e)},di=n(123);var mi=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var hi=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a};var gi=function(){return[]},yi=Object.prototype.propertyIsEnumerable,vi=Object.getOwnPropertySymbols,bi=vi?function(e){return null==e?[]:(e=Object(e),hi(vi(e),(function(t){return yi.call(e,t)})))}:gi;var Si=function(e,t){return Nr(e,bi(e),t)};var Ei=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Ci=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Ei(t,bi(e)),e=En(e);return t}:gi;var Oi=function(e,t){return Nr(e,Ci(e),t)};var Ii=function(e,t,n){var r=t(e);return Br(e)?r:Ei(r,n(e))};var ji=function(e){return Ii(e,oi,bi)};var Ai=function(e){return Ii(e,pi,Ci)},Ti=ar(ln.a,"DataView"),wi=ar(ln.a,"Promise"),Li=ar(ln.a,"Set"),ki=ar(ln.a,"WeakMap"),_i=Wn(Ti),xi=Wn(or),Pi=Wn(wi),Ni=Wn(Li),Di=Wn(ki),Ri=bn;(Ti&&"[object DataView]"!=Ri(new Ti(new ArrayBuffer(1)))||or&&"[object Map]"!=Ri(new or)||wi&&"[object Promise]"!=Ri(wi.resolve())||Li&&"[object Set]"!=Ri(new Li)||ki&&"[object WeakMap]"!=Ri(new ki))&&(Ri=function(e){var t=bn(e),n="[object Object]"==t?e.constructor:void 0,r=n?Wn(n):"";if(r)switch(r){case _i:return"[object DataView]";case xi:return"[object Map]";case Pi:return"[object Promise]";case Ni:return"[object Set]";case Di:return"[object WeakMap]"}return t});var Fi=Ri,Mi=Object.prototype.hasOwnProperty;var Ui=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Mi.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Vi=ln.a.Uint8Array;var Bi=function(e){var t=new e.constructor(e.byteLength);return new Vi(t).set(new Vi(e)),t};var zi=function(e,t){var n=t?Bi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},Hi=/\w*$/;var qi=function(e){var t=new e.constructor(e.source,Hi.exec(e));return t.lastIndex=e.lastIndex,t},Ji=un?un.prototype:void 0,$i=Ji?Ji.valueOf:void 0;var Ki=function(e){return $i?Object($i.call(e)):{}};var Yi=function(e,t){var n=t?Bi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Gi=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Bi(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return zi(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Yi(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return qi(e);case"[object Set]":return new r;case"[object Symbol]":return Ki(e)}},Wi=Object.create,Zi=function(){function e(){}return function(t){if(!Hn(t))return{};if(Wi)return Wi(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Qi=function(e){return"function"!=typeof e.constructor||ti(e)?{}:Zi(En(e))};var Xi=function(e){return Cn(e)&&"[object Map]"==Fi(e)},ea=Gr.a&&Gr.a.isMap,ta=ea?Yr(ea):Xi;var na=function(e){return Cn(e)&&"[object Set]"==Fi(e)},ra=Gr.a&&Gr.a.isSet,ia=ra?Yr(ra):na,aa={};aa["[object Arguments]"]=aa["[object Array]"]=aa["[object ArrayBuffer]"]=aa["[object DataView]"]=aa["[object Boolean]"]=aa["[object Date]"]=aa["[object Float32Array]"]=aa["[object Float64Array]"]=aa["[object Int8Array]"]=aa["[object Int16Array]"]=aa["[object Int32Array]"]=aa["[object Map]"]=aa["[object Number]"]=aa["[object Object]"]=aa["[object RegExp]"]=aa["[object Set]"]=aa["[object String]"]=aa["[object Symbol]"]=aa["[object Uint8Array]"]=aa["[object Uint8ClampedArray]"]=aa["[object Uint16Array]"]=aa["[object Uint32Array]"]=!0,aa["[object Error]"]=aa["[object Function]"]=aa["[object WeakMap]"]=!1;var oa=function e(t,n,r,i,a,o){var s,c=1&n,l=2&n,u=4&n;if(r&&(s=a?r(t,i,a,o):r(t)),void 0!==s)return s;if(!Hn(t))return t;var p=Br(t);if(p){if(s=Ui(t),!c)return mi(t,s)}else{var f=Fi(t),d="[object Function]"==f||"[object GeneratorFunction]"==f;if(Object(zr.a)(t))return Object(di.a)(t,c);if("[object Object]"==f||"[object Arguments]"==f||d&&!a){if(s=l||d?{}:Qi(t),!c)return l?Oi(t,fi(s,t)):Si(t,si(s,t))}else{if(!aa[f])return a?t:{};s=Gi(t,f,c)}}o||(o=new wr);var m=o.get(t);if(m)return m;o.set(t,s),ia(t)?t.forEach((function(i){s.add(e(i,n,r,i,t,o))})):ta(t)&&t.forEach((function(i,a){s.set(a,e(i,n,r,a,t,o))}));var h=u?l?Ai:ji:l?keysIn:oi,g=p?void 0:h(t);return Lr(g||t,(function(i,a){g&&(i=t[a=i]),Pr(s,a,e(i,n,r,a,t,o))})),s};var sa=function(e){return oa(e,4)};var ca=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var la=function(e){return"symbol"==typeof e||Cn(e)&&"[object Symbol]"==bn(e)};function ua(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(ua.Cache||jr),n}ua.Cache=jr;var pa=ua;var fa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,da=/\\(\\)?/g,ma=function(e){var t=pa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(fa,(function(e,n,r,i){t.push(r?i.replace(da,"$1"):n||e)})),t}));var ha=function(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},ga=un?un.prototype:void 0,ya=ga?ga.toString:void 0;var va=function e(t){if("string"==typeof t)return t;if(Br(t))return ca(t,e)+"";if(la(t))return ya?ya.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var ba=function(e){return null==e?"":va(e)};var Sa=function(e){return Br(e)?ca(e,ha):la(e)?[e]:mi(ma(ba(e)))};var Ea=function(e,t){},Ca=n(29),Oa=n(30),Ia=n.n(Oa);var ja=function(e){return oa(e,5)};function Aa(){return(Aa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ta(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function wa(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function La(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var ka=function(e){return"function"==typeof e},_a=function(e){return null!==e&&"object"==typeof e},xa=function(e){return String(Math.floor(Number(e)))===e},Pa=function(e){return"[object String]"===Object.prototype.toString.call(e)},Na=function(e){return 0===d.Children.count(e)},Da=function(e){return _a(e)&&ka(e.then)};function Ra(e,t,n,r){void 0===r&&(r=0);for(var i=Sa(t);e&&r<i.length;)e=e[i[r++]];return void 0===e?n:e}function Fa(e,t,n){for(var r=sa(e),i=r,a=0,o=Sa(t);a<o.length-1;a++){var s=o[a],c=Ra(e,o.slice(0,a+1));if(c&&(_a(c)||Array.isArray(c)))i=i[s]=sa(c);else{var l=o[a+1];i=i[s]=xa(l)&&Number(l)>=0?[]:{}}}return(0===a?e:i)[o[a]]===n?e:(void 0===n?delete i[o[a]]:i[o[a]]=n,0===a&&void 0===n&&delete r[o[a]],r)}function Ma(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,a=Object.keys(e);i<a.length;i++){var o=a[i],s=e[o];_a(s)?n.get(s)||(n.set(s,!0),r[o]=Array.isArray(s)?[]:{},Ma(s,t,n,r[o])):r[o]=t}return r}var Ua=Object(d.createContext)(void 0),Va=Ua.Provider,Ba=Ua.Consumer;function za(){var e=Object(d.useContext)(Ua);return e||Ea(!1),e}function Ha(e,t){switch(t.type){case"SET_VALUES":return Aa({},e,{values:t.payload});case"SET_TOUCHED":return Aa({},e,{touched:t.payload});case"SET_ERRORS":return Aa({},e,{errors:t.payload});case"SET_STATUS":return Aa({},e,{status:t.payload});case"SET_ISSUBMITTING":return Aa({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Aa({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Aa({},e,{values:Fa(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Aa({},e,{touched:Fa(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Aa({},e,{errors:Fa(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Aa({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Aa({},e,{touched:Ma(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return Aa({},e,{isSubmitting:!1});default:return e}}var qa={},Ja={};function $a(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,a=e.validateOnMount,o=void 0!==a&&a,s=e.isInitialValid,c=e.enableReinitialize,l=void 0!==c&&c,u=e.onSubmit,p=wa(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),f=Aa({validateOnChange:n,validateOnBlur:i,validateOnMount:o,onSubmit:u},p),m=Object(d.useRef)(f.initialValues),h=Object(d.useRef)(f.initialErrors||qa),g=Object(d.useRef)(f.initialTouched||Ja),y=Object(d.useRef)(f.initialStatus),v=Object(d.useRef)(!1),b=Object(d.useRef)({});Object(d.useEffect)((function(){0}),[]),Object(d.useEffect)((function(){return v.current=!0,function(){v.current=!1}}),[]);var S=Object(d.useReducer)(Ha,{values:f.initialValues,errors:f.initialErrors||qa,touched:f.initialTouched||Ja,status:f.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),E=S[0],C=S[1],O=Object(d.useCallback)((function(e,t){return new Promise((function(n,r){var i=f.validate(e,t);null==i?n(qa):Da(i)?i.then((function(e){n(e||qa)}),(function(e){r(e)})):n(i)}))}),[f.validate]),I=Object(d.useCallback)((function(e,t){var n=f.validationSchema,r=ka(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1);void 0===r&&(r={});var i=function e(t){var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=String(r);!0===Array.isArray(t[i])?n[i]=t[i].map((function(t){return!0===Array.isArray(t)||wn(t)?e(t):""!==t?t:void 0})):wn(t[i])?n[i]=e(t[i]):n[i]=""!==t[i]?t[i]:void 0}return n}(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){i.then((function(){e(qa)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return Fa(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var a;if(r){if(i>=n.length)break;a=n[i++]}else{if((i=n.next()).done)break;a=i.value}var o=a;Ra(t,o.path)||(t=Fa(t,o.path,o.message))}}return t}(n)):t(n)}))}))}),[f.validationSchema]),j=Object(d.useCallback)((function(e,t){return new Promise((function(n){return n(b.current[e].validate(t))}))}),[]),A=Object(d.useCallback)((function(e){var t=Object.keys(b.current).filter((function(e){return ka(b.current[e].validate)})),n=t.length>0?t.map((function(t){return j(t,Ra(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Fa(e,t[r],n)),e}),{})}))}),[j]),T=Object(d.useCallback)((function(e){return Promise.all([A(e),f.validationSchema?I(e):{},f.validate?O(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return cn.all([t,n,r],{arrayMerge:Ya})}))}),[f.validate,f.validationSchema,A,O,I]),w=Wa((function(e){return void 0===e&&(e=E.values),Object(Ca.unstable_runWithPriority)(Ca.LowPriority,(function(){return T(e).then((function(e){return v.current&&C({type:"SET_ERRORS",payload:e}),e}))}))})),L=Wa((function(e){return void 0===e&&(e=E.values),C({type:"SET_ISVALIDATING",payload:!0}),T(e).then((function(e){return v.current&&(C({type:"SET_ISVALIDATING",payload:!1}),tn()(E.errors,e)||C({type:"SET_ERRORS",payload:e})),e}))}));Object(d.useEffect)((function(){o&&!0===v.current&&w(f.initialValues)}),[f.initialValues,o,w]);var k=Object(d.useCallback)((function(e){var t=e&&e.values?e.values:m.current,n=e&&e.errors?e.errors:h.current?h.current:f.initialErrors||{},r=e&&e.touched?e.touched:g.current?g.current:f.initialTouched||{},i=e&&e.status?e.status:y.current?y.current:f.initialStatus;m.current=t,h.current=n,g.current=r,y.current=i,C({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})}),[f.initialErrors,f.initialStatus,f.initialTouched]);Object(d.useEffect)((function(){l&&!0===v.current&&!tn()(m.current,f.initialValues)&&(m.current=f.initialValues,k())}),[l,f.initialValues,k]),Object(d.useEffect)((function(){l&&!0===v.current&&!tn()(h.current,f.initialErrors)&&(h.current=f.initialErrors||qa,C({type:"SET_ERRORS",payload:f.initialErrors||qa}))}),[l,f.initialErrors]),Object(d.useEffect)((function(){l&&!0===v.current&&!tn()(g.current,f.initialTouched)&&(g.current=f.initialTouched||Ja,C({type:"SET_TOUCHED",payload:f.initialTouched||Ja}))}),[l,f.initialTouched]),Object(d.useEffect)((function(){l&&!0===v.current&&!tn()(y.current,f.initialStatus)&&(y.current=f.initialStatus,C({type:"SET_STATUS",payload:f.initialStatus}))}),[l,f.initialStatus,f.initialTouched]);var _=Wa((function(e){if(ka(b.current[e].validate)){var t=Ra(E.values,e),n=b.current[e].validate(t);return Da(n)?(C({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),C({type:"SET_ISVALIDATING",payload:!1})}))):(C({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return Promise.resolve()})),x=Object(d.useCallback)((function(e,t){var n=t.validate;b.current[e]={validate:n}}),[]),P=Object(d.useCallback)((function(e){delete b.current[e]}),[]),N=Wa((function(e){return C({type:"SET_TOUCHED",payload:e}),i?w(E.values):Promise.resolve()})),D=Object(d.useCallback)((function(e){C({type:"SET_ERRORS",payload:e})}),[]),R=Wa((function(e){return C({type:"SET_VALUES",payload:e}),n?w(e):Promise.resolve()})),F=Object(d.useCallback)((function(e,t){C({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),M=Wa((function(e,t,r){return void 0===r&&(r=!0),C({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),n&&r?w(Fa(E.values,e,t)):Promise.resolve()})),U=Object(d.useCallback)((function(e,t){var n,r=t,i=e;if(!Pa(e)){e.persist&&e.persist();var a=e.target,o=a.type,s=a.name,c=a.id,l=a.value,u=a.checked,p=(a.outerHTML,a.options),f=a.multiple;r=t||(s||c),i=/number|range/.test(o)?(n=parseFloat(l),isNaN(n)?"":n):/checkbox/.test(o)?function(e,t,n){if("true"==n||"false"==n)return!!t;if(t&&n)return Array.isArray(e)?e.concat(n):[n];if(!Array.isArray(e))return!e;var r=e.indexOf(n);if(r<0)return e;return e.slice(0,r).concat(e.slice(r+1))}(Ra(E.values,r),u,l):f?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(p):l}r&&M(r,i)}),[M,E.values]),V=Object(d.useCallback)((function(e){if(Pa(e))return function(t){return U(t,e)};U(e)}),[U]),B=Wa((function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),C({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),i&&n?w(E.values):Promise.resolve()})),z=Object(d.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,a=(n.outerHTML,t||(r||i));B(a,!0)}),[B]),H=Object(d.useCallback)((function(e){if(Pa(e))return function(t){return z(t,e)};z(e)}),[z]),q=Object(d.useCallback)((function(e){ka(e)?C({type:"SET_FORMIK_STATE",payload:e}):C({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),J=Object(d.useCallback)((function(e){C({type:"SET_STATUS",payload:e})}),[]),$=Object(d.useCallback)((function(e){C({type:"SET_ISSUBMITTING",payload:e})}),[]),K={resetForm:k,validateForm:L,validateField:_,setErrors:D,setFieldError:F,setFieldTouched:B,setFieldValue:M,setStatus:J,setSubmitting:$,setTouched:N,setValues:R,setFormikState:q},Y=Wa((function(){return u(E.values,K)})),G=Wa((function(){return C({type:"SUBMIT_ATTEMPT"}),L().then((function(e){if(0===Object.keys(e).length){var t=Y();if(void 0===t)return;return Promise.resolve(t).then((function(){v.current&&C({type:"SUBMIT_SUCCESS"})})).catch((function(e){if(v.current)throw C({type:"SUBMIT_FAILURE"}),e}))}v.current&&C({type:"SUBMIT_FAILURE"})}))})),W=Wa((function(e){e&&e.preventDefault&&ka(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&ka(e.stopPropagation)&&e.stopPropagation(),G()})),Z=Wa((function(e){if(e&&e.preventDefault&&ka(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&ka(e.stopPropagation)&&e.stopPropagation(),f.onReset){var t=f.onReset(E.values,K);Da(t)?t.then(k):k()}else k()})),Q=Object(d.useCallback)((function(e){return{value:Ra(E.values,e),error:Ra(E.errors,e),touched:!!Ra(E.touched,e),initialValue:Ra(m.current,e),initialTouched:!!Ra(g.current,e),initialError:Ra(h.current,e)}}),[E.errors,E.touched,E.values]),X=Object(d.useCallback)((function(e){var t=_a(e),n=t?e.name:e,r=Ra(E.values,n),i={name:n,value:r,onChange:V,onBlur:H};if(t){var a=e.type,o=e.value,s=e.as,c=e.multiple;"checkbox"===a?void 0===o?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(o)),i.value=o):"radio"===a?(i.checked=r===o,i.value=o):"select"===s&&c&&(i.value=i.value||[],i.multiple=!0)}return i}),[H,V,E.values]),ee=Object(d.useMemo)((function(){return!tn()(m.current,E.values)}),[E.values]),te=Object(d.useMemo)((function(){return void 0!==s?ee?E.errors&&0===Object.keys(E.errors).length:!1!==s&&ka(s)?s(f):s:E.errors&&0===Object.keys(E.errors).length}),[s,ee,E.errors,f]);return Aa({},E,{initialValues:m.current,initialErrors:h.current,initialTouched:g.current,initialStatus:y.current,handleBlur:H,handleChange:V,handleReset:Z,handleSubmit:W,resetForm:k,setErrors:D,setFormikState:q,setFieldTouched:B,setFieldValue:M,setFieldError:F,setStatus:J,setSubmitting:$,setTouched:N,setValues:R,submitForm:G,validateForm:L,validateField:_,isValid:te,dirty:ee,unregisterField:P,registerField:x,getFieldProps:X,getFieldMeta:Q,validateOnBlur:i,validateOnChange:n,validateOnMount:o})}function Ka(e){var t=$a(e),n=e.component,r=e.children,i=e.render;return Object(d.useEffect)((function(){0}),[]),Object(d.createElement)(Va,{value:t},n?Object(d.createElement)(n,t):i?i(t):r?ka(r)?r(t):Na(r)?null:d.Children.only(r):null)}function Ya(e,t,n){var r=e.slice();return t.forEach((function(t,i){if(void 0===r[i]){var a=!1!==n.clone&&n.isMergeableObject(t);r[i]=a?cn(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=cn(e[i],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var Ga="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d.useLayoutEffect:d.useEffect;function Wa(e){var t=Object(d.useRef)(e);return Ga((function(){t.current=e})),Object(d.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)}),[])}function Za(e){var t=e.validate,n=e.name,r=e.render,i=e.children,a=e.as,o=e.component,s=wa(e,["validate","name","render","children","as","component"]),c=za(),l=(c.validate,c.validationSchema,wa(c,["validate","validationSchema"]));Object(d.useEffect)((function(){0}),[]);var u=l.registerField,p=l.unregisterField;Object(d.useEffect)((function(){return u(n,{validate:t}),function(){p(n)}}),[u,p,n,t]);var f=l.getFieldProps(Aa({name:n},s)),m=l.getFieldMeta(n),h={field:f,form:l};if(r)return r(Aa({},h,{meta:m}));if(ka(i))return i(Aa({},h,{meta:m}));if(o){if("string"==typeof o){var g=s.innerRef,y=wa(s,["innerRef"]);return Object(d.createElement)(o,Aa({ref:g},f,y),i)}return Object(d.createElement)(o,Aa({field:f,form:l},s),i)}var v=a||"input";if("string"==typeof v){var b=s.innerRef,S=wa(s,["innerRef"]);return Object(d.createElement)(v,Aa({ref:b},f,S),i)}return Object(d.createElement)(v,Aa({},f,s),i)}var Qa=Object(d.forwardRef)((function(e,t){var n=e.action,r=wa(e,["action"]),i=n||"#",a=za(),o=a.handleReset,s=a.handleSubmit;return Object(d.createElement)("form",Object.assign({onSubmit:s,ref:t,onReset:o,action:i},r))}));function Xa(e){var t=function(t){return Object(d.createElement)(Ba,null,(function(n){return n||Ea(!1),Object(d.createElement)(e,Object.assign({},t,{formik:n}))}))},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+n+")",Ia()(t,e)}Qa.displayName="Form";var eo=function(e,t,n){var r=to(e);return r.splice(t,0,n),r},to=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(Aa({},e,{length:t+1}))}return[]},no=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,a=i.name,o=i.validateOnChange,s=i.formik,c=s.setFormikState,l=s.validateForm;c((function(n){var i="function"==typeof r?r:e,o="function"==typeof t?t:e;return Aa({},n,{values:Fa(n.values,a,e(Ra(n.values,a))),errors:r?Fa(n.errors,a,i(Ra(n.errors,a))):n.errors,touched:t?Fa(n.touched,a,o(Ra(n.touched,a))):n.touched})}),(function(){o&&l()}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(to(t),[ja(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=to(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=to(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return eo(n,e,t)}),(function(t){return eo(t,e,null)}),(function(t){return eo(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=to(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(La(n)),n.pop=n.pop.bind(La(n)),n}Ta(t,e);var n=t.prototype;return n.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?to(n):[];return t||(t=r[e]),ka(r.splice)&&r.splice(e,1),r}),!0,!0),t},n.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,a=t.name,o=t.formik,s=(o.validate,o.validationSchema,Aa({},e,{form:wa(o,["validate","validationSchema"]),name:a}));return n?Object(d.createElement)(n,s):r?r(s):i?"function"==typeof i?i(s):Na(i)?null:d.Children.only(i):null},t}(d.Component);no.defaultProps={validateOnChange:!0};var ro=Xa(function(e){function t(){return e.apply(this,arguments)||this}Ta(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return Ra(this.props.formik.errors,this.props.name)!==Ra(e.formik.errors,this.props.name)||Ra(this.props.formik.touched,this.props.name)!==Ra(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},n.render=function(){var e=this.props,t=e.component,n=e.formik,r=e.render,i=e.children,a=e.name,o=wa(e,["component","formik","render","children","name"]),s=Ra(n.touched,a),c=Ra(n.errors,a);return s&&c?r?ka(r)?r(c):null:i?ka(i)?i(c):null:t?Object(d.createElement)(t,o,c):c:null},t}(d.Component));(function(e){function t(t){var n;n=e.call(this,t)||this;var r=t.render,i=t.children,a=t.component,o=t.as;t.name;return r&&Ea(!1),a&&r&&Ea(!1),o&&i&&ka(i)&&Ea(!1),a&&i&&ka(i)&&Ea(!1),r&&i&&!Na(i)&&Ea(!1),n}Ta(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e,t,n){return this.props.shouldUpdate?this.props.shouldUpdate(e,this.props):Ra(this.context.values,this.props.name)!==Ra(n.values,this.props.name)||Ra(this.context.errors,this.props.name)!==Ra(n.errors,this.props.name)||Ra(this.context.touched,this.props.name)!==Ra(n.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length||this.context.isSubmitting!==n.isSubmitting},n.componentDidMount=function(){this.context.registerField(this.props.name,{validate:this.props.validate})},n.componentDidUpdate=function(e){this.props.name!==e.name&&(this.context.unregisterField(e.name),this.context.registerField(this.props.name,{validate:this.props.validate})),this.props.validate!==e.validate&&this.context.registerField(this.props.name,{validate:this.props.validate})},n.componentWillUnmount=function(){this.context.unregisterField(this.props.name)},n.render=function(){var e=this.props,t=(e.validate,e.name),n=e.render,r=e.as,i=e.children,a=e.component,o=(e.shouldUpdate,wa(e,["validate","name","render","as","children","component","shouldUpdate"])),s=this.context,c=(s.validate,s.validationSchema,wa(s,["validate","validationSchema"])),l={value:"radio"===o.type||"checkbox"===o.type?o.value:Ra(s.values,t),name:t,onChange:s.handleChange,onBlur:s.handleBlur},u={field:l,meta:{value:Ra(s.values,t),error:Ra(s.errors,t),touched:!!Ra(s.touched,t),initialValue:Ra(s.initialValues,t),initialTouched:!!Ra(s.initialTouched,t),initialError:Ra(s.initialErrors,t)},form:c};if(n)return n(u);if(ka(i))return i(u);if(a){if("string"==typeof a){var p=o.innerRef,f=wa(o,["innerRef"]);return Object(d.createElement)(a,Aa({ref:p},l,f),i)}return Object(d.createElement)(a,Aa({field:l,form:s},o),i)}var m=r||"input";if("string"==typeof m){var h=o.innerRef,g=wa(o,["innerRef"]);return Object(d.createElement)(m,Aa({ref:h},l,g),i)}return Object(d.createElement)(m,Aa({},l,o),i)},t}(d.Component)).contextType=Ua;var io=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function ao(e){const{castInitialValues:t,castValuesOnSubmit:n,initialValues:r,onSubmit:i,resetOnSubmit:a}=e,o=io(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit","resetOnSubmit"]),s=t&&e.validationSchema?e.validationSchema.cast(function e(t){const n=pt.deepClone(t);return Object.keys(n).forEach(t=>{n.hasOwnProperty(t)&&(pt.isObject(n[t])?n[t]=e(n[t]):null===n[t]&&delete n[t])}),n}(r)):r,c={allowInitialSubmit:e.allowInitialSubmit};return d.createElement(Ka,Object.assign({enableReinitialize:!0},o,{initialValues:s,onSubmit:(t,{setSubmitting:r,resetForm:o})=>{const s=n&&e.validationSchema?e.validationSchema.cast(t):t;i(s,()=>{a&&o(),r(!1)})},initialStatus:c}),X.isFunction(e.children)?t=>e.children(t):d.Children.count(e.children)?e.children:null)}ao.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0};var oo=n(2),so=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),co=n(3);const lo={getCustomFormControlClassName(e,t,n,r){let i="form-control";return Ra(t,n)&&Ra(e,n)&&(i+=" is-invalid"),r&&(i+=" "+r),i}};function uo(e){const{values:t}=za(),n=t[e.fieldName];return"string"!=typeof n?d.createElement(d.Fragment,null):d.createElement("div",{className:"float-right text-muted"},n.length,"/",e.limit)}var po=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function fo(e){const{label:t}=e,n=po(e,["label"]);return d.createElement(co.Form.Group,null,d.createElement("div",{className:"custom-control custom-checkbox"},d.createElement(ho,Object.assign({className:"custom-control-input"},n)),d.createElement(co.Form.Label,{className:"custom-control-label",htmlFor:n.id},t)))}var mo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function ho(e){const{children:t}=e,n=mo(e,["children"]);return d.createElement(Za,Object.assign({},n),X.isFunction(t)?e=>t(e):d.Children.count(t)?t:null)}function go(e){const{label:t,className:n,showCharacterCounter:r}=e,i=mo(e,["label","className","showCharacterCounter"]),{errors:a,touched:o}=za();return"checkbox"===i.type?d.createElement(fo,Object.assign({},e)):d.createElement(co.Form.Group,null,!!t&&d.createElement(co.Form.Label,{htmlFor:i.id},t),d.createElement(ho,Object.assign({className:lo.getCustomFormControlClassName(a,o,i.name,n)},i)),!!r&&!!i.maxLength&&d.createElement(uo,{fieldName:i.name,limit:i.maxLength}),d.createElement(ro,{name:i.name},e=>d.createElement(co.Form.Control.Feedback,{type:"invalid"},e)))}function yo(e){var t;const[n,r]=d.useState(!1);return d.useEffect(()=>{var t;e.isValid&&(e.dirty||(null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit))?r(!0):r(!1)},[e.isValid,null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit,e.dirty,e.values]),d.useEffect(()=>{e.isSubmitting&&r(!1)},[e.isSubmitting]),n}var vo=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function bo(e){const{showSpinner:t,children:n}=e,r=vo(e,["showSpinner","children"]),i=d.useRef(),[a,o]=d.useState({});return d.useEffect(()=>{const{width:e,height:t}=a;if(e&&t)return;const n=i.current,r=n.offsetHeight,s=n.offsetWidth;r&&s&&o({width:s,height:r})}),d.useEffect(()=>{const{width:e,height:t}=a;if(!e||!t)return;const n=i.current;n.style.width=e+1+"px",n.style.height=t+1+"px"},[a]),d.createElement(co.Button,Object.assign({ref:i,disabled:t},r),t?d.createElement(co.Spinner,{as:"span",animation:"border",role:"status",size:"sm"}):n)}var So=n(124),Eo=n(21);const Co="AlertService",Oo="LanguageService";const Io=class extends G{static get Instance(){return this.instance||(this.instance=new this)}get name(){return Oo}setConfig(e){this.polyglot=new So({locale:e.locale,phrases:e.phrases.rootElement||e.phrases}),this.cache={}}getPhrase(e,t,n){const r=`${e}.${t}`;if(this.polyglot||x.throw(new B("LanguageService config must be set.")),!this.polyglot.has(r)){if(!w.isDevelopment){const e=window.trackJs;return e&&e.console.error(`No phrase set for ${r} in language config`),""}x.throw(new B(`No phrase set for ${r} in language config.`))}if(!n||m.isEmpty(n)){const e=this.cache[r];if(e)return e;const t=this.polyglot.t(r);return this.cache[r]=t,t}const i=m.omit(n,"smartCount");let a={};for(let e in i)a[e]=Eo.sanitize(i[e]);m.isNumber(n.smartCount)&&(a.smart_count=n.smartCount);const o=`${r}:${m.values(Object.assign({},a)).join(":")}`,s=this.cache[o];if(s)return s;const c=this.polyglot.t(r,a);return this.cache[o]=c,c}encloseNamespace(e){return(t,n)=>this.getPhrase(e,t,n)}}.Instance,jo=d.createContext(""),Ao=d.memo((function(e){const{phrase:t,namespace:n,options:r}=e,i=d.useContext(jo),a=n||i,o=Io.getPhrase(a,t,r);return d.createElement("span",{dangerouslySetInnerHTML:{__html:o}})}),(e,t)=>e.namespace===t.namespace&&e.phrase===t.phrase&&pt.isEqual(e.options,t.options));function To(e){const t=za(),n=yo(t);d.useEffect(()=>{function e(e){13===e.keyCode&&n&&t.validateForm().then(e=>{Object.keys(e).length||t.submitForm()})}return window.addEventListener("keypress",e),()=>window.removeEventListener("keypress",e)},[n]);let r="save";return e.isNew&&(r="create"),e.hasNext&&(r="next"),d.createElement(bo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},d.createElement(Ao,{namespace:"shared.formButtons",phrase:r}))}function wo(e){var t=za();return d.createElement(Qa,null,d.createElement(go,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this company",autoFocus:!0}),d.createElement(To,{isNew:e.isNew}))}function Lo(e){return d.createElement(ao,{initialValues:e.company,validationSchema:so,onSubmit:e.saveCompany},d.createElement(wo,{isNew:!(e.company&&e.company.id)}))}function ko(e){var t=Object(te.useDispatch)(),n=i.useBasicFetch(Zt(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(Lo,{company:n.data,saveCompany:function(n,r){return i.fetch(t,Xt(e.id,n,r))}}))}function _o(){var e=Object(te.useDispatch)();return d.createElement(Lo,{saveCompany:function(t,n){i.fetch(e,Qt(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.PEOPLE,action:o.Companies.EDIT_COMPANY,args:[e.id]})}),n))}})}var xo,Po=n(125);!function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)"}(xo||(xo={}));const No={isNumber:e=>No.isType(e,"number"),isString:e=>No.isType(e,"string"),isType:(e,t)=>typeof e===t};var Do,Ro=n(14),Fo=n.n(Ro);function Mo(e,t){return pt.isObject(e)&&e.hasOwnProperty(t)&&No.isString(e[t])}function Uo(e,t,n){return({value:r})=>{if(r.length||n(),!(r.length<e.activationLength)){if(e.local){const n=X.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(r,e.local):function(e,t,n){const r=e.trim().toLowerCase();return r.length?t.filter(e=>!(!Mo(e,n)||!No.isString(e[n]))&&e[n].trim().toLowerCase().includes(r)):[]}(r,e.local,e.valueKey);t(e=>Object.assign(Object.assign({},e),{[Do.Local]:n}))}e.getRemoteUrl&&function(e,t,n){const r=X.isFunction(e)&&e(t);r&&i.ajaxRequest({resource:r,type:nt.GET,success:n,error:()=>{}})}(e.getRemoteUrl,r,n=>t(t=>Object.assign(Object.assign({},t),{[Do.Remote]:X.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n})))}}}function Vo(e,t,n,r,i,a){const o=t=>e[t]||[],s=t?o(Do.Recent):[],c=o(Do.Local),l=o(Do.Remote);let u=[];s.length&&u.push({title:n,data:s});const p=[...c,...l];return Number.isInteger(a)&&u.length>a&&p.slice(0,a),X.isFunction(i)?u.push(...i(p)):u.push({title:r,data:p}),u}function Bo(e){return e.data}function zo(e){if(e.title)return d.createElement("strong",null,e.title)}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote"}(Do||(Do={}));const Ho={container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded "+Fo.a.suggestionsContainerOpen,suggestionsList:"list-unstyled m-0",suggestion:"cursor-pointer py-1 px-2",suggestionHighlighted:Fo.a.suggestionHighlighted,sectionContainer:"border-bottom py-1 "+Fo.a.sectionContainer};function qo(e={}){return Object.assign(Ho,e)}var Jo=n(15),$o=n(32),Ko=n.n($o),Yo=n(33),Go=n.n(Yo),Wo=n(34),Zo=n.n(Wo),Qo=n(35),Xo=n.n(Qo),es=(n(36),n(37),n(38)),ts=n.n(es),ns=n(39),rs=n.n(ns),is=n(40),as=n.n(is),os=n(41),ss=n.n(os),cs=n(42),ls=n.n(cs),us=n(43),ps=n.n(us),fs=n(44),ds=n.n(fs),ms=n(45),hs=n.n(ms),gs=n(46),ys=n.n(gs),vs=n(47),bs=n.n(vs),Ss=n(48),Es=n.n(Ss),Cs=n(49),Os=n.n(Cs),Is=n(50),js=n.n(Is),As=n(51),Ts=n.n(As),ws=n(52),Ls=n.n(ws),ks=n(53),_s=n.n(ks),xs=n(54),Ps=n.n(xs),Ns=n(55),Ds=n.n(Ns),Rs=n(56),Fs=n.n(Rs),Ms=n(57),Us=n.n(Ms),Vs=(n(58),n(59)),Bs=n.n(Vs),zs=n(60),Hs=n.n(zs),qs=n(61),Js=n.n(qs),$s=(n(62),n(63),n(64)),Ks=n.n($s),Ys=n(65),Gs=n.n(Ys),Ws=n(66),Zs=n.n(Ws),Qs=n(67),Xs=n.n(Qs),ec=n(68),tc=n.n(ec),nc=n(69),rc=n.n(nc),ic=(n(70),n(71)),ac=n.n(ic),oc=n(72),sc=n.n(oc),cc=n(73),lc=n.n(cc),uc=n(74),pc=n.n(uc),fc=n(75),dc=n.n(fc),mc=n(76),hc=n.n(mc),gc=n(77),yc=n.n(gc),vc=(n(78),n(79)),bc=n.n(vc),Sc=n(80),Ec=n.n(Sc),Cc=n(81),Oc=n.n(Cc),Ic=n(82),jc=n.n(Ic),Ac=n(83),Tc=n.n(Ac),wc=n(84),Lc=n.n(wc),kc=n(85),_c=n.n(kc),xc=n(86),Pc=n.n(xc),Nc=n(87),Dc=n.n(Nc),Rc=n(88),Fc=n.n(Rc),Mc=n(89),Uc=n.n(Mc),Vc=n(90),Bc=n.n(Vc),zc=n(91),Hc=n.n(zc),qc=(n(92),n(93),n(94),n(95)),Jc=n.n(qc),$c=(n(96),n(97),n(98),n(99),n(100)),Kc=n.n($c),Yc=n(101),Gc=n.n(Yc),Wc=(n(102),n(103),n(104),n(105)),Zc=n.n(Wc),Qc=n(106),Xc=n.n(Qc),el=n(107),tl=n.n(el),nl=n(108),rl=n.n(nl),il=n(109),al=n.n(il),ol=n(110),sl=n.n(ol),cl=n(111),ll=n.n(cl),ul=(n(112),n(113),n(114),n(115)),pl=n.n(ul),fl=n(116),dl=n.n(fl);const ml=[Ko.a,Zo.a,Xo.a,ts.a,ss.a,ls.a,ps.a,ds.a,as.a,Go.a,hs.a,ys.a,bs.a,Es.a,Os.a,rs.a,js.a,Ts.a,Ls.a,Us.a,_s.a,Ps.a,Ds.a,Fs.a,Bs.a,Zs.a,_c.a,Dc.a,Pc.a,Hc.a,Fc.a,Uc.a,Bc.a,pc.a,hc.a,dc.a,Hs.a,Js.a,sc.a,lc.a,ac.a,Ks.a,Xs.a,Ec.a,Oc.a,tc.a,rc.a,jc.a,Gs.a,bc.a,Tc.a,Lc.a,yc.a,Kc.a,Gc.a,Jc.a,tl.a,Xc.a,Zc.a,rl.a,sl.a,al.a,ll.a,dl.a,pl.a];var hl;!function(e){e.AddToPlaylists="add-to-playlist",e.Caret="caret",e.Delete="delete",e.Edit="edit",e.NoEdit="no-edit",e.Close="close",e.Folder="folder",e.Resources="resources",e.More="more",e.Bell="bell",e.Plus="plus",e.Search="search",e.Share="share",e.Upload="upload",e.Preview="preview",e.CircleCheck="circle-check",e.Down="down",e.Right="right",e.UpDown="up-down",e.ChevronUp="chevron-up",e.ChevronDown="chevron-down",e.ChevronLeft="chevron-left",e.ChevronRight="chevron-right",e.VisibleOff="visible-off",e.VisibleOn="visible-on",e.PublisherArchive="publisher-archive",e.Play="play",e.PlayCircle="play-circle",e.ArrowLeft="arrow-left",e.CheckCircleOutline="check-circle-o",e.CheckCircle="check-circle",e.Check="check",e.Lock="lock",e.Link="link",e.Info="info",e.Question="question",e.Star="star",e.StarOutline="star-o",e.Archive="archive",e.Warning="warning",e.WarningOutline="warning-o",e.NewWindow="new-window",e.File="file",e.FilePDF="file-pdf",e.FileExcel="file-excel",e.FilePowerpoint="file-ppt",e.FileWord="file-word",e.FileImg="file-img",e.FileZip="file-zip",e.Enter="enter",e.Calendar="calendar",e.CloseCaption="close-caption",e.CloseCaptionBadge="close-caption-badge",e.Playlist="playlist",e.Handle="handle",e.Subject="subject",e.Series="series",e.EditClickView="edit-clickview",e.Heart="heart",e.HeartOutline="heart-outline",e.WhiteWave="white-wave",e.Cog="cog",e.Video="video",e.Compass="compass",e.History="history",e.Tag="tag"}(hl||(hl={}));m.extend(Jo.config,{autoReplaceSvg:!1,autoAddCss:!1,familyPrefix:"cv",autoA11y:!0,observeMutations:!1,replacementClass:"cv-svg",keepOriginalSource:!1}),Jo.library.add(...ml);const gl="cv";const yl=class{constructor(){}static get Instance(){return this.instance||(this.instance=new this)}getSvg(e,t={}){const n=this.faIconLookup(e,t),r=this.getIcon(n,t);if(r&&(!r||r.html.length))return r.html.pop()}getIcon(e,t){return Jo.icon(e,t.iconOptions||{})}faIconLookup(e,t){let{prefix:n=gl}=t;return Jo.findIconDefinition({prefix:n,iconName:e})}}.Instance,vl=hl,bl={getRandomInt:(e=1e4)=>Math.floor(Math.random()*Math.floor(e))};function Sl(e){const{title:t,placement:n,trigger:r,children:i}=e;return d.createElement(co.OverlayTrigger,{placement:n,overlay:d.createElement(co.Tooltip,{id:`${t}-${bl.getRandomInt()}`},t),trigger:r},d.createElement("span",null,i))}Sl.defaultProps={trigger:["hover","click","focus"],placement:"top"};const El="d-inline-block svg-container",Cl="span";var Ol;function Il(e){const{svgName:t,className:n=El,tagName:r=Cl,size:i=Ol.Standard,onClick:a,title:o,tooltipPlacement:s="right"}=e,c=r,l={dangerouslySetInnerHTML:{__html:yl.getSvg(t)},className:`${n} ${i}`,onClick:X.isFunction(a)?a:null};return o?d.createElement(Sl,{title:o,placement:s},d.createElement(c,Object.assign({},l))):d.createElement(c,Object.assign({},l))}!function(e){e.Standard="std",e.Small="sm",e.Medium="md",e.Large="lg",e.ExtraLarge="xlg"}(Ol||(Ol={}));var jl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Al=e=>{const t="d-inline-block svg-container";return X.isFunction(e)?t+" cursor-pointer":t};function Tl(e){const{onClickSearchIcon:t,searchIconPlacement:n,className:r}=e,i=jl(e,["onClickSearchIcon","searchIconPlacement","className"]);let a="form-control "+Fo.a.input,o="input-group-text bg-white";"right"===n&&(a+=" border-right-0",o+=" pl-0"),"left"===n&&(a+=" border-left-0",o+=" pr-0"),r&&(a+=" "+r);const s=()=>d.createElement("div",{className:o},d.createElement(Il,{svgName:vl.Search,size:Ol.Small,onClick:t,className:Al(t)}));return d.createElement("div",{className:"input-group"},"left"===n&&d.createElement("div",{className:"input-group-prepend"},d.createElement(s,null)),d.createElement("input",Object.assign({className:a},i)),"right"===n&&d.createElement("div",{className:"input-group-append"},d.createElement(s,null)))}const wl=X.isFunction;function Ll(e){const t=(n=e.initialSuggestions,r=e.recentSearches,{[Do.Recent]:r,[Do.Local]:n,[Do.Remote]:[]});var n,r;const[i,a]=d.useState(e.initialQuery||""),[o,s]=d.useState(t),c=function(e){const[t,n]=Object(d.useState)(window.matchMedia(e).matches);return Object(d.useEffect)(()=>{const r=window.matchMedia(e);r.matches!==t&&n(r.matches);const i=()=>n(r.matches);return r.addListener(i),()=>r.removeListener(i)},[e]),t}(xo.XS),l=()=>{s(t)},u=t=>{t.preventDefault(),wl(e.onSubmit)&&e.onSubmit(i)};return d.createElement("form",{onSubmit:u},d.createElement(Po,{suggestions:Vo(o,!i,e.recentSearchHeading||Io.getPhrase("shared.searchBar","recentSearchHeading"),e.suggestionsHeading,e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:Uo(e,s,l),onSuggestionsClearRequested:()=>{e.alwaysRenderSuggestions||l()},onSuggestionSelected:(t,{suggestion:n})=>{e.clearQueryOnSelect&&a(""),e.onSuggestionSelected(n)},getSuggestionValue:t=>e.updateQueryOnSelection?function(e,t){return Mo(t,e)?t[e]:""}(e.valueKey,t):i,renderSuggestion:t=>wl(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return Mo(t,e)?d.createElement(d.Fragment,null,t[e]):d.createElement(d.Fragment,null)}(e.valueKey,t),alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!c,inputProps:{placeholder:e.placeholder||Io.getPhrase("shared.searchBar","placeholder"),value:i,onChange:(t,{newValue:n})=>{a(n),wl(e.onQueryChange)&&e.onQueryChange(n)},onKeyDown:t=>{8===t.keyCode&&e.onBackspace&&!i&&e.onBackspace()},autoFocus:!!e.autoFocusInput,onClickSearchIcon:!!e.submitOnClickSearchIcon&&u,searchIconPlacement:e.searchIconPlacement},renderInputComponent:Tl,theme:qo(e.theme),multiSection:!0,renderSectionTitle:zo,getSectionSuggestions:Bo}))}function kl(e){const{appLink:t,className:n,children:i,tag:a="a"}=e;if(!t)return d.createElement("span",{className:n||""},i);let o=e.onClick;o||(o=e=>{e.preventDefault(),r.AppLinkHelper.trigger(t)});const s={onClick:o,href:r.AppLinkHelper.getHref(t),className:n};return d.createElement(a,Object.assign({},s),i)}function _l(e){var t=e.backToName,n=e.appLink;return d.createElement(kl,{appLink:n,className:"d-inline-flex align-items-center"},d.createElement(Il,{svgName:vl.ArrowLeft,size:Ol.Small}),d.createElement("span",{className:"ml-1"},"Back to ".concat(t)))}function xl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pl(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Ll.defaultProps={updateQueryOnSelection:!0,valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialSuggestions:[],searchIconPlacement:"right"};var Nl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Dl(e){var t=e.selected,n=e.onToggle,r=Nl(e,["selected","onToggle"]),i=xl(d.useState(t),2),a=i[0],o=i[1];d.useEffect((function(){return o(t)}),[t]);return d.createElement(co.Form.Check,Object.assign({type:"checkbox",id:"checkbox-".concat(bl.getRandomInt()),checked:a,onChange:function(){o(!a),n(!a)}},r))}var Rl,Fl,Ml,Ul,Vl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Bl(e){var t=e.onFileSelect,n=e.acceptMultiple,r=e.mimeType,i=e.label,a=e.error,o=e.touched,s=Vl(e,["onFileSelect","acceptMultiple","mimeType","label","error","touched"]),c="custom-file-input cursor-pointer";a&&o&&(c+=" is-invalid");var l=Object.assign({type:"file",className:c,onChange:function(e){var n=e.currentTarget.files;n&&n.length&&X.isFunction(t)&&t(n)},autoComplete:"off",value:"",multiple:!!n},r?{accept:r}:{});return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"custom-file"},d.createElement(Za,Object.assign({},l,s),e.children),d.createElement(co.Form.Label,{className:"custom-file-label",htmlFor:s.id},i)))}!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(Rl||(Rl={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners"}(Fl||(Fl={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(Ml||(Ml={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(Ul||(Ul={}));const zl={urlBuilder(e,t){const n=m.map(t,(e,t)=>{if(t&&Array.isArray(e)){return e.map(e=>`${t}=${encodeURIComponent(e)}`).join("&")}return t&&void 0!==e?`${t}=${encodeURIComponent(e)}`:""}),r=m.reduce(n,(e,t)=>t?e?`${e}&${t}`:t:e);return r?`${e}?${r}`:e},buildFilter(e){let t=[];if(e.limit&&t.push("limit:"+e.limit),e.cursor&&t.push("page:"+e.cursor),e.before&&t.push("dateCreated:..."+e.before),t.length)return t.join(",")},makeHttps:e=>m.isString(e)?-1===e.indexOf("http://")?e:e=e.replace("http://","https://"):e,safeUrlConcat(e,t){if(!e)return;let n=e;return e.endsWith("/")||(n+="/"),t?(n+=t.startsWith("/")?t.slice(1):t,n):n}};var Hl;!function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(Hl||(Hl={}));const ql={[Fl.Banners]:Hl.Banner,[Fl.Thumbnails]:Hl.Thumbnail},Jl=e=>"/v1/category-map/"+e,$l={createUrl:(e,t)=>$l._createUrl(e,t),createBannerUrl:(e,t,n)=>e&&e.url?$l._createUrl(e.url,n):$l._createCategoryMappedUrl(t,n),Rfc3986EncodeURIComponent:e=>encodeURIComponent(e).replace(/[!'()*]/g,escape),_createCategoryMappedUrl(e,t){const{fallbackBaseUrl:n,fallbackCategoryName:r,type:i}=e,a=zl.safeUrlConcat(n,""+Jl(ql[i])),o=Object.assign({name:$l.Rfc3986EncodeURIComponent(r)},t);return $l._createUrl(a,o)},_createUrl(e,t){if(!e)return;if(pt.isEmpty(t))return e;const n=$.param(t),r=-1===e.indexOf("?")?"?":"&";return zl.safeUrlConcat(e,`${r}${n}`)},legacyCreateThumbnailUrl(e,t){if(!e)return"";let n;if(!e)return;if(n=e instanceof r.Model?e.get("url"):"string"==typeof e?e:e.url,!n)return;const i=Object.assign({size:Rl.Small,bgColor:"000"},t);return $l._createUrl(n,i)}},Kl={[Fl.Thumbnails]:{width:1280,height:720},[Fl.Banners]:{width:3600,height:666},[Fl.Covers]:{width:1080,height:1080},[Fl.Posters]:{width:1e3,height:1500},[Fl.TallPosters]:{width:1080,height:1920},[Fl.HeroBanners]:{width:1920,height:640}};var Yl={onFileSelect:function(e,t,n){if(t&&t.length){var r=new FileReader;r.addEventListener("load",(function(){return Yl.onReaderLoad(r,e,n)})),r.readAsDataURL(t[0])}},onReaderLoad:function(e,t,n){var r=new Image;r.src=e.result;var i=Kl[t].width,a=Kl[t].height;r.addEventListener("load",(function(){Yl.isImageValid(t,r)&&X.isFunction(n)?n(r):alert("Image too small: minimum dimensions are ".concat(i," x ").concat(a))}))},isImageValid:function(e,t){var n=Kl[e].width,r=Kl[e].height;return!(n&&t.width<n)&&!(r&&t.height<r)}},Gl={isItemActive:function(e,t){return t||(t=r.AppLinkHelper.getCurrentAppLink()),t.application===e.appLink.application&&(Array.isArray(e.activeActions)?e.activeActions.includes(t.action):t.action===e.appLink.action)}},Wl=function(e){return Object.values(e).every((function(e){return!!e}))},Zl=function(e,t){return!!e&&!!t&&e.toString()===t.toString()},Ql=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function Xl(e){return function(e){if(Array.isArray(e))return eu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return eu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eu(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var tu={find:function(e,t){if(e&&e.children&&e.children.length)for(var n=function e(n){if(Zl(n.id,t))return n;var r=n.children;if(r&&r.length)for(var i=0;i<r.length;i++){var a=e(r[i]);if(a)return a}},r=0;r<e.children.length;r++){var i=n(e.children[r]);if(i)return i}},getPath:function(e,t){for(var n=[t],r=function(e){return e.hasOwnProperty("parentIds")&&Array.isArray(e.parentIds)&&e.parentIds.length?e.parentIds[0]:e.hasOwnProperty("parentId")?e.parentId:null},i=r(t);i;){var a=tu.find(e,i);a&&(n=[a].concat(Xl(n))),i=a?r(a):null}return n}},nu=function(e){return e&&e.groups?e.groups.map((function(e){return e.name})):[]};function ru(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return iu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var au,ou=d.createContext(void 0),su=function(e){var t=e.children,n=ru(d.useState(),2),r=n[0],i=n[1],a=ru(d.useState(!1),2),o=a[0],s=a[1],c=ru(d.useState(),2),l=c[0],u=c[1],p={getDataUrl:function(){var e=r;return i(null),e},setDataUrl:i,imageUploaded:o,getImage:function(){var e=l;return u(null),s(!1),e},setImage:function(e){u(e),s(!0)}};return d.createElement(ou.Provider,{value:p},t)};function cu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return lu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pu=(uu(au={},Fl.Thumbnails,"Thumbnail"),uu(au,Fl.Banners,"Banner"),uu(au,Fl.Avatars,"Avatar"),uu(au,Fl.Logos,"Logo"),uu(au,Fl.Covers,"Cover"),uu(au,Fl.Posters,"Poster"),uu(au,Fl.TallPosters,"Tall Poster"),uu(au,Fl.HeroBanners,"Hero Banner"),au);function fu(e){var t,n=za(),i=Ra(null===(t=n)||void 0===t?void 0:t.values,e.fieldName),a=d.useContext(ou),o=a.setDataUrl,s=a.getImage,l=a.imageUploaded,u=cu(d.useState(!1),2),p=u[0],f=u[1],m=cu(d.useState(i),2),h=m[0],g=m[1],y=cu(d.useState(!1),2),v=y[0],b=y[1];function S(t){f(!0),o(t.src),r.AppLinkHelper.trigger({application:e.application,action:e.uploadAction,args:[e.imageType]})}d.useEffect((function(){if(p){var t,r=s();if(r)f(!1),g(r),t=r,X.isFunction(e.setSelectedImage)?e.setSelectedImage(t):n&&n.setFieldValue(e.fieldName,{fileId:t.id,fileIdType:Ul.ImageAPIv2})}}),[l]);var E=e.label||pu[e.imageType]||"Image";return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"form-control h-auto py-2"},d.createElement("label",null,E),d.createElement("em",{className:"ml-1 text-muted"},"(Minimum dimensions are ".concat(Kl[e.imageType].width,"px")+" x ".concat(Kl[e.imageType].height,"px)")),d.createElement(Bl,{label:"Choose a ".concat(E.toLowerCase()),name:"image",mimeType:c.IMAGES,onFileSelect:function(t){return Yl.onFileSelect(e.imageType,t,S)}}),!!h&&!!h.url&&d.createElement(d.Fragment,null,!v&&d.createElement("div",{className:"pb-2 ".concat(e.imageType===Fl.Banners?"w-100":"w-50")},d.createElement("img",{src:$l.createUrl(h.url),className:"img img-fluid"})),d.createElement("div",{className:"d-flex justify-content-center"},d.createElement(Il,{svgName:v?vl.ChevronDown:vl.ChevronUp,size:Ol.Large,className:"svg-container cursor-pointer",onClick:function(){return b(!v)},title:v?"Show image":"Hide image",tooltipPlacement:"top"})))))}var du,mu=n(126),hu=n.n(mu);function gu(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yu(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e[e.NoRestrictions=0]="NoRestrictions",e[e.RestrictToCanvas=1]="RestrictToCanvas"}(du||(du={}));var vu,bu,Su,Eu,Cu,Ou,Iu,ju,Au,Tu,wu,Lu,ku,_u,xu,Pu,Nu,Du,Ru,Fu,Mu,Uu=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function Vu(e){var t=e.dataUrl,n=e.minHeight,r=e.minWidth,i=e.onCrop,a=e.onCancel,o=d.useRef(),s=d.useRef(),c=gu(d.useState(!1),2),l=c[0],u=c[1],p=gu(d.useState(!1),2),f=p[0],m=p[1];return d.useEffect((function(){var e=new Image;e.src=t;var i=o.current.offsetWidth/e.width;return s.current=new hu.a(o.current,{viewMode:du.RestrictToCanvas,autoCropArea:1,aspectRatio:r/n,minCropBoxWidth:r*i,minCropBoxHeight:n*i,ready:function(){return u(!0)}}),function(){return s.current.destroy()}}),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement("img",{ref:o,src:t,className:"img img-fluid mw-100"})),d.createElement("div",{className:"d-flex justify-content-end border-top pt-3"},d.createElement(co.Button,{variant:"link",onClick:a},"Cancel"),d.createElement(bo,{onClick:function(){if(l){m(!0);var e=s.current.getCroppedCanvas().toDataURL(function(e){var t=e.match(Uu);if(t)return t[1]}(t));X.isFunction(i)&&i(e)}},disabled:!l,showSpinner:f},"Crop")))}!function(e){e.Stream="cv_product_stream",e.WebPlayerStream="cv_product_webplayer_stream",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(vu||(vu={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Restriction="restriction",e.Interactive="interactive",e.PDF="pdf",e.CustomerSetting="customer_setting",e.StaffRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.Upload="upload",e.SearchResults="search_results",e.Audience="audience",e.User="target_user"}(bu||(bu={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.VideoItemPreview="video_item_preview",e.VideoDetails="video_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.StaffRequestDetails="staff_request_details",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.TeacherManager="teacher_manager",e.TeacherManagerListItem="teacher_manager_list_item",e.StudentManager="student_manager",e.StudentManagerListItem="student_manager_list_item",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ClassroomOverview="classroom_overview",e.ClassroomOverviewStudentListItem="classroom_overview_student_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.PlayPage="play_page",e.FloatingPlayer="floating_player",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.MyUploads="my_uploads"}(Su||(Su={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard"}(Eu||(Eu={})),function(e){e.PageLoad="page_load"}(Cu||(Cu={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(Ou||(Ou={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}(Iu||(Iu={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}(ju||(ju={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(Au||(Au={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit"}(Tu||(Tu={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Thumbnail="thumbnail",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open"}(wu||(wu={})),function(e){e.LibraryReview="library_review"}(Lu||(Lu={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(ku||(ku={})),function(e){e.Edit="edit"}(_u||(_u={})),function(e){e.Image="image",e.User="user"}(xu||(xu={})),function(e){e.On="on",e.Off="off"}(Pu||(Pu={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(Nu||(Nu={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(Du||(Du={})),function(e){e.Video="videos",e.Folder="categories",e.Series="series",e.Tags="tags"}(Ru||(Ru={})),function(e){e[e.V1=1]="V1"}(Fu||(Fu={})),function(e){e.Analytics="AnalyticsService",e.Context="ContextService"}(Mu||(Mu={}));class Bu extends r.Service{constructor(){super(...arguments),this.contextHistory=[]}get name(){return Mu.Context}static get Instance(){return this.instance||(this.instance=new this)}initialize(){this.listenTo(y.SHELL,r.EventNames.ROUTE,this.setContext)}setContext(e){this.contextHistory.length>=5&&this.contextHistory.unshift(),this.contextHistory.push({pageLoad:!this.contextHistory.length,appLink:e})}getCurrentContext(){if(this.contextHistory.length)return this.contextHistory[this.contextHistory.length-1]}fromPageLoad(){return 1===this.contextHistory.length}}const zu=new Bu;var Hu;!function(e){e.Inlet="event:inlet",e.Outlet="event:outlet"}(Hu||(Hu={}));const qu="global:analytics",Ju=Fu.V1;class $u{constructor(e,t,n,r){this.type=e,this.data=t,this.actionContext=n,this.eventVersion=r||Ju}isType(e){return e===this.type}enrich(e,t){this.validateKey(e),this[e]=t}get(e){if(e&&this[e])return this[e]}validateKey(e){"type"!==e&&"data"!==e||r.ErrorHelper.throw(new B(e+" is not a valid key")),this[e]&&r.ErrorHelper.throw(new B("Event already contains an enrichment named "+e))}}const Ku={log(e,t,n,r){h.Radio.channel(qu).trigger(Hu.Inlet,new $u(e,t,n,r))}};function Yu(){const{appLink:e}=zu.getCurrentContext();return m.isObject(e)||r.ErrorHelper.throw(new B("Applink does not exist. Check current context.")),e.application.replace(":","-")}function Gu(e={}){const{location:t,entity:n,workflowPhase:i=null,descriptor:a=null}=e;return t||r.ErrorHelper.throw(new B("location must be set.")),n||r.ErrorHelper.throw(new B("entity must be set.")),{productArea:Yu(),location:t,entity:n,descriptor:a,workflowPhase:i}}function Wu(){return r.LocationUtils.GetCurrentPath()+r.LocationUtils.GetCurrentQueryString()}const Zu={logUserAction(e,t){if(!function(e){return!(!m.isArray(e)||!m.every(e,e=>m.isObject(e)))||!!m.isObject(e)}(e)||!m.isObject(t))return;const{userAction:n,action:r,eventVersion:i}=Zu.buildUserActionEvent(t);Ku.log(n,e,r,i)},logNavigate(e,t){const n=Object.assign({currentLocation:Wu(),appLink:e},t);Ku.log(vu.Navigate,n)},mergeOptions:(e,t)=>m.extend({},e,t),buildActionContext:(e={})=>Gu(e),buildUserActionEvent(e={}){const{actionType:t,eventVersion:n}=e;return{userAction:t,action:Gu(e),eventVersion:n}},buildCurrentLocation:()=>Wu(),buildSearchEvent:(e,t)=>({data:{query:e},action:Gu({entity:bu.Video,location:Su.SearchBar,descriptor:t})}),buildInstantSearchEvent(e,t,n){let r;n===Ru.Series&&(r=bu.Series),n===Ru.Folder&&(r=bu.Folder),n===Ru.Tags&&(r=bu.Tag),n===Ru.Video&&(r=bu.Video);const i={instant:{},query:e};return t.id&&(i.instant.selectedId=t.id),t.name&&(i.instant.selectedName=t.name),{data:i,action:Gu({entity:r,location:Su.SearchBar})}},mapInteractionType(e){switch(e){case Du.DragDrop:return ku.DragDrop;case Du.FileSelect:return ku.FileSelect;default:return}}};function Qu(e,t){return t?{application:e.application,action:e.action,args:e.args,params:Object.assign({},e.params,{cursor:t})}:null}function Xu({appLink:e,cursors:t,className:n}){function r(e){Zu.logUserAction({page:e},{location:Su.Pagination,entity:bu.Pagination,actionType:vu.Navigate,workflowPhase:Eu.Complete})}return d.createElement(jo.Provider,{value:"shared.pagination"},d.createElement("div",{className:n},d.createElement(kl,{appLink:Qu(e,t.previous),className:"btn btn-secondary mr-1 "+(t.previous?"":"disabled"),onClick:()=>r("previous")},d.createElement(Ao,{phrase:"previous"})),d.createElement(kl,{appLink:Qu(e,t.next),className:"btn btn-secondary "+(t.next?"":"disabled"),onClick:()=>r("next")},d.createElement(Ao,{phrase:"next"}))))}function ep(e){if(!e.collection)return d.createElement(d.Fragment,null);var t=e.collection,n=t.data,r=t.pagination;return d.createElement(d.Fragment,null,!!n&&d.createElement(fp,{objects:n,getObjectAppLink:e.getObjectAppLink,newObjectAppLink:e.newObjectAppLink,objectName:e.objectName}),!!r&&!!r.cursors&&d.createElement(Xu,{cursors:r.cursors,appLink:e.collectionAppLink}))}Xu.defaultProps={className:"py-2"};var tp=n(22),np=n.n(tp);function rp(e){let t="dropdown-item";return e&&(t+=" "+e),t}function ip(e){if(!e.actions||!e.actions.length)return d.createElement(d.Fragment,null);const t="actions-dropdown-"+bl.getRandomInt();let n="px-0 "+np.a.dropdownToggle;return e.dropdownToggleClassName&&(n+=" "+e.dropdownToggleClassName),d.createElement(co.Dropdown,{className:e.className?e.className:"",alignRight:!0},d.createElement(co.Dropdown.Toggle,{as:"button",type:"button",id:t,className:n},d.createElement(Il,{svgName:vl.More,size:Ol.Small})),d.createElement(co.Dropdown.Menu,null,e.actions.map((e,t)=>d.createElement(kl,{key:t,appLink:e.appLink,className:rp(e.className)},e.label))))}ip.defaultProps={dropdownToggleClassName:"btn btn-light"};var ap=n(18),op=n.n(ap);function sp(e){const{svgName:t,children:n,appLink:r,className:i,onClick:a}=e;let o=`${i} ${op.a.iconButton}`;o+=n?" "+op.a.iconWithText:" "+op.a.iconOnly;const s=d.createElement(Il,{svgName:t,className:op.a.svg});return r?d.createElement(kl,{appLink:r,className:o,onClick:a},s,n):d.createElement("button",{className:o,onClick:a},s,n)}function cp(e){const{onClick:t,appLink:n,svgName:r,tooltip:i}=e.actionOptions;let a="ml-2";return e.actionOptions.className&&(a+=" "+e.actionOptions.className),i?d.createElement(Sl,{title:i},d.createElement(sp,{appLink:n,svgName:r,onClick:t,className:a},e.children)):r?d.createElement(sp,{onClick:t,appLink:n,svgName:r,className:a},e.children):n?d.createElement(kl,{onClick:t,appLink:n,className:a},e.children):d.createElement("button",{onClick:t,className:a},e.children)}function lp(e){const t=[],n=[];e.actions.forEach(e=>{e.button?t.push(e):n.push(e)});let r="d-flex";return e.className&&(r+=" "+e.className),d.createElement("div",{className:r},d.createElement(d.Fragment,null,!!t.length&&d.createElement("span",{className:np.a.buttonList},t.map((e,t)=>d.createElement(cp,{key:t,actionOptions:e},e.label))),e.sortComponent?e.sortComponent:"",!!n.length&&d.createElement(ip,{actions:n,className:!!t.length&&"ml-2",dropdownToggleClassName:e.actionsDropdownClassName})))}function up(e){var t=e.object,n=e.actions;return d.createElement("div",{className:"d-flex justify-content-between py-2"},!!t&&d.createElement("h5",null,t.name),!!n&&d.createElement("span",null,d.createElement(lp,{actions:n})))}function pp(e){return d.createElement("tr",null,d.createElement("td",null,d.createElement(kl,{appLink:e.appLink},e.object.name)),d.createElement("td",null))}function fp(e){return d.createElement(co.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Name"),d.createElement("th",null,d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(kl,{appLink:e.newObjectAppLink},d.createElement(Il,{svgName:vl.Plus,size:Ol.Small}),d.createElement("span",null,"New ".concat(e.objectName))))))),d.createElement("tbody",null,e.objects.map((function(t){return d.createElement(pp,{key:t.id,object:t,appLink:e.getObjectAppLink(t)})}))))}function dp(e){var t=e.objects,n=e.getAppLink,r=e.emptyMessage;return t?t.length?d.createElement("ul",{className:"list-unstyled"},t.map((function(e,t){return d.createElement("li",{key:t,className:"border rounded mb-3"},d.createElement(kl,{appLink:n(e),className:"d-block p-3"},e.name))}))):d.createElement("div",{className:"py-3"},d.createElement("p",null,r)):d.createElement(d.Fragment,null)}dp.defaultProps={emptyMessage:"There is nothing here."};function mp(e){var t=za();return d.createElement(go,{as:"select",label:"Rating",name:"rating",id:"rating",value:t.values.rating&&t.values.rating.id,onChange:function(e){return t.setFieldValue("rating",e.target.value?{id:e.target.value}:{})},disabled:e.disabled},d.createElement(d.Fragment,null,d.createElement("option",{value:""},"Please select a rating"),e.ratings.map((function(e,t){return d.createElement("option",{key:t,value:e.id},function(e){return"".concat(e.name).concat(e.code?" (".concat(e.code,")"):"")}(e))}))))}function hp(e){var t=e.tabs,n=e.isItemActive;return d.createElement(co.Nav,{fill:!0,variant:"tabs"},t.map((function(e,t){return d.createElement(co.Nav.Item,{key:t},d.createElement(kl,{appLink:e.appLink,className:(r=n(e),r?"nav-link active":"nav-link")},e.label));var r})))}hp.defaultProps={isItemActive:Gl.isItemActive};var gp=n(8),yp=n.n(gp);function vp(e){var t=e.name,n=e.appLink,r=e.onSelect,i=e.isDisabled,a=e.className,o=e.actions,s=yp.a.text;return a&&(s+=" ".concat(a)),i?d.createElement("a",{className:"".concat(s," text-muted ").concat(yp.a.disabled)},t):d.createElement(d.Fragment,null,n?d.createElement(kl,{appLink:n,className:s},t):d.createElement("a",{onClick:r,className:s},t),!!o&&d.createElement(lp,{className:yp.a.actions,actions:o}))}function bp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Sp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ep(e){var t=e.tree,n=e.selectedIds,r=e.getAppLink,i=e.onSelect,a=e.isDisabled,o=e.actions,s=Array.isArray(n)&&n.some((function(e){return Zl(t.id,e)})),c=d.useMemo((function(){return Array.isArray(n)&&n.some((function(e){return tu.find(t,e)}))}),[t,n]),l=bp(d.useState(c),2),u=l[0],p=l[1],f=!!t.children&&!!t.children.length,m={name:t.name,appLink:X.isFunction(r)?r(t):null,onSelect:X.isFunction(i)?function(){return i(t)}:null,isDisabled:!!X.isFunction(a)&&a(t),className:s&&yp.a.selected||c&&yp.a.parentOfSelected,actions:!!o&&o.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(t)})}))};return d.createElement("li",{className:"position-relative".concat(u?"":" ".concat(yp.a.collapsed))},d.createElement("div",{className:"position-relative"},d.createElement("span",{className:yp.a.node},f&&d.createElement(Il,{svgName:vl.ChevronDown,size:Ol.Small,className:"svg-container ".concat(yp.a.chevron),onClick:function(){return p(!u)}}),d.createElement(vp,Object.assign({},m))),u&&d.createElement(Op,Object.assign({},e))))}var Cp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Op(e){var t=e.tree,n=Cp(e,["tree"]);return t&&t.children?d.createElement("ul",{className:"m-0 p-0 ".concat(yp.a.tree)},t.children.map((function(e){return d.createElement(Ep,Object.assign({key:e.id,tree:e},n))}))):d.createElement(d.Fragment,null)}var Ip={getChord:function(e,t){return tu.getPath(e,t).map((function(e){return e.name})).join(" -> ")},getState:function(e,t){var n={};return Array.isArray(e)&&e.forEach((function(e){var r,i,a,o=tu.find(t,e);o&&(n=Object.assign((r={},i=e,a=Ip.getChord(t,o),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r),n))})),n}};function jp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ap(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ap(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ap(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Tp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function wp(e){var t=e.onSelect,n=e.label,r=e.hideCollapseBtn,i=e.collapse,a=e.noSelectionMessage,o=e.isNodeDisabled,s=e.getSelectedItemAppLink,c=Tp(e,["onSelect","label","hideCollapseBtn","collapse","noSelectionMessage","isNodeDisabled","getSelectedItemAppLink"]),l=c.tree,u=c.selectedIds,p=jp(d.useState(Ip.getState(u,l)),2),f=p[0],m=p[1];d.useEffect((function(){return m(Ip.getState(u,l))}),[u,l]);var h=jp(d.useState(!!i),2),g=h[0],y=h[1];d.useEffect((function(){return y(!!i)}),[i]);var v=!r||!!n;return d.createElement(d.Fragment,null,v&&d.createElement("div",{className:"pb-2"},!!n&&d.createElement("label",{className:"m-0"},n),!r&&d.createElement("a",{className:"float-right cursor-pointer",onClick:function(){return y(!g)}},g?"Expand":"Collapse")),!g&&d.createElement("div",{className:"py-2 border-top"},d.createElement(Op,Object.assign({onSelect:function(e){return X.isFunction(t)&&t(e)},isDisabled:o},c))),(!pt.isEmpty(f)||!!a)&&d.createElement("div",{className:"py-2 border-top"},d.createElement("label",null,"Selected:"),d.createElement("ul",{className:"m-0"},pt.isEmpty(f)?d.createElement("li",null,a):Object.keys(f).map((function(e,t){return d.createElement("li",{key:t},X.isFunction(s)?d.createElement(kl,{appLink:s(e)},f[e]):f[e])})))))}var Lp=n(23);const kp={isEmpty:e=>e&&!(e.data&&e.data.length),length:e=>e&&e.data&&e.data.length,at(e,t){if(e&&e.data&&e.data.length&&!(t>e.data.length))return e.data[t]},get(e,t){if(e&&e.data&&e.data.length)return e.data.find(e=>e.id&&e.id.toString()===t)},flattenCollections(e){if(!e||!e.length)return;let t=[];return e.forEach(e=>{t=[...t,...e.data]}),t},getNextCursor:e=>e.pagination&&e.pagination.cursors&&e.pagination.cursors.next};var _p=function(e){var t="bg-white";return e&&(t+=" ".concat(e)),t};function xp(e){var t=e.video,n=e.getVideoAppLink,r=e.getVideoActions,i=e.className,a=void 0===i?"":i,o=e.itemNumber,s=X.isFunction(n)&&n(t);return d.createElement("tr",{className:_p(a)},!!o&&d.createElement("td",null,d.createElement("span",null,o)),d.createElement("td",null,s?d.createElement(kl,{appLink:s},t.name):t.name),X.isFunction(r)&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(lp,{actions:r(t)}))))}var Pp=Object(Lp.SortableElement)((function(e){return d.createElement(xp,Object.assign({sortable:!0},e))})),Np=n(11),Dp=n.n(Np),Rp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Fp=function(e){var t=e.sortable,n=e.getVideoActions;return d.createElement("thead",null,d.createElement("tr",null,!!t&&d.createElement("th",null,"#"),d.createElement("th",null,"Name"),!!n&&d.createElement("th",null)))},Mp=d.forwardRef((function(e,t){var n=e.videos,r=e.sortable,i=Rp(e,["videos","sortable"]);return d.createElement("tbody",{ref:t},!kp.isEmpty(n)&&n.data.map((function(e,t){return r?d.createElement(Pp,Object.assign({key:e.id,index:t,itemNumber:t+1,video:e,className:Dp.a.draggableVideoItem},i)):d.createElement(xp,Object.assign({video:e},i))})))}));var Up=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Vp=Object(Lp.SortableContainer)((function(e){var t=e.forwardedRef,n=Up(e,["forwardedRef"]);return d.createElement(Mp,Object.assign({sortable:!0,ref:t},n))})),Bp=function(e){return function(t){var n=t.node,r=e.current;if(r){r.classList.add(Dp.a.sortingContainer);var i=r.querySelector(".".concat(Dp.a.draggedVideoItem));n.childNodes.forEach((function(e,t){return i.childNodes[t].style.width="".concat(e.offsetWidth,"px")}))}}},zp=function(e,t){return function(n){var r=e.current;r&&r.classList.remove(Dp.a.sortingContainer),t(n.oldIndex,n.newIndex)}};function Hp(e){var t=e.onSortEnd,n=e.emptyMessage,r=Up(e,["onSortEnd","emptyMessage"]),i=d.useRef();return kp.isEmpty(e.videos)?d.createElement("div",null,n):d.createElement(co.Table,{responsive:!0},d.createElement(Fp,Object.assign({sortable:!0},e)),d.createElement(Vp,Object.assign({forwardedRef:i,onSortStart:Bp(i),onSortEnd:zp(i,t),lockAxis:"y",lockToContainerEdges:!0,distance:1,helperClass:Dp.a.draggedVideoItem,helperContainer:function(){return i.current}},r)))}function qp(e){var t=e.alias,n=e.onDelete;return d.createElement("li",{className:"list-group-item d-flex justify-content-between"},t.name,d.createElement(Il,{svgName:vl.Delete,onClick:function(){return n(t.id)}}))}function Jp(e){var t=e.aliases,n=e.onDelete;return d.createElement("ul",{className:"list-group mb-3"},t?t.map((function(e){return d.createElement(qp,{key:e.id,alias:e,onDelete:n})})):d.createElement("span",null,"Currently there are no aliases for this object."))}Hp.defaultProps={emptyMessage:"There are no videos in this list."};var $p=Object(oo.object)().shape({name:Object(oo.string)().trim().max(255,"Name is too long").required("Name is required").default("")});function Kp(){var e=za(),t=yo(e);return d.createElement(Qa,null,d.createElement(go,{label:"Create an alias",name:"name",id:"name",value:e.values.name,placeholder:"Add an alias"}),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(bo,{showSpinner:e.isSubmitting,type:"submit",disabled:!t},"Add")))}function Yp(e){var t=e.onSave;return d.createElement(ao,{initialValues:{name:""},validationSchema:$p,onSubmit:function(e,n){t(e,n)},resetOnSubmit:!0},d.createElement(Kp,null))}function Gp(e){var t=e.onSave,n=e.aliases,r=e.onDelete;return d.createElement("div",{className:"w-50"},d.createElement("h1",null,"Aliases"),d.createElement(Jp,{aliases:n,onDelete:r}),d.createElement(Yp,{onSave:t}))}var Wp=u.COMPANIES,Zp=function(e){return{application:Wp,action:o.Companies.EDIT_COMPANY,args:[e.id]}},Qp=function(e){return r.AppLinkHelper.trigger(Zp(e))};function Xp(e){var t=i.useBasicFetch(Wt(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(Ll,{placeholder:"Search for a company",onSuggestionSelected:Qp,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/companies/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(ep,{collection:t&&t.data,collectionAppLink:{application:Wp,action:o.Companies.COMPANIES},newObjectAppLink:{application:Wp,action:o.Companies.NEW_COMPANY},getObjectAppLink:Zp,objectName:"Company"}))}function ef(e){return(ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rf(e,t,n){return t&&nf(e.prototype,t),n&&nf(e,n),e}function af(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&of(e,t)}function of(e,t){return(of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lf(e);if(t){var i=lf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return cf(this,n)}}function cf(e,t){return!t||"object"!==ef(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lf(e){return(lf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var uf,pf,ff=function(e){af(n,e);var t=sf(n);function n(){return tf(this,n),t.apply(this,arguments)}return rf(n,[{key:"channelName",get:function(){return u.COMPANIES}},{key:"appRoutes",get:function(){return{"manage/companies(/)":"companies","manage/companies/new(/)":"newCompany","manage/companies/:id(/)":"editCompany"}}}]),n}(r.AppRouter),df=function(e){af(n,e);var t=sf(n);function n(){return tf(this,n),t.apply(this,arguments)}return rf(n,[{key:"companies",value:function(e){var t=e.cursor;this.layout.showChildView(ae,d.createElement(Xp,{cursor:t}))}},{key:"newCompany",value:function(){this.layout.showChildView(ae,d.createElement(_o,null))}},{key:"editCompany",value:function(e){this.layout.showChildView(ae,d.createElement(ko,{id:e}))}},{key:"name",get:function(){return"Companies Application"}},{key:"channelName",get:function(){return u.COMPANIES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return ff}}]),n}(r.Application),mf=n(31);!function(e){e.Success="success",e.Warning="warning",e.Fail="danger",e.Info="info"}(uf||(uf={})),function(e){e.Success="Success! 🙌",e.Warning="Whoops...",e.Fail="Oops...",e.Info="FYI"}(pf||(pf={}));class hf extends G{constructor(e){super(e)}initialize(){this.alertCollection=new U,this.listenTo(y.ALERT,"remove:alert",this.removeAlert),this.showAlerts()}get name(){return Co}get defaults(){return{maxAlerts:3}}showAlerts(){const e=h.Radio.channel(y.ALERT);let t={collection:this.alertCollection};this.options.alertViewCtor&&(t=m.extend({},t,{ctor:this.options.alertViewCtor})),e.trigger("show:alert",t)}removeAlert(e){this.alertCollection.remove(e),this.showAlerts()}createAlert(e){this.alertCollection.length===this.options.maxAlerts&&this.alertCollection.shift(),e.id||(e=m.extend({},e,{id:this.generateUniqueAlertId()})),this.alertCollection.push(new K(e)),this.showAlerts()}clearAllAlerts(){this.alertCollection.reset(null)}success(e){return"string"==typeof e?m.bind(()=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,{message:e})),this):e.useXHR?m.bind((e,t)=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,{message:t})),this):m.bind(()=>this.createAlert(m.extend({},this.options.defaultSuccessAlert,e)),this)}error(e){return"string"==typeof e?m.bind(()=>this.createAlert(m.extend({},this.options.defaultErrorAlert,{message:e})),this):e.useXHR?m.bind(e=>this.createAlert(m.extend({},this.options.defaultErrorAlert,{message:e.message})),this):m.bind(()=>this.createAlert(m.extend({},this.options.defaultErrorAlertIL_DEFAULT,e)),this)}generateUniqueAlertId(){return m.uniqueId("alert_")}}var gf=n(9),yf=n.n(gf);function vf(e){const{alert:t,svgName:n,svgClassName:r,closeAlert:i}=e,{message:a,heading:o,appLink:s,appLinkText:c,appLinkClassName:l=""}=t,u=Object(Eo.sanitize)(a);return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-inline-block "+yf.a.icon},d.createElement(Il,{svgName:n,className:"svg-container "+r})),d.createElement("div",{className:"pl-2 d-inline-block "+yf.a.alertContent},d.createElement("p",{className:"p-0 m-0 pb-1 "+yf.a.heading},o),d.createElement("p",{className:"p-0 m-0 "+yf.a.message,dangerouslySetInnerHTML:{__html:u}}),!!s&&d.createElement(kl,{className:l,appLink:s},c)),d.createElement("div",{className:"close d-inline-block cursor-pointer",role:"button","aria-hidden":"true",onClick:i},"×"))}const bf=e=>{switch(e.type){case uf.Success:return vl.CheckCircleOutline;case uf.Fail:case uf.Warning:return vl.Warning;case uf.Info:default:return vl.Info}};function Sf({alert:e,closeAlert:t}){const[n,r]=d.useState(!0),i=d.useRef();d.useEffect(()=>{n?i.current=window.setTimeout(t,3e3):clearTimeout(i.current)},[n]);const a="text-"+e.type.toLowerCase();return d.createElement("li",{className:"bg-white mt-2 p-2 show clearfix "+yf.a.alertItem,onMouseEnter:()=>r(!1),onMouseLeave:()=>r(!0)},d.createElement(vf,{alert:e,svgName:bf(e),svgClassName:a,closeAlert:t}))}function Ef({alerts:e,removeAlert:t}){return d.createElement("div",{className:yf.a.alertBox},d.createElement(mf.TransitionGroup,{component:"ul",className:yf.a.alertList+" list-unstyled"},e&&e.map((e,n)=>d.createElement(mf.CSSTransition,{key:n,timeout:200,classNames:"alert"},d.createElement(Sf,{alert:e,closeAlert:()=>t(e.id)})))))}function Cf(){return d.createElement("div",{className:"text-center p-5"},d.createElement(co.Spinner,{as:"div",animation:"border",role:"status"}))}function Of(e){const{title:t,closeButton:n=!0,closePopup:r,onEntered:i,showLoadingSpinner:a}=e,o=Object.assign({show:!0,onHide:r},X.isFunction(i)?{onEntered:i}:{});return d.createElement(co.Modal,Object.assign({},o),!!t&&d.createElement(co.Modal.Header,{closeButton:n},d.createElement(co.Modal.Title,null,t)),a?d.createElement(Cf,null):d.createElement(co.Modal.Body,null,e.children))}var If=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function jf({buttons:e}){return d.createElement("div",{className:"d-flex justify-content-end border-top pt-3 px-3 mx-n3"},e.map((e,t)=>((e,t)=>{const{buttonText:n,type:r="button",isSpinnerButton:i,showSpinner:a=!1,className:o}=e,s=If(e,["buttonText","type","isSpinnerButton","showSpinner","className"]),c=Object.assign({key:t,type:r,className:"ml-2"+(o?" "+o:"")},s);return i?d.createElement(bo,Object.assign({showSpinner:a},c),n):d.createElement(co.Button,Object.assign({},c),n)})(e,t)))}var Af,Tf;!function(e){e.Boolean="System.Boolean",e.String="System.String",e.StaffRequest="ClickView.DomainApi.Models.Options.Enums.StaffRequestOption, ClickView.DomainApi.Models, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null",e.Long="System.Int64"}(Af||(Af={})),function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(Tf||(Tf={}));var wf={namespace:"domain_options"},Lf=function(){return"/api/domain/v3/settings/types"},kf=function(e){return"/api/domain/v3/settings/types/".concat(e)},_f=function(){return"/api/domain/v3/settings/types"},xf=function(e){return"/api/domain/v3/settings/types/".concat(e)},Pf=function(e){return"/api/domain/v3/settings/types/".concat(e)},Nf="domain:options",Df="domain:option",Rf="update:domain:option",Ff="delete:domain:option",Mf=function(){return{key:Nf,url:Lf(),normalizeOptions:wf}},Uf=function(e){return{key:"".concat(Df,":").concat(e),url:kf(e),normalizeOptions:wf}},Vf=function(e,t,n){return e.type===Af.String&&(e=Hf(e)),{key:Df,url:_f(),data:e,type:nt.POST,success:t,error:n,invalidationKeys:[Nf],normalizeOptions:wf}},Bf=function(e,t){return e.type===Af.String&&(e=Hf(e)),{key:"".concat(Rf,":").concat(e.id),url:xf(e.id),data:e,type:nt.PUT,always:t,formatData:function(){return e},normalizeOptions:wf}},zf=function(e,t){return{key:"".concat(Ff,":").concat(e),url:Pf(e),type:nt.DELETE,invalidationKeys:[Nf],normalizeOptions:wf,success:t}};function Hf(e){var t=e.defaultValue;if('"'===t)return Object.assign(Object.assign({},e),{defaultValue:'"'.concat(t,'"')});var n=t.charAt(0),r=t.charAt(t.length-1);return'"'!==n&&(t='"'.concat(t)),'"'!==r&&(t="".concat(t,'"')),Object.assign(Object.assign({},e),{defaultValue:t})}function qf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jf(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jf(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $f(e){var t=qf(d.useState(!1),2),n=t[0],a=t[1],s=i.useBasicFetch(Uf(e.optionId)),c=Object(te.useDispatch)(),l=function(){e.closePopup(),r.AppLinkHelper.trigger({application:u.DOMAIN_OPTIONS,action:o.DomainOptions.DOMAIN_OPTIONS})};return d.createElement(Of,{title:"Delete Domain Option",closePopup:e.closePopup,showLoadingSpinner:!s.data},s.data&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,s.data.name),"?")),d.createElement(jf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){a(!0),i.fetch(c,zf(e.optionId,l))},buttonText:"Yes, delete this domain option",isSpinnerButton:!0,showSpinner:n}]})))}var Kf,Yf=function(e){return{application:u.DOMAIN_OPTIONS,action:o.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]}},Gf={application:u.DOMAIN_OPTIONS,action:o.DomainOptions.NEW_DOMAIN_OPTION};function Wf(){var e=i.useBasicFetch(Mf());if(!e.data)return d.createElement(d.Fragment,null);var t=e.data.map((function(e){return e.displayName&&(e.name=e.displayName),e}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a domain option type to edit:"),d.createElement(kl,{appLink:Gf,className:"d-block"},d.createElement(Il,{svgName:vl.Plus,size:Ol.Small}),d.createElement("span",null,"New Domain Option"))),d.createElement(dp,{objects:t,getAppLink:Yf}))}!function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience"}(Kf||(Kf={}));var Zf=oo.object().shape({id:oo.string(),name:oo.string().trim().max(64,"Name is too long").required("Name is required").default(""),displayName:oo.string().trim().max(255,"Display name is too long").required("Display name is required").default(""),type:oo.mixed().required("Type is required").default(Af.Boolean),entityType:oo.mixed().required("Entity type is required").default(Kf.Customer),kind:oo.mixed().required("Kind is required").default(Tf.Temporary),defaultValue:oo.mixed().required("Default value is required").default("false")}).noUnknown();function Qf(e){var t=e.type,n=e.defaultValue;if(!t)return d.createElement(d.Fragment,null);var r={label:"Default Value",name:"defaultValue",id:"defaultValue",value:n};return t===Af.Boolean?d.createElement(go,Object.assign({as:"select"},r),d.createElement("option",{value:"true"},"True"),d.createElement("option",{value:"false"},"False")):t===Af.Long||t===Af.StaffRequest?d.createElement(go,Object.assign({as:"input",type:"number"},r)):t===Af.String?d.createElement(go,Object.assign({as:"input"},r)):void 0}var Xf=[Kf.Customer,Kf.User];function ed(e){var t=null===e.id||void 0===e.id,n=za(),r=yo(n);return d.createElement(Qa,null,d.createElement(go,{label:"Name (snake_case)",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this domain option",autoFocus:!0}),d.createElement(go,{label:"Display Name",type:"text",name:"displayName",id:"displayName",value:n.values.displayName,placeholder:"Enter a display name for this domain option"}),d.createElement(go,{as:"select",label:"Kind",name:"kind",id:"kind",value:n.values.kind},pt.getEnumKeys(Tf).map((function(e){return d.createElement("option",{key:e,value:Tf[e]},e)}))),d.createElement(go,{as:"select",label:"Entity",name:"entityType",id:"entityType",value:n.values.entityType},pt.getEnumKeys(Kf).filter((function(e){return Xf.includes(Kf[e])})).map((function(e){return d.createElement("option",{key:e,value:Kf[e]},e)}))),d.createElement(go,{as:"select",label:"Type",name:"type",id:"type",value:n.values.type},pt.getEnumKeys(Af).map((function(e){return d.createElement("option",{key:e,value:Af[e]},e)}))),d.createElement(Qf,{type:n.values.type,defaultValue:n.values.defaultValue}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(bo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(co.Button,{as:kl,variant:"danger",appLink:{application:u.DOMAIN_OPTIONS,action:o.DomainOptions.DELETE_DOMAIN_OPTION,args:[e.id]}},"Delete")))}function td(e){return d.createElement(ao,{initialValues:e.domainOption,validationSchema:Zf,onSubmit:e.saveDomainOption},d.createElement(ed,{id:e.domainOption&&e.domainOption.id}))}function nd(){var e=Object(te.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Domain Option"),d.createElement(td,{saveDomainOption:function(t,n){i.fetch(e,Vf(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.DOMAIN_OPTIONS,action:o.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]})}),n))}}))}function rd(e){var t=e.optionId,n=i.useBasicFetch(Uf(t)),r=Object(te.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Domain Option"),n.data&&d.createElement(td,{domainOption:n.data,saveDomainOption:function(e,t){return i.fetch(r,Bf(e,t))}}))}function id(e){return(id="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ad(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function od(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sd(e,t,n){return t&&od(e.prototype,t),n&&od(e,n),e}function cd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ld(e,t)}function ld(e,t){return(ld=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ud(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fd(e);if(t){var i=fd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pd(this,n)}}function pd(e,t){return!t||"object"!==id(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fd(e){return(fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dd=function(e){cd(n,e);var t=ud(n);function n(){return ad(this,n),t.apply(this,arguments)}return sd(n,[{key:"channelName",get:function(){return u.DOMAIN_OPTIONS}},{key:"appRoutes",get:function(){return{"developer/options(/)":"domainOptions","developer/options/new(/)":"newDomainOption","developer/options/:id(/)":"editDomainOption"}}},{key:"appLinks",get:function(){return["deleteDomainOption"]}}]),n}(r.AppRouter),md=function(e){cd(n,e);var t=ud(n);function n(){return ad(this,n),t.apply(this,arguments)}return sd(n,[{key:"domainOptions",value:function(){this.layout.showChildView(ae,d.createElement(Wf,null))}},{key:"newDomainOption",value:function(){this.layout.showChildView(ae,d.createElement(nd,null))}},{key:"editDomainOption",value:function(e){this.layout.showChildView(ae,d.createElement(rd,{optionId:e}))}},{key:"deleteDomainOption",value:function(e){this.layout.showChildView(oe,d.createElement($f,Object.assign({optionId:e},this.getPopupProps())))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(Ef,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Domain Options Application"}},{key:"channelName",get:function(){return u.DOMAIN_OPTIONS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return dd}}]),n}(r.Application),hd=function(e){return e?"".concat("/api/master/v2/people","?cursor=").concat(e):"/api/master/v2/people"},gd=function(e){return"/api/master/v2/objects/".concat(e)},yd=function(){return"/api/master/v2/people"},vd=function(e){return"/api/master/v2/objects/".concat(e)},bd="people",Sd="person",Ed="update:person",Cd=function(e){return{key:"".concat(bd).concat(e?":".concat(e):""),url:hd(e)}},Od=function(e){return{key:"".concat(Sd,":").concat(e),url:gd(e)}},Id=function(e,t,n){return{key:Sd,url:yd(),data:e,type:nt.POST,success:t,error:n,invalidationKeys:[bd]}},jd=function(e,t,n){return{key:"".concat(Ed,":").concat(e),url:vd(e),data:t,type:nt.PUT,always:n}},Ad=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown();function Td(e){var t=za();return d.createElement(Qa,null,d.createElement(go,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this person",autoFocus:!0}),d.createElement(To,{isNew:e.isNew}))}function wd(e){return d.createElement(ao,{initialValues:e.person,validationSchema:Ad,onSubmit:e.savePerson},d.createElement(Td,{isNew:!(e.person&&e.person.id)}))}function Ld(e){var t=Object(te.useDispatch)(),n=i.useBasicFetch(Od(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(wd,{person:n.data,savePerson:function(n,r){return i.fetch(t,jd(e.id,n,r))}}))}function kd(){var e=Object(te.useDispatch)();return d.createElement(wd,{savePerson:function(t,n){i.fetch(e,Id(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.PEOPLE,action:o.People.EDIT_PERSON,args:[e.id]})}),n))}})}var _d=u.PEOPLE,xd=function(e){return{application:_d,action:o.People.EDIT_PERSON,args:[e.id]}},Pd=function(e){return r.AppLinkHelper.trigger(xd(e))};function Nd(e){var t=i.useBasicFetch(Cd(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(Ll,{placeholder:"Search for a person",onSuggestionSelected:Pd,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/people/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(ep,{collection:t&&t.data,collectionAppLink:{application:_d,action:o.People.PEOPLE},newObjectAppLink:{application:_d,action:o.People.NEW_PERSON},getObjectAppLink:xd,objectName:"Person"}))}function Dd(e){return(Dd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Md(e,t,n){return t&&Fd(e.prototype,t),n&&Fd(e,n),e}function Ud(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vd(e,t)}function Vd(e,t){return(Vd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hd(e);if(t){var i=Hd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zd(this,n)}}function zd(e,t){return!t||"object"!==Dd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hd(e){return(Hd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qd=function(e){Ud(n,e);var t=Bd(n);function n(){return Rd(this,n),t.apply(this,arguments)}return Md(n,[{key:"channelName",get:function(){return u.PEOPLE}},{key:"appRoutes",get:function(){return{"manage/people(/)":"people","manage/people/new(/)":"newPerson","manage/people/:id(/)":"editPerson"}}}]),n}(r.AppRouter),Jd=function(e){Ud(n,e);var t=Bd(n);function n(){return Rd(this,n),t.apply(this,arguments)}return Md(n,[{key:"people",value:function(e){var t=e.cursor;this.layout.showChildView(ae,d.createElement(Nd,{cursor:t}))}},{key:"newPerson",value:function(){this.layout.showChildView(ae,d.createElement(kd,null))}},{key:"editPerson",value:function(e){this.layout.showChildView(ae,d.createElement(Ld,{id:e}))}},{key:"name",get:function(){return"People Application"}},{key:"channelName",get:function(){return u.PEOPLE}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return qd}}]),n}(r.Application);const $d=class extends G{constructor(){super(),this.constructors={},this.destructors={},this.instances={},this.singletonInstances={},this.referenceCounts={}}get name(){return"InstanceManager"}static get Instance(){return this.instance||(this.instance=new this)}registerDataService(e,t){this.validateConstructor(e);const n=e.prototype.name;return this.referenceCounts[n]=0,this.constructors[n]=()=>new e({dataProvider:this.getInstance(t.dataProvider),cache:this.getInstance(t.cache),bootstrapData:t.bootstrapData,defaultErrorHandler:t.defaultErrorHandler,alertService:t.alertService}),this.destructors[n]=()=>{this.instances[n]?this.instances[n].destroy():x.throw(new B(`Trying to destroy a ${n} instance that has already been destroyed`)),this.releaseInstance(t.dataProvider),this.releaseInstance(t.cache)},this}registerInstance(e,t){this.validateConstructor(e);const n=e.prototype.name;return this.referenceCounts[n]=0,this.constructors[n]=()=>new e(t),this.destructors[n]=()=>m.isFunction(this.instances[n].destroy)&&this.instances[n].destroy(),this}registerSingleton(e){const t=e.name;return this.singletonInstances[t]=e,this}getInstance(e,t){return this.singletonInstances[e]?this.singletonInstances[e]:(this.constructors[e]||x.throw(new B(`${e} was not registered with ${this.name}`)),this.referenceCounts[e]++,t&&this.listenTo(t,"destroy",()=>this.releaseInstance(e)),this.instances[e]||(this.instances[e]=this.constructors[e]()),this.instances[e])}releaseInstance(e){if(this.instances[e])return window.setTimeout(()=>{this.referenceCounts[e]--,this.referenceCounts[e]<1&&(this.destructors[e](),delete this.instances[e])},0),this}validateConstructor(e){const t=e.prototype.name;t||x.throw(new B(`Classes registered with ${this.name} must have a unique name property.`)),this.constructors[t]&&x.throw(new B(`A class with the name: ${t} has already been registered with ${this.name}`))}}.Instance;function Kd(e){return function(e){const t=$d.getInstance(e);return d.useEffect(()=>()=>$d.releaseInstance(e)),t}(e)}function Yd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gd(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wd(e){var t=e.imageType,n=e.closePopup,r=d.useContext(ou),i=r.getDataUrl,a=r.setImage,o=Yd(d.useState(i()),1)[0],s=Yd(d.useState(!1),2),c=s[0],l=s[1],u=Kd(f.IMAGE_UPLOAD),p=function(e){a(e),n()},m={dataUrl:o,imageType:t,minWidth:Kl[t].width,minHeight:Kl[t].height,onCrop:function(e){return u.uploadBase64Image(e,t,p,n)},onCancel:n};return d.createElement(Of,{title:"Crop Image",closePopup:n,onEntered:function(){return l(!0)}},c&&d.createElement(Vu,Object.assign({},m)))}var Zd=function(e){var t=e.children;return d.createElement(su,null,t)};const Qd=()=>{const e=Kd(Co);return{success(t){e.success(t)()},error(t){e.error(t)()},warning(t){e.createAlert({type:uf.Warning,heading:pf.Warning,message:t})}}};function Xd(e){var t=e.page,n=e.totalPages,r=No.isNumber(t)&&t>0&&t<n&&t+1,i=No.isNumber(t)&&t>1&&t-1,a={};if(r&&r<=n&&(a.next=r.toString()),i&&(a.previous=i.toString()),!pt.isEmpty(a))return a}var em,tm={convertLegacyPaginatedCollection:function(e){if(e)return{data:e.data,pagination:{cursors:Xd(e.pagination),limit:e.pagination.pageSize}}}};!function(e){e.Developer="Curator Devs",e.Content="Content",e.Curator="Curators",e.Support="Support",e.SalesSupport="Sales Support"}(em||(em={}));var nm=function(){return[{value:"protected",access:"r"}]},rm=function(e){return[em.Developer,em.Content].some((function(t){return nu(e).includes(t)}))},im=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1";return{key:"playlists:".concat(e),url:"/ajax/playlists/curators?page=".concat(e),formatData:tm.convertLegacyPaginatedCollection}},am=function(e,t){var n="/api/domain/v1/search/playlists?query=".concat(e);return t&&(n+="&filter={page:".concat(t,"}")),{key:"playlists:search:".concat(e).concat(t?":".concat(t):""),url:n,formatData:tm.convertLegacyPaginatedCollection}},om=function(e){return{key:"playlist:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=cover,banner")}},sm=function(e){var t=e.slice().sort();return{key:"playlists:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},cm=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(t,"/playlists"),key:"playlist",data:Object.assign(Object.assign({},e),{permissions:nm()}),type:nt.POST,invalidationKeys:"playlists",success:n,error:r,always:i}},lm=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:playlist:".concat(e),data:t,type:nt.PUT,success:n,error:r,always:i}},um=function(e,t,n,r){return{url:"/api/master/v1/playlists/".concat(e),key:"delete:playlist:".concat(e),type:nt.DELETE,invalidationKeys:"playlists",success:t,error:n,always:r}},pm=function(e){return{key:"playlist:".concat(e,":videos"),url:"/api/master/v2/objects/".concat(e,"/videos?query={orderBy:orderindex,limit:100}")}},fm=function(e,t,n,r){return{key:"reorder:playlist",url:"/api/master/v1/objects/".concat(e,"/videos/reorder"),data:t,type:nt.PUT,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r}},dm=function(e,t,n,r,i){return{key:"remove:playlist:video",url:"/api/master/v1/playlists/".concat(e,"/dissociate/").concat(t),type:nt.DELETE,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r,always:i}};function mm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return hm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hm(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gm(e){var t=Object(te.useDispatch)(),n=Qd(),a=mm(d.useState(!1),2),s=a[0],c=a[1],l=i.useBasicFetch(om(e.playlistId));var p=[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,um(e.playlistId,(function(){n.success("Successfully deleted playlist."),r.AppLinkHelper.trigger({application:u.PLAYLISTS,action:o.Playlists.PLAYLISTS})}),(function(){c(!1),n.error("Failed to delete playlist.")}),e.closePopup))},buttonText:"Yes, delete playlist",isSpinnerButton:!0,showSpinner:s}],f=!!l.data;return d.createElement(Of,{title:"Delete Playlist",closePopup:e.closePopup,showLoadingSpinner:!f},f&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,l.data.name),"?"),d.createElement("p",null,"Please ensure it is not being used in any widgets.")),d.createElement(jf,{buttons:p})))}const ym={url:"/api/currentUser",key:"currentuser"};var vm=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:oo.string().trim().max(65535,"Description is too long").default(""),cover:oo.object().shape({fileId:oo.string(),fileIdType:oo.mixed(),url:oo.string()}).default({}).noUnknown(),banner:oo.object().shape({fileId:oo.string(),fileIdType:oo.mixed(),url:oo.string()}).default({}).noUnknown()}).noUnknown(),bm=function(e,t){var n=u.PLAYLISTS,r=o.Playlists,i=[{label:"Edit Playlist Details",appLink:{application:n,action:r.EDIT_PLAYLIST,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_PLAYLIST_VIDEOS,args:[t]}}];return rm(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_PLAYLIST_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_PLAYLIST_AUDIENCES,args:[t]}}]),i};function Sm(e){var t=za(),n=yo(t);return d.createElement(Qa,null,d.createElement(go,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this playlist",autoFocus:!0}),d.createElement(go,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this playlist here"}),d.createElement(fu,{imageType:Fl.Covers,fieldName:"cover",application:u.PLAYLISTS,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement(fu,{imageType:Fl.Banners,fieldName:"banner",application:u.PLAYLISTS,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(bo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(lp,{actions:e.actions})))}function Em(e){var t,n=e.playlist&&e.playlist.id;return d.createElement(ao,{initialValues:e.playlist,validationSchema:vm,onSubmit:e.savePlaylist},d.createElement(Sm,{id:n,actions:!!n&&(t=n,[{label:"Delete playlist",appLink:{application:u.PLAYLISTS,action:o.Playlists.DELETE_PLAYLIST,args:[t]},className:"text-danger"}])}))}function Cm(e){return d.createElement("div",{className:"py-2"},d.createElement(hp,{tabs:bm(e.currentUser,e.playlistId),isItemActive:(t=e.activeAction,function(e){return e.appLink.action===t})}));var t}function Om(e){var t=Object(te.useDispatch)(),n=Qd(),r=i.useBasicFetch(om(e.playlistId)),a=i.useBasicFetch(ym);return d.createElement(d.Fragment,null,!!a.data&&d.createElement(Cm,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST,currentUser:a.data}),!!r.data&&d.createElement(Em,{playlist:r.data,savePlaylist:function(r,a){i.fetch(t,lm(e.playlistId,r,(function(){n.success("Successfully updated playlist.")}),(function(){n.error("Failed to update playlist.")}),a))}}))}const Im={fetch(e,t){const{dataServiceName:n,eventPrefix:r,fetchData:i,setData:a,onError:o,deleteEventPrefix:s}=e;if(!X.isFunction(i))return void x.throw(new B("A fetchData function must be passed to fetch"));if(!X.isFunction(a))return void x.throw(new B("A setData function must be passed to fetch"));const c=o&&X.isFunction(o),l=$d.getInstance(n),u=h.Radio.channel(l.channelName),p=r+":request",f=r+":sync",d=r+":error",m=r+":invalidate",g=s&&s+":sync",y=()=>t(!1),v=()=>t(!0),b=()=>t(!1),S=()=>u.off(m,b);u.once(p,y),u.once(f,v),u.once(m,b),c&&u.once(d,o),g&&u.once(g,S);const E=i(l);return E&&(t(!0),e.setData(E)),()=>{$d.releaseInstance(n),u.off(p,y),u.off(f,v),u.off(m,b),c&&u.off(d,o),g&&u.off(g,S)}}},jm=e=>Array(Array.isArray(e)?e.length:0).fill(!1);function Am(e,t,n=!0){const[r,i]=d.useState(jm(e));d.useEffect(()=>{i(jm(e))},[...t]),d.useEffect(()=>{if(!n)return;const t=[];return e&&e.forEach((e,n)=>{t.push(Im.fetch(e,e=>{e!==r[n]&&i(Mt.cloneAndReplaceAtIdx(r,n,e))}))}),()=>t.forEach(e=>e())},[r,n])}function Tm(e,t,n=!0){const[r,i]=d.useState(!1);d.useEffect(()=>{i(!1)},[...t]),d.useEffect(()=>{if(n)return Im.fetch(e,i)},[r,n])}const wm={getSetStateByKey:(e,t,n)=>r=>e(e=>{const i=X.isFunction(n)?n:X.useIdentity();return Object.assign(Object.assign({},e),{[t]:i(r,e)})})};var Lm,km,_m,xm;!function(e){e[e.Subject=0]="Subject",e[e.Classification=1]="Classification"}(Lm||(Lm={})),function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos"}(km||(km={})),function(e){e.Root="0"}(_m||(_m={})),function(e){e.Root="root"}(xm||(xm={}));var Pm,Nm=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default(""),levelIds:oo.array().of(oo.string()).required("A level is required").default([])}).noUnknown();!function(e){e.Subject="Subject",e.Topic="Topic"}(Pm||(Pm={}));var Dm=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentIds:oo.array().of(oo.string()).default([xm.Root]),subjectIds:oo.array().of(oo.string()).min(1,"A classification must be mapped to at least one subject").required("A classification must be mapped to at least one subject").default([]),type:oo.mixed().required("Type is required").default(Pm.Subject),emphasize:oo.boolean().default(!1),comingSoon:oo.boolean().default(!0),canBePreferred:oo.boolean().default(!1),cover:oo.object().shape({fileId:oo.string(),fileIdType:oo.mixed(),url:oo.string()}).default({}).noUnknown(),banner:oo.object().shape({fileId:oo.string(),fileIdType:oo.mixed(),url:oo.string()}).default({}).noUnknown()}).noUnknown(),Rm=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),Fm=oo.object().shape({name:oo.string().max(255,"Name is too long").required("Name is required"),description:oo.string().max(65535,"Description is too long").required("Description is required")}),Mm=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentId:oo.string().default(_m.Root)}).noUnknown(),Um={singularizeMemberType:function(e){switch(e){case km.Playlists:return"playlist";case km.Series:return"series";case km.Videos:return"video"}},getMemberAppLink:function(e,t){var n=[t];switch(e){case km.Playlists:return{application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:n};case km.Series:return{application:u.SERIES,action:o.Series.EDIT_SERIES,args:n};case km.Videos:return{application:u.VIDEOS,action:o.Videos.EDIT_VIDEO,args:n}}},getMemberActions:function(e,t,n,r){return[{label:"Remove ".concat(Um.singularizeMemberType(n)),appLink:{application:u.SUBJECTS,action:t===Lm.Subject?o.Subjects.REMOVE_SUBJECT_MEMBER:o.Subjects.REMOVE_CLASSIFICATION_MEMBER,args:[e,r,n]},className:"text-danger"}]}},Vm=function(){var e=u.SUBJECTS,t=o.Subjects;return[{label:"Classifications",appLink:{application:e,action:t.CLASSIFICATIONS},activeActions:[t.CLASSIFICATIONS,t.PRESENTATION_CLASSIFICATIONS,t.NEW_CLASSIFICATION,t.EDIT_CLASSIFICATION,t.EDIT_CLASSIFICATION_PLAYLISTS,t.EDIT_CLASSIFICATION_SERIES,t.EDIT_CLASSIFICATION_VIDEOS,t.DELETE_CLASSIFICATION,t.REMOVE_CLASSIFICATION_MEMBER]},{label:"Subjects",appLink:{application:e,action:t.SUBJECTS},activeActions:[t.SUBJECTS,t.NEW_SUBJECT,t.EDIT_SUBJECT,t.EDIT_SUBJECT_PLAYLISTS,t.EDIT_SUBJECT_SERIES,t.EDIT_SUBJECT_VIDEOS,t.SUBJECT_CLASSIFICATIONS,t.DELETE_SUBJECT,t.ADD_SUBJECT_MEMBERS,t.REMOVE_SUBJECT_MEMBER]},{label:"Audiences",appLink:{application:e,action:t.AUDIENCES},activeActions:[t.AUDIENCES,t.PRESENTATION_AUDIENCES,t.NEW_AUDIENCE,t.EDIT_AUDIENCE]},{label:"Levels",appLink:{application:e,action:t.LEVELS},activeActions:[t.LEVELS,t.NEW_LEVEL,t.EDIT_LEVEL]},{label:"Presentations",appLink:{application:e,action:t.PRESENTATIONS},activeActions:[t.PRESENTATIONS,t.NEW_PRESENTATION,t.EDIT_PRESENTATION]}]},Bm=function(e){var t=u.SUBJECTS,n=o.Subjects;return[{label:"Edit Subject Details",appLink:{application:t,action:n.EDIT_SUBJECT,args:[e]}},{label:"Classifications",appLink:{application:t,action:n.SUBJECT_CLASSIFICATIONS,args:[e]}},{label:"Playlists",appLink:{application:t,action:n.EDIT_SUBJECT_PLAYLISTS,args:[e]}},{label:"Series",appLink:{application:t,action:n.EDIT_SUBJECT_SERIES,args:[e]}},{label:"Videos",appLink:{application:t,action:n.EDIT_SUBJECT_VIDEOS,args:[e]}}]},zm=function(e,t){var n=u.SUBJECTS,r=o.Subjects;return[{label:"Edit Classification Details",appLink:{application:n,action:r.EDIT_CLASSIFICATION,args:[e,t]}},{label:"Playlists",appLink:{application:n,action:r.EDIT_CLASSIFICATION_PLAYLISTS,args:[e,t]}},{label:"Series",appLink:{application:n,action:r.EDIT_CLASSIFICATION_SERIES,args:[e,t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_CLASSIFICATION_VIDEOS,args:[e,t]}}]};function Hm(e){return(Hm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qm(e){return function(e){if(Array.isArray(e))return Jm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Jm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jm(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Km(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ym(e,t){return(Ym=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Gm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zm(e);if(t){var i=Zm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wm(this,n)}}function Wm(e,t){return!t||"object"!==Hm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zm(e){return(Zm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qm=function(){return"/api/subjects/v1/subjects/tree"},Xm=function(e){return"/api/subjects/v1/subjects/".concat(e)},eh=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/").concat(t,"?query={limit:100}")},th=function(e,t,n){var r="/api/subjects/v1/subjects/".concat(e,"/classifications"),i=[];return t&&i.push("presentationId=".concat(t)),n&&i.push("query=".concat(n,"{limit:100}")),i.length?"".concat(r,"?").concat(i.join("&")):r},nh=function(){return"/api/subjects/v1/subjects"},rh=function(e){return"/api/subjects/v1/subjects/".concat(e)},ih=function(e){return"/api/subjects/v1/subjects/".concat(e)},ah=function(e){return"/api/subjects/v1/objects/".concat(e,"/subjects")},oh=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/subjects?addToClassifications=").concat(!!t)},sh=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?addToClassifications=").concat(!!t)},ch=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},lh=function(){return"/api/subjects/v1/presentations"},uh=function(e){return"/api/subjects/v1/presentations/".concat(e)},ph=function(){return"/api/subjects/v1/presentations"},fh=function(e){return"/api/subjects/v1/presentations/".concat(e)},dh=function(e){return"/api/subjects/v1/presentations/".concat(e,"/classifications/tree")},mh=function(e){return"/api/subjects/v1/classifications/".concat(e,"?query=cover,banner")},hh=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/").concat(t,"?query={limit:100}")},gh=function(){return"/api/subjects/v1/classifications"},yh=function(e){return"/api/subjects/v1/classifications/".concat(e)},vh=function(e){return"/api/subjects/v1/classifications/".concat(e)},bh=function(e){return"/api/subjects/v1/objects/".concat(e,"/classifications")},Sh=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/classifications?presentationId=").concat(t)},Eh=function(e){return"/api/subjects/v1/classifications/".concat(e,"/objects")},Ch=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},Oh=function(){return"/api/subjects/v1/levels"},Ih=function(e){return"/api/subjects/v1/levels/".concat(e)},jh=function(){return"/api/subjects/v1/levels"},Ah=function(e){return"/api/subjects/v1/levels/".concat(e)},Th=function(e){return"/api/subjects/v1/objects/".concat(e,"/levels")},wh=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/levels?addToAudiences=").concat(!!t)},Lh=function(e){return"/api/subjects/v1/presentations/".concat(e,"/audiences")},kh=function(e){return"/api/subjects/v1/audiences/".concat(e)},_h=function(){return"/api/subjects/v1/audiences"},xh=function(e){return"/api/subjects/v1/audiences/".concat(e)},Ph=function(e){return"/api/subjects/v1/audiences/".concat(e)},Nh=function(e){return"/api/subjects/v1/objects/".concat(e,"/audiences")},Dh=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/audiences?presentationId=").concat(t)},Rh=function(e,t,n){var r="".concat(s.SUBJECT,":").concat(e);return t&&(r+=":".concat(t)),r+=":".concat(s.CLASSIFICATIONS),n&&(r+=":".concat(n)),r},Fh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ym(e,t)}(a,e);var t,n,r,i=Gm(a);function a(){return $m(this,a),i.apply(this,arguments)}return t=a,(n=[{key:"getPresentations",value:function(e,t){return this.get({resource:lh(),eventPrefix:s.PRESENTATIONS,expiryTime:Je.STANDARD,callback:e,errorCallback:t})}},{key:"getPresentation",value:function(e,t,n){return this.get({resource:uh(e),eventPrefix:"".concat(s.PRESENTATION,":").concat(e),expiryTime:Je.STANDARD,callback:t,errorCallback:n})}},{key:"createPresentation",value:function(e,t,n){return this.create({resource:ph(),data:e,callback:t,errorCallback:n,eventPrefix:s.PRESENTATION,invalidationKeys:[s.PRESENTATIONS],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully created presentation."),errorHandler:this.alertService.error("Failed to create presentation.")})}},{key:"updatePresentation",value:function(e,t,n,r){return this.update({resource:fh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_PRESENTATION,":").concat(e),invalidationKeys:["".concat(s.PRESENTATION,":").concat(e),s.PRESENTATIONS],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully updated presentation."),errorHandler:this.alertService.error("Failed to update presentation.")})}},{key:"getSubjectTree",value:function(e,t){return this.get({resource:Qm(),formatData:function(e){return{children:e,name:_m.Root,id:null}},eventPrefix:s.SUBJECTS,expiryTime:Je.STANDARD,callback:e,errorCallback:t})}},{key:"getSubject",value:function(e,t,n){return this.get({resource:Xm(e),eventPrefix:"".concat(s.SUBJECT,":").concat(e),expiryTime:Je.STANDARD,callback:t,errorCallback:n})}},{key:"getSubjectMemberIds",value:function(e,t,n,r){return this.get({resource:eh(e,t),eventPrefix:"".concat(s.SUBJECT,":").concat(e,":").concat(t),expiryTime:Je.STANDARD,callback:n,errorCallback:r})}},{key:"getSubjectClassifications",value:function(e,t,n,r,i){return this.get({resource:th(e,t,n),eventPrefix:Rh(e,t,n),expiryTime:Je.STANDARD,callback:r,errorCallback:i})}},{key:"createSubject",value:function(e,t,n){return this.create({resource:nh(),data:e,callback:t,errorCallback:n,eventPrefix:s.SUBJECT,invalidationKeys:[s.SUBJECTS],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully created subject."),errorHandler:this.alertService.error("Failed to create subject.")})}},{key:"updateSubject",value:function(e,t,n,r){return this.update({resource:rh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_SUBJECT,":").concat(e),invalidationKeys:["".concat(s.SUBJECT,":").concat(e),s.SUBJECTS],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully updated subject."),errorHandler:this.alertService.error("Failed to save subject.")})}},{key:"deleteSubject",value:function(e,t,n){var r=this;return this.delete({resource:ih(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_SUBJECT,invalidationKeys:["".concat(s.SUBJECT,":").concat(e),s.SUBJECTS],successHandler:this.alertService.success("Successfully deleted subject."),errorHandler:function(e){var t,n=(null===(t=e)||void 0===t?void 0:t.code)===_t.Conflict?"Cannot delete a subject with child subjects and/or classifications.":"Failed to delete subject.";r.alertService.error(n)()}})}},{key:"getObjectSubjects",value:function(e,t,n,r){return this.get({resource:ah(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.SUBJECTS),expiryTime:Je.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectSubjects",value:function(e,t,n,r,i,a){var o=Um.singularizeMemberType(n),c=["".concat(n,":").concat(e,":").concat(s.SUBJECTS)];return r&&c.push("".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)),c.push.apply(c,qm(t.map((function(e){return"".concat(s.SUBJECTS,":").concat(e,":").concat(n)})))),this.update({resource:oh(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_SUBJECTS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," subjects.")),errorHandler:this.alertService.error("Failed to update ".concat(o," subjects."))})}},{key:"addObjectsToSubject",value:function(e,t,n,r,i,a){var o=1===t.length?Um.singularizeMemberType(n):n,c=["".concat(s.SUBJECT,":").concat(e,":").concat(n)].concat(qm(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.SUBJECTS)}))),qm(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)}))));return this.create({resource:sh(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.ADD_TO_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:c,expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(o," to subject.")),errorHandler:this.alertService.error("Failed to add ".concat(o," to subject."))})}},{key:"removeObjectsFromSubject",value:function(e,t,n,r,i){var a=1===t.length?Um.singularizeMemberType(n):n,o=["".concat(s.SUBJECT,":").concat(e,":").concat(n)].concat(qm(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.SUBJECTS)}))));return this.delete({resource:ch(e,t),callback:r,errorCallback:i,eventPrefix:"".concat(s.REMOVE_FROM_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:o,expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(a," from subject.")),errorHandler:this.alertService.error("Failed to remove ".concat(a," from subject."))})}},{key:"getClassificationTree",value:function(e,t,n){return this.get({resource:dh(e),formatData:function(e){return{children:e,name:xm.Root,id:null}},eventPrefix:"".concat(s.CLASSIFICATIONS,":").concat(e),expiryTime:Je.STANDARD,callback:t,errorCallback:n})}},{key:"getClassification",value:function(e,t,n){return this.get({resource:mh(e),eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e),expiryTime:Je.STANDARD,callback:t,errorCallback:n})}},{key:"getClassificationMembers",value:function(e,t,n,r){return this.get({resource:hh(e,t),eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e,":").concat(t),expiryTime:Je.STANDARD,callback:n,errorCallback:r})}},{key:"createClassification",value:function(e,t,n){return this.create({resource:gh(),data:e,callback:t,errorCallback:n,eventPrefix:s.CLASSIFICATION,invalidationKeys:[s.CLASSIFICATIONS],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully created classification."),errorHandler:this.alertService.error("Failed to create classification.")})}},{key:"updateClassification",value:function(e,t,n,r){return this.update({resource:yh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_CLASSIFICATION,":").concat(e),invalidationKeys:["".concat(s.CLASSIFICATION,":").concat(e),s.CLASSIFICATIONS],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully updated classification."),errorHandler:this.alertService.error("Failed to save classification.")})}},{key:"deleteClassification",value:function(e,t,n){return this.delete({resource:vh(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_CLASSIFICATION,invalidationKeys:["".concat(s.CLASSIFICATION,":").concat(e),s.CLASSIFICATIONS],successHandler:this.alertService.success("Successfully deleted classification"),errorHandler:this.alertService.error("Failed to delete classification")})}},{key:"getObjectClassifications",value:function(e,t,n,r){return this.get({resource:bh(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.CLASSIFICATIONS),expiryTime:Je.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectClassifications",value:function(e,t,n,r,i,a){var o=Um.singularizeMemberType(r),c=["".concat(r,":").concat(e,":").concat(s.CLASSIFICATIONS)];return c.push.apply(c,qm(n.map((function(e){return"".concat(s.CLASSIFICATION,":").concat(e,":").concat(r)})))),this.update({resource:Sh(e,t),data:n,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_CLASSIFICATIONS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," classifications.")),errorHandler:this.alertService.error("Failed to update ".concat(o," classifications."))})}},{key:"addObjectsToClassification",value:function(e,t,n,r,i,a,o){var c=1===t.length?Um.singularizeMemberType(n):n,l=["".concat(s.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&l.push(Rh(r,i,n)),l.push.apply(l,qm(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)})))),this.create({resource:Eh(e),data:t,callback:a,errorCallback:o,eventPrefix:"".concat(s.ADD_TO_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:l,expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(c," to classification.")),errorHandler:this.alertService.error("Failed to add ".concat(c," to classification."))})}},{key:"removeObjectsFromClassification",value:function(e,t,n,r,i,a,o){var c=1===t.length?Um.singularizeMemberType(n):n,l=["".concat(s.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&l.push(Rh(r,i,n)),l.push.apply(l,qm(t.map((function(e){return"".concat(n,":").concat(e,":").concat(s.CLASSIFICATIONS)})))),this.delete({resource:Ch(e,t),callback:a,errorCallback:o,eventPrefix:"".concat(s.REMOVE_FROM_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:l,expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(c," from classification.")),errorHandler:this.alertService.error("Failed to remove ".concat(c," from classification."))})}},{key:"getLevels",value:function(e,t){return this.get({resource:Oh(),eventPrefix:s.LEVELS,expiryTime:Je.STANDARD,callback:e,errorCallback:t})}},{key:"getLevel",value:function(e,t,n){return this.get({resource:Ih(e),eventPrefix:"".concat(s.LEVEL,":").concat(e),expiryTime:Je.STANDARD,callback:t,errorCallback:n})}},{key:"createLevel",value:function(e,t,n){return this.create({resource:jh(),data:e,callback:t,errorCallback:n,eventPrefix:s.LEVEL,invalidationKeys:[s.LEVELS],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully created level."),errorHandler:this.alertService.error("Failed to create level.")})}},{key:"updateLevel",value:function(e,t,n,r){return this.update({resource:Ah(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_LEVEL,":").concat(e),invalidationKeys:["".concat(s.LEVEL,":").concat(e),s.LEVELS],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully updated level."),errorHandler:this.alertService.error("Failed to save level.")})}},{key:"getObjectLevels",value:function(e,t,n,r){return this.get({resource:Th(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.LEVELS),expiryTime:Je.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectLevels",value:function(e,t,n,r,i,a){var o=Um.singularizeMemberType(n),c=["".concat(n,":").concat(e,":").concat(s.LEVELS)];return r&&c.push("".concat(n,":").concat(e,":").concat(s.AUDIENCES)),this.update({resource:wh(e,r),data:t,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_LEVELS,":").concat(e),invalidationKeys:c,successHandler:this.alertService.success("Successfully updated ".concat(o," levels.")),errorHandler:this.alertService.error("Failed to update ".concat(o," levels."))})}},{key:"getAudiences",value:function(e,t,n){return this.get({resource:Lh(e),callback:t,errorCallback:n,eventPrefix:"".concat(s.AUDIENCES,":").concat(e),expiryTime:Je.STANDARD})}},{key:"getAudience",value:function(e,t,n){return this.get({resource:kh(e),callback:t,errorCallback:n,eventPrefix:"".concat(s.AUDIENCE,":").concat(e),expiryTime:Je.STANDARD})}},{key:"createAudience",value:function(e,t,n){return this.create({resource:_h(),data:e,callback:t,errorCallback:n,eventPrefix:s.AUDIENCE,invalidationKeys:[s.AUDIENCES],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully created audience."),errorHandler:this.alertService.error("Failed to create audience.")})}},{key:"updateAudience",value:function(e,t,n,r){return this.update({resource:xh(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(s.UPDATE_AUDIENCE,":").concat(e),invalidationKeys:["".concat(s.AUDIENCE,":").concat(e),s.AUDIENCES],expiryTime:Je.STANDARD,successHandler:this.alertService.success("Successfully updated audience."),errorHandler:this.alertService.error("Failed to update audience.")})}},{key:"deleteAudience",value:function(e,t,n){return this.delete({resource:Ph(e),callback:t,errorCallback:n,eventPrefix:s.DELETE_AUDIENCE,invalidationKeys:["".concat(s.AUDIENCE,":").concat(e),s.AUDIENCES],successHandler:this.alertService.success("Successfully deleted audience"),errorHandler:this.alertService.error("Failed to delete audience")})}},{key:"getObjectAudiences",value:function(e,t,n,r){return this.get({resource:Nh(e),eventPrefix:"".concat(t,":").concat(e,":").concat(s.AUDIENCES),expiryTime:Je.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectAudiences",value:function(e,t,n,r,i,a){var o=Um.singularizeMemberType(r);return this.update({resource:Dh(e,t),data:n,callback:i,errorCallback:a,eventPrefix:"".concat(s.UPDATE_OBJECT_AUDIENCES,":").concat(e),invalidationKeys:["".concat(r,":").concat(e,":").concat(s.AUDIENCES)],successHandler:this.alertService.success("Successfully updated ".concat(o," audiences.")),errorHandler:this.alertService.error("Failed to update ".concat(o," audiences."))})}},{key:"name",get:function(){return f.SUBJECT}},{key:"channelName",get:function(){return p.SUBJECT}}])&&Km(t.prototype,n),r&&Km(t,r),a}(De),Mh={dataServiceName:f.SUBJECT,dataChannelName:p.SUBJECT},Uh={getSubjectTreeFetchOptions:function(e,t){return Object.assign(Object.assign({},Mh),{eventPrefix:s.SUBJECTS,fetchData:function(e){return e.getSubjectTree()},setData:e,onError:t})},getSubjectFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(s.SUBJECT,":").concat(e),fetchData:function(t){return t.getSubject(e)},setData:t,onError:n,deleteEventPrefix:s.DELETE_SUBJECT})},getSubjectMemberIdsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(s.SUBJECT,":").concat(e,":").concat(t),fetchData:function(n){return n.getSubjectMemberIds(e,t)},setData:n,onError:r})},getSubjectClassificationFetchOptions:function(e,t,n,r,i){return Object.assign(Object.assign({},Mh),{eventPrefix:Rh(e,n,r),fetchData:function(t){return t.getSubjectClassifications(e,n,r)},setData:t,onError:i})},getObjectSubjectsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.SUBJECTS),fetchData:function(n){return n.getObjectSubjects(e,t)},setData:n,onError:r})},getPresentationsFetchOptions:function(e,t){return Object.assign(Object.assign({},Mh),{eventPrefix:s.PRESENTATIONS,fetchData:function(e){return e.getPresentations()},setData:e,onError:t})},getPresentationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(s.PRESENTATION,":").concat(e),fetchData:function(t){return t.getPresentation(e)},setData:t,onError:n})},getClassificationTreeFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(s.CLASSIFICATIONS,":").concat(e),fetchData:function(t){return t.getClassificationTree(e)},setData:t,onError:n})},getClassificationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e),fetchData:function(t){return t.getClassification(e)},setData:t,onError:n,deleteEventPrefix:s.DELETE_CLASSIFICATION})},getClassificationMembersFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(s.CLASSIFICATION,":").concat(e,":").concat(t),fetchData:function(n){return n.getClassificationMembers(e,t)},setData:n,onError:r})},getObjectClassificationsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.CLASSIFICATIONS),fetchData:function(n){return n.getObjectClassifications(e,t)},setData:n,onError:r})},getLevelsFetchOptions:function(e,t){return Object.assign(Object.assign({},Mh),{eventPrefix:s.LEVELS,fetchData:function(e){return e.getLevels()},setData:e,onError:t})},getLevelFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(s.LEVEL,":").concat(e),fetchData:function(t){return t.getLevel(e)},setData:t,onError:n})},getObjectLevelsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.LEVELS),fetchData:function(n){return n.getObjectLevels(e,t)},setData:n,onError:r})},getAudiencesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(s.AUDIENCES,":").concat(e),fetchData:function(t){return t.getAudiences(e)},setData:t,onError:n})},getAudienceFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(s.AUDIENCE,":").concat(e),fetchData:function(t){return t.getAudience(e)},setData:t,onError:n})},getObjectAudiencesFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Mh),{eventPrefix:"".concat(t,":").concat(e,":").concat(s.AUDIENCES),fetchData:function(n){return n.getObjectAudiences(e,t)},setData:n,onError:r})}},Vh=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[e.id]}},Bh=function(e,t){var n=e.levelIds;return t.filter((function(e){return n.includes(e.id)}))};function zh(e){var t=e.showLevels;return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Audiences"),!!t&&d.createElement("th",null,"Mapped Level(s)")))}function Hh(e){var t,n=e.audience,r=e.levels;return d.createElement("tr",null,d.createElement("td",null,d.createElement(kl,{appLink:(t=n,{application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[t.presentationId,t.masterId]})},n.name)),d.createElement("td",null,r.map((function(e){return d.createElement(kl,{key:e.id,appLink:Vh(e),className:"mr-2"},e.name)}))))}function qh(e){var t=e.audiences,n=e.levels;return d.createElement(co.Table,{responsive:!0,bordered:!0},d.createElement(zh,{showLevels:!!t.length}),d.createElement("tbody",null,t.length?t.map((function(e){return d.createElement(Hh,{key:e.masterId,audience:e,levels:Bh(e,n)})})):d.createElement("tr",null,d.createElement("td",null,"This presentation has no audiences."))))}function Jh(e){var t=null===e.masterId||void 0===e.masterId,n=za(),r=yo(n);return d.createElement(Qa,null,d.createElement(go,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this audience",autoFocus:!0}),d.createElement(go,{label:"Mapped Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(bo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(co.Button,{as:kl,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_AUDIENCE,args:[e.presentationId,e.masterId]}},"Delete")))}function $h(e){return d.createElement(ao,{initialValues:e.audience,validationSchema:Nm,onSubmit:e.saveAudience},d.createElement(Jh,{masterId:e.audience&&e.audience.masterId,presentationId:e.presentationId,levels:e.levels}))}function Kh(e){var t=e.objectAudiences,n=e.presentationAudiences;return t.filter((function(e){return n.some((function(t){return t.masterId===e.masterId}))}))}function Yh(e){var t,n,r,i,a,o=Um.singularizeMemberType(e.memberType),s=(n=(t=e).presentationAudiences,r=t.objectLevels,i=t.objectAudiences,a=r.map((function(e){return e.id})),n.filter((function(e){return Mt.intersection(e.levelIds,a).length||i.some((function(t){return t.masterId===e.masterId}))})));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Levels"),d.createElement("p",null,"Select which levels this ".concat(o," is mapped to.")),d.createElement("p",null,"To see how levels correspond to audiences, scroll down to the audience-level mappings table."),d.createElement(hg,{initialValues:{levelIds:e.objectLevels.map((function(e){return e.id})),addToAudiences:!0},saveLevels:e.saveLevels,levels:e.levels,memberType:e.memberType})),d.createElement("h6",null,"Audiences"),d.createElement("p",null,"Select a presentation to view its audiences and map them to this ".concat(o,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(vg,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),d.createElement("p",null,"Audience to level mappings for this presentation are displayed below."),d.createElement(qh,{levels:e.levels,audiences:e.presentationAudiences}),d.createElement("p",null,"Only the audiences which are mapped to a level that this"+" ".concat(o," is mapped to are displayed below.")),!!s.length&&d.createElement(Wh,{initialValues:{audienceIds:Kh(e).map((function(e){return e.masterId}))},saveAudiences:e.saveAudiences,audiences:s}))}function Gh(e){var t=za(),n=yo(t);return d.createElement(Qa,null,d.createElement(go,{label:"Audience(s)",as:"select",name:"audienceIds",id:"audience-ids",multiple:!0,size:e.audiences.length,value:t.values.audienceIds},e.audiences.map((function(e){return d.createElement("option",{key:e.masterId,value:e.masterId},e.name)}))),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(bo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Audiences")))}function Wh(e){return d.createElement(ao,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.audienceIds;return e.saveAudiences(r,n)},enableReinitialize:!0},d.createElement(Gh,{audiences:e.audiences}))}function Zh(e){var t=e.item,n=e.getItemAppLink,r=e.actions,i=e.pinState;return d.createElement("tr",null,d.createElement("td",null,d.createElement(kl,{appLink:n(t)},t.name)),i.isPinnable&&d.createElement("td",null,d.createElement(Dl,{selected:parseInt(t.id)===parseInt(i.currentPinnedVideo),onToggle:function(e){return i.onChange(e,t.id)},id:t.id})),r&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(lp,{actions:r}))))}function Qh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Xh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ng(e){var t=e.items,n=e.memberType,r=e.classification,i=e.getItemAppLink,a=e.getActions,o=e.updatePinnedVideo,s=eg(d.useState(!1),2),c=s[0],l=s[1],u=function(e,t){var n=e.pinnedVideoMasterId||null,r=Qh(d.useState(n),2),i=r[0],a=r[1];return{currentPinnedVideo:i,onChange:function(e,t){a(e?t:null)},canSubmit:n!==i,isPinnable:t===km.Videos}}(r,n);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this classification."));var p="".concat(Ql(Um.singularizeMemberType(n))," Name");return d.createElement(d.Fragment,null,d.createElement(co.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,p),u.isPinnable&&d.createElement("th",null,"Pinned"),X.isFunction(a)&&d.createElement("th",null))),d.createElement("tbody",null,t.map((function(e){return d.createElement(Zh,{item:e,key:e.id,getItemAppLink:i,actions:X.isFunction(a)&&a(e),pinState:u})})))),u.isPinnable&&d.createElement(bo,{showSpinner:c,onClick:function(){l(!0),o(u.currentPinnedVideo,(function(){return l(!1)}))},disabled:!u.canSubmit||c},"Save"))}function rg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ig(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ig(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ig(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ag=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e]}};function og(e){var t=za(),n=yo(t),r=null===e.id||void 0===e.id,i=!r||!(!t.values.parentIds||!t.values.parentIds.length),a=rg(d.useState(i),2),s=a[0],c=a[1];d.useEffect((function(){return c(i)}),[e.id,t.values.parentIds]),d.useEffect((function(){t.values.subjectIds.length&&!t.touched.subjectIds&&t.setFieldTouched("subjectIds",!0)}),[t.values.subjectIds]);var l=function(e){return t.setFieldValue("parentIds",Mt.addOrRemove(t.values.parentIds.map((function(e){return e.toString()})),e.id.toString()))},p=function(e){return t.setFieldValue("subjectIds",Mt.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),e.id.toString()))},f=function(e){return"".concat(lo.getCustomFormControlClassName(t.errors,t.touched,e)," h-auto py-2")};return d.createElement(Qa,null,d.createElement(go,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this classification",autoFocus:!0}),d.createElement(go,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},pt.getEnumKeys(Pm).map((function(e){return d.createElement("option",{key:e,value:Pm[e]},e)}))),d.createElement(go,{label:"Coming Soon",name:"comingSoon",id:"comingSoon",type:"checkbox",checked:t.values.comingSoon}),d.createElement(go,{label:"Emphasize",name:"emphasize",id:"emphasize",type:"checkbox",checked:t.values.emphasize}),d.createElement(go,{label:"Can Be Preferred",name:"canBePreferred",id:"canBePreferred",type:"checkbox",checked:t.values.canBePreferred}),d.createElement(go,{name:"parentIds"},(function(){return d.createElement("div",{className:f("parentIds")},d.createElement(wp,{label:"Parent Classification(s)",tree:e.classificationTree,selectedIds:t.values.parentIds,onSelect:l,collapse:s,noSelectionMessage:"No parent selected, this will be a root classification.",isNodeDisabled:(n=e.classificationTree,r=e.id,function(e){if(e.id===r)return!0;var t=tu.find(n,r);return!!tu.find(t,e.id)})}));var n,r})),d.createElement(go,{name:"subjectIds"},(function(){return d.createElement("div",{className:f("subjectIds")},d.createElement(wp,{label:"Mapped Subject(s)",tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:p,collapse:!r,getSelectedItemAppLink:ag}))})),d.createElement(fu,{imageType:Fl.Covers,fieldName:"cover",application:u.SUBJECTS,uploadAction:o.Subjects.UPLOAD_IMAGE}),d.createElement(fu,{imageType:Fl.Banners,fieldName:"banner",application:u.SUBJECTS,uploadAction:o.Subjects.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(bo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},r?"Create":"Save"),!r&&d.createElement(co.Button,{as:kl,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_CLASSIFICATION,args:[e.presentationId,e.id]}},"Delete")))}function sg(e){return d.createElement(ao,{initialValues:e.classification,validationSchema:Dm,onSubmit:e.saveClassification},d.createElement(og,{id:e.classification&&e.classification.id,presentationId:e.presentationId,classificationTree:e.classificationTree,subjectTree:e.subjectTree}))}var cg=function(e){return function(t){if(!e)return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION;switch(e){case km.Playlists:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;case km.Series:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_SERIES;case km.Videos:return t.appLink.action===o.Subjects.EDIT_CLASSIFICATION_VIDEOS}}};function lg(e){var t=e.presentation,n=e.classificationId,r=e.memberType;return t?d.createElement(d.Fragment,null,d.createElement("h6",null,"Presentation: ".concat(!!t&&t.name)),d.createElement("div",{className:"py-2"},d.createElement(hp,{tabs:zm(t.id,n),isItemActive:cg(r)}))):d.createElement(d.Fragment,null)}function ug(e){var t=za(),n=yo(t),r=function(e){return t.setFieldValue("classificationIds",Mt.addOrRemove(t.values.classificationIds.map((function(e){return e.toString()})),e.id.toString()))},i="".concat(lo.getCustomFormControlClassName(t.errors,t.touched,"classificationIds")," h-auto py-2");return d.createElement(Qa,null,d.createElement(go,{name:"classificationIds"},(function(){return d.createElement("div",{className:i},d.createElement(wp,{label:"Mapped Classification(s)",tree:e.classificationTree,selectedIds:t.values.classificationIds,onSelect:r,getSelectedItemAppLink:(n=e.presentationId,function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[n,e]}}),isNodeDisabled:e.isClassificationDisabled}));var n})),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(bo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Classifications")))}function pg(e){return d.createElement(ao,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.classificationIds;return e.saveClassifications(r,n)},enableReinitialize:!0},d.createElement(ug,{presentationId:e.presentationId,classificationTree:e.classificationTree,isClassificationDisabled:e.isClassificationDisabled}))}function fg(e){var t=null===e.id||void 0===e.id,n=za(),r=yo(n);return d.createElement(Qa,null,d.createElement(go,{label:"Name",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this level",autoFocus:!0}),d.createElement(bo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"))}function dg(e){return d.createElement(ao,{initialValues:e.level,validationSchema:Rm,onSubmit:e.saveLevel},d.createElement(fg,{id:e.level&&e.level.id}))}function mg(e){var t=Um.singularizeMemberType(e.memberType),n=za(),r=yo(n);return d.createElement(Qa,null,d.createElement(go,{label:"Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement(go,{label:"Automatically add to audiences*",name:"addToAudiences",id:"add-to-audiences",type:"checkbox",checked:n.values.addToAudiences}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(t," to a level, all of that level's")+" audiences across all presentations will also be added to.")),d.createElement("p",null,d.createElement("strong",null,"Note:")," When removing a ".concat(t," from a level, that level's audiences "),d.createElement("strong",null,"will not")," be automatically removed from."),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(bo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},"Save Levels")))}function hg(e){return d.createElement(ao,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.levelIds,i=t.addToAudiences;return e.saveLevels(r,i,n)}},d.createElement(mg,{levels:e.levels,memberType:e.memberType}))}function gg(e){var t=e.values,n=t.name,r=t.description,i=e.id,a=e.isSubmitting,o=!i;return d.createElement(Qa,null,d.createElement(go,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this presentation",autoFocus:!0}),d.createElement(go,{label:"Description",as:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this presentation here"}),d.createElement(bo,{showSpinner:a,type:"submit"},o?"Create":"Save"))}function yg(e){var t=e.presentation,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,a=void 0===i?"":i,o=t.description,s=void 0===o?"":o,c=e.savePresentation;return d.createElement(Ka,{initialValues:{name:a,description:s},validationSchema:Fm,onSubmit:c},(function(e){return d.createElement(gg,Object.assign({id:r},e))}))}function vg(e){var t=e.presentations,n=e.currentPresentation,r=e.setCurrentPresentation,i=e.label,a=function(e){var n,i,a=(n=e,i=t,Mt.first(i.filter((function(e){return e.id.toString()===n.toString()}))));r(a)};return d.useEffect((function(){t&&!n&&r(t[0])}),[t]),d.createElement(d.Fragment,null,!!n&&d.createElement(d.Fragment,null,d.createElement(co.Form.Label,null,i),d.createElement(co.Form.Control,{as:"select",value:n.id,onChange:function(e){return a(e.target.value)},className:"cursor-pointer"},t.map((function(e){return d.createElement("option",{value:e.id,key:e.id},e.name)})))))}function bg(e){return d.createElement(d.Fragment,null,d.createElement("h4",null,"".concat(Ql(e.memberType))),d.createElement(co.Table,{responsive:!0},d.createElement("tbody",null,e.objects&&e.objects.map((function(t){return d.createElement("tr",{key:t.id},d.createElement("td",null,d.createElement(kl,{appLink:Um.getMemberAppLink(e.memberType,t.id)},t.name)))})))),d.createElement(_g,{initialValues:{subjectIds:[],addToClassifications:!0},subjectTree:e.subjectTree,saveSubjects:e.onClickAddToSubject,memberType:e.memberType,saveBtnText:"Add to subject",subjectRequired:!0}))}function Sg(e){return function(e){if(Array.isArray(e))return Eg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Eg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eg(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Eg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cg(e){var t=Um.singularizeMemberType(e.memberType),n=[].concat(Sg(e.objectClassifications),Sg(e.objectSubjectClassifications)).map((function(e){return e.id}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Subjects"),d.createElement("p",null,"Select which subjects this ".concat(t," is mapped to.")),d.createElement(_g,{initialValues:{subjectIds:e.objectSubjects.map((function(e){return e.id}))},subjectTree:e.subjectTree,saveSubjects:e.saveSubjects,memberType:e.memberType,saveBtnText:"Save Subjects",allowMultiple:!0})),d.createElement("h6",null,"Classifications"),d.createElement("p",null,"Select a presentation to view its classifications and map them to this ".concat(t,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(vg,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),e.currentPresentation&&e.classificationTree&&e.classificationTree.children.length?d.createElement(d.Fragment,null,d.createElement("p",null,"Only classifications which are mapped to one of the subjects selected above can be selected."),d.createElement(pg,{initialValues:{classificationIds:e.objectClassifications.map((function(e){return e.id}))},presentationId:e.currentPresentation.id,classificationTree:e.classificationTree,saveClassifications:e.saveClassifications,isClassificationDisabled:function(e){return!n.includes(e.id)}})):d.createElement("p",null,"This presentation has no classifications."))}function Og(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ig(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ig(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ig(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}vg.defaultProps={label:"Presentation"};function jg(e){var t=!e.id,n=za(),r=yo(n),i=!t||!!n.values.parentId,a=Og(d.useState(i),2),s=a[0],c=a[1];d.useEffect((function(){return c(i)}),[e.id,n.values.parentId]);var l=function(e){var t=e.id===n.values.parentId?null:e.id;n.setFieldValue("parentId",t)},p="".concat(lo.getCustomFormControlClassName(n.errors,n.touched,"parentId")," h-auto py-2");return d.createElement(Qa,null,d.createElement(go,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this subject",autoFocus:!0}),d.createElement(go,{name:"parentId"},(function(){return d.createElement("div",{className:p},d.createElement(wp,{label:"Parent Subject",tree:e.subjectTree,selectedIds:[n.values.parentId],onSelect:l,collapse:s,noSelectionMessage:"No parent selected, this will be a root subject.",isNodeDisabled:(t=e.subjectTree,r=e.id,function(e){if(e.id===r)return!0;var n=tu.find(t,r);return!!tu.find(n,e.id)})}));var t,r})),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(bo,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(co.Button,{as:kl,variant:"danger",appLink:{application:u.SUBJECTS,action:o.Subjects.DELETE_SUBJECT,args:[e.id]}},"Delete")))}function Ag(e){return d.createElement(ao,{initialValues:e.subject,validationSchema:Mm,onSubmit:e.saveSubject},d.createElement(jg,{id:e.subject&&e.subject.id,subjectTree:e.subjectTree}))}var Tg=function(e){return function(t){return t.appLink.action===e}};function wg(e){var t=e.subjectId,n=e.activeAction;return d.createElement(d.Fragment,null,d.createElement(co.Alert,{variant:"danger"},"Warning: You are editing the backbone subjects."),d.createElement("div",{className:"py-2"},d.createElement(hp,{tabs:Bm(t),isItemActive:Tg(n)})))}var Lg=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e]}};function kg(e){var t=za(),n=yo(t),r=function(n){var r=e.allowMultiple?Mt.addOrRemove(t.values.subjectIds.map((function(e){return e.toString()})),n.id.toString()):[n.id];t.setFieldValue("subjectIds",r)},i=Um.singularizeMemberType(e.memberType),a="".concat(lo.getCustomFormControlClassName(t.errors,t.touched,"subjectIds")," h-auto py-2");return d.createElement(Qa,null,d.createElement(go,{name:"subjectIds"},(function(){return d.createElement("div",{className:a},d.createElement(wp,{label:"Mapped Subject".concat(e.allowMultiple?"(s)":""),tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:r,collapse:!!t.initialValues.subjectIds.length,getSelectedItemAppLink:Lg}))})),d.createElement(go,{label:"Automatically add to classifications*",name:"addToClassifications",id:"add-to-classifications",type:"checkbox",checked:t.values.addToClassifications}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(i," to a subject, all of that subject's")+" mapped classifications across all presentations will also be added to.")),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(bo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.saveBtnText)))}function _g(e){var t;return d.createElement(ao,{initialValues:e.initialValues,validationSchema:(t=e.subjectRequired,oo.object().shape({subjectIds:t?oo.array().of(oo.string()).min(1,"A subject is required").required("A subject is required"):oo.array().of(oo.string()),addToClassifications:oo.boolean().default(!0)}).noUnknown()),onSubmit:function(t,n){var r=t.subjectIds,i=t.addToClassifications;return e.saveSubjects(r,i,n)}},d.createElement(kg,{subjectTree:e.subjectTree,memberType:e.memberType,allowMultiple:e.allowMultiple,saveBtnText:e.saveBtnText}))}kg.defaultProps={saveBtnText:"Save"};var xg=function(e){return d.createElement("div",{className:"border rounded p-2 mb-3"},d.createElement("h6",{className:"border-bottom pb-1"},e.presentation.name),e.classifications&&e.classifications.length?d.createElement("ul",{className:"list-unstyled mb-0"},e.classifications.map((function(t){return d.createElement("li",{key:t.id,className:"py-1"},d.createElement(kl,{appLink:(n=e.presentation.id,r=t.id,{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[n,r]})},t.name));var n,r}))):d.createElement("p",null,d.createElement("em",null,"There are no classifications mapped to this subject in this presentation.")))},Pg=function(e){return d.createElement(d.Fragment,null,!!e.presentations&&!!e.classificationDictionary&&e.presentations.map((function(t){return d.createElement(xg,{key:t.id,presentation:t,classifications:e.classificationDictionary[t.id]})})))},Ng=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Dg(e){return d.createElement(d.Fragment,null,e.classifications.map((function(t){return d.createElement("th",{key:t.id},d.createElement("span",{className:"d-inline-block"},d.createElement(Dl,{selected:e.getIsClassificationSelected(t),onToggle:function(n){return e.onToggleClassification(t.id,n)}})),d.createElement(kl,{appLink:e.getClassificationAppLink(t.id)},function(e,t){return t?e.name:"Classification: ".concat(e.name)}(t,e.showClassificationSubHeader)))})))}function Rg(e){var t=e.memberType,n=e.hasActions,r=e.classifications,i=Ng(e,["memberType","hasActions","classifications"]),a="".concat(Ql(Um.singularizeMemberType(t))," Name"),o=!!r&&!!r.length,s=o&&r.length>1,c=o?2:1,l=Object.assign({classifications:r,showClassificationSubHeader:s},i);return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",{rowSpan:c},a),o&&(s?d.createElement("th",{colSpan:r.length,className:"text-center"},"Classifications"):d.createElement(Dg,Object.assign({},l))),n&&d.createElement("th",{rowSpan:c})),o&&s&&d.createElement("tr",null,d.createElement(Dg,Object.assign({},l))))}function Fg(e){var t=e.member,n=t.id,i=t.name,a=t.classifications,o=void 0===a?[]:a,s=e.getMemberAppLink,c=e.onToggleClassification,l=e.actions,u=X.isFunction(s)&&s(n);return o.length&&!X.isFunction(c)&&r.ErrorHelper.throw(new B("onToggleClassification must be passed to SubjectMemberItem")),d.createElement("tr",null,d.createElement("td",null,u?d.createElement(kl,{appLink:s(n)},i):i),!!o.length&&o.map((function(e){return d.createElement("td",{key:e.id},d.createElement(Dl,{selected:e.selected,onToggle:function(t){return c(e.id,t,n)}}))})),l&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(lp,{actions:l}))))}var Mg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Ug(e,t){return function(n){var r=n[e],i=kp.length(r);return!!i&&i===t.length}}function Vg(e){var t=e.members,n=e.memberType,r=e.getActions,i=e.classifications,a=e.getClassificationAppLink,o=e.onToggleClassification,s=Mg(e,["members","memberType","getActions","classifications","getClassificationAppLink","onToggleClassification"]);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this subject."));var c=X.isFunction(r),l={memberType:n,classifications:i,getClassificationAppLink:a,getIsClassificationSelected:Ug(n,t),onToggleClassification:o,hasActions:c};return d.createElement(co.Table,{responsive:!0,bordered:!0},d.createElement(Rg,Object.assign({},l)),d.createElement("tbody",null,t.map((function(e,t){return d.createElement(Fg,Object.assign({key:t,member:e,actions:c&&r(e.id),onToggleClassification:o},s))}))))}function Bg(e){var t=e.navItems,n=e.currentAppLink;return d.createElement(co.Container,null,d.createElement(co.Navbar,{className:"justify-content-between align-items-center"},d.createElement(co.Nav,null,!!t&&t.map((function(e,t){return d.createElement(co.Nav.Item,{key:t},d.createElement(kl,{appLink:e.appLink,className:"nav-link".concat(Gl.isItemActive(e,n)?" text-primary":"")},e.label))})))))}function zg(e,t){d.useEffect((function(){e.presentations&&!e.currentPresentation&&wm.getSetStateByKey(t,"currentPresentation")(Mt.first(e.presentations))}),[e.presentations])}function Hg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jg(e){var t=i.useBasicFetch(om(e.playlistId)),n=i.useBasicFetch(ym),r=Hg(d.useState({}),2),a=r[0],s=r[1],c=Kd(f.SUBJECT);!function(e,t,n){var r=function(e){return wm.getSetStateByKey(n,e)};Am([Uh.getObjectLevelsFetchOptions(e,km.Playlists,r("playlistLevels"))],[e]),Tm(Uh.getObjectAudiencesFetchOptions(e,km.Playlists,r("playlistAudiences")),[e,t.playlistLevels]),Am([Uh.getPresentationsFetchOptions(r("presentations")),Uh.getLevelsFetchOptions(r("levels"))],[]),Tm(!!t.currentPresentation&&Uh.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.playlistId,a,s),zg(a,s);var l=!!(a.presentations&&a.levels&&a.presentationAudiences&&a.playlistLevels&&a.playlistAudiences);return d.createElement(d.Fragment,null,!!n.data&&d.createElement(Cm,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_AUDIENCES,currentUser:n.data}),d.createElement(up,{object:t.data}),!!l&&d.createElement(Yh,{objectLevels:a.playlistLevels,objectAudiences:a.playlistAudiences,presentations:a.presentations,currentPresentation:a.currentPresentation,setCurrentPresentation:wm.getSetStateByKey(s,"currentPresentation"),levels:a.levels,presentationAudiences:a.presentationAudiences,memberType:km.Playlists,saveLevels:function(t,n,r){return c.updateObjectLevels(e.playlistId,t,km.Playlists,n,r,r)},saveAudiences:function(t,n){return c.updateObjectAudiences(e.playlistId,a.currentPresentation.id,t,km.Playlists,n,n)}}))}function $g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||Yg(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kg(e){return function(e){if(Array.isArray(e))return Gg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Yg(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yg(e,t){if(e){if("string"==typeof e)return Gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gg(e,t):void 0}}function Gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wg(e){var t=i.useBasicFetch(om(e.playlistId)),n=i.useBasicFetch(ym),r=$g(d.useState({}),2),a=r[0],s=r[1],c=Kd(f.SUBJECT);!function(e,t,n){var r=function(e){return wm.getSetStateByKey(n,e)};Am([Uh.getSubjectTreeFetchOptions(r("subjectTree")),Uh.getPresentationsFetchOptions(r("presentations"))],[]),Am([Uh.getObjectSubjectsFetchOptions(e,km.Playlists,r("playlistSubjects"))],[e]),Tm(!!t.currentPresentation&&Uh.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.playlistSubjects]);var i=function(e,t){return[].concat(Kg(t.subjectClassifications||[]),Kg(e))},a=t.playlistSubjects&&t.playlistSubjects.map((function(e){return Uh.getSubjectClassificationFetchOptions(e.id,wm.getSetStateByKey(n,"subjectClassifications",i))}));Am(a,[t.playlistSubjects],!!a),Tm(Uh.getObjectClassificationsFetchOptions(e,km.Playlists,r("playlistClassifications")),[e,t.playlistSubjects])}(e.playlistId,a,s),zg(a,s);var l=!!(a.playlistSubjects&&a.subjectTree&&a.presentations&&a.classificationTree&&a.playlistClassifications&&a.subjectClassifications);return d.createElement(d.Fragment,null,!!n.data&&d.createElement(Cm,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_SUBJECTS,currentUser:n.data}),d.createElement(up,{object:t.data}),l&&d.createElement(Cg,{objectSubjects:a.playlistSubjects,subjectTree:a.subjectTree,memberType:km.Playlists,presentations:a.presentations,currentPresentation:a.currentPresentation,setCurrentPresentation:wm.getSetStateByKey(s,"currentPresentation"),objectClassifications:a.playlistClassifications,objectSubjectClassifications:a.subjectClassifications,classificationTree:a.classificationTree,saveSubjects:function(t,n,r){return c.updateObjectSubjects(e.playlistId,t,km.Playlists,n,r,r)},saveClassifications:function(t,n){return c.updateObjectClassifications(e.playlistId,a.currentPresentation.id,t,km.Playlists,n,n)}}))}const Zg={reorder(e,t,n){if(t===n)return{reorderedItems:e,reorderRequest:null};const r=Mt.moveItem(e,t,n),i=n<e.length-1?r[n+1].id:null;return{reorderedItems:r,reorderRequest:{sourceMemberId:r[n].id,destinationMemberId:i}}},updateState(e,t,n){const r=[],i=pt.deepClone(n),a=[e];let o=n[e];const s=!!o&&!!o.data&&o.data.length;for(;o&&Array.isArray(o.data);){r.push(...o.data);const t=o.pagination&&o.pagination.cursors&&o.pagination.cursors.next,i=!!t&&`${e}:${t}`;o=t&&n[i],o&&a.push(i)}if(!r.length)return n;const c=Mt.findIndex(r,e=>e.id===t.sourceMemberId),l=[...r],u=l.splice(c,1),p=t.destinationMemberId?Mt.findIndex(l,e=>e.id===t.destinationMemberId):l.length;return l.splice(p,0,u[0]),a.forEach(e=>{const t=l.splice(0,s);i[e].data=t}),i}};function Qg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Xg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ey=function(e){return{application:u.VIDEOS,action:o.Videos.EDIT_VIDEO,args:[e.id]}};function ty(e){var t,n,r=Object(te.useDispatch)(),a=Qd(),s=i.useBasicFetch(om(e.playlistId)),c=i.useBasicFetch(pm(e.playlistId)),l=i.useBasicFetch(ym),p=Qg(function(e){const[t,n]=Object(d.useState)();return Object(d.useEffect)(()=>{t&&(e.length!==t.length||function(e,t){let n=!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r].id!==t[r].id){n=!1;break}return n}(e,t))&&n(null)},[e]),[t,n]}(null===(t=c.data)||void 0===t?void 0:t.data),2),f=p[0],m=p[1],h=f?{data:f,pagination:null}:c.data;return d.createElement(d.Fragment,null,!!l.data&&d.createElement(Cm,{playlistId:e.playlistId,activeAction:o.Playlists.EDIT_PLAYLIST_VIDEOS,currentUser:l.data}),d.createElement(up,{object:s.data}),!!h&&d.createElement(Hp,{onSortEnd:function(t,n){if(t!==n){var o=Zg.reorder(c.data.data,t,n),s=o.reorderRequest,l=o.reorderedItems;m(l);i.fetch(r,fm(e.playlistId,s,null,(function(){a.error("Failed to update playlist order."),m(null)})))}},videos:h,getVideoAppLink:ey,getVideoActions:(n=e.playlistId,function(e){return[{label:"Remove video",appLink:{application:u.PLAYLISTS,action:o.Playlists.REMOVE_VIDEO,args:[n.toString(),e.id.toString()]},className:"text-danger"}]}),emptyMessage:"There are no videos in this playlist."}))}function ny(){var e=Object(te.useDispatch)(),t=Qd(),n=i.useBasicFetch(ym);return d.createElement(d.Fragment,null,!!n.data&&d.createElement(Em,{savePlaylist:function(a,s){i.fetch(e,cm(a,n.data.id,(function(e){t.success("Successfully created playlist."),function(e){e&&e.id&&r.AppLinkHelper.trigger({application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]})}(e)}),(function(){t.error("Failed to create playlist.")}),s))}}))}var ry="rating,thumbnail,glance",iy=function(e){return{url:"/api/master/v2/objects/".concat(e,"?query=").concat(ry),key:"videos:".concat(e)}},ay=function(e){var t=e.slice().sort();return{key:"videos:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},oy=function(e){return{url:"/ajax/hostedlibraries/rightsline/programs/".concat(e),key:"rightsline:videos:".concat(e),normalizeOptions:{namespace:"rightsline"}}},sy=function(e,t,n,r,i){return{key:"videos:".concat(e),url:"/api/master/v2/objects/".concat(e),data:t,type:nt.PUT,success:n,error:r,always:i}};function cy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ly(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ly(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ly(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uy(e){var t=Object(te.useDispatch)(),n=Qd(),r=i.useBasicFetch(om(e.playlistId)),a=i.useBasicFetch(iy(e.videoId)),o=cy(d.useState(!1),2),s=o[0],c=o[1];var l=!!r.data&&!!a.data;return d.createElement(Of,{title:"Remove Video",closePopup:e.closePopup,showLoadingSpinner:!l},!!l&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,a.data.name)," from ",d.createElement("strong",null,r.data.name),"?")),d.createElement(jf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,dm(e.playlistId,e.videoId,(function(){n.success("Successfully removed video from playlist")}),(function(){n.error("Failed to remove video from playlist")}),e.closePopup))},buttonText:"Yes, remove video",isSpinnerButton:!0,showSpinner:s}]})))}function py(e){return r.AppLinkHelper.trigger(function(e){return{application:u.PLAYLISTS,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}}(e))}function fy(e){var t=e?{application:u.PLAYLISTS,action:o.Playlists.SEARCH_PLAYLISTS,params:{query:e}}:{application:u.PLAYLISTS,action:o.Playlists.PLAYLISTS};r.AppLinkHelper.trigger(t)}function dy(e){return d.createElement("div",{className:"pb-3 w-50"},d.createElement(Ll,{initialQuery:e.query,placeholder:"Search for a playlist",onSuggestionSelected:py,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/playlists/instant/raw","?query=").concat(e)},activationLength:2,onSubmit:fy}))}var my=u.PLAYLISTS,hy=function(e){return{application:my,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}};function gy(e){var t=i.useBasicFetch(im(e.cursor));return d.createElement(d.Fragment,null,d.createElement(dy,null),d.createElement(ep,{collection:t&&t.data,collectionAppLink:{application:my,action:o.Playlists.PLAYLISTS},newObjectAppLink:{application:my,action:o.Playlists.NEW_PLAYLIST},getObjectAppLink:hy,objectName:"Playlist"}))}var yy=u.PLAYLISTS,vy=function(e){return{application:yy,action:o.Playlists.EDIT_PLAYLIST,args:[e.id]}};function by(e){var t=i.useBasicFetch(am(e.query,e.cursor));return d.createElement(d.Fragment,null,d.createElement(dy,{query:e.query}),!!t.data&&(t.data.data.length?d.createElement(ep,{collection:t.data,collectionAppLink:{application:yy,action:o.Playlists.SEARCH_PLAYLISTS,params:{query:e.query}},newObjectAppLink:{application:yy,action:o.Playlists.NEW_PLAYLIST},getObjectAppLink:vy,objectName:"Playlist"}):d.createElement("p",null,"No playlists found, please try a different search query.")))}function Sy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ey(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ey(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ey(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Cy=function(e,t,n){return[{variant:"link",onClick:t,buttonText:"Cancel"},{variant:"danger",onClick:e,buttonText:"Yes, delete this audience",isSpinnerButton:!0,showSpinner:n}]};function Oy(e){var t=e.id,n=e.routeToOnDelete,i=e.closePopup,a=Sy(d.useState(),2),o=a[0],s=a[1],c=Sy(d.useState(!1),2),l=c[0],u=c[1],p=Kd(f.SUBJECT);Tm(Uh.getAudienceFetchOptions(t,s),[t]);return d.createElement(Of,{title:"Delete Audience",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?")),d.createElement(jf,{buttons:Cy((function(){u(!0);p.deleteAudience(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)}),i,l)})))}function Iy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ay=function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function Ty(e){var t=e.presentationId,n=e.audienceId,r=Iy(d.useState(),2),i=r[0],a=r[1],o=Iy(d.useState(),2),s=o[0],c=o[1],l=Iy(d.useState(),2),u=l[0],p=l[1],m=Kd(f.SUBJECT);Tm(Uh.getAudienceFetchOptions(n,a),[n]),Tm(Uh.getLevelsFetchOptions(c),[]),Tm(Uh.getPresentationFetchOptions(t,p),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(_l,{appLink:Ay(t),backToName:"audiences"})),!!u&&d.createElement("h6",null,"Presentation: ".concat(u.name)),!!i&&!!s&&d.createElement($h,{audience:i,levels:s,saveAudience:function(e,r){return m.updateAudience(n,Object.assign(Object.assign({},e),{presentationId:t}),r,r)},presentationId:t}))}function wy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ly(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ly(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ly(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ky=function(e){return function(t){return{application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[e,t.masterId]}}},_y=function(e){return{application:u.SUBJECTS,action:o.Subjects.NEW_AUDIENCE,args:[e]}},xy={application:u.SUBJECTS,action:o.Subjects.AUDIENCES};function Py(e){var t=e.presentationId,n=wy(d.useState(),2),r=n[0],i=n[1];return Tm(Uh.getAudiencesFetchOptions(t,i),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(_l,{appLink:xy,backToName:"presentations"})),d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select an audience to edit:"),d.createElement(kl,{appLink:_y(t),className:"d-block"},d.createElement(Il,{svgName:vl.Plus,size:Ol.Small}),d.createElement("span",null,"New Audience"))),d.createElement(dp,{objects:r,getAppLink:ky(e.presentationId),emptyMessage:"There are no audiences in this presentation yet. Click '+ New Audience' to create one."}))}function Ny(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Dy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ry=function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function Fy(e){var t=e.presentationId,n=Ny(d.useState(),2),i=n[0],a=n[1],s=Ny(d.useState(),2),c=s[0],l=s[1],p=Kd(f.SUBJECT);Tm(Uh.getLevelsFetchOptions(a),[]),Tm(Uh.getPresentationFetchOptions(t,l),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2"},d.createElement(_l,{appLink:Ry(t),backToName:"audiences"})),!!c&&d.createElement("h6",null,"Presentation: ".concat(c.name)),!!i&&d.createElement($h,{levels:i,presentationId:t,saveAudience:function(e,n){return p.createAudience(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_AUDIENCE,args:[e,n.masterId]})}}(t,n),n)}}))}function My(e){return{application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]}}function Uy(e){return[{label:"Add child",getAppLink:function(t){return Object.assign(Object.assign({},My(e)),{args:[e],params:{parentId:t.id}})}},{label:"Delete classification",getAppLink:function(t){return{application:u.SUBJECTS,action:o.Subjects.DELETE_CLASSIFICATION,args:[e,t.id]}},className:"text-danger"}]}var Vy=n(127),By=n.n(Vy);function zy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qy(e){var t=e.presentationId,n=e.selectedClassificationId,r=zy(d.useState(),2),i=r[0],a=r[1],s=zy(d.useState(),2),c=s[0],l=s[1];return function(e,t,n){Am([Uh.getClassificationTreeFetchOptions(e,t),Uh.getPresentationFetchOptions(e,n)],[e])}(t,a,l),d.createElement("div",{className:"".concat(By.a.navContainer," h-auto pr-2 border-right")},!!c&&d.createElement("h6",{className:"border-bottom pb-2"},"Classifications (".concat(c.name,")")),d.createElement(kl,{appLink:My(t),className:"d-inline-block pb-2"},d.createElement(Il,{svgName:vl.Plus,size:Ol.Small}),d.createElement("span",null,"New Classification")),!!i&&d.createElement("div",{className:"border-top pt-1"},d.createElement(Op,{tree:i,getAppLink:function(e){return function(e,t){return{application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,t.id]}}(t,e)},selectedIds:[n],actions:Uy(t)})))}function Jy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $y(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ky(e){var t=e.classificationId,n=e.routeToOnDelete,i=e.closePopup,a=Jy(d.useState(),2),o=a[0],s=a[1],c=Jy(d.useState(!1),2),l=c[0],u=c[1];Tm(Uh.getClassificationFetchOptions(t,s),[]);var p=Kd(f.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);p.deleteClassification(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this classification",isSpinnerButton:!0,showSpinner:l}];return d.createElement(Of,{title:"Delete Classification",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?")),d.createElement(jf,{buttons:m})))}function Yy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wy(e){var t=e.presentationId,n=e.classificationId,r=Yy(d.useState(),2),i=r[0],a=r[1],o=Yy(d.useState(),2),s=o[0],c=o[1],l=Yy(d.useState(),2),u=l[0],p=l[1],m=Yy(d.useState(),2),h=m[0],g=m[1],y=Kd(f.SUBJECT),v=Uh.getClassificationFetchOptions(n,a),b=Uh.getPresentationFetchOptions(t,c),S=Uh.getClassificationTreeFetchOptions(t,p);Tm(Uh.getSubjectTreeFetchOptions(g),[]),Tm(v,[n]),Am([b,S],[t]);return d.createElement("div",null,d.createElement(lg,{presentation:s,classificationId:n}),!!i&&!!u&&!!h&&d.createElement(sg,{classification:i,presentationId:t,subjectTree:h,classificationTree:u,saveClassification:function(e,t){return y.updateClassification(n,e,t,t)}}))}function Zy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Qy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xy(e){var t=e.presentationId,n=e.classificationId,r=e.memberType,i=Zy(d.useState(),2),a=i[0],o=i[1],s=Zy(d.useState(),2),c=s[0],l=s[1],u=Zy(d.useState(),2),p=u[0],m=u[1];Tm(Uh.getPresentationFetchOptions(t,o),[]),Tm(Uh.getClassificationFetchOptions(n,l),[n]),Tm(Uh.getClassificationMembersFetchOptions(n,r,m),[n,r]);var h=Kd(f.SUBJECT),g={items:p&&p.data,memberType:r,classification:c,updatePinnedVideo:function(e,t){var r=Object.assign(Object.assign({},c),{pinnedVideoMasterId:e});h.updateClassification(n,r,t)},getItemAppLink:function(e){return Um.getMemberAppLink(r,e.id)},getActions:function(e){return Um.getMemberActions(n,Lm.Classification,r,e.id)}},y={presentation:a,classificationId:n},v=Wl(g);return d.createElement(d.Fragment,null,d.createElement(lg,Object.assign({},y,{memberType:r})),v&&d.createElement(ng,Object.assign({},g)))}function ev(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nv(e){var t=e.presentationId,n=e.parentId,i=ev(d.useState(),2),a=i[0],s=i[1],c=ev(d.useState(),2),l=c[0],p=c[1],m=Kd(f.SUBJECT),h=Uh.getClassificationTreeFetchOptions(t,s);Tm(Uh.getSubjectTreeFetchOptions(p),[]),Tm(h,[t]);return d.createElement("div",null,d.createElement("h4",{className:"py-2"},"Create New Classification"),!!l&&!!a&&d.createElement(sg,{classification:n?{parentIds:[n]}:{},presentationId:t,subjectTree:l,classificationTree:a,saveClassification:function(e,n){return m.createClassification(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),n&&n.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]})}}(t,n),n)}}))}var rv=function(e){return{key:"series:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=thumbnail,tallPoster,banner,rating")}},iv=function(e){var t=e.slice().sort();return{key:"series:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},av=function(e,t,n,r){return{url:"/api/master/v2/series",key:"series",data:e,type:nt.POST,success:t,error:n,always:r}},ov=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:series:".concat(e),data:t,type:nt.PUT,success:n,error:r,always:i}};function sv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return cv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lv(e){var t=sv(d.useState(),2),n=t[0],r=t[1],a=sv(d.useState(!1),2),o=a[0],s=a[1],c=i.useBasicFetch(function(e,t){switch(e){case km.Playlists:return om(t);case km.Series:return rv(t);case km.Videos:return iy(t)}}(e.memberType,e.memberId)),l=Kd(f.SUBJECT);Tm(Uh.getClassificationFetchOptions(e.classificationId,r),[e.classificationId]);var u=!!n&&!!c.data,p="Remove ".concat(Ql(Um.singularizeMemberType(e.memberType)));return d.createElement(Of,{title:p,closePopup:e.closePopup,showLoadingSpinner:!u},u&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,c.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"This will not remove it from the backbone subject.")),d.createElement(jf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0),l.removeObjectsFromClassification(e.classificationId,[e.memberId],e.memberType,null,null,e.closePopup,e.closePopup),n.pinnedVideoMasterId===e.memberId&&l.updateClassification(e.classificationId,Object.assign(Object.assign({},n),{pinnedVideoMasterId:null}))},buttonText:"Yes, remove this ".concat(Um.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:o}]})))}function uv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return pv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fv(e){var t=e.id,n=uv(d.useState(),2),r=n[0],i=n[1],a=Kd(f.SUBJECT);Tm(Uh.getLevelFetchOptions(t,i),[t]);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Level"),!!r&&d.createElement(dg,{level:r,saveLevel:function(e,n){return a.updateLevel(t,e,n,n)}}))}function dv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hv=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[e.id]}},gv={application:u.SUBJECTS,action:o.Subjects.NEW_LEVEL};function yv(){var e=dv(d.useState(),2),t=e[0],n=e[1];return Tm(Uh.getLevelsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a level to edit:"),d.createElement(kl,{appLink:gv,className:"d-block"},d.createElement(Il,{svgName:vl.Plus,size:Ol.Small}),d.createElement("span",null,"New Level"))),d.createElement(dp,{objects:t,getAppLink:hv}))}function vv(){var e=Kd(f.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Level"),d.createElement(dg,{saveLevel:function(t,n){return e.createLevel(t,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_LEVEL,args:[t.id]})}}(n),n)}}))}function bv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Sv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ev(e){var t=e.id,n=bv(d.useState(),2),r=n[0],i=n[1],a=Kd(f.SUBJECT);Tm(Uh.getPresentationFetchOptions(t,i),[t]);var o={presentation:r,savePresentation:function(e,n){var r=n.setSubmitting;return a.updatePresentation(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},s=Wl(o);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Presentation"),!!s&&d.createElement(yg,Object.assign({},o)))}function Cv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ov(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ov(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ov(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Iv=function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_PRESENTATION,args:[e.id]}},jv={application:u.SUBJECTS,action:o.Subjects.NEW_PRESENTATION};function Av(){var e=Cv(d.useState(),2),t=e[0],n=e[1];return Tm(Uh.getPresentationsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a presentation to edit:"),d.createElement(kl,{appLink:jv,className:"d-block"},d.createElement(Il,{svgName:vl.Plus,size:Ol.Small}),d.createElement("span",null,"New Presentation"))),d.createElement(dp,{objects:t,getAppLink:Iv}))}function Tv(){var e=Kd(f.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Presentation"),d.createElement(yg,{savePresentation:function(t,n){var i=n.setSubmitting;e.createPresentation(t,(function(e){return function(e,t){t(!1),e&&e.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_PRESENTATION,args:[e.id]})}(e,i)}),(function(){return i(!1)}))}}))}function wv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Lv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Lv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kv(e){var t=e.objectType,n=e.getAppLink,r=wv(d.useState(),2),i=r[0],a=r[1];return Tm(Uh.getPresentationsFetchOptions(a),[]),d.createElement("div",null,d.createElement("h5",null,d.createElement(Ao,{namespace:"subjects.selectPresentation",phrase:"heading",options:{objectType:t}})),d.createElement(dp,{objects:i,getAppLink:n}))}function _v(e){const{title:t,onClickConfirm:n,confirmButtonText:r,cancelButtonText:i,closePopup:a}=e,[o,s]=d.useState(!1),c=[{variant:"link",onClick:a,buttonText:i},{variant:"primary",onClick:()=>{s(!0),n()},buttonText:r,isSpinnerButton:!0,showSpinner:o}];return d.createElement(Of,{title:t,closePopup:a},d.createElement(d.Fragment,null,e.children,d.createElement(jf,{buttons:c})))}function xv(e,t){return wm.getSetStateByKey(e,t)}function Pv(e,t,n,i,a){var s=i.selectedSubject,c=function(){return xv(a,"showConfirmationPopup")(!1)};t.addObjectsToSubject(s.id,e.map((function(e){return e.id})),n.memberType,i.addToClassifications,(function(){c(),r.AppLinkHelper.trigger(function(e,t){var n={application:u.SUBJECTS,args:[e]};switch(t){case km.Playlists:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_PLAYLISTS});case km.Series:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_SERIES});case km.Videos:return Object.assign(Object.assign({},n),{action:o.Subjects.EDIT_SUBJECT_VIDEOS})}}(s.id,n.memberType))}),c)}function Nv(e,t,n){if(t&&n){var r=1===t.length?"this ".concat(Um.singularizeMemberType(e)):"these ".concat(e);return"Add ".concat(r," to ").concat(n.name)}}function Dv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Rv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fv(e,t){return function(n,r,i){i(),xv(t,"selectedSubject")(tu.find(e.subjectTree,Mt.first(n))),xv(t,"addToClassifications")(r),xv(t,"showConfirmationPopup")(!0)}}function Mv(e){var t=Dv(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(function(e,t){switch(e){case km.Playlists:return sm(t);case km.Series:return iv(t);case km.Videos:return ay(t)}}(e.memberType,e.objectIds)),o=Kd(f.SUBJECT);!function(e,t){e.memberType,e.objectIds,Tm(Uh.getSubjectTreeFetchOptions(xv(t,"subjectTree")),[])}(e,r);var s;return d.createElement(d.Fragment,null,!!a.data&&!!n.subjectTree&&d.createElement(bg,{memberType:e.memberType,objects:a.data,subjectTree:n.subjectTree,onClickAddToSubject:Fv(n,r)}),n.showConfirmationPopup&&d.createElement(_v,{title:Nv(e.memberType,a.data,n.selectedSubject),onClickConfirm:function(){return Pv(a.data,o,e,n,r)},closePopup:function(){return e=!1,xv(r,"showConfirmationPopup")(e);var e}},d.createElement("p",null,"The following ".concat(e.memberType," will be added to "),d.createElement("strong",null,n.selectedSubject.name),n.addToClassifications?" and its mapped classifications:":":"),d.createElement("ul",null,a.data.map((function(e){return d.createElement("li",{key:e.id},e.name)}))),!n.addToClassifications&&d.createElement("p",null,"".concat(1===a.data.length?"It":"They"," will not be added to its mapped classifications.")),d.createElement("p",null,"".concat((s=e.memberType,Ql(Um.singularizeMemberType(s)))," to classification mappings can be managed from the "),d.createElement("strong",null,"Edit Subject ".concat(Ql(e.memberType)," ")),"page.")))}function Uv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bv(e){var t=e.subjectId,n=e.routeToOnDelete,i=e.closePopup,a=Uv(d.useState(),2),o=a[0],s=a[1],c=Uv(d.useState(!1),2),l=c[0],u=c[1];Tm(Uh.getSubjectFetchOptions(t,s),[]);var p=Kd(f.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0);p.deleteSubject(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this subject",isSpinnerButton:!0,showSpinner:l}];return d.createElement(Of,{title:"Delete Subject",closePopup:i,showLoadingSpinner:!o},!!o&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,o.name),"?"),d.createElement("p",null,"Subjects that have mapped classifications cannot be deleted.")),d.createElement(jf,{buttons:m})))}function zv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qv(e){var t=e.subjectId,n=zv(d.useState(),2),r=n[0],i=n[1],a=zv(d.useState(),2),s=a[0],c=a[1],l=Kd(f.SUBJECT),u=Uh.getSubjectFetchOptions(t,i);Tm(Uh.getSubjectTreeFetchOptions(c),[]),Tm(u,[t]);return d.createElement(d.Fragment,null,d.createElement(wg,{subjectId:t,activeAction:o.Subjects.EDIT_SUBJECT}),!!r&&!!s&&d.createElement(Ag,{subject:r,subjectTree:s,saveSubject:function(e,n){return l.updateSubject(t,e,n,n)}}))}function Jv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}_v.defaultProps={confirmButtonText:"Confirm",cancelButtonText:"Cancel"};var Kv=d.createContext(void 0);function Yv(e){var t=e.children,n=Jv(d.useState(),2),r=n[0],i=n[1];return d.createElement(Kv.Provider,{value:[r,i]},t)}var Gv=function(e){var t=e.children;return d.createElement(Yv,null,d.createElement(su,null,t))};function Wv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qv(e,t){return wm.getSetStateByKey(e,t)}function Xv(e){switch(e){case km.Playlists:return o.Subjects.EDIT_SUBJECT_PLAYLISTS;case km.Series:return o.Subjects.EDIT_SUBJECT_SERIES;case km.Videos:return o.Subjects.EDIT_SUBJECT_VIDEOS}}function eb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nb(e){var t=eb(d.useState({}),2),n=t[0],r=t[1],a=n.presentations,s=n.classifications,c=n.memberIds,l=n.membersWithClassifications,p=i.useBasicFetch(Array.isArray(c)&&function(e,t){switch(e){case km.Playlists:return sm(t);case km.Series:return iv(t);case km.Videos:return ay(t)}}(e.memberType,c)),m=eb(d.useContext(Kv),2),h=m[0],g=m[1],y=Kd(f.SUBJECT);!function(e,t,n){var r=e.subjectId,i=e.memberType,a=Wv(d.useContext(Kv),1)[0];Tm(Uh.getPresentationsFetchOptions(Qv(n,"presentations")),[]),Tm(Uh.getSubjectMemberIdsFetchOptions(r,i,Qv(n,"memberIds")),[r,i]),Tm(!!a&&Uh.getSubjectClassificationFetchOptions(r,Qv(n,"classifications"),a.id,i),[r,i,a],!!a)}(e,0,r),function(e,t,n,r){var i=n.classifications;d.useEffect((function(){Qv(r,"membersWithClassifications")(function(e,t,n){if(!t||!n)return;return t.map((function(t){return{id:t.id,name:t.name,classifications:n.map((function(n){return{id:n.id,selected:(r=t,i=n,!!i[e]&&!!i[e].data.filter((function(e){return e.id===r.id})).length)};var r,i}))}}))}(t.memberType,e,i))}),[e,i])}(p.data,e,n,r);var v,b,S=!!h&&!!s;return d.createElement(d.Fragment,null,d.createElement(wg,{subjectId:e.subjectId,activeAction:Xv(e.memberType)}),d.createElement(co.Alert,{variant:"info",className:"m-0"},"Select which ".concat(e.memberType," are shown for each classification in this subject.")+" Change the selected presentation to view different classifications."),d.createElement("div",{className:"w-50 py-2"},!!a&&d.createElement(vg,{presentations:a,currentPresentation:h,setCurrentPresentation:g})),S&&d.createElement(Vg,{members:l||[],memberType:e.memberType,getMemberAppLink:function(t){return Um.getMemberAppLink(e.memberType,t)},getActions:function(t){return Um.getMemberActions(e.subjectId,Lm.Subject,e.memberType,t)},classifications:s,getClassificationAppLink:h&&(v=e.memberType,b=h.id,function(e){var t,n=u.SUBJECTS,r=[b,e];switch(v){case km.Playlists:t=o.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;break;case km.Series:t=o.Subjects.EDIT_CLASSIFICATION_SERIES;break;case km.Videos:t=o.Subjects.EDIT_CLASSIFICATION_VIDEOS}return{application:n,action:t,args:r}}),onToggleClassification:function(t,n,r){return function(e,t,n,r,i,a,o){(o?e.addObjectsToClassification.bind(e):e.removeObjectsFromClassification.bind(e))(a,n,t,r,i)}(y,e.memberType,r?[r]:c,e.subjectId,h&&h.id,t,n)}}))}function rb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ib(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ib(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ib(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ab(e){var t=e.parentId,n=rb(d.useState(),2),i=n[0],a=n[1],s=Kd(f.SUBJECT);Tm(Uh.getSubjectTreeFetchOptions(a),[]);var c={application:u.SUBJECTS,action:o.Subjects.PRESENTATIONS};return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2 border-bottom"},d.createElement(_l,{backToName:"Presentations",appLink:c})),d.createElement("h4",{className:"py-2"},"Create New Subject"),!!i&&d.createElement(Ag,{subject:{parentId:t},subjectTree:i,saveSubject:function(e,t){return s.createSubject(e,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[t.id]})}}(t),t)}}))}function ob(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cb(e){var t=ob(d.useState(),2),n=t[0],r=t[1],a=ob(d.useState(!1),2),o=a[0],s=a[1],c=i.useBasicFetch(function(e,t){switch(e){case km.Playlists:return om(t);case km.Series:return rv(t);case km.Videos:return iy(t)}}(e.memberType,e.memberId)),l=Kd(f.SUBJECT);Tm(Uh.getSubjectFetchOptions(e.subjectId,r),[e.subjectId]);var u=!!n&&!!c.data,p="Remove ".concat(Ql(Um.singularizeMemberType(e.memberType)));return d.createElement(Of,{title:p,closePopup:e.closePopup,showLoadingSpinner:!u},u&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,c.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"Please ensure that it is not in any classifications before removing.")),d.createElement(jf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){s(!0),l.removeObjectsFromSubject(e.subjectId,[e.memberId],e.memberType,e.closePopup,e.closePopup)},buttonText:"Yes, remove this ".concat(Um.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:o}]})))}function lb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ub(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ub(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ub(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pb(e){var t=e.subjectId,n=lb(d.useState({}),2),r=n[0];return function(e,t){var n=function(e){return wm.getSetStateByKey(t,e)};Tm(Uh.getSubjectClassificationFetchOptions(e,n("classifications")),[e]),Tm(Uh.getPresentationsFetchOptions(n("presentations")),[])}(t,n[1]),d.createElement(d.Fragment,null,d.createElement(wg,{subjectId:t,activeAction:o.Subjects.SUBJECT_CLASSIFICATIONS}),d.createElement(Pg,{presentations:r.presentations,classificationDictionary:Mt.groupBy(r.classifications,"presentationId")}))}var fb=n(128),db=n.n(fb);function mb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return hb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gb(e){var t=e.selectedSubjectId,n=mb(d.useState(),2),r=n[0],i=n[1];Tm(Uh.getSubjectTreeFetchOptions(i),[]);var a=d.useCallback((function(e){return{application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[e.id]}}),[]),s={application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT},c=[{label:"Add child",getAppLink:function(e){return Object.assign(Object.assign({},s),{params:{parentId:e.id}})}},{label:"Delete subject",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.DELETE_SUBJECT,args:[e.id]}},className:"text-danger"}];return d.createElement("div",{className:"".concat(db.a.navContainer," h-auto pr-2 border-right")},d.createElement("h5",{className:"border-bottom pb-2"},"Subjects"),d.createElement(kl,{appLink:s,className:"d-inline-block pb-2"},d.createElement(Il,{svgName:vl.Plus,size:Ol.Small}),d.createElement("span",null,"New Subject")),!!r&&d.createElement("div",{className:"border-top pt-1"},d.createElement(Op,{tree:r,getAppLink:a,selectedIds:[t],actions:c})))}function yb(e){var t=e.currentAppLink;return d.createElement(Bg,{navItems:Vm(),currentAppLink:t})}function vb(e){return(vb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eb(e,t,n){return t&&Sb(e.prototype,t),n&&Sb(e,n),e}function Cb(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ob(e,t)}function Ob(e,t){return(Ob=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ib(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ab(e);if(t){var i=Ab(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jb(this,n)}}function jb(e,t){return!t||"object"!==vb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ab(e){return(Ab=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Tb=function(e){Cb(n,e);var t=Ib(n);function n(){return bb(this,n),t.apply(this,arguments)}return Eb(n,[{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"appRoutes",get:function(){return{"manage/playlists(/)":"index","manage/playlists/new(/)":"newPlaylist","manage/playlists/search(/)":"searchPlaylists","manage/playlists/:id(/)":"editPlaylist","manage/playlists/:id/videos(/)":"editPlaylistVideos","manage/playlists/:id/subjects(/)":"editPlaylistSubjects","manage/playlists/:id/audiences(/)":"editPlaylistAudiences"}}},{key:"appLinks",get:function(){return["deletePlaylist","removeVideo","uploadImage","removeFromSubject"]}}]),n}(r.AppRouter),wb=function(e){Cb(n,e);var t=Ib(n);function n(){return bb(this,n),t.apply(this,arguments)}return Eb(n,[{key:"initialize",value:function(){var e=this;pt.values(f).forEach((function(t){return $d.getInstance(t,e)}))}},{key:"index",value:function(e){var t;this.layout.showChildView(ae,d.createElement(gy,{cursor:null===(t=e)||void 0===t?void 0:t.cursor}))}},{key:"searchPlaylists",value:function(e){var t,n;this.layout.showChildView(ae,d.createElement(by,{query:null===(t=e)||void 0===t?void 0:t.query,cursor:null===(n=e)||void 0===n?void 0:n.cursor}))}},{key:"newPlaylist",value:function(){this.layout.showChildView(ae,d.createElement(ny,null))}},{key:"editPlaylist",value:function(e){this.layout.showChildView(ae,d.createElement(Om,{key:e,playlistId:e}))}},{key:"editPlaylistVideos",value:function(e){this.layout.showChildView(ae,d.createElement(ty,{key:e,playlistId:e}))}},{key:"editPlaylistSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(Wg,{key:e,playlistId:e}))}},{key:"editPlaylistAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(Jg,{key:e,playlistId:e}))}},{key:"deletePlaylist",value:function(e){var t=Object.assign({playlistId:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(gm,Object.assign({},t)))}},{key:"removeVideo",value:function(e,t){var n=Object.assign({playlistId:e,videoId:t},this.getPopupProps());this.layout.showChildView(oe,d.createElement(uy,Object.assign({},n)))}},{key:"removeFromSubject",value:function(e,t){var n=Object.assign({subjectId:t,memberId:e,memberType:km.Playlists},this.getPopupProps());this.layout.showChildView(oe,d.createElement(cb,Object.assign({},n)))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Wd,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(Ef,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Playlists Application"}},{key:"channelName",get:function(){return u.PLAYLISTS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:Zd}}}}],[{key:"router",get:function(){return Tb}}]),n}(r.Application),Lb=function(e){var t=e.children;return d.createElement(su,null,t)},kb=function(){return"/api/domain/v2/me/ratings"},_b="ratings",xb=function(){return{url:kb(),key:_b}},Pb=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:oo.string().trim().max(350,"Description is too long").default(""),rating:oo.object().shape({id:oo.string()}).default({}).noUnknown(),tallPoster:oo.object().shape({fileId:oo.string(),fileIdType:oo.mixed(),url:oo.string()}).default({}).noUnknown(),banner:oo.object().shape({fileId:oo.string(),fileIdType:oo.mixed(),url:oo.string()}).default({}).noUnknown()}).noUnknown(),Nb=function(e,t){var n=u.SERIES,r=o.Series,i=[{label:"Edit Series Details",appLink:{application:n,action:r.EDIT_SERIES,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_SERIES_VIDEOS,args:[t]}}];return rm(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_SERIES_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_SERIES_AUDIENCES,args:[t]}}]),i};function Db(e){var t=za(),n=yo(t);return d.createElement(Qa,null,d.createElement(go,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this series",autoFocus:!0}),d.createElement(go,{label:"Description",as:"textarea",name:"description",id:"description",maxLength:350,value:t.values.description,placeholder:"Describe this series here",showCharacterCounter:!0}),d.createElement(mp,{ratings:e.ratings}),d.createElement(fu,{imageType:Fl.TallPosters,fieldName:"tallPoster",application:u.SERIES,uploadAction:o.Series.UPLOAD_IMAGE}),d.createElement(fu,{imageType:Fl.Banners,fieldName:"banner",application:u.SERIES,uploadAction:o.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(bo,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(lp,{actions:e.actions})))}function Rb(e){return d.createElement(ao,{initialValues:e.series,validationSchema:Pb,onSubmit:e.saveSeries},d.createElement(Db,{id:e.series&&e.series.id,ratings:e.ratings}))}function Fb(e){return d.createElement("div",{className:"py-2"},d.createElement(hp,{tabs:Nb(e.currentUser,e.seriesId),isItemActive:(t=e.activeAction,function(e){return e.appLink.action===t})}));var t}function Mb(e){var t,n=Object(te.useDispatch)(),r=Qd(),a=i.useBasicFetch(rv(e.seriesId)),s=i.useBasicFetch(xb()),c=i.useBasicFetch(ym);return d.createElement(d.Fragment,null,!!c.data&&d.createElement(Fb,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES,currentUser:c.data}),!!a.data&&!!s.data&&d.createElement(Rb,{series:a.data,saveSeries:function(t,a){i.fetch(n,ov(e.seriesId,t,(function(){r.success("Successfully updated series.")}),(function(){r.error("Failed to update series.")}),a))},ratings:s.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit series page ",d.createElement(kl,{className:"info-link",appLink:(t=e.seriesId,{application:u.SERIES,action:o.Series.LEGACY_EDIT_SERIES,args:[t]})},"here"),"."))}function Ub(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bb(e){var t=Ub(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(rv(e.seriesId)),s=i.useBasicFetch(ym),c=Kd(f.SUBJECT);!function(e,t,n){var r=function(e){return wm.getSetStateByKey(n,e)};Tm(Uh.getObjectLevelsFetchOptions(e,km.Series,r("seriesLevels")),[e]),Tm(Uh.getObjectAudiencesFetchOptions(e,km.Series,r("seriesAudiences")),[e,t.seriesLevels]),Am([Uh.getPresentationsFetchOptions(r("presentations")),Uh.getLevelsFetchOptions(r("levels"))],[]),Tm(!!t.currentPresentation&&Uh.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.seriesId,n,r),zg(n,r);var l=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.seriesLevels&&n.seriesAudiences);return d.createElement(d.Fragment,null,!!s.data&&d.createElement(Fb,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES_AUDIENCES,currentUser:s.data}),d.createElement(up,{object:a.data}),!!l&&d.createElement(Yh,{objectLevels:n.seriesLevels,objectAudiences:n.seriesAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:wm.getSetStateByKey(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:km.Series,saveLevels:function(t,n,r){return c.updateObjectLevels(e.seriesId,t,km.Series,n,r,r)},saveAudiences:function(t,r){return c.updateObjectAudiences(e.seriesId,n.currentPresentation.id,t,km.Series,r,r)}}))}function zb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||qb(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hb(e){return function(e){if(Array.isArray(e))return Jb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||qb(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qb(e,t){if(e){if("string"==typeof e)return Jb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jb(e,t):void 0}}function Jb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $b(e){var t=zb(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(rv(e.seriesId)),s=i.useBasicFetch(ym),c=Kd(f.SUBJECT);!function(e,t,n){var r=function(e){return wm.getSetStateByKey(n,e)};Am([Uh.getSubjectTreeFetchOptions(r("subjectTree")),Uh.getPresentationsFetchOptions(r("presentations"))],[]),Tm(Uh.getObjectSubjectsFetchOptions(e,km.Series,r("seriesSubjects")),[e]),Tm(!!t.currentPresentation&&Uh.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.seriesSubjects]);var i=function(e,t){return[].concat(Hb(t.subjectClassifications||[]),Hb(e))},a=t.seriesSubjects&&t.seriesSubjects.map((function(e){return Uh.getSubjectClassificationFetchOptions(e.id,wm.getSetStateByKey(n,"subjectClassifications",i))}));Am(a,[t.seriesSubjects],!!a),Tm(Uh.getObjectClassificationsFetchOptions(e,km.Series,r("seriesClassifications")),[e,t.seriesSubjects])}(e.seriesId,n,r),zg(n,r);var l=!!(n.seriesSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.seriesClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,!!s.data&&d.createElement(Fb,{seriesId:e.seriesId,activeAction:o.Series.EDIT_SERIES_SUBJECTS,currentUser:s.data}),d.createElement(up,{object:a.data}),l&&d.createElement(Cg,{objectSubjects:n.seriesSubjects,subjectTree:n.subjectTree,memberType:km.Series,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:wm.getSetStateByKey(r,"currentPresentation"),objectClassifications:n.seriesClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return c.updateObjectSubjects(e.seriesId,t,km.Series,n,r,r)},saveClassifications:function(t,r){return c.updateObjectClassifications(e.seriesId,n.currentPresentation.id,t,km.Series,r,r)}}))}function Kb(){var e=Object(te.useDispatch)(),t=Qd(),n=i.useBasicFetch(xb());return d.createElement(d.Fragment,null,!!n.data&&d.createElement(Rb,{saveSeries:function(n,a){var s=function(){t.error("Failed to create series.")},c=function(e){t.success("Successfully created series."),function(e){r.AppLinkHelper.trigger({application:u.SERIES,action:o.Series.EDIT_SERIES,args:[e.id]})}(e)};i.fetch(e,av(n,(function(t){var n={permissions:nm()};i.fetch(e,ov(t.id,n,c,s,a))}),s))},ratings:n.data}))}function Yb(e){return(Yb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zb(e,t,n){return t&&Wb(e.prototype,t),n&&Wb(e,n),e}function Qb(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xb(e,t)}function Xb(e,t){return(Xb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nS(e);if(t){var i=nS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return tS(this,n)}}function tS(e,t){return!t||"object"!==Yb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nS(e){return(nS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rS=function(e){Qb(n,e);var t=eS(n);function n(){return Gb(this,n),t.apply(this,arguments)}return Zb(n,[{key:"channelName",get:function(){return u.SERIES}},{key:"appRoutes",get:function(){return{"manage/series/new(/)":"newSeries","manage/series/:id(/)":"editSeries","manage/series/:id/videos(/)":"editSeriesVideos","manage/series/:id/subjects(/)":"editSeriesSubjects","manage/series/:id/audiences(/)":"editSeriesAudiences","manage/legacy/series/:id(/)":"legacyEditSeries"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),iS=function(e){Qb(n,e);var t=eS(n);function n(){return Gb(this,n),t.apply(this,arguments)}return Zb(n,[{key:"initialize",value:function(){var e=this;pt.values(f).forEach((function(t){return $d.getInstance(t,e)}))}},{key:"newSeries",value:function(){this.layout.showChildView(ae,d.createElement(Kb,null))}},{key:"editSeries",value:function(e){this.layout.showChildView(ae,d.createElement(Mb,{seriesId:e}))}},{key:"editSeriesVideos",value:function(e){this.legacyEditSeries(e)}},{key:"editSeriesSubjects",value:function(e){this.layout.showChildView(ae,d.createElement($b,{seriesId:e}))}},{key:"editSeriesAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(Bb,{seriesId:e}))}},{key:"legacyEditSeries",value:function(e){r.LocationUtils.Redirect("/manage/legacy/series/".concat(e),!0)}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Wd,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(Ef,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Series Application"}},{key:"channelName",get:function(){return u.SERIES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:Lb}}}}],[{key:"router",get:function(){return rS}}]),n}(r.Application);function aS(e){return(aS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cS(e,t,n){return t&&sS(e.prototype,t),n&&sS(e,n),e}function lS(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uS(e,t)}function uS(e,t){return(uS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dS(e);if(t){var i=dS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return fS(this,n)}}function fS(e,t){return!t||"object"!==aS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dS(e){return(dS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mS=function(e){lS(n,e);var t=pS(n);function n(){return oS(this,n),t.apply(this,arguments)}return cS(n,[{key:"channelName",get:function(){return u.SUBJECTS}},{key:"appRoutes",get:function(){return{"manage/subjects(/)":"subjects","manage/subjects/add-objects(/)":"addSubjectMembers","manage/subjects/new(/)":"newSubject","manage/subjects/:id/edit(/)":"editSubject","manage/subjects/:id/edit/playlists(/)":"editSubjectPlaylists","manage/subjects/:id/edit/series(/)":"editSubjectSeries","manage/subjects/:id/edit/videos(/)":"editSubjectVideos","manage/subjects/:id/classifications(/)":"subjectClassifications","manage/subjects/classifications(/)":"classifications","manage/subjects/presentations/:id/classifications(/)":"presentationClassifications","manage/subjects/presentations/:id/classifications/new(/)":"newClassification","manage/subjects/presentations/:id/classifications/:id/edit(/)":"editClassification","manage/subjects/presentations/:id/classifications/:id/edit/playlists(/)":"editClassificationPlaylists","manage/subjects/presentations/:id/classifications/:id/edit/series(/)":"editClassificationSeries","manage/subjects/presentations/:id/classifications/:id/edit/videos(/)":"editClassificationVideos","manage/subjects/levels(/)":"levels","manage/subjects/levels/new(/)":"newLevel","manage/subjects/levels/:id(/)":"editLevel","manage/subjects/audiences(/)":"audiences","manage/subjects/presentations/:id/audiences(/)":"presentationAudiences","manage/subjects/presentations/:id/audiences/new(/)":"newAudience","manage/subjects/presentations/:id/audiences/:id/edit(/)":"editAudience","manage/subjects/presentations(/)":"presentations","manage/subjects/presentations/new":"newPresentation","manage/subjects/presentations/:id(/)":"editPresentation"}}},{key:"appLinks",get:function(){return["deleteClassification","removeClassificationMember","deleteSubject","removeSubjectMember","deleteAudience","uploadImage"]}}]),n}(r.AppRouter),hS=function(e){lS(n,e);var t=pS(n);function n(){return oS(this,n),t.apply(this,arguments)}return cS(n,[{key:"initialize",value:function(){var e=this;this.subjectDataService=$d.getInstance(f.SUBJECT,this),pt.values(f).forEach((function(t){return $d.getInstance(t,e)}))}},{key:"subjects",value:function(){this.subjectDataService.getSubjectTree((function(e){var t=!!e.children&&e.children[0];t?r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_SUBJECT,args:[t.id]},{replace:!0}):r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT},{replace:!0})}))}},{key:"newSubject",value:function(e){var t={parentId:e.parentId};this.layout.showChildView(ae,d.createElement(ab,Object.assign({key:e.parentId},t))),this.renderSubjectsLeftNav()}},{key:"editSubject",value:function(e){this.layout.showChildView(ae,d.createElement(qv,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"editSubjectPlaylists",value:function(e){var t={subjectId:e,memberType:km.Playlists};this.layout.showChildView(ae,d.createElement(nb,Object.assign({key:"".concat(e,":playlists")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectSeries",value:function(e){var t={subjectId:e,memberType:km.Series};this.layout.showChildView(ae,d.createElement(nb,Object.assign({key:"".concat(e,":series")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectVideos",value:function(e){var t={subjectId:e,memberType:km.Videos};this.layout.showChildView(ae,d.createElement(nb,Object.assign({key:"".concat(e,":videos")},t))),this.renderSubjectsLeftNav(e)}},{key:"subjectClassifications",value:function(e){this.layout.showChildView(ae,d.createElement(pb,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"addSubjectMembers",value:function(e){var t=e.memberType,n=e.objectIds;if(t&&n){var r={memberType:t,objectIds:Array.isArray(n)?n:[n]};this.layout.showChildView(ae,d.createElement(Mv,Object.assign({},r))),this.hideLeftNav()}}},{key:"removeSubjectMember",value:function(e,t,n){var r=Object.assign({subjectId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(cb,Object.assign({},r)))}},{key:"deleteSubject",value:function(e){var t=e.toString()===this.currentLeftNavId.toString()?{application:u.SUBJECTS,action:o.Subjects.NEW_SUBJECT}:null,n=Object.assign({subjectId:e,routeToOnDelete:t||null},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Bv,Object.assign({},n)))}},{key:"classifications",value:function(){var e={objectType:"classifications",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_CLASSIFICATIONS,args:[e.id]}}};this.layout.showChildView(ae,d.createElement(kv,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationClassifications",value:function(e){this.subjectDataService.getClassificationTree(e,(function(t){var n=!!t.children&&t.children[0];n?r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]},{replace:!0}):r.AppLinkHelper.trigger({application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]},{replace:!0})}))}},{key:"newClassification",value:function(e,t){var n={presentationId:e,parentId:t.parentId};this.layout.showChildView(ae,d.createElement(nv,Object.assign({key:t.parentId},n))),this.renderClassificationLeftNav(e)}},{key:"editClassification",value:function(e,t){var n={presentationId:e,classificationId:t};this.layout.showChildView(ae,d.createElement(Wy,Object.assign({key:t},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationPlaylists",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:km.Playlists};this.layout.showChildView(ae,d.createElement(Xy,Object.assign({key:"".concat(t,":playlists")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationSeries",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:km.Series};this.layout.showChildView(ae,d.createElement(Xy,Object.assign({key:"".concat(t,":series")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationVideos",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:km.Videos};this.layout.showChildView(ae,d.createElement(Xy,Object.assign({key:"".concat(t,":videos")},n))),this.renderClassificationLeftNav(e,t)}},{key:"removeClassificationMember",value:function(e,t,n){var r=Object.assign({classificationId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(lv,Object.assign({},r)))}},{key:"deleteClassification",value:function(e,t){var n=t===this.currentLeftNavId?{application:u.SUBJECTS,action:o.Subjects.NEW_CLASSIFICATION,args:[e]}:null,r=Object.assign({classificationId:t,routeToOnDelete:n||null},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Ky,Object.assign({},r)))}},{key:"levels",value:function(){this.layout.showChildView(ae,d.createElement(yv,null)),this.hideLeftNav()}},{key:"newLevel",value:function(){this.layout.showChildView(ae,d.createElement(vv,null)),this.hideLeftNav()}},{key:"editLevel",value:function(e){this.layout.showChildView(ae,d.createElement(fv,{key:e,id:e})),this.hideLeftNav()}},{key:"audiences",value:function(){var e={objectType:"audiences",getAppLink:function(e){return{application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e.id]}}};this.layout.showChildView(ae,d.createElement(kv,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(Py,{presentationId:e})),this.hideLeftNav()}},{key:"newAudience",value:function(e){this.layout.showChildView(ae,d.createElement(Fy,{presentationId:e})),this.hideLeftNav()}},{key:"editAudience",value:function(e,t){var n={presentationId:e,audienceId:t};this.layout.showChildView(ae,d.createElement(Ty,Object.assign({key:t},n))),this.hideLeftNav()}},{key:"deleteAudience",value:function(e,t){var n={application:u.SUBJECTS,action:o.Subjects.PRESENTATION_AUDIENCES,args:[e]},r=Object.assign({id:t,routeToOnDelete:n},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Oy,Object.assign({},r)))}},{key:"presentations",value:function(){this.layout.showChildView(ae,d.createElement(Av,null)),this.hideLeftNav()}},{key:"newPresentation",value:function(){this.layout.showChildView(ae,d.createElement(Tv,null))}},{key:"editPresentation",value:function(e){this.layout.showChildView(ae,d.createElement(Ev,{key:e,id:e})),this.hideLeftNav()}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(oe,d.createElement(Wd,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(y.ALERT).trigger("remove:alert",e)};this.layout.showChildView(se,d.createElement(Ef,{alerts:n,removeAlert:r}))}},{key:"renderClassificationLeftNav",value:function(e,t){this.setCurrentLeftNavItem(t);var n={presentationId:e,selectedClassificationId:t};this.layout.showChildView(ie,d.createElement(qy,Object.assign({},n)))}},{key:"renderSubjectsLeftNav",value:function(e){this.setCurrentLeftNavItem(e),this.layout.showChildView(ie,d.createElement(gb,{selectedSubjectId:e}))}},{key:"setCurrentLeftNavItem",value:function(e){this.currentLeftNavId=e||null}},{key:"hideLeftNav",value:function(){this.setCurrentLeftNavItem(),this.layout.hideLeftNav()}},{key:"getTopNav",value:function(e){return d.createElement(yb,{currentAppLink:e})}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Subjects Application"}},{key:"channelName",get:function(){return u.SUBJECTS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:Gv,getTopNavView:this.getTopNav}}}}],[{key:"router",get:function(){return mS}}]),n}(r.Application);class gS extends P{onShowAlert(e){if(!this.layoutOptions.options.alertRegion)return;const{ctor:t,collection:n}=e,r=n?n.toJSON():[];this.layout.showChildView(this.layoutOptions.options.alertRegion,d.createElement(t,{alerts:r,removeAlert:e=>h.Radio.channel(y.ALERT).trigger("remove:alert",e)}))}}var yS,vS=function(e){return{url:"/api/domain/v1/themes/".concat(e),key:"themes:".concat(e)}},bS=function(e){var t="/api/domain/v1/themes",n="themes";return e&&(t+="?type=".concat(e),n+=":type:".concat(e)),{url:t,key:n}},SS=function(e,t,n,r){return{url:"/api/domain/v1/themes",key:"theme",data:e,type:nt.POST,invalidationKeys:"themes",success:t,error:n,always:r}},ES=function(e,t,n,r,i){return{url:"/api/domain/v1/themes/".concat(e),key:"update:theme:".concat(e),data:t,type:nt.PUT,success:n,error:r,always:i}},CS=function(e,t,n,r){return{url:"/api/domain/v1/themes/".concat(e),key:"delete:theme:".concat(e),type:nt.DELETE,invalidationKeys:"themes",success:t,error:n,always:r}},OS=function(e){return{application:u.THEMES,action:o.Themes.EDIT_THEME,args:[e.id]}};function IS(){var e=i.useBasicFetch(bS());return e.data?d.createElement(fp,{objects:e.data,getObjectAppLink:OS,newObjectAppLink:{application:u.THEMES,action:o.Themes.NEW_THEME},objectName:"Theme"}):d.createElement(d.Fragment,null)}!function(e){e.Glance="glance"}(yS||(yS={}));var jS=[{key:"topLeft",label:"Top Left"},{key:"topRight",label:"Top Right"},{key:"bottomLeft",label:"Bottom Left"},{key:"bottomRight",label:"Bottom Right"}];function AS(){var e=za();return d.createElement("div",{className:"form-group"},jS.map((function(t){var n="data.".concat(t.key);return d.createElement(fu,{label:t.label,imageType:Fl.HeroBanners,fieldName:n,application:u.THEMES,uploadAction:o.Videos.UPLOAD_IMAGE,setSelectedImage:function(t){e.setFieldValue(n,{fileId:t.id,url:t.url,fileIdType:Ul.ImageAPIv2})}})})))}var TS=oo.object().shape({fileId:oo.string(),fileIdType:oo.mixed(),url:oo.string()}).default({}).noUnknown(),wS=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default(""),type:oo.mixed().required("Type is required"),data:oo.mixed().when("type",{is:yS.Glance,then:oo.object().shape({topLeft:TS,topRight:TS,bottomLeft:TS,bottomRight:TS}).noUnknown(),otherwise:oo.mixed().strip(!0)}).default({})}).noUnknown();function LS(e){var t=za(),n=function(e){switch(e){case yS.Glance:return AS;default:return}}(t.values.type);return d.createElement(Qa,null,d.createElement(go,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this theme",autoFocus:!0}),d.createElement(go,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},d.createElement("option",{value:null},"Select a type..."),pt.getEnumKeys(yS).map((function(e){return d.createElement("option",{key:e,value:yS[e]},e)}))),!!n&&d.createElement(n,null),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(To,{isNew:e.isNew}),!!e.actions&&d.createElement(lp,{actions:e.actions})))}function kS(e){var t;return d.createElement(ao,{initialValues:e.theme,validationSchema:wS,onSubmit:e.saveTheme},d.createElement(LS,{isNew:!(null===(t=e.theme)||void 0===t?void 0:t.id),actions:e.actions}))}function _S(){var e=Object(te.useDispatch)();return d.createElement(kS,{saveTheme:function(t,n){i.fetch(e,SS(t,(function(e){n(),r.AppLinkHelper.trigger({application:u.THEMES,action:o.Themes.EDIT_THEME,args:[e.id]})}),null,n))}})}function xS(e){var t=Object(te.useDispatch)(),n=Qd(),r=i.useBasicFetch(vS(e.id));return r.data?d.createElement(kS,{theme:r.data,saveTheme:function(r,a){i.fetch(t,ES(e.id,r,(function(){n.success("Successfully updated theme")}),(function(){n.error("Failed to update theme")}),a))},actions:[{label:"Delete theme",className:"btn btn-danger",button:!0,appLink:{application:u.THEMES,action:o.Themes.DELETE_THEME,args:[e.id]}}]}):d.createElement(d.Fragment,null)}function PS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return NS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function DS(e){var t=Object(te.useDispatch)(),n=Qd(),a=PS(d.useState(!1),2),s=a[0],c=a[1],l=i.useBasicFetch(vS(e.id));return d.createElement(Of,{title:"Delete Theme",closePopup:e.closePopup,showLoadingSpinner:!l.data},d.createElement(d.Fragment,null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,l.data.name),"?"),d.createElement(jf,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),i.fetch(t,CS(e.id,(function(){n.success("Successfully deleted theme"),r.AppLinkHelper.trigger({application:u.THEMES,action:o.Themes.THEMES})}),(function(){n.error("Failed to delete theme")})))},buttonText:"Yes, delete this theme",isSpinnerButton:!0,showSpinner:s}]})))}var RS=function(e){var t=e.children;return d.createElement(su,null,t)};function FS(e){return(FS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function MS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function US(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function VS(e,t,n){return t&&US(e.prototype,t),n&&US(e,n),e}function BS(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zS(e,t)}function zS(e,t){return(zS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function HS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=JS(e);if(t){var i=JS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qS(this,n)}}function qS(e,t){return!t||"object"!==FS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function JS(e){return(JS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $S=function(e){BS(n,e);var t=HS(n);function n(){return MS(this,n),t.apply(this,arguments)}return VS(n,[{key:"channelName",get:function(){return u.THEMES}},{key:"appRoutes",get:function(){return{"manage/themes(/)":"themes","manage/themes/new(/)":"newTheme","manage/themes/:id(/)":"editTheme"}}},{key:"appLinks",get:function(){return["deleteTheme","uploadImage"]}}]),n}(r.AppRouter),KS=function(e){BS(n,e);var t=HS(n);function n(){return MS(this,n),t.apply(this,arguments)}return VS(n,[{key:"themes",value:function(){this.layout.showChildView(ae,d.createElement(IS,null))}},{key:"newTheme",value:function(){this.layout.showChildView(ae,d.createElement(_S,null))}},{key:"editTheme",value:function(e){this.layout.showChildView(ae,d.createElement(xS,{id:e}))}},{key:"deleteTheme",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(DS,{id:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(Wd,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Themes Application"}},{key:"channelName",get:function(){return u.THEMES}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:RS}}}}],[{key:"router",get:function(){return $S}}]),n}(gS),YS=function(e){var t=e.children;return d.createElement(su,null,t)},GS=function(e,t){var n=u.VIDEOS,r=o.Videos,i=[{label:"Edit Video Details",appLink:{application:n,action:r.EDIT_VIDEO,args:[t]}}];return rm(e)?[].concat(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_VIDEO_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_VIDEO_AUDIENCES,args:[t]}},{label:"Aliases",appLink:{application:n,action:r.EDIT_VIDEO_ALIASES,args:[t]}}]):i};function WS(e){var t,n=GS(e.currentUser,e.videoId);return n.length<2?d.createElement(d.Fragment,null):d.createElement("div",{className:"py-2"},d.createElement(hp,{tabs:n,isItemActive:(t=e.activeAction,function(e){return e.appLink.action===t})}))}var ZS,QS=oo.object().shape({name:oo.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:oo.string().trim().default(""),status:oo.mixed().required("Status is required"),productionYear:oo.number().min(1900),rating:oo.object().shape({id:oo.string()}).default({}).noUnknown(),thumbnail:oo.object().shape({fileId:oo.string(),fileIdType:oo.mixed(),url:oo.string()}).default({}).noUnknown(),heroBanner:oo.object().shape({fileId:oo.string(),fileIdType:oo.mixed(),url:oo.string()}).default({}).noUnknown(),glance:oo.object().shape({theme:oo.string(),format:oo.mixed(),content:oo.string()}).default({}).noUnknown()}).noUnknown();!function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Pending=3]="Pending",e[e.Rejected=4]="Rejected",e[e.Processing=5]="Processing"}(ZS||(ZS={}));var XS,eE=n(129);function tE(e){var t,n,r,i,a,o=za();return d.createElement("div",{className:"form-group p-2 border"},d.createElement("div",{className:"border-bottom mb-2"},d.createElement("label",null,"Summary")),d.createElement(go,{as:"select",label:"Theme",name:"glance.theme",id:"type",value:null===(t=o.values.glance)||void 0===t?void 0:t.theme},d.createElement("option",{value:null},"Select a theme..."),e.themes.map((function(e){return d.createElement("option",{key:e.id,value:e.name},e.name)}))),d.createElement(go,{as:"select",label:"Format",name:"glance.format",id:"type",value:null===(n=o.values.glance)||void 0===n?void 0:n.format},d.createElement("option",{value:null},"Select a format..."),pt.getEnumKeys(XS).map((function(e){return d.createElement("option",{key:e,value:XS[e]},e)}))),d.createElement(go,{label:"Content",as:"textarea",name:"glance.content",id:"content",value:null===(r=o.values.glance)||void 0===r?void 0:r.content}),(null===(i=o.values.glance)||void 0===i?void 0:i.format)===XS.Markdown&&d.createElement("div",{className:"form-group"},d.createElement("label",null,"Content Preview"),d.createElement("div",{className:"border rounded py-2",dangerouslySetInnerHTML:{__html:eE(null===(a=o.values.glance)||void 0===a?void 0:a.content)}})))}function nE(e){switch(e){case ZS.Published:return"badge-success";case ZS.Archived:return"badge-danger";case ZS.Draft:return"badge-warning";case ZS.Pending:return"badge-info";case ZS.Rejected:return"badge-dark";default:return"badge-secondary"}}function rE(e){var t=za(),n=!!e.rightslineId,r=rm(e.currentUser);return d.createElement(Qa,null,n&&d.createElement(go,{label:"Rightsline ID",name:"rightslineId",id:"rightslineId",value:e.rightslineId,disabled:!0}),d.createElement(go,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this video",disabled:n,autoFocus:!0}),d.createElement("div",{className:"form-group"},d.createElement("label",null,"Status"),d.createElement("div",null,d.createElement("span",{className:"badge ".concat(nE(t.values.status))},ZS[t.values.status]))),d.createElement(go,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this video here",disabled:n,showCharacterCounter:!0}),d.createElement(go,{label:"Production Year",type:"number",name:"productionYear",id:"productionYear",value:t.values.productionYear,disabled:n}),d.createElement(mp,{ratings:e.ratings,disabled:n}),d.createElement(fu,{imageType:Fl.Thumbnails,fieldName:"thumbnail",application:u.VIDEOS,uploadAction:o.Videos.UPLOAD_IMAGE}),d.createElement(fu,{imageType:Fl.HeroBanners,fieldName:"heroBanner",application:u.VIDEOS,uploadAction:o.Videos.UPLOAD_IMAGE}),r&&d.createElement(tE,{themes:e.themes}),d.createElement(To,{isNew:!e.id}))}function iE(e,t){if(e)return t?Object.assign(Object.assign({},e),t):e}function aE(e){return d.createElement(ao,{initialValues:iE(e.video,e.rightslineVideo),validationSchema:QS,onSubmit:e.saveVideo,allowInitialSubmit:!!e.rightslineVideo},d.createElement(rE,{id:e.video&&e.video.id,ratings:e.ratings,themes:e.themes,currentUser:e.currentUser,rightslineId:e.rightslineId}))}function oE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cE(e){var t,n=Object(te.useDispatch)(),r=oE(d.useState(!1),2),a=r[0],s=r[1],c=i.useBasicFetch(iy(e.videoId)),l=i.useBasicFetch(oy(e.videoId)),p=i.useBasicFetch(xb()),f=i.useBasicFetch(bS(yS.Glance)),m=i.useBasicFetch(ym);var h,g=!!c.data&&!!p.data&&!!f.data&&!!m.data&&l.isComplete;return d.createElement(d.Fragment,null,!!m.data&&d.createElement(WS,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO,currentUser:m.data}),!!l.data&&d.createElement("div",{className:"pt-3 text-right"},d.createElement(co.Button,{variant:"outline-dark",size:"sm",onClick:function(){l.isFetching||(s(!0),i.fetch(n,oy(e.videoId)))}},"Sync from Rightsline")),g&&d.createElement(aE,{video:c.data,saveVideo:function(t,r){i.fetch(n,sy(e.videoId,t,null,null,r))},ratings:p.data,themes:f.data,currentUser:m.data,rightslineId:null===(t=l.data)||void 0===t?void 0:t.rightslineId,rightslineVideo:a&&l.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit video page ",d.createElement(kl,{className:"info-link",appLink:(h=e.videoId,{application:u.VIDEOS,action:o.Videos.LEGACY_EDIT_VIDEO,args:[h]})},"here"),"."))}function lE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return uE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pE(e){var t=lE(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(iy(e.videoId)),s=i.useBasicFetch(ym),c=Kd(f.SUBJECT);!function(e,t,n){var r=function(e){return wm.getSetStateByKey(n,e)};Tm(Uh.getObjectLevelsFetchOptions(e,km.Videos,r("videoLevels")),[e]),Tm(Uh.getObjectAudiencesFetchOptions(e,km.Videos,r("videoAudiences")),[e,t.videoLevels]),Am([Uh.getPresentationsFetchOptions(r("presentations")),Uh.getLevelsFetchOptions(r("levels"))],[]),Tm(!!t.currentPresentation&&Uh.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.videoId,n,r),zg(n,r);var l=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.videoLevels&&n.videoAudiences);return d.createElement(d.Fragment,null,!!s.data&&d.createElement(WS,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO_AUDIENCES,currentUser:s.data}),d.createElement(up,{object:a.data}),!!l&&d.createElement(Yh,{objectLevels:n.videoLevels,objectAudiences:n.videoAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:wm.getSetStateByKey(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:km.Videos,saveLevels:function(t,n,r){return c.updateObjectLevels(e.videoId,t,km.Videos,n,r,r)},saveAudiences:function(t,r){return c.updateObjectAudiences(e.videoId,n.currentPresentation.id,t,km.Videos,r,r)}}))}function fE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}(e,t)||mE(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dE(e){return function(e){if(Array.isArray(e))return hE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||mE(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mE(e,t){if(e){if("string"==typeof e)return hE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hE(e,t):void 0}}function hE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gE(e){var t=fE(d.useState({}),2),n=t[0],r=t[1],a=i.useBasicFetch(iy(e.videoId)),s=i.useBasicFetch(ym),c=Kd(f.SUBJECT);!function(e,t,n){var r=function(e){return wm.getSetStateByKey(n,e)};Am([Uh.getSubjectTreeFetchOptions(r("subjectTree")),Uh.getPresentationsFetchOptions(r("presentations"))],[]),Tm(Uh.getObjectSubjectsFetchOptions(e,km.Videos,r("videoSubjects")),[e]),Tm(!!t.currentPresentation&&Uh.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.videoSubjects]);var i=function(e,t){return[].concat(dE(t.subjectClassifications||[]),dE(e))},a=t.videoSubjects&&t.videoSubjects.map((function(e){return Uh.getSubjectClassificationFetchOptions(e.id,wm.getSetStateByKey(n,"subjectClassifications",i))}));Am(a,[t.videoSubjects],!!a),Tm(Uh.getObjectClassificationsFetchOptions(e,km.Videos,r("videoClassifications")),[e,t.videoSubjects])}(e.videoId,n,r),zg(n,r);var l=!!(n.videoSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.videoClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,!!s.data&&d.createElement(WS,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO_SUBJECTS,currentUser:s.data}),d.createElement(up,{object:a.data}),l&&d.createElement(Cg,{objectSubjects:n.videoSubjects,subjectTree:n.subjectTree,memberType:km.Videos,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:wm.getSetStateByKey(r,"currentPresentation"),objectClassifications:n.videoClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return c.updateObjectSubjects(e.videoId,t,km.Videos,n,r,r)},saveClassifications:function(t,r){return c.updateObjectClassifications(e.videoId,n.currentPresentation.id,t,km.Videos,r,r)}}))}!function(e){e.Markdown="text/markdown"}(XS||(XS={}));var yE=function(e){return{key:"aliases:".concat(e),url:"/api/master/v2/objects/".concat(e,"/aliases")}},vE=function(e,t,n,r){return{key:"create:alias",url:"/api/master/v2/objects/".concat(e,"/aliases"),type:nt.POST,invalidationKeys:"aliases:".concat(e),data:t,success:n,error:r}},bE=function(e,t,n,r){return{key:"delete:alias",url:"/api/domain/v2/objects/".concat(e,"/aliases/").concat(t),type:nt.DELETE,invalidationKeys:"aliases:".concat(e),success:n,error:r}};function SE(e){var t=Object(te.useDispatch)(),n=Qd(),r=i.useBasicFetch(yE(e.videoId)),a=i.useBasicFetch(ym);return r.data?d.createElement(d.Fragment,null,!!a.data&&d.createElement(WS,{videoId:e.videoId,activeAction:o.Videos.EDIT_VIDEO_ALIASES,currentUser:a.data}),d.createElement(Gp,{aliases:r.data.data,onSave:function(r,a){i.fetch(t,vE(e.videoId,r,(function(){n.success("Successfully created alias"),a()}),(function(){n.error("Something went wrong creating your alias")})))},onDelete:function(r){i.fetch(t,bE(e.videoId,r,(function(){n.success("Successfully deleted alias")}),(function(){n.error("Something went wrong deleting your alias")})))}})):d.createElement(d.Fragment,null,"Loading...")}function EE(e){return(EE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function IE(e,t,n){return t&&OE(e.prototype,t),n&&OE(e,n),e}function jE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&AE(e,t)}function AE(e,t){return(AE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function TE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=LE(e);if(t){var i=LE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wE(this,n)}}function wE(e,t){return!t||"object"!==EE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LE(e){return(LE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kE,_E,xE=function(e){jE(n,e);var t=TE(n);function n(){return CE(this,n),t.apply(this,arguments)}return IE(n,[{key:"channelName",get:function(){return u.VIDEOS}},{key:"appRoutes",get:function(){return{"manage/videos/:id(/)":"editVideo","manage/videos/:id/audiences(/)":"editVideoAudiences","manage/videos/:id/subjects(/)":"editVideoSubjects","manage/videos/:id/aliases(/)":"editVideoAliases","tools/programlookup/:id":"legacyEditVideo"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),PE=function(e){jE(n,e);var t=TE(n);function n(){return CE(this,n),t.apply(this,arguments)}return IE(n,[{key:"initialize",value:function(){var e=this;pt.values(f).forEach((function(t){return $d.getInstance(t,e)}))}},{key:"editVideo",value:function(e){this.layout.showChildView(ae,d.createElement(cE,{videoId:e}))}},{key:"editVideoAudiences",value:function(e){this.layout.showChildView(ae,d.createElement(pE,{videoId:e}))}},{key:"editVideoSubjects",value:function(e){this.layout.showChildView(ae,d.createElement(gE,{videoId:e}))}},{key:"editVideoAliases",value:function(e){this.layout.showChildView(ae,d.createElement(SE,{videoId:e}))}},{key:"legacyEditVideo",value:function(e){r.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(oe,d.createElement(Wd,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Videos Application"}},{key:"channelName",get:function(){return u.VIDEOS}},{key:"layoutOptions",get:function(){return{name:l.CURATOR_LAYOUT,options:{provider:YS,alertRegion:se}}}}],[{key:"router",get:function(){return xE}}]),n}(gS);!function(e){e.Fifo="FifoMemoryCache"}(kE||(kE={}));class NE extends G{constructor(e){super(),this.size=e.size,this.cache={},this.cachedkeys=[]}get name(){return kE.Fifo}removeCacheKey(e){this.cachedkeys=m.without(this.cachedkeys,e)}has(e){return!!this.cache[e]}get(e){return this.cache[e]}set(e,t){e&&t||x.throw(new B("Must provide a cache key and a value to cache in FifoMemoryCache.")),this.has(e)&&this.removeCacheKey(e),this.cachedkeys.push(e),this.cache[e]=t,this.cachedkeys.length>this.size&&delete this.cache[this.cachedkeys.shift()]}getOrSet(e,t){if(this.has(e))return this.get(e);const n=t();return this.set(e,n),n}remove(e){return!!this.has(e)&&(delete this.cache[e],this.removeCacheKey(e),!0)}invalidate(e,t){const n=m.object(this.cachedkeys,this.cachedkeys);let r=[];m.each(e,e=>{n[e]&&r.push(e);const t=new RegExp(e,"i"),i=m.filter(n,e=>t.test(e));r.push(...i)}),r.length&&(r=m.uniq(r),m.each(r,e=>{delete this.cache[e],m.isFunction(t)&&t(e)}),this.cachedkeys=m.without(this.cachedkeys,...r))}}!function(e){e[e.Unknown=0]="Unknown",e[e.BadRequest=1]="BadRequest",e[e.Unauthorized=2]="Unauthorized",e[e.Forbidden=3]="Forbidden",e[e.NotFound=4]="NotFound",e[e.InternalServer=5]="InternalServer"}(_E||(_E={}));const DE={type:_E.Unknown,message:"",code:0};var RE;!function(e){e.Ajax="AjaxDataProvider",e.Notifications="NotificationsSignalRDataProvider"}(RE||(RE={}));const FE={parseErrorMessage(e,t,n){if(!n||!n.errorCode)return e[t];let r=""+n.errorCode;return n.errorSubCode&&(r+="."+n.errorSubCode),e[r]||e[t]}};class ME extends A.Object{constructor(e){super(e),$.ajaxSetup({cache:!1,contentType:"application/json; charset=utf-8"}),this.successMiddleware={},this.errorMiddleware={},this.dataServiceErrorMessageMappings=e.dataServiceErrorMessageMappings,this.defaultErrorMessageKey=e.defaultErrorMessageKey}get name(){return RE.Ajax}parseUrl(e){const t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t}makeHttps(e){const t=this.parseUrl(e);return"http:"===t.protocol&&(t.protocol="https:"),t.href}base(e,t,n,r={}){n||(n=nt.GET);const i=m.defaults(r,{forceHttps:!1}),a={url:e,method:n,type:n};t&&(a.data=n===nt.POST||n===nt.PUT?JSON.stringify(t):t),i.forceHttps&&(a.url=this.makeHttps(a.url)),i.traditional&&(a.traditional=i.traditional);const o=$.ajax(a);return m.keys(this.successMiddleware).length&&o.done(m.values(this.successMiddleware)),m.keys(this.errorMiddleware).length&&o.fail(m.values(this.errorMiddleware)),o}create(e,t,n){const{channel:r,successEvent:i,errorEvent:a}=n;this.base(e,t,nt.POST).done((e,t,n)=>r.trigger(i,e,t,n)).fail((e,t,n)=>r.trigger(a,e,t,n))}read(e,t){const{channel:n,successEvent:r,errorEvent:i}=t;this.base(e,null,nt.GET).done((e,t,i)=>{n.trigger(r,e,t,i)}).fail((e,t,r)=>{n.trigger(i,e,t,r)})}update(e,t,n){const{channel:r,successEvent:i,errorEvent:a}=n;this.base(e,t,nt.PUT).done((e,t,n)=>r.trigger(i,e,t,n)).fail((e,t,n)=>r.trigger(a,e,t,n))}delete(e,t){const{channel:n,successEvent:r,errorEvent:i}=t;this.base(e,null,nt.DELETE).done((e,t,i)=>n.trigger(r,e,t,i)).fail((e,t,r)=>n.trigger(i,e,t,r))}useMiddleware(e,t){this.successMiddleware[e]||(this.successMiddleware[e]=t)}useErrorMiddleware(e,t){this.errorMiddleware[e]||(this.errorMiddleware[e]=t)}parseError(e,t,n){const r=e.responseJSON,i=DE;switch(i.code=e.status,i.message=FE.parseErrorMessage(this.dataServiceErrorMessageMappings,this.defaultErrorMessageKey,r),e.status){case 400:i.type=_E.BadRequest;break;case 401:i.type=_E.Unauthorized;break;case 403:i.type=_E.Forbidden;break;case 404:i.type=_E.NotFound;break;case 500:i.type=_E.InternalServer}return i}}n.d(t,"Actions",(function(){return o})),n.d(t,"DataPrefixes",(function(){return s})),n.d(t,"FileExtensions",(function(){return c})),n.d(t,"Layouts",(function(){return l})),n.d(t,"AppChannels",(function(){return u})),n.d(t,"DataChannels",(function(){return p})),n.d(t,"DataServices",(function(){return f})),n.d(t,"CuratorLayoutView",(function(){return be})),n.d(t,"LayoutComponent",(function(){return Ie})),n.d(t,"CuratorAppNavService",(function(){return Ne})),n.d(t,"ImageUploadDataService",(function(){return He})),n.d(t,"LanguageDataService",(function(){return Xe})),n.d(t,"CompaniesApplication",(function(){return df})),n.d(t,"DomainOptionsApplication",(function(){return md})),n.d(t,"PeopleApplication",(function(){return Jd})),n.d(t,"PlaylistsApplication",(function(){return wb})),n.d(t,"SeriesApplication",(function(){return iS})),n.d(t,"SubjectDataService",(function(){return Fh})),n.d(t,"SubjectDataServiceHelper",(function(){return Uh})),n.d(t,"SubjectsApplication",(function(){return hS})),n.d(t,"ThemesApplication",(function(){return KS})),n.d(t,"VideosApplication",(function(){return PE})),n.d(t,"DomainOptionsApplication",(function(){return md})),n.d(t,"Core",(function(){return r})),n.d(t,"InstanceManager",(function(){return $d})),n.d(t,"FifoMemoryCache",(function(){return NE})),n.d(t,"AjaxDataProvider",(function(){return ME})),n.d(t,"AlertList",(function(){return Ef})),n.d(t,"AlertType",(function(){return uf})),n.d(t,"BaseAlertService",(function(){return hf})),n.d(t,"LanguageService",(function(){return Io})),n.d(t,"Flight",(function(){return i})),n.d(t,"CacheDurations",(function(){return Je}))}])}));
17
+ */var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,c=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,S=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case f:case p:case a:case u:case c:case m:return e;default:switch(e=e&&e.$$typeof){case l:case d:case v:case y:case s:return e;default:return t}}case o:return t}}}function j(e){return O(e)===p}t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=s,t.Element=i,t.ForwardRef=d,t.Fragment=a,t.Lazy=v,t.Memo=y,t.Portal=o,t.Profiler=u,t.StrictMode=c,t.Suspense=m,t.isAsyncMode=function(e){return j(e)||O(e)===f},t.isConcurrentMode=j,t.isContextConsumer=function(e){return O(e)===l},t.isContextProvider=function(e){return O(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return O(e)===d},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===v},t.isMemo=function(e){return O(e)===y},t.isPortal=function(e){return O(e)===o},t.isProfiler=function(e){return O(e)===u},t.isStrictMode=function(e){return O(e)===c},t.isSuspense=function(e){return O(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===u||e===c||e===m||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===s||e.$$typeof===l||e.$$typeof===d||e.$$typeof===g||e.$$typeof===S||e.$$typeof===E||e.$$typeof===b)},t.typeOf=O},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),a=f(o),c=f(n(16)),u=f(n(170)),s=f(n(171)),l=n(179);function f(e){return e&&e.__esModule?e:{default:e}}var p=function(){return!0},d=function(e){function t(e){var n=e.alwaysRenderSuggestions;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return m.call(r),r.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},r.justPressedUpDown=!1,r.justMouseEntered=!1,r.pressedSuggestion=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,u.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,i=n.onSuggestionHighlighted,o=n.highlightFirstSuggestion;if(!(0,u.default)(r,e.suggestions)&&r.length>0&&o)this.highlightFirstSuggestion();else if(i){var a=this.getHighlightedSuggestion();a!=t.highlightedSuggestion&&i({suggestion:a})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(i){var o=i.valueBeforeUpDown;return null===t?o=null:null===o&&void 0!==n&&(o=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:o}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,i=n.multiSection,o=n.getSectionSuggestions;return i?o(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,i=r.value,o=r.onChange;t!==i&&o(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,r=e.shouldRenderSuggestions,i=n.value;return t.length>0&&r(i)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,i=t.renderInputComponent,o=t.onSuggestionsFetchRequested,c=t.renderSuggestion,u=t.inputProps,f=t.multiSection,d=t.renderSectionTitle,m=t.id,h=t.getSectionSuggestions,y=t.theme,v=t.getSuggestionValue,b=t.alwaysRenderSuggestions,g=t.highlightFirstSuggestion,S=this.state,E=S.isFocused,O=S.isCollapsed,j=S.highlightedSectionIndex,C=S.highlightedSuggestionIndex,w=S.valueBeforeUpDown,A=b?p:this.props.shouldRenderSuggestions,I=u.value,T=u.onFocus,k=u.onKeyDown,_=this.willRenderSuggestions(this.props),P=b||E&&!O&&_,L=P?n:[],x=r({},u,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=A(I);e.setState({isFocused:!0,isCollapsed:!n}),T&&T(t),n&&o({value:I,reason:"input-focused"})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,i=A(n);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(r({},g?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!i})),i?o({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var i=t.keyCode;switch(i){case 40:case 38:if(O)A(I)&&(o({value:I,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var a=r.newHighlightedSectionIndex,c=r.newHighlightedItemIndex,u=void 0;u=null===c?null===w?I:w:e.getSuggestionValueByIndex(a,c),e.updateHighlightedSuggestion(a,c,I),e.maybeCallOnChange(t,u,40===i?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var s=e.getHighlightedSuggestion();if(P&&!b&&e.closeSuggestions(),null!=s){var l=v(s);e.maybeCallOnChange(t,l,"enter"),e.onSuggestionSelected(t,{suggestion:s,suggestionValue:l,suggestionIndex:C,sectionIndex:j,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:P&&t.preventDefault();var f=P&&!b;if(null===w){if(!f){e.maybeCallOnChange(t,"","escape"),A("")?o({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,w,"escape");f?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}k&&k(t)}}),N={query:this.getQuery()};return a.default.createElement(s.default,{multiSection:f,items:L,renderInputComponent:i,renderItemsContainer:this.renderSuggestionsContainer,renderItem:c,renderItemData:N,renderSectionTitle:d,getSectionItems:h,highlightedSectionIndex:j,highlightedItemIndex:C,inputProps:x,itemProps:this.itemProps,theme:(0,l.mapToAutowhateverTheme)(y),id:m,ref:this.storeAutowhateverRef})}}]),t}(o.Component);d.propTypes={suggestions:c.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){var n=e[t];if("function"!=typeof n)throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},onSuggestionSelected:c.default.func,onSuggestionHighlighted:c.default.func,renderInputComponent:c.default.func,renderSuggestionsContainer:c.default.func,getSuggestionValue:c.default.func.isRequired,renderSuggestion:c.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:c.default.func,alwaysRenderSuggestions:c.default.bool,multiSection:c.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:c.default.bool,highlightFirstSuggestion:c.default.bool,theme:c.default.object,id:c.default.string},d.defaultProps={renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return a.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:l.defaultTheme,id:"1"};var m=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var r=n.sectionIndex,i=n.itemIndex;e.updateHighlightedSuggestion(r,i),t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!0),e.justMouseEntered=!0,setTimeout((function(){e.justMouseEntered=!1}))},this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(e.props.multiSection?0:null,0)},this.onDocumentMouseUp=function(){e.pressedSuggestion&&!e.justSelectedSuggestion&&e.input.focus(),e.pressedSuggestion=null},this.onSuggestionMouseDown=function(t){e.justSelectedSuggestion||(e.justSelectedSuggestion=!0,e.pressedSuggestion=t.target)},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var r=e.props,i=r.alwaysRenderSuggestions,o=r.onSuggestionSelected,a=r.onSuggestionsFetchRequested;o&&o(t,n),i?a({value:n.suggestionValue,reason:"suggestion-selected"}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,r=n.alwaysRenderSuggestions,i=n.focusInputOnSuggestionClick,o=e.getSuggestionIndices(e.findSuggestionElement(t.target)),a=o.sectionIndex,c=o.suggestionIndex,u=e.getSuggestion(a,c),s=e.props.getSuggestionValue(u);e.maybeCallOnChange(t,s,"click"),e.onSuggestionSelected(t,{suggestion:u,suggestionValue:s,suggestionIndex:c,sectionIndex:a,method:"click"}),r||e.closeSuggestions(),!0===i?e.input.focus():e.onBlur(),setTimeout((function(){e.justSelectedSuggestion=!1}))},this.onBlur=function(){var t=e.props,n=t.inputProps,r=t.shouldRenderSuggestions,i=n.value,o=n.onBlur,a=e.getHighlightedSuggestion(),c=r(i);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!c}),o&&o(e.blurEvent,{highlightedSuggestion:a})},this.onSuggestionMouseLeave=function(t){e.resetHighlightedSuggestion(!1),e.justSelectedSuggestion&&t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!1)},this.onSuggestionTouchStart=function(){e.justSelectedSuggestion=!0},this.onSuggestionTouchMove=function(){e.justSelectedSuggestion=!1,e.pressedSuggestion=null,e.input.focus()},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.onSuggestionMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionTouchStart,onTouchMove:e.onSuggestionTouchMove,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,r=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:r,query:e.getQuery()})}};t.default=d},function(e,t,n){"use strict";var r=n(169);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},function(e,t,n){"use strict";e.exports=n(172).default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),c=d(a),u=d(n(16)),s=d(n(173)),l=d(n(174)),f=d(n(176)),p=d(n(177));function d(e){return e&&e.__esModule?e:{default:e}}var m={},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},n.onKeyDown=function(e){var t=n.props,r=t.inputProps,o=t.highlightedSectionIndex,a=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var c="ArrowDown"===e.key?"next":"prev",u=n.sectionIterator[c]([o,a]),s=i(u,2),l=s[0],f=s[1];r.onKeyDown(e,{newHighlightedSectionIndex:l,newHighlightedItemIndex:f});break;default:r.onKeyDown(e,{highlightedSectionIndex:o,highlightedItemIndex:a})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,s.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,l.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,i=n.items,o=n.renderItem,a=n.renderItemData,u=n.renderSectionTitle,s=n.highlightedSectionIndex,l=n.highlightedItemIndex,d=n.itemProps;return i.map((function(n,i){var m="react-autowhatever-"+r+"-",h=m+"section-"+i+"-",y=0===i;return c.default.createElement("div",t(h+"container","sectionContainer",y&&"sectionContainerFirst"),c.default.createElement(f.default,{section:n,renderSectionTitle:u,theme:t,sectionKeyPrefix:h}),c.default.createElement(p.default,{items:e.sectionsItems[i],itemProps:d,renderItem:o,renderItemData:a,sectionIndex:i,highlightedItemIndex:s===i?l:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:m,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,r=n.id,i=n.renderItem,o=n.renderItemData,a=n.highlightedSectionIndex,u=n.highlightedItemIndex,s=n.itemProps;return c.default.createElement(p.default,{items:e,itemProps:s,renderItem:i,renderItemData:o,highlightedItemIndex:null===a?u:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+r+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,i=t.multiSection,o=t.renderInputComponent,a=t.renderItemsContainer,u=t.highlightedSectionIndex,s=t.highlightedItemIndex,l=this.state.isInputFocused,f=i?this.renderSections():this.renderItems(),p=null!==f,d=this.getItemId(u,s),m="react-autowhatever-"+n,h=r({role:"combobox","aria-haspopup":"listbox","aria-owns":m,"aria-expanded":p},e("react-autowhatever-"+n+"-container","container",p&&"containerOpen"),this.props.containerProps),y=o(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":m,"aria-activedescendant":d},e("react-autowhatever-"+n+"-input","input",p&&"inputOpen",l&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),v=a({containerProps:r({id:m,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",p&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:f});return c.default.createElement("div",h,y,v)}}]),t}(a.Component);h.propTypes={id:u.default.string,multiSection:u.default.bool,renderInputComponent:u.default.func,renderItemsContainer:u.default.func,items:u.default.array.isRequired,renderItem:u.default.func,renderItemData:u.default.object,renderSectionTitle:u.default.func,getSectionItems:u.default.func,containerProps:u.default.object,inputProps:u.default.object,itemProps:u.default.oneOfType([u.default.object,u.default.func]),highlightedSectionIndex:u.default.number,highlightedItemIndex:u.default.number,theme:u.default.oneOfType([u.default.object,u.default.array])},h.defaultProps={id:"1",multiSection:!1,renderInputComponent:function(e){return c.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return c.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:m,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:m,inputProps:m,itemProps:m,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}},t.default=h},function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var t=e.data,n=e.multiSection;function i(e){var i=r(e,2),o=i[0],a=i[1];return n?null===a||a===t[o]-1?null===(o=function(e){for(null===e?e=0:e++;e<t.length&&0===t[e];)e++;return e===t.length?null:e}(o))?[null,null]:[o,0]:[o,a+1]:0===t||a===t-1?[null,null]:null===a?[null,0]:[null,a+1]}return{next:i,prev:function(e){var i=r(e,2),o=i[0],a=i[1];return n?null===a||0===a?null===(o=function(e){for(null===e?e=t.length-1:e--;e>=0&&0===t[e];)e--;return-1===e?null:e}(o))?[null,null]:[o,t[o]-1]:[o,a-1]:0===t||0===a?[null,null]:null===a?[null,t-1]:[null,a-1]},isLast:function(e){return null===i(e)[1]}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o,a=n(175),c=(o=a)&&o.__esModule?o:{default:o},u=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),o=n[0],a=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var s=n.map((function(e){return o[e]})).filter(u);return"string"==typeof s[0]||"function"==typeof a?{key:e,className:a?a.apply(void 0,i(s)):s.join(" ")}:{key:e,style:c.default.apply(void 0,[{}].concat(i(s)))}}},e.exports=t.default},function(e,t,n){"use strict";var r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter((function(t){return r.call(e,t)}))}e.exports=Object.assign||function(e,t){for(var n,r,a=i(e),c=1;c<arguments.length;c++){n=arguments[c],r=o(Object(n));for(var u=0;u<r.length;u++)a[r[u]]=n[r[u]]}return a}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(0),o=u(i),a=u(n(16)),c=u(n(27));function u(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){return s(this,t),l(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){return(0,c.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,i=e.sectionKeyPrefix,a=n(t);return a?o.default.createElement("div",r(i+"title","sectionTitle"),a):null}}]),t}(i.Component);f.propTypes={section:a.default.any.isRequired,renderSectionTitle:a.default.func.isRequired,theme:a.default.func.isRequired,sectionKeyPrefix:a.default.string.isRequired},t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),a=l(o),c=l(n(16)),u=l(n(178)),s=l(n(27));function l(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;f(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.storeHighlightedItemReference=function(e){r.props.onHighlightedItemChange(null===e?null:e.item)},p(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,s.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,i=t.itemProps,o=t.renderItem,c=t.renderItemData,s=t.sectionIndex,l=t.highlightedItemIndex,f=t.getItemId,p=t.theme,d=t.keyPrefix,m=null===s?d:d+"section-"+s+"-",h="function"==typeof i;return a.default.createElement("ul",r({role:"listbox"},p(m+"items-list","itemsList")),n.map((function(t,n){var d=0===n,y=n===l,v=m+"item-"+n,b=h?i({sectionIndex:s,itemIndex:n}):i,g=r({id:f(s,n),"aria-selected":y},p(v,"item",d&&"itemFirst",y&&"itemHighlighted"),b);return y&&(g.ref=e.storeHighlightedItemReference),a.default.createElement(u.default,r({},g,{sectionIndex:s,isHighlighted:y,itemIndex:n,item:t,renderItem:o,renderItemData:c}))})))}}]),t}(o.Component);d.propTypes={items:c.default.array.isRequired,itemProps:c.default.oneOfType([c.default.object,c.default.func]),renderItem:c.default.func.isRequired,renderItemData:c.default.object.isRequired,sectionIndex:c.default.number,highlightedItemIndex:c.default.number,onHighlightedItemChange:c.default.func.isRequired,getItemId:c.default.func.isRequired,theme:c.default.func.isRequired,keyPrefix:c.default.string.isRequired},d.defaultProps={sectionIndex:null},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(0),a=s(o),c=s(n(16)),u=s(n(27));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,n,r;l(this,t);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),r.storeItemReference=function(e){null!==e&&(r.item=e)},r.onMouseEnter=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseEnter(e,{sectionIndex:n,itemIndex:i})},r.onMouseLeave=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseLeave(e,{sectionIndex:n,itemIndex:i})},r.onMouseDown=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onMouseDown(e,{sectionIndex:n,itemIndex:i})},r.onClick=function(e){var t=r.props,n=t.sectionIndex,i=t.itemIndex;r.props.onClick(e,{sectionIndex:n,itemIndex:i})},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"shouldComponentUpdate",value:function(e){return(0,u.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,i=e.renderItem,o=e.renderItemData,c=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete c.sectionIndex,delete c.itemIndex,"function"==typeof c.onMouseEnter&&(c.onMouseEnter=this.onMouseEnter),"function"==typeof c.onMouseLeave&&(c.onMouseLeave=this.onMouseLeave),"function"==typeof c.onMouseDown&&(c.onMouseDown=this.onMouseDown),"function"==typeof c.onClick&&(c.onClick=this.onClick),a.default.createElement("li",r({role:"option"},c,{ref:this.storeItemReference}),i(n,r({isHighlighted:t},o)))}}]),t}(o.Component);p.propTypes={sectionIndex:c.default.number,isHighlighted:c.default.bool.isRequired,itemIndex:c.default.number.isRequired,item:c.default.any.isRequired,renderItem:c.default.func.isRequired,renderItemData:c.default.object.isRequired,onMouseEnter:c.default.func,onMouseLeave:c.default.func,onMouseDown:c.default.func,onClick:c.default.func},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},function(e,t,n){const{defaults:r}=n(17),{block:i}=n(117),{rtrim:o,splitCells:a,escape:c}=n(13);e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||r,this.rules=i.normal,this.options.pedantic?this.rules=i.pedantic:this.options.gfm&&(this.rules=i.gfm)}static get rules(){return i}static lex(t,n){return new e(n).lex(t)}lex(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.token(e,!0)}token(e,t){let n,r,u,s,l,f,p,d,m,h,y,v,b,g,S,E;for(e=e.replace(/^ +$/gm,"");e;)if((u=this.rules.newline.exec(e))&&(e=e.substring(u[0].length),u[0].length>1&&this.tokens.push({type:"space"})),u=this.rules.code.exec(e)){const t=this.tokens[this.tokens.length-1];e=e.substring(u[0].length),t&&"paragraph"===t.type?t.text+="\n"+u[0].trimRight():(u=u[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",codeBlockStyle:"indented",text:this.options.pedantic?u:o(u,"\n")}))}else if(u=this.rules.fences.exec(e))e=e.substring(u[0].length),this.tokens.push({type:"code",lang:u[2]?u[2].trim():u[2],text:u[3]||""});else if(u=this.rules.heading.exec(e))e=e.substring(u[0].length),this.tokens.push({type:"heading",depth:u[1].length,text:u[2]});else if((u=this.rules.nptable.exec(e))&&(f={type:"table",header:a(u[1].replace(/^ *| *\| *$/g,"")),align:u[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:u[3]?u[3].replace(/\n$/,"").split("\n"):[]},f.header.length===f.align.length)){for(e=e.substring(u[0].length),y=0;y<f.align.length;y++)/^ *-+: *$/.test(f.align[y])?f.align[y]="right":/^ *:-+: *$/.test(f.align[y])?f.align[y]="center":/^ *:-+ *$/.test(f.align[y])?f.align[y]="left":f.align[y]=null;for(y=0;y<f.cells.length;y++)f.cells[y]=a(f.cells[y],f.header.length);this.tokens.push(f)}else if(u=this.rules.hr.exec(e))e=e.substring(u[0].length),this.tokens.push({type:"hr"});else if(u=this.rules.blockquote.exec(e))e=e.substring(u[0].length),this.tokens.push({type:"blockquote_start"}),u=u[0].replace(/^ *> ?/gm,""),this.token(u,t),this.tokens.push({type:"blockquote_end"});else if(u=this.rules.list.exec(e)){for(e=e.substring(u[0].length),s=u[2],g=s.length>1,p={type:"list_start",ordered:g,start:g?+s:"",loose:!1},this.tokens.push(p),u=u[0].match(this.rules.item),d=[],n=!1,b=u.length,y=0;y<b;y++)f=u[y],h=f.length,f=f.replace(/^ *([*+-]|\d+\.) */,""),~f.indexOf("\n ")&&(h-=f.length,f=this.options.pedantic?f.replace(/^ {1,4}/gm,""):f.replace(new RegExp("^ {1,"+h+"}","gm"),"")),y!==b-1&&(l=i.bullet.exec(u[y+1])[0],(s.length>1?1===l.length:l.length>1||this.options.smartLists&&l!==s)&&(e=u.slice(y+1).join("\n")+e,y=b-1)),r=n||/\n\n(?!\s*$)/.test(f),y!==b-1&&(n="\n"===f.charAt(f.length-1),r||(r=n)),r&&(p.loose=!0),S=/^\[[ xX]\] /.test(f),E=void 0,S&&(E=" "!==f[1],f=f.replace(/^\[[ xX]\] +/,"")),m={type:"list_item_start",task:S,checked:E,loose:r},d.push(m),this.tokens.push(m),this.token(f,!1),this.tokens.push({type:"list_item_end"});if(p.loose)for(b=d.length,y=0;y<b;y++)d[y].loose=!0;this.tokens.push({type:"list_end"})}else if(u=this.rules.html.exec(e))e=e.substring(u[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===u[1]||"script"===u[1]||"style"===u[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(u[0]):c(u[0]):u[0]});else if(t&&(u=this.rules.def.exec(e)))e=e.substring(u[0].length),u[3]&&(u[3]=u[3].substring(1,u[3].length-1)),v=u[1].toLowerCase().replace(/\s+/g," "),this.tokens.links[v]||(this.tokens.links[v]={href:u[2],title:u[3]});else if((u=this.rules.table.exec(e))&&(f={type:"table",header:a(u[1].replace(/^ *| *\| *$/g,"")),align:u[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:u[3]?u[3].replace(/\n$/,"").split("\n"):[]},f.header.length===f.align.length)){for(e=e.substring(u[0].length),y=0;y<f.align.length;y++)/^ *-+: *$/.test(f.align[y])?f.align[y]="right":/^ *:-+: *$/.test(f.align[y])?f.align[y]="center":/^ *:-+ *$/.test(f.align[y])?f.align[y]="left":f.align[y]=null;for(y=0;y<f.cells.length;y++)f.cells[y]=a(f.cells[y].replace(/^ *\| *| *\| *$/g,""),f.header.length);this.tokens.push(f)}else if(u=this.rules.lheading.exec(e))e=e.substring(u[0].length),this.tokens.push({type:"heading",depth:"="===u[2].charAt(0)?1:2,text:u[1]});else if(t&&(u=this.rules.paragraph.exec(e)))e=e.substring(u[0].length),this.tokens.push({type:"paragraph",text:"\n"===u[1].charAt(u[1].length-1)?u[1].slice(0,-1):u[1]});else if(u=this.rules.text.exec(e))e=e.substring(u[0].length),this.tokens.push({type:"text",text:u[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens}}},function(e,t,n){const r=n(28),i=n(118),o=n(119),a=n(120),{defaults:c}=n(17),{merge:u,unescape:s}=n(13);e.exports=class e{constructor(e){this.tokens=[],this.token=null,this.options=e||c,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.slugger=new i}static parse(t,n){return new e(n).parse(t)}parse(e){this.inline=new o(e.links,this.options),this.inlineText=new o(e.links,u({},this.options,{renderer:new a})),this.tokens=e.reverse();let t="";for(;this.next();)t+=this.tok();return t}next(){return this.token=this.tokens.pop(),this.token}peek(){return this.tokens[this.tokens.length-1]||0}parseText(){let e=this.token.text;for(;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)}tok(){let e="";switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,s(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":{let t,n,r,i,o="";for(r="",t=0;t<this.token.header.length;t++)r+=this.renderer.tablecell(this.inline.output(this.token.header[t]),{header:!0,align:this.token.align[t]});for(o+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=this.token.cells[t],r="",i=0;i<n.length;i++)r+=this.renderer.tablecell(this.inline.output(n[i]),{header:!1,align:this.token.align[i]});e+=this.renderer.tablerow(r)}return this.renderer.table(o,e)}case"blockquote_start":for(e="";"blockquote_end"!==this.next().type;)e+=this.tok();return this.renderer.blockquote(e);case"list_start":{e="";const t=this.token.ordered,n=this.token.start;for(;"list_end"!==this.next().type;)e+=this.tok();return this.renderer.list(e,t,n)}case"list_item_start":{e="";const t=this.token.loose,n=this.token.checked,r=this.token.task;if(this.token.task)if(t)if("text"===this.peek().type){const e=this.peek();e.text=this.renderer.checkbox(n)+" "+e.text}else this.tokens.push({type:"text",text:this.renderer.checkbox(n)});else e+=this.renderer.checkbox(n);for(;"list_item_end"!==this.next().type;)e+=t||"text"!==this.token.type?this.tok():this.parseText();return this.renderer.listitem(e,r,n)}case"html":return this.renderer.html(this.token.text);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText());default:{const e='Token with "'+this.token.type+'" type was not found.';if(!this.options.silent)throw new Error(e);console.log(e)}}}}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"AppLinkHelper",(function(){return w})),n.d(r,"AppLinkUtility",(function(){return j})),n.d(r,"Application",(function(){return re})),n.d(r,"AppRouter",(function(){return ve})),n.d(r,"Behavior",(function(){return Ae})),n.d(r,"Collection",(function(){return Re})),n.d(r,"CollectionView",(function(){return qe})),n.d(r,"ComponentCollection",(function(){return qe})),n.d(r,"Error",(function(){return B})),n.d(r,"ErrorHelper",(function(){return J})),n.d(r,"SilentError",(function(){return H})),n.d(r,"LayoutView",(function(){return Et})),n.d(r,"NestedModel",(function(){return Ft})),n.d(r,"Service",(function(){return Yt})),n.d(r,"Model",(function(){return _t})),n.d(r,"View",(function(){return dt})),n.d(r,"Component",(function(){return mt})),n.d(r,"EventNames",(function(){return y})),n.d(r,"LayoutService",(function(){return tn})),n.d(r,"Middleware",(function(){return oe})),n.d(r,"LocationUtils",(function(){return b})),n.d(r,"Shell",(function(){return dn}));var i={};n.r(i),n.d(i,"emptyResponse",(function(){return oi})),n.d(i,"getResponse",(function(){return ai})),n.d(i,"getFetch",(function(){return ci})),n.d(i,"fetch",(function(){return ui})),n.d(i,"useGetFetch",(function(){return si})),n.d(i,"useGetResponse",(function(){return li})),n.d(i,"useBasicFetch",(function(){return fi})),n.d(i,"createMiddleware",(function(){return gi})),n.d(i,"FlightReducer",(function(){return Ti})),n.d(i,"Simulator",(function(){return Vi})),n.d(i,"Actions",(function(){return Rr})),n.d(i,"RequestStatus",(function(){return Lr})),n.d(i,"ajaxRequest",(function(){return Ur})),n.d(i,"normalize",(function(){return qr})),n.d(i,"denormalize",(function(){return Kr}));n(130),n(131),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161);var o={UPLOAD_IMAGE:"upload:image"},a={Subjects:Object.assign({SUBJECTS:"subjects",NEW_SUBJECT:"new:subject",EDIT_SUBJECT:"edit:subject",EDIT_SUBJECT_PLAYLISTS:"edit:subject:playlists",EDIT_SUBJECT_SERIES:"edit:subject:series",EDIT_SUBJECT_VIDEOS:"edit:subject:videos",SUBJECT_CLASSIFICATIONS:"subject:classifications",DELETE_SUBJECT:"delete:subject",ADD_SUBJECT_MEMBERS:"add:subject:members",REMOVE_SUBJECT_MEMBER:"remove:subject:member",CLASSIFICATIONS:"classifications",PRESENTATION_CLASSIFICATIONS:"presentation:classifications",NEW_CLASSIFICATION:"new:classification",EDIT_CLASSIFICATION:"edit:classification",EDIT_CLASSIFICATION_PLAYLISTS:"edit:classification:playlists",EDIT_CLASSIFICATION_SERIES:"edit:classification:series",EDIT_CLASSIFICATION_VIDEOS:"edit:classification:videos",DELETE_CLASSIFICATION:"delete:classification",REMOVE_CLASSIFICATION_MEMBER:"remove:classification:member",LEVELS:"levels",NEW_LEVEL:"new:level",EDIT_LEVEL:"edit:level",AUDIENCES:"audiences",PRESENTATION_AUDIENCES:"presentation:audiences",NEW_AUDIENCE:"new:audience",EDIT_AUDIENCE:"edit:audience",DELETE_AUDIENCE:"delete:audience",PRESENTATIONS:"presentations",NEW_PRESENTATION:"new:presentation",EDIT_PRESENTATION:"edit:presentation"},o),Playlists:Object.assign({PLAYLISTS:"index",SEARCH_PLAYLISTS:"search:playlists",NEW_PLAYLIST:"new:playlist",EDIT_PLAYLIST:"edit:playlist",EDIT_PLAYLIST_VIDEOS:"edit:playlist:videos",EDIT_PLAYLIST_SUBJECTS:"edit:playlist:subjects",EDIT_PLAYLIST_AUDIENCES:"edit:playlist:audiences",DELETE_PLAYLIST:"delete:playlist",REMOVE_VIDEO:"remove:video",REMOVE_FROM_SUBJECT:"remove:from:subject"},o),Series:Object.assign({EDIT_SERIES:"edit:series",EDIT_SERIES_VIDEOS:"edit:series:videos",EDIT_SERIES_SUBJECTS:"edit:series:subjects",EDIT_SERIES_AUDIENCES:"edit:series:audiences",LEGACY_EDIT_SERIES:"legacy:edit:series"},o),Videos:Object.assign({EDIT_VIDEO:"edit:video",EDIT_VIDEO_AUDIENCES:"edit:video:audiences",EDIT_VIDEO_SUBJECTS:"edit:video:subjects",EDIT_VIDEO_ALIASES:"edit:video:aliases",LEGACY_EDIT_VIDEO:"legacy:edit:video"},o),DomainOptions:{DOMAIN_OPTIONS:"domain:options",NEW_DOMAIN_OPTION:"new:domain:option",EDIT_DOMAIN_OPTION:"edit:domain:option",DELETE_DOMAIN_OPTION:"delete:domain:option"},People:{PEOPLE:"people",NEW_PERSON:"new:person",EDIT_PERSON:"edit:person"},Companies:{COMPANIES:"companies",NEW_COMPANY:"new:company",EDIT_COMPANY:"edit:company"},Themes:Object.assign({THEMES:"themes",NEW_THEME:"new:theme",EDIT_THEME:"edit:theme",DELETE_THEME:"delete:theme"},o)},c={SUBJECT:"subject",SUBJECTS:"subjects",UPDATE_SUBJECT:"update:subject",DELETE_SUBJECT:"delete:subject",UPDATE_OBJECT_SUBJECTS:"update:object:subjects",ADD_TO_SUBJECT:"add:to:subject",REMOVE_FROM_SUBJECT:"remove:from:subject",CLASSIFICATION:"classification",CLASSIFICATIONS:"classifications",UPDATE_CLASSIFICATION:"update:classification",DELETE_CLASSIFICATION:"delete:classification",UPDATE_OBJECT_CLASSIFICATIONS:"update:object:classifications",ADD_TO_CLASSIFICATION:"add:to:classification",REMOVE_FROM_CLASSIFICATION:"remove:from:classification",PRESENTATION:"presentation",PRESENTATIONS:"presentations",UPDATE_PRESENTATION:"update:presentation",LEVEL:"level",LEVELS:"levels",UPDATE_LEVEL:"update:level",ADD_TO_LEVEL:"add:to:level",REMOVE_FROM_LEVEL:"remove:from:level",UPDATE_OBJECT_LEVELS:"update:object:levels",AUDIENCE:"audience",AUDIENCES:"audiences",UPDATE_AUDIENCE:"update:audience",DELETE_AUDIENCE:"delete:audience",UPDATE_OBJECT_AUDIENCES:"update:object:audiences",PLAYLIST:"playlist",PLAYLISTS:"playlists",UPDATE_PLAYLIST:"update:playlist",DELETE_PLAYLIST:"delete:playlist",PLAYLIST_VIDEOS:"playlist:videos",REORDER_PLAYLIST_VIDEOS:"reorder:playlist:videos",REMOVE_PLAYLIST_VIDEO:"remove:playlist:video",VIDEO:"video",SERIES:"series",SERIES_BY_ID:"series:by:id",UPDATE_SERIES:"update:series",CURRENT_USER:"current:user",UPLOAD_IMAGE:"upload:image",LOCALE:"locale",PHRASES:"PHRASES"},u={IMAGES:".".concat(["jpg","tif","png","bmp","gif","jpeg"].join(",."))},s={CURATOR_LAYOUT:"CuratorLayout"},l={COMPANIES:"companies:application",DOMAIN_OPTIONS:"domain:options:application",PEOPLE:"people:application",PLAYLISTS:"playlists:application",SERIES:"series:application",SUBJECTS:"subjects:application",THEMES:"themes:application",VIDEOS:"videos:application"},f={IMAGE_UPLOAD:"image:upload:data:service",SUBJECT:"subject:data:service",LANGUAGE:"language:data:service"},p={IMAGE_UPLOAD:"ImageUploadDataService",SUBJECT:"SubjectDataService",LANGUAGE:"LanguageDataService"},d=n(0),m=n(1),h=n(4),y={SHOW_POPUP:"show:popup",ROUTE:"route",LOCK_NAV:"lock:nav",UNLOCK_NAV:"unlock:nav",NAV_IS_LOCKED:"navigation:islocked",NAV_UNLOCKED_BY_USER:"navigation:unlocked:by:user",ROUTING_START:"routing:start",ROUTING_END:"routing:end",HAS_ACTIVE_ROUTE:"has:active:route",ROUTE_LOOKUP:"route:look:up",URL_CHANGE:"url:change",ERROR:"error",CURRENT_ROUTE:"route:current"},v={SHELL:"global:shell",ALERT:"global:alert",POPUP:"global:popup"},b={GetQuery:function(){return b.DeserializeQueryParams(window.location.search.substring(1))},UpdateQuery:function(e){if(e){var t=b.GetQuery(),n=b.SerializeQueryParams(m.extend(t,e));n&&(n="?".concat(n)),b.UpdateUrl("".concat(b.GetCurrentPath()).concat(n),null,{replace:!0,trigger:!1})}},UpdateUrl:function(e,t,n){var r=w.buildRoute(e,t);h.history.navigate(r,n),h.Radio.channel(v.SHELL).trigger(y.URL_CHANGE,t,n)},SerializeQueryParams:function(e){return e?"string"==typeof e?e:$.param(e,!0):""},DeserializeQueryParams:function(e){return e?m.reduce(e.split("&"),(function(e,t){var n=t.split("="),r=n[0],i=n.length>0?decodeURIComponent(n[1]):"";return e[r]?e[r]instanceof Array?(e[r].push(i),e):(e[r]=[e[r],i],e):(e[r]=i,e)}),{}):{}},StartHistory:function(){h.History.started&&h.history.stop(),h.history.start({pushState:!0})},PageLoad:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?window.open(e,"_blank"):window.location.href=e},Redirect:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function(){return t?window.location.replace(e):window.location.href=e};j.hasActiveRoute()?h.Radio.channel(v.SHELL).once("routing:end",n):n()},Reload:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];window.location.reload(e)},GetCurrentPath:function(){return window.location.pathname},GetCurrentQueryString:function(){return window.location.search},GetCurrentUrl:function(){return window.location.href},GetCurrentReferrer:function(){return document.referrer},SetPageTitle:function(e){document.title=e}},g=/((\(\?)?:\w+)|(\*\w+)/,S=/[\(\)]/g,E=/\(\/\)/g,O=/\/$/,j={routingStarted:function(){h.Radio.channel(v.SHELL).trigger(y.ROUTING_START)},routingEnded:function(){j.hasActiveRoute()&&h.Radio.channel(v.SHELL).trigger(y.ROUTING_END)},hasActiveRoute:function(){return h.Radio.channel(v.SHELL).request(y.HAS_ACTIVE_ROUTE)}},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.usedHelper=!0;var n=e.application,r=e.action;h.Radio.channel(n).trigger(r,e,t)},w={getHref:function(e){if(!e)return"";var t=e.application,n=e.action,r=e.args,i=e.params,o=h.Radio.channel(v.SHELL);return"/".concat(o.request(y.ROUTE_LOOKUP,"".concat(t,":").concat(n),r,i))},buildRoute:function(e,t){if(!t)return e;var n=t.args,r=t.params;if(m.each(n,(function(t){e=e.replace(g,t||"")})),e=(e=(e=e.replace(E,"")).replace(S,"")).replace(O,""),!r)return e;var i=b.SerializeQueryParams(r);return i.length?"".concat(e,"?").concat(i):e},trigger:function(e,t){e&&(j.hasActiveRoute()?h.Radio.channel(v.SHELL).once("routing:end",(function(){C(e,t)})):C(e,t))},getCurrentAppLink:function(){return h.Radio.channel(v.SHELL).request(y.CURRENT_ROUTE)}},A=n(7);function I(e,t,n,r){var i=e;return"string"==typeof e&&(i=h.Radio.channel(e)),r.call(this,i,t,n)}function T(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var k=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.variables={}}var t,n,r;return t=e,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"get",value:function(e){return this.variables[e]}},{key:"setUpVariables",value:function(e){this.variables=e}},{key:"name",get:function(){return"EnvironmentVariables"}},{key:"isDevelopment",get:function(){return this.variables.isDevelopment}}])&&T(t.prototype,n),r&&T(t,r),e}().Instance;function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),e}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&V(e,t)}function R(e){var t=F();return function(){var n,r=z(e);if(t){var i=z(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return D(this,n)}}function D(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function M(e){var t="function"==typeof Map?new Map:void 0;return(M=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return U(e,arguments,z(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),V(r,e)})(e)}function U(e,t,n){return(U=F()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&V(i,n.prototype),i}).apply(null,arguments)}function F(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var B=function(e){N(n,e);var t=R(n);function n(e){return x(this,n),t.call(this,e)}return n}(M(Error)),H=function(e){N(n,e);var t=R(n);function n(){return x(this,n),t.apply(this,arguments)}return L(n,[{key:"name",get:function(){return"SilentError"}}]),n}(B),q=function(e){N(n,e);var t=R(n);function n(){return x(this,n),t.apply(this,arguments)}return L(n,[{key:"name",get:function(){return"CoreError"}}]),n}(M(Error)),J={throw:function(e){if(h.Radio.channel(v.SHELL).trigger(y.ERROR,e),!(e instanceof H||k.isDevelopment))throw e}};function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Z(e,t,n){return(Z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ne(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Q(e,t){return(Q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ne(e);if(t){var i=ne(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ee(this,n)}}function ee(e,t){return!t||"object"!==Y(t)&&"function"!=typeof t?te(e):t}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ne(e){return(ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q(e,t)}(o,e);var t,n,r,i=X(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).mergeOptions(e,[].concat(K(t.defaultProps),K(t.props||[]))),m.result(te(t),"name")||J.throw(new q("BaseApplication must define a name")),m.result(te(t),"channelName")||J.throw(new q("BaseApplication must define a channelName")),t.listenTo(t.getGlobalRadioChannel("popup"),y.SHOW_POPUP,t.onShowPopup),t.listenTo(t.getGlobalRadioChannel("alert"),"show:alert",t.onShowAlert),t}return t=o,(n=[{key:"getGlobalRadioChannel",value:function(e){var t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||J.throw(new q("Global channel ".concat(t," does not exist"))),h.Radio.channel(t)}},{key:"onLoadLayout",value:function(){if(this.layoutOptions&&this.layoutOptions.name){var e=m.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(m.extend(this.layoutOptions,{options:e})),this.layout||J.throw(new q("Layout: ".concat(this.layoutOptions.name," does not exist or was not registered"))),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}},{key:"onShowPopup",value:function(e){this.layout.getRegion("popup")||J.throw(new q("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}},{key:"onShowAlert",value:function(e){var t=e.ctor,n=e.collection,r=this.layout.getRegion("alert");r||J.throw(new q("Your application layout must define an alert region")),r.hasView()||this.layout.showChildView("alert",new t({collection:n}))}},{key:"setDefaultQueryParams",value:function(e){this.defaultQueryParams&&(e=m.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}},{key:"getAndClearDefaultQueryParams",value:function(){var e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}},{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],Z(ne(o.prototype),"listenTo",this))}},{key:"defaultProps",get:function(){return["shell","layoutService"]}}])&&W(t.prototype,n),r&&W(t,r),o}(A.Application);function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var oe=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,(n=[{key:"use",value:function(e){var t;this.go=(t=this.go,function(n,r){return t(n,(function(){return e(n,r)}))})}},{key:"go",value:function(e,t){t(e)}}])&&ie(t.prototype,n),r&&ie(t,r),e}();function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e){return function(e){if(Array.isArray(e))return ue(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function le(e,t,n){return(le="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=me(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function fe(e,t){return(fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=me(e);if(t){var i=me(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return de(this,n)}}function de(e,t){return!t||"object"!==ae(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function me(e){return(me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var he=/([A-Z])/g,ye=/(^|:)(\w)/gi,ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fe(e,t)}(o,e);var t,n,r,i=pe(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).bindDisposal(),t.processInternalRoutes(),t.processExternalRoutes(),t.processAppLinks(),t}return t=o,(n=[{key:"bindDisposal",value:function(){var e=this;this.listenTo(v.SHELL,y.ROUTE,(function(t){t.application!==e.channelName&&e.destroyApp()}))}},{key:"addRouteLookup",value:function(e,t){var n=this;this.options.shell.addRouteLookup("".concat(this.channelName,":").concat(e),(function(r,i){return w.buildRoute(t,{application:n.channelName,action:e,args:r,params:i})}))}},{key:"processInternalRoutes",value:function(){var e=this;m.each(m.keys(this.appRoutes),(function(t){var n=e.appRoutes[t],r=e.toEventName(n);e.addRouteLookup(r,t),e.listenTo(e.channelName,r,(function(n,r){r&&r.usedHelper||J.throw(new q("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(n,{isAppRoute:!0},(function(){var i=m.extend({},e.controller.getAndClearDefaultQueryParams(),n.params);n.params=i,b.UpdateUrl(t,n,r)}))}))}))}},{key:"processExternalRoutes",value:function(){var e=this;this.externalRoutes&&m.each(m.keys(this.externalRoutes),(function(t){var n=e.externalRoutes[t],r=e.toEventName(n);e.addRouteLookup(r,t),e.listenTo(e.channelName,r,(function(e,t){t&&t.usedHelper||J.throw(new q("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),b.PageLoad(w.getHref(e))}))}))}},{key:"processAppLinks",value:function(){var e=this;this.appLinks&&m.each(this.appLinks,(function(t){var n=e.toEventName(t);e.listenTo(e.channelName,n,(function(t,n){n&&n.usedHelper||J.throw(new q("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(t,{isAppRoute:!1})}))}))}},{key:"executeRoute",value:function(e,t,n){var r=this;this.validateAppLink(e);var i=this.toMethodName(e.action);j.routingStarted();var o=h.Radio.channel(v.SHELL);if(this.options.shell.isNavLocked())return o.trigger(y.NAV_IS_LOCKED,e),void j.routingEnded();var a=new oe;m.each(this.filters,(function(e){return a.use(e)})),a.go(e,(function(){o.trigger(y.ROUTE,e,t),r.createApp();var a=r.controller;if(m.isFunction(a[i])||(j.routingEnded(),J.throw(new q("".concat(i," does not exist on the ").concat(m.result(a,"name"),".")))),!1===a.triggerMethod("before:action"))return a.triggerMethod("action:cancelled"),void j.routingEnded();a.triggerMethod("load:layout"),a[i].apply(a,[].concat(ce(e.args||[]),[e.params||{}])),m.isFunction(n)&&n(),j.routingEnded()}))}},{key:"createApp",value:function(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}},{key:"destroyApp",value:function(){this.controller&&(this.controller.destroy(),delete this.controller)}},{key:"_addAppRoute",value:function(e,t,n){var r=this;this.route(t,n,(function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var o={application:r.channelName,action:r.toEventName(n),args:t.slice(0,t.length-1),params:b.DeserializeQueryParams(t[t.length-1])};r.executeRoute(o,{isAppRoute:!0},(function(){b.UpdateQuery(m.extend(r.controller.getAndClearDefaultQueryParams(),o.params))}))}))}},{key:"toEventName",value:function(e){return e.replace(he,":$1").toLowerCase()}},{key:"toMethodName",value:function(e){var t=e.replace(ye,(function(e,t,n){return n.toUpperCase()}));return t[0].toLowerCase()+t.slice(1,t.length)}},{key:"validateAppLink",value:function(e){e.application&&e.action||(j.routingEnded(),J.throw(new q("Invalid AppLink")))}},{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],le(me(o.prototype),"listenTo",this))}}])&&se(t.prototype,n),r&&se(t,r),o}(A.AppRouter);function be(e){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ee(e,t,n){return(Ee="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=we(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function je(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=we(e);if(t){var i=we(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ce(this,n)}}function Ce(e,t){return!t||"object"!==be(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function we(e){return(we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ae=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oe(e,t)}(o,e);var t,n,r,i=je(o);function o(){return ge(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],Ee(we(o.prototype),"listenTo",this))}}])&&Se(t.prototype,n),r&&Se(t,r),o}(A.Behavior);function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _e(e,t,n){return(_e="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ne(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Pe(e,t){return(Pe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ne(e);if(t){var i=Ne(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xe(this,n)}}function xe(e,t){return!t||"object"!==Ie(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pe(e,t)}(o,e);var t,n,r,i=Le(o);function o(){return Te(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],_e(Ne(o.prototype),"listenTo",this))}}])&&ke(t.prototype,n),r&&ke(t,r),o}(h.Collection);function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ue(e,t,n){return(Ue="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=He(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Fe(e,t){return(Fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=He(e);if(t){var i=He(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ze(this,n)}}function ze(e,t){return!t||"object"!==De(t)&&"function"!=typeof t?Be(e):t}function Be(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fe(e,t)}(o,e);var t,n,r,i=Ve(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this,e),m.result(Be(t),"name")||J.throw(new q("Error: View with cid:".concat(t.cid," requires a name."))),t}return t=o,(n=[{key:"serializeModel",value:function(){return this.model?this.model.toJSON():{}}},{key:"serializeCollection",value:function(){return this.collection?this.collection.toJSON():[]}},{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],Ue(He(o.prototype),"listenTo",this))}}])&&Me(t.prototype,n),r&&Me(t,r),o}(A.CollectionView);function Je(e){return(Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ye(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t){return(Ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var i=Ze(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return We(this,n)}}function We(e,t){return!t||"object"!==Je(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ke(e,t)}(o,e);var t,n,r,i=Ge(o);function o(){return $e(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"name",get:function(){return"DevError"}}])&&Ye(t.prototype,n),r&&Ye(t,r),o}(B);function Xe(e){return(Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function et(e){return function(e){if(Array.isArray(e))return tt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return tt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tt(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function it(e,t,n){return t&&rt(e.prototype,t),n&&rt(e,n),e}function ot(e,t,n){return(ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ft(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function at(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ct(e,t)}function ct(e,t){return(ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ut(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ft(e);if(t){var i=ft(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return st(this,n)}}function st(e,t){return!t||"object"!==Xe(t)&&"function"!=typeof t?lt(e):t}function lt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ft(e){return(ft=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pt=function(e){at(n,e);var t=ut(n);function n(e){var r;nt(this,n),r=t.call(this,e);var i=[].concat(et(r.defaultProps),et(r.props||[]));return r.mergeOptions(e,i),m.result(lt(r),"name")||J.throw(new q("Error: View with cid:".concat(r.cid," requires a name."))),r}return it(n,[{key:"_setOptions",value:function(e){this.options=m.extend({},m.result(this,"defaults"),e)}},{key:"_setAttributes",value:function(e){var t,n,r;k.isDevelopment&&m.extend(e,(t={},n="cv-classname",r=this.name,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t)),this.$el.attr(e)}},{key:"serializeModel",value:function(){return this.model?this.model.toJSON():{}}},{key:"serializeCollection",value:function(){return this.collection?this.collection.toJSON():[]}},{key:"resetClassName",value:function(){this.$el.attr("class",m.result(this,"className"))}},{key:"serializeData",value:function(){var e=this,t=ot(ft(n.prototype),"serializeData",this).call(this),r=m.result(this,"viewOptions"),i=m.extend({},t,{options:r});return n.ViewDataExtensions.length?m.extend.apply(m,[i].concat(et(m.map(n.ViewDataExtensions,(function(t){return t instanceof Function?t(e):t}))))):i}},{key:"viewOptions",value:function(){return this.options}},{key:"undelegateAppLinks",value:function(){this.$el&&this.$el.off(".appLinks".concat(this.cid))}},{key:"renderAppLinks",value:function(){var e=this,t=this.appLinks;t&&(t=this.normalizeUIKeys(t),this.undelegateAppLinks(),m.each(m.keys(t),(function(n){var r=n,i=t[n],o=w.getHref(i);"[this]"===r&&(r=null);var a=r?e.$el.find(n):e.$el;(a.is("a")||a.is("button"))&&(o&&"/"!==o&&a.attr("href",o),e.delegate("click.appLinks".concat(e.cid),r,(function(e){e.preventDefault(),w.trigger(i)})))})))}},{key:"hasPartialLoadingRegions",value:function(){return void 0!==this._hasPartialLoadingRegions||(this._hasPartialLoadingRegions=m.some(this.regions,(function(e){return m.has(e,"partialLoading")}))),this._hasPartialLoadingRegions}},{key:"renderPartialLoading",value:function(e){h.Radio.channel(v.SHELL).trigger("render:partial:loading",this,e)}},{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],ot(ft(n.prototype),"listenTo",this))}},{key:"render",value:function(){if(this._isDestroyed)return this;var e=this.processRequriedResources(!0);return e&&(e=this.triggerMethod("before:render",this)),!1!==e&&(e=!0),!1===(e=e&&this.processRequriedResources(!1))?(this._partialLoadingRendered||!this.hasPartialLoadingRegions()||(this._partialLoadingRendered=!0,this._reInitRegions(),this._renderTemplate(),this.renderPartialLoading()),this):((this._isRendered||this._partialLoadingRendered)&&this._reInitRegions(),this.setTitle(),this._renderTemplate(),this.bindUIElements(),this.renderAppLinks(),this._partialLoadingRendered=!1,this._isRendered=!0,this.triggerMethod("render",this),this)}},{key:"processRequriedResources",value:function(e){return!0}},{key:"setTitle",value:function(){}},{key:"defaultProps",get:function(){return["shell","layoutService"]}},{key:"ui",get:function(){return this.uiStorage||(this.uiStorage=this.elements),this.uiStorage},set:function(e){this.uiStorage=e}},{key:"elements",get:function(){return null}}],[{key:"AddViewDataExtension",value:function(e){n.ViewDataExtensions.push(e)}}]),n}(A.View);pt.ViewDataExtensions=[];var dt=function(e){at(n,e);var t=ut(n);function n(e){var r;return nt(this,n),(r=t.call(this,e)).boundListeners={},r.resourceInstances={},r}return it(n,[{key:"processRequriedResources",value:function(e){var t=this,n=m.keys(this.requiredResources);if(!n.length)return!0;var r=this,i=!0;return m.each(n,(function(n){var o=t.requiredResources[n];if(o.beforeOnBeforeRender===e){var a=o.dataServiceName;t.resourceInstances[a]||(t.resourceInstances[a]=o.getInstance(t)),t.boundListeners["".concat(a,":").concat(o.eventName)]||(t.listenTo(t.resourceInstances[a].channelName,o.eventName,t.render),t.boundListeners["".concat(a,":").concat(o.eventName)]=!0),r[n]=o.getData(t.resourceInstances[a]),i=i&&!!r[n]}})),i}},{key:"setTitle",value:function(){m.isString(this.title)||!1===this.title||J.throw(new Qe("Must define a title for ".concat(this.name,"."))),h.Radio.channel(v.SHELL).trigger("set:page:title",this.title)}}]),n}(pt),mt=function(e){at(n,e);var t=ut(n);function n(){return nt(this,n),t.apply(this,arguments)}return n}(pt);function ht(e){return(ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vt(e,t){return(vt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=St(e);if(t){var i=St(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gt(this,n)}}function gt(e,t){return!t||"object"!==ht(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function St(e){return(St=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Et=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vt(e,t)}(o,e);var t,n,r,i=bt(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e)}return t=o,r=[{key:"getCacheKey",value:function(e){J.throw(new Qe("Must define getCacheKey for ".concat(this.name,".")))}}],(n=[{key:"unmountRegion",value:function(e){this.trigger("unmount:".concat(e))}}])&&yt(t.prototype,n),r&&yt(t,r),o}(dt);function Ot(e){return(Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wt(e,t,n){return(wt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function At(e,t){return(At=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function It(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kt(e);if(t){var i=kt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Tt(this,n)}}function Tt(e,t){return!t||"object"!==Ot(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kt(e){return(kt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _t=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&At(e,t)}(o,e);var t,n,r,i=It(o);function o(){return jt(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"mixin",value:function(e){for(var t in e){if(this.hasOwnProperty(t)){var n=this[t];return void(this[t]=m.extend({},n,e[t]))}this[t]=e[t]}}},{key:"addValidation",value:function(e){this.mixin({validation:e})}},{key:"validate",value:function(e,t){wt(kt(o.prototype),"validate",this).call(this,e,t)}},{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],wt(kt(o.prototype),"listenTo",this))}}])&&Ct(t.prototype,n),r&&Ct(t,r),o}(h.Model);function Pt(e){return(Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nt(e,t,n){return(Nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ut(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Rt(e,t){return(Rt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ut(e);if(t){var i=Ut(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Mt(this,n)}}function Mt(e,t){return!t||"object"!==Pt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ut(e){return(Ut=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ft=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rt(e,t)}(o,e);var t,n,r,i=Dt(o);function o(){return Lt(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"set",value:function(e,t,n){var r,i;if(null===e)return this;for(r in"object"===Pt(e)?(i=e,n=t):(i={})[e]=t,n||(n={}),i)m.has(this.associations,r)&&(i[r]=this.setAssociation(r,i[r],n));return Nt(Ut(o.prototype),"set",this).call(this,i,n)}},{key:"get",value:function(e){var t=e.indexOf(".");if(-1===t)return Nt(Ut(o.prototype),"get",this).call(this,e);var n=e.substr(0,t),r=this.attributes[n];if(!r||!m.isFunction(r.get))return Nt(Ut(o.prototype),"get",this).call(this,e);var i=e.substr(t+1);return r.get(i)}},{key:"setAssociation",value:function(e,t,n){var r=this.associations[e],i=this.attributes[e];if(!m.isFunction(r))return t;if(n.unset)return i&&delete i.parent,delete this[e],i;if(i)return i instanceof _t&&i.set(t,n),i instanceof Re&&i.set(t,n),n.silent||this.trigger("change:".concat(e),this,t,n),i;var o=t instanceof _t?t:new r(t,{parse:!0});return o.parent=this,this[e]=o,o}},{key:"toJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Nt(Ut(o.prototype),"toJSON",this).apply(this,t);return m.each(this.associations,(function(e,t){m.has(r,t)&&m.isFunction(r[t].toJSON)?r[t]=r[t].toJSON():r[t]=(new e).toJSON()})),r}},{key:"toFlatJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m.omit(Nt(Ut(o.prototype),"toJSON",this).apply(this,t),m.keys(this.associations))}}])&&xt(t.prototype,n),r&&xt(t,r),o}(_t);function Vt(e){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bt(e,t,n){return(Bt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$t(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ht(e,t){return(Ht=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$t(e);if(t){var i=$t(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Jt(this,n)}}function Jt(e,t){return!t||"object"!==Vt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $t(e){return($t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ht(e,t)}(o,e);var t,n,r,i=qt(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).name||J.throw(new q("Your service must be named.")),t}return t=o,(n=[{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],Bt($t(o.prototype),"listenTo",this))}}])&&zt(t.prototype,n),r&&zt(t,r),o}(A.Object);function Kt(e){return(Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wt(e,t,n){return(Wt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=en(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Zt(e,t){return(Zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=en(e);if(t){var i=en(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Xt(this,n)}}function Xt(e,t){return!t||"object"!==Kt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function en(e){return(en=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zt(e,t)}(o,e);var t,n,r,i=Qt(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).layouts={},t.requiredRegions=e.requiredRegions,t}return t=o,(n=[{key:"clearLayout",value:function(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}},{key:"registerLayout",value:function(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}},{key:"getLayout",value:function(e){var t=e.name,n=e.options,r=void 0===n?{}:n;this.layouts[t]||J.throw(new q("".concat(t," was not registered as a template.")));var i=this.layouts[t].getCacheKey(r);return this.currentLayoutCacheKey===i&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",r),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=i,this.currentLayout=new this.layouts[t](r),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}},{key:"checkRequiredRegions",value:function(e){m.each(this.requiredRegions,(function(t){m.has(m.result(e.prototype,"regions"),t)||J.throw(new q("Layout: ".concat(e.prototype.name," must define an ").concat(t," region.")))}))}},{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],Wt(en(o.prototype),"listenTo",this))}}])&&Gt(t.prototype,n),r&&Gt(t,r),o}(A.Object);function nn(e){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rn(e,t,n){return(rn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=un(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function on(e,t){return(on=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function an(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=un(e);if(t){var i=un(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return cn(this,n)}}function cn(e,t){return!t||"object"!==nn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function un(e){return(un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fn(e,t,n){return t&&ln(e.prototype,t),n&&ln(e,n),e}var pn=function(){function e(t,n){sn(this,e),this.application=t,this.options=n||{}}return fn(e,[{key:"Application",get:function(){return this.application}},{key:"Options",get:function(){return this.options}}]),e}(),dn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&on(e,t)}(n,e);var t=an(n);function n(){return sn(this,n),t.apply(this,arguments)}return fn(n,[{key:"initialize",value:function(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}},{key:"bindListeners",value:function(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}},{key:"bindNavLockListeners",value:function(){var e=this;this.listenTo(v.SHELL,y.LOCK_NAV,(function(){return e.shellState.navLock=!0})),this.listenTo(v.SHELL,y.UNLOCK_NAV,(function(){return e.shellState.navLock=!1}))}},{key:"bindAppLinkListeners",value:function(){var e=this;this.listenTo(v.SHELL,y.ROUTING_START,(function(){return e.shellState.activeRoute=!0})),this.listenTo(v.SHELL,y.ROUTING_END,(function(){return e.shellState.activeRoute=!1})),this.listenTo(v.SHELL,y.ROUTE,(function(t){return e.shellState.currentAppLink=t}));var t=h.Radio.channel(v.SHELL);t.reply(y.HAS_ACTIVE_ROUTE,m.bind(this.hasActiveRoute,this)),t.reply(y.CURRENT_ROUTE,(function(){return e.shellState.currentAppLink}))}},{key:"bindErrorHandlers",value:function(){window.addEventListener("error",(function(){j.routingEnded()}))}},{key:"bindErrorListener",value:function(){var e=h.Radio.channel(v.SHELL);this.listenTo(e,y.ERROR,this.handleError)}},{key:"bindRouteLookup",value:function(){var e=this;h.Radio.channel(v.SHELL).reply(y.ROUTE_LOOKUP,(function(t,n,r){return e.routeLookup[t]?e.routeLookup[t](n,r):""}),this)}},{key:"addRouteLookup",value:function(e,t){this.routeLookup[e]=t}},{key:"registerApplication",value:function(e,t){return this.applications.push(new pn(e,t)),this}},{key:"getGlobalRadioChannels",value:function(){return v}},{key:"isNavLocked",value:function(){return this.shellState.navLock}},{key:"start",value:function(e){var t=this;e||(e={}),this.runInitializationSteps(this,(function(r,i){t.runStartUpSteps(t,e,(function(r,i,o){rn(un(n.prototype),"start",t).call(t,e)}))}))}},{key:"hasActiveRoute",value:function(){return this.shellState.activeRoute}},{key:"onStart",value:function(){var e=this;m.each(this.applications,(function(t){var n={appConstructor:t.Application,shell:e,appOptions:Object.assign({region:"",shell:e,layoutService:e.layoutService},t.Options)};new t.Application.router(n)})),this.bindListeners(),b.StartHistory()}},{key:"addInitializationStep",value:function(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,function(n,r){return t(n,(function(){return e(n,r)}))}),this}},{key:"runInitializationSteps",value:function(e,t){t(e)}},{key:"addStartUpStep",value:function(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,function(n,r,i){return t(n,r,(function(){return e(n,r,i)}))}),this}},{key:"runStartUpSteps",value:function(e,t,n){n(e,t)}},{key:"registerLayout",value:function(e,t){return this.layoutService.registerLayout(e,t),this}},{key:"registerErrorHandler",value:function(e,t){return e||J.throw(new q("An error must have a name in order to register a handler for it.")),m.any(this.errorHandlers,(function(t){return t.errorType===e}))&&J.throw(new q("An error handler for ".concat(e.prototype.name," has already been defined."))),this.errorHandlers.push({errorType:e,handler:t}),this}},{key:"handleError",value:function(e){var t=m.find(this.errorHandlers,(function(t){return e instanceof t.errorType}));t&&t.handler&&t.handler(e)}},{key:"registerStore",value:function(e){this.store=e}},{key:"listenTo",value:function(){return I.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],rn(un(n.prototype),"listenTo",this))}}]),n}(A.Application),mn=function(e){return m.isFunction(e)},hn=function(){return m.identity},yn=n(24),vn=n(5);function bn(e){return(bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t){return(En=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function On(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Cn(e);if(t){var i=Cn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jn(this,n)}}function jn(e,t){return!t||"object"!==bn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cn(e){return(Cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&En(e,t)}(o,e);var t,n,r,i=On(o);function o(){return gn(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"isReactComponent",value:function(e){return d&&d.isValidElement(e)}},{key:"showChildView",value:function(e,t){this.isReactComponent(t)&&this.showChildReactComponent(e,t)}},{key:"showChildReactComponent",value:function(e,t){var n=this;this.isAttached()?this.renderChildReactComponent(e,t):this.listenToOnce(this,"attach",(function(){return n.renderChildReactComponent(e,t)}))}},{key:"renderChildReactComponent",value:function(e,t){var n=this.getRegion(e),r=this.$el.find(n.el);r&&r.length&&(n.trigger("before:show"),yn.render(t,r[0],(function(){return n.trigger("show")})),this.listenToOnce(this,"unmount:".concat(e),(function(){return yn.unmountComponentAtNode(r[0])})),this.listenToOnce(this,"before:destroy",(function(){return yn.unmountComponentAtNode(r[0])})))}},{key:"wrapWithStore",value:function(e){return d.createElement(vn.Provider,{store:this.options.store},e)}}])&&Sn(t.prototype,n),r&&Sn(t,r),o}(Et),An="top:nav",In="left:nav",Tn="content",kn="popup",_n="alert",Pn=n(121),Ln=n.n(Pn),xn=n(25),Nn=n.n(xn);function Rn(e){return(Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mn(e,t,n){return(Mn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=zn(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Un(e,t){return(Un=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zn(e);if(t){var i=zn(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vn(this,n)}}function Vn(e,t){return!t||"object"!==Rn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zn(e){return(zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Un(e,t)}(a,e);var t,n,i,o=Fn(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).childComponents={},t}return t=a,i=[{key:"getCacheKey",value:function(e){var t="".concat(this.name),n=[];return Object.keys(e).forEach((function(t){n.push("".concat(t,":").concat(e[t]))})),n.length&&(n.sort(),t+=":".concat(n.join(":"))),t}}],(n=[{key:"regions",value:function(){return{layout:".layout-region"}}},{key:"getChildComponents",value:function(){return{topNav:{component:this.childComponents[An],className:Nn.a.topNavRegion},leftNav:{component:this.childComponents[In],className:"py-3 ".concat(Nn.a.leftNavRegion)},content:{component:this.childComponents[Tn],className:"position-relative container py-3"},popup:{component:this.childComponents[kn]},alert:{component:this.childComponents[_n]}}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"renderTopNav",value:function(){mn(this.options.getTopNavView)&&(this.childComponents[An]=this.options.getTopNavView(r.AppLinkHelper.getCurrentAppLink()))}},{key:"hideLeftNav",value:function(){this.unsetRegion(In)}},{key:"closePopup",value:function(){this.unsetRegion(kn)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderTopNav(),this.renderLayout()}},{key:"renderLayout",value:function(){var e=Object.assign({provider:this.options.provider},this.getChildComponents());Mn(zn(a.prototype),"showChildView",this).call(this,"layout",this.wrapWithStore(d.createElement(Yn,Object.assign({},e))))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"CuratorLayoutView"}},{key:"template",get:function(){return Ln.a}},{key:"className",get:function(){return"container-fluid ".concat(Nn.a.curatorLayout)}}])&&Dn(t.prototype,n),i&&Dn(t,i),a}(wn),Hn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},qn=function(e){var t=e.className,n=e.children;return d.createElement("div",{className:t},n)},Jn=function(e,t){return"".concat(e).concat(t?" ".concat(t):"")},$n=function(e){var t=e.topNav,n=e.leftNav,r=e.content,i=e.popup,o=e.alert;return d.createElement(d.Fragment,null,d.createElement("div",{className:"position-relative"},!!t.component&&d.createElement(qn,{className:Jn("top-nav-region",t.className)},t.component),!!n.component&&d.createElement(qn,{className:Jn("left-nav-region",n.className)},n.component),!!r.component&&d.createElement("div",{className:"content-container"},d.createElement(qn,{className:Jn("content-region",r.className)},r.component))),!!i.component&&d.createElement(qn,{className:Jn("popup-region",i.className)},i.component),!!o.component&&d.createElement(qn,{className:Jn("alert-region",o.className)},o.component))},Yn=function(e){var t=e.provider,n=Hn(e,["provider"]);return t?d.createElement(t,null,d.createElement($n,Object.assign({},n))):d.createElement($n,Object.assign({},n))};function Kn(e){return(Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gn(e){return function(e){if(Array.isArray(e))return Wn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Wn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wn(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xn(e,t){return(Xn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function er(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nr(e);if(t){var i=nr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return tr(this,n)}}function tr(e,t){return!t||"object"!==Kn(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nr(e){return(nr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xn(e,t)}(a,e);var t,n,i,o=er(a);function a(){return Zn(this,a),o.apply(this,arguments)}return t=a,(n=[{key:"initialize",value:function(){this.listenTo(v.SHELL,r.EventNames.ROUTING_END,this.updateNav)}},{key:"updateNav",value:function(){var e=this,t=r.AppLinkHelper.getCurrentAppLink().application;if(t!==this.currentApplication){this.currentApplication=t;var n=this.options.navItemMappings[t];if(n){var i=document.querySelector(this.options.navSelector);i&&i.children&&Gn(i.children).forEach((function(t){var r=t.querySelector("a");r&&(r.classList.remove(e.options.currentItemClassName),r.text===n&&r.classList.add(e.options.currentItemClassName))}))}}}},{key:"name",get:function(){return"CuratorAppNavService"}}])&&Qn(t.prototype,n),i&&Qn(t,i),a}(r.Service);function ir(e){return(ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function or(e){return function(e){if(Array.isArray(e))return ar(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ar(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ur(e,t){return(ur=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pr(e);if(t){var i=pr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lr(this,n)}}function lr(e,t){return!t||"object"!==ir(t)&&"function"!=typeof t?fr(e):t}function fr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pr(e){return(pr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ur(e,t)}(o,e);var t,n,r,i=sr(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this,e),m.result(fr(t),"name")||J.throw(new Qe("Must provide a name when extending BaseDataService")),m.result(fr(t),"channelName")||J.throw(new Qe("Must provide a channelName for ".concat(m.result(fr(t),"name"))));var n=[].concat(or(t.defaultProps),or(t.props||[]));return t.dataRequestSignatures={},t.mergeOptions(e,n),t}return t=o,(n=[{key:"getCursors",value:function(e){var t=this.cache.get(e);return t?t.cursors:{}}},{key:"clearCacheAndGet",value:function(e){var t=this,n=e.callback,r=e.errorCallback,i=e.eventPrefix,o=this.getEventNames(i),a=o.syncEvent,c=o.errorEvent,u=this.cache.get(i);if(u&&u.openRequest)return this.listenToOnce(this.getChannel(),a,(function(e){m.isFunction(r)&&t.stopListening(t.getChannel(),c,r),m.isFunction(n)&&n(e)})),void this.listenToOnce(this.getChannel(),c,(function(){m.isFunction(n)&&t.stopListening(t.getChannel(),a,n),m.isFunction(r)&&r()}));this.cache.remove(e.eventPrefix),this.get(e)}},{key:"get",value:function(e){var t=this,n=e.callback,r=e.errorCallback,i=e.eventPrefix,o=e.resource,a=e.formatData,c=e.expiryTime,u=e.successHandler,s=e.errorHandler,l=e.bootstrapName,f=this.getEventNames(i),p=f.syncEvent,d=f.requestEvent,h=f.successEvent,y=f.errorEvent,v=this.getChannel(),b=this.currentTimestamp();this.bootstrapData&&this.bootstrapData[l]&&(this.cacheData(i,this.bootstrapData[l],a,{openRequest:!1,timestamp:b}),delete this.bootstrapData[l]);var g,S=this.cache.get(i);S&&(g=S.data);var E=S&&S.openRequest,O=this.isExpired(i,c);if(E&&(this.listenToOnce(v,p,(function(e){m.isFunction(r)&&t.stopListening(t.getChannel(),y,r),m.isFunction(n)&&n(e)})),this.listenToOnce(v,y,(function(){m.isFunction(n)&&t.stopListening(t.getChannel(),p,n),m.isFunction(r)&&r()}))),this.cache.has(i)&&!O||(v.trigger(d),this.listenToResponse({eventPrefix:i,formatData:a,cacheOptions:{timestamp:b},callback:n,errorCallback:r,successHandler:u,errorHandler:s}),this.cacheData(i,null,null,{openRequest:!0,timestamp:b}),this.dataProvider.read(o,{channel:this.getTransportChannel(),successEvent:h,errorEvent:y})),g&&m.isFunction(n)&&!O&&n(g),g)return g}},{key:"create",value:function(e){var t=e.eventPrefix,n=e.resource,r=e.data,i=e.formatData,o=e.callback,a=e.errorCallback,c=e.invalidationKeys,u=e.successHandler,s=e.errorHandler,l=this.getEventNames(e.eventPrefix),f=l.requestEvent,p=l.successEvent,d=l.errorEvent,m=this.getChannel(),h=this.getTransportChannel();m.trigger(f),this.listenToResponse({eventPrefix:t,formatData:i,invalidationKeys:c,callback:o,errorCallback:a,successHandler:u,errorHandler:s}),this.dataProvider.create(n,r,{channel:h,successEvent:p,errorEvent:d})}},{key:"update",value:function(e){var t=e.data,n=e.callback,r=e.errorCallback,i=e.resource,o=e.formatData,a=e.eventPrefix,c=e.invalidationKeys,u=e.errorHandler,s=e.successHandler,l=this.getEventNames(e.eventPrefix),f=l.requestEvent,p=l.successEvent,d=l.errorEvent,m=this.getChannel(),h=this.getTransportChannel();m.trigger(f),this.listenToResponse({eventPrefix:a,formatData:o,invalidationKeys:c,callback:n,errorCallback:r,successHandler:s,errorHandler:u}),this.dataProvider.update(i,t,{channel:h,successEvent:p,errorEvent:d})}},{key:"delete",value:function(e){var t=e.eventPrefix,n=e.resource,r=e.callback,i=e.errorCallback,o=e.invalidationKeys,a=e.successHandler,c=e.errorHandler,u=this.getEventNames(t),s=u.successEvent,l=u.errorEvent,f=this.getTransportChannel();this.listenToResponse({eventPrefix:t,invalidationKeys:o,callback:r,errorCallback:i,cacheOptions:{noCache:!0,clearCacheKey:!0},successHandler:a,errorHandler:c}),this.dataProvider.delete(n,{channel:f,successEvent:s,errorEvent:l})}},{key:"listenToResponse",value:function(e){var t=this,n=e.eventPrefix,r=e.formatData,i=e.callback,o=e.errorCallback,a=e.successHandler,c=e.errorHandler,u=e.invalidationKeys,s=e.cacheOptions,l=void 0===s?{}:s,f=this.getEventNames(n),p=f.syncEvent,d=(f.requestEvent,f.successEvent),h=f.errorEvent,y=f.successAlertEvent,v=f.errorAlertEvent,b=this.getChannel(),g=this.getTransportChannel(),S=this.getAlertChannel();m.isFunction(i)&&this.listenToOnce(b,p,i),m.isFunction(o)&&this.listenToOnce(b,h,o),this.stopListening(S,y),this.stopListening(S,v),m.isFunction(a)&&this.listenToOnce(S,y,a),m.isFunction(c)&&this.listenToOnce(S,v,c),!m.isFunction(c)&&!1!==c&&m.isFunction(this.defaultErrorHandler)&&this.listenToOnce(S,v,this.defaultErrorHandler),this.hasRequestSignature(n)||(this.setRequestSignature(n),this.listenTo(g,d,(function(e){t.stopListening(b,h,o);for(var i=arguments.length,a=new Array(i>1?i-1:0),c=1;c<i;c++)a[c-1]=arguments[c];S.trigger.apply(S,[y,e].concat(a));var s=l.noCache?t.formatData(e,r):t.cacheData(n,e,r);l.clearCacheKey&&t.cache.remove(n),b.trigger(p,s),u&&u.length&&t.cache.invalidate(u,(function(e){return b.trigger("".concat(e,":invalidate"))}))})),this.listenTo(g,h,(function(){var e;t.stopListening(b,p,i);var r=(e=t.dataProvider).parseError.apply(e,arguments);S.trigger(v,r),b.trigger(h,r),l.noCache||t.cacheData(n,null,null)})))}},{key:"cacheData",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.openRequest,o=void 0!==i&&i,a=r.timestamp;a||(a=this.currentTimestamp());var c=this.processPagination(t),u=this.formatData(t,n);return this.cache.set(e,{data:u,timestamp:a,cursors:c,openRequest:o}),u}},{key:"processPagination",value:function(e){if(e){var t=e.pagination;if(t)return t.cursors?t.cursors:m.isUndefined(t.offset)||m.isUndefined(t.pageSize)?t.page?this.convertLegacyPaginationToCursors(t):void 0:this.convertOffsetPaginationToCursors(t)}}},{key:"formatData",value:function(e,t){return m.isFunction(t)?t(e):e}},{key:"chain",value:function(){var e=this,t=[],n=function(e,t){m.isFunction(e)&&e(t)},r=function(r,o){return t.push((function(){var i=r.callback;r.callback=function(e){n(i,e),n(t.shift())},e[o](r)})),i},i={func:function(e){return t.push((function(){e(t.shift()||function(){})})),i},get:function(e){return r(e,"get")},create:function(e){return r(e,"create")},update:function(e){return r(e,"update")},delete:function(e){return r(e,"delete")},run:function(){n(t.shift())}};return i}},{key:"invalidateCache",value:function(e){e&&e.length&&this.cache.invalidate(e)}},{key:"currentTimestamp",value:function(){return(new Date).valueOf()}},{key:"isExpired",value:function(e,t){if(!t)return!1;var n=this.cache.get(e);if(!n||!n.timestamp)return!0;var r=1e3*t;return n.timestamp<this.currentTimestamp()-r}},{key:"getEventNames",value:function(e){return{syncEvent:"".concat(e,":sync"),requestEvent:"".concat(e,":request"),successEvent:"".concat(e,":success"),errorEvent:"".concat(e,":error"),successAlertEvent:"".concat(e,":success:alert"),errorAlertEvent:"".concat(e,":error:alert")}}},{key:"getTransportChannel",value:function(){return h.Radio.channel("".concat(this.channelName,":transport"))}},{key:"getAlertChannel",value:function(){return h.Radio.channel("".concat(this.channelName,":alert"))}},{key:"setRequestSignature",value:function(e){this.dataRequestSignatures[e]=e}},{key:"hasRequestSignature",value:function(e){return!!this.dataRequestSignatures[e]}},{key:"convertOffsetPaginationToCursors",value:function(e){var t=e.offset,n=e.pageSize,r=e.totalItems,i=r>0&&t<r&&t+n,o=r>0&&t>0&&Math.max(t-n,0),a={};if(i&&i<r&&(a.next=i.toString()),m.isNumber(o)&&(a.previous=o.toString()),!m.isEmpty(a))return a}},{key:"convertLegacyPaginationToCursors",value:function(e){var t=e.page,n=e.totalPages,r=m.isNumber(t)&&t>0&&t<n&&t+1,i=m.isNumber(t)&&t>1&&t-1,o={};if(r&&r<=n&&(o.next=r.toString()),i&&(o.previous=i.toString()),!m.isEmpty(o))return o}},{key:"defaultProps",get:function(){return["dataProvider","cache","bootstrapData","defaultErrorHandler","alertService"]}}])&&cr(t.prototype,n),r&&cr(t,r),o}(Yt);function mr(e){return(mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vr(e,t){return(vr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function br(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sr(e);if(t){var i=Sr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gr(this,n)}}function gr(e,t){return!t||"object"!==mr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Sr(e){return(Sr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Er=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vr(e,t)}(o,e);var t,n,r,i=br(o);function o(){return hr(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"uploadBase64Image",value:function(e,t,n,r){return this.create({resource:"/api/image/upload?type=".concat(t),eventPrefix:c.UPLOAD_IMAGE,data:e,callback:n,errorCallback:r})}},{key:"name",get:function(){return p.IMAGE_UPLOAD}},{key:"channelName",get:function(){return f.IMAGE_UPLOAD}}])&&yr(t.prototype,n),r&&yr(t,r),o}(dr);function Or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var jr=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value=t}var t,n,r;return t=e,(n=[{key:"increment",value:function(){this.value+=1}},{key:"decrement",value:function(){this.value-=1}},{key:"getValue",value:function(){return this.value}}])&&Or(t.prototype,n),r&&Or(t,r),e}(),Cr={SHORT:120,STANDARD:600};function wr(e){return(wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ar(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ir(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tr(e,t){return(Tr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pr(e);if(t){var i=Pr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _r(this,n)}}function _r(e,t){return!t||"object"!==wr(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pr(e){return(Pr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lr,xr,Nr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tr(e,t)}(o,e);var t,n,r,i=kr(o);function o(){return Ar(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"getLanguageConfig",value:function(e){var t={locale:"en",phrases:{}},n=new jr(3),r=function(){n.decrement(),n.getValue()>0||e(t)};this.get({resource:"/api/locale",eventPrefix:c.LOCALE,expiryTime:Cr.STANDARD,callback:function(e){t.locale=e,r()}}),this.get({resource:"/api/phrases/shared",eventPrefix:"".concat(c.PHRASES,":shared"),expiryTime:Cr.STANDARD,callback:function(e){null===e.shared&&(e.shared={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}}),this.get({resource:"/api/phrases/subjects",eventPrefix:"".concat(c.PHRASES,":subjects"),expiryTime:Cr.STANDARD,callback:function(e){null===e.subjects&&(e.subjects={}),t.phrases=Object.assign(Object.assign({},t.phrases),e),r()}})}},{key:"name",get:function(){return p.LANGUAGE}},{key:"channelName",get:function(){return f.LANGUAGE}}])&&Ir(t.prototype,n),r&&Ir(t,r),o}(dr),Rr={API_REQUEST:"API_REQUEST",API_REPONSE:"API_RESPONSE",API_ERROR:"API_ERROR",INVALIDATE:"INVALIDATE",UPDATE:"UPDATE"};function Dr(e){return{getResponseHeader:e.getResponseHeader,responseJSON:e.responseJSON,status:e.status}}!function(e){e.None="None",e.Fetching="Fetching",e.Success="Success",e.Error="Error"}(Lr||(Lr={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(xr||(xr={}));var Mr=[xr.POST,xr.PUT];function Ur(e){var t=e.resource,n=e.type,r=e.success,i=e.error,o=e.always,a={url:t,method:n};Mr.includes(n)&&e.data&&(a.data=JSON.stringify(e.data)),$.ajax(a).done((function(e,t,n){r&&r(e,Dr(n))})).fail((function(e,t,n){i&&i(Dr(e))})).always((function(){o&&o()}))}function Fr(e){return(Fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.idAttribute,r=void 0===n?"id":n,i=t.namespace,o=void 0===i?"":i;return e[r]||J.throw(new Qe("There was an issue during normalization. Object did not have an id attribute.")),"".concat(o,"__").concat(e[r])}function zr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.idAttribute,i=void 0===r?"id":r,o=[];return e.forEach((function(e){e[i]&&o.push(Vr(e,n)),Hr(e,t,n)})),o}function Br(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.idAttribute,i=void 0===r?"id":r,o=Object.assign({},e);if(Object.keys(e).forEach((function(r){var a=e[r];if(a)if(Array.isArray(a)){var c=zr(a,t,n);c.length&&(o[r]=c)}else if("object"===Fr(a)){var u=Br(a,t,n);a[i]?o[r]=Vr(a,n):o[r]=u}})),e[i]){var a=Vr(e,n);return t[a]=o,a}return o}function Hr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e)return Array.isArray(e)?zr(e,t,n):"object"===Fr(e)?Br(e,t,n):e}function qr(e,t){var n={};return{result:Hr(e,n,t),entities:n}}var Jr={isEmpty:function(e){return m.isEmpty(e)},values:function(e){return m.values(e)},keys:function(e){return m.keys(e)},deepClone:function(e){return(m.isArray(e)?m.map:m.mapObject)(e,(function(e){return m.isObject(e)||m.isArray(e)?Jr.deepClone(e):e}))},getEnumKeys:function(e){return Object.keys(e).filter((function(e){return!(parseInt(e)>=0)}))},isObject:function(e){return m.isObject(e)},isEqual:function(e,t){return m.isEqual(e,t)},omit:function(e,t){return m.omit(e,t)}};function $r(e){return($r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Yr(e,t,n){if(e){if("string"==typeof e)return function(e,t,n){if(n[e])return n[e];n[e]={};var r=Yr(t[e],t,n);return Object.assign(n[e],r),Jr.isEmpty(n[e])&&delete n[e],n[e]}(e,t,n);if(Array.isArray(e))return e.map((function(e){return Yr(e,t,n)}));if("object"===$r(e)){var r={};return Object.keys(e).forEach((function(i){r[i]=Yr(e[i],t,n)||e[i]})),r}}}function Kr(e,t){return Yr(e,t,{})}function Gr(e,t){return e===t}function Wr(e,t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}function Zr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Gr,n=null,r=null;return function(){return Wr(t,n,arguments)||(r=e.apply(null,arguments)),n=arguments,r}}function Qr(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return typeof e})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return t}function Xr(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];var o=0,a=r.pop(),c=Qr(r),u=e.apply(void 0,[function(){return o++,a.apply(null,arguments)}].concat(n)),s=e((function(){for(var e=[],t=c.length,n=0;n<t;n++)e.push(c[n].apply(null,arguments));return u.apply(null,e)}));return s.resultFunc=a,s.dependencies=c,s.recomputations=function(){return o},s.resetRecomputations=function(){return o=0},s}}var ei=Xr(Zr);var ti={currentTimestamp:function(){return(new Date).valueOf()},isExpired:function(e,t){if(!t)return!1;var n=1e3*t;return e<ti.currentTimestamp()-n},currentTimeOfDay:function(e){e||(e=new Date);var t=e.getHours();return t>=12&&t<18?"afternoon":t>=18?"evening":"morning"}};function ni(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ri=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.status=t.status,this.requestTime=t.requestTime,this.cacheDuration=t.cacheDuration,this.data=t.data,this.statusCode=t.statusCode}var t,n,r;return t=e,(n=[{key:"shouldFetch",get:function(){return this.status===Lr.None||this.isExpired}},{key:"isExpired",get:function(){return ti.isExpired(this.requestTime,this.cacheDuration)}},{key:"isFetching",get:function(){return this.status===Lr.Fetching}},{key:"hasError",get:function(){return this.status===Lr.Error}},{key:"isComplete",get:function(){return this.status===Lr.Success||this.status===Lr.Error}}])&&ni(t.prototype,n),r&&ni(t,r),e}();function ii(e,t,n){if(!e||!t)return oi();var r=t.response;return!1!==t.request.normalize&&(r=Kr(t.response,n)),new ri({status:t.status,statusCode:t.statusCode,requestTime:t.timestamp,cacheDuration:t.request.expiryTime,data:r})}function oi(){return new ri({status:Lr.None})}function ai(e,t){return ii(t,e.flightData.resources[t],e.flightData.entities)}function ci(e,t){return function(){ui(e,t)}}function ui(e,t){e({type:Rr.API_REQUEST,request:t})}function si(e){return ci(Object(vn.useDispatch)(),e)}function li(e,t){var n=Object(d.useMemo)((function(){var n;return(null===(n=t)||void 0===n?void 0:n.optimize)?function(e){return Xr(Zr,(function(e,t){var n=["response","request"];return Jr.isEqual(Jr.omit(e,n),Jr.omit(t,n))}))((function(t){return t.flightData.resources[e]}),(function(t){var n,r=t.flightData.resources[e];return(null===(n=r)||void 0===n?void 0:n.entityIds)?r.entityIds.reduce((function(e,n){return e[n]=t.flightData.entities[n],e}),{}):{}}),(function(t,n){return ii(e,t,n)}))}(e):function(e){return ei((function(t){return t.flightData.resources[e]}),(function(e){return e.flightData.entities}),(function(t,n){return ii(e,t,n)}))}(e)}),[e]);return Object(vn.useSelector)((function(e){return n(e)}))}function fi(e,t){var n=Object(vn.useDispatch)(),r=li(e&&e.key,t),i=ci(n,e);return e&&r.shouldFetch&&i(),r}function pi(e){return function(e){if(Array.isArray(e))return di(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return di(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var mi,hi=function(e,t,n){var r=Array.isArray(t)?t:[t],i=[];return r.forEach((function(t){var n,r=new RegExp(t,"i"),o=Object.keys(e.resources).filter((function(e){return r.test(e)}));(n=i).push.apply(n,pi(o))})),n&&(i=i.filter((function(e){return e!==n}))),i.reduce((function(e,t){return e[t]=!0,e}),{})};!function(e){e[e.Ok=200]="Ok",e[e.NoContent=204]="NoContent",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.Conflict=409]="Conflict",e[e.InternalServer=500]="InternalServer"}(mi||(mi={}));var yi=function(e){var t=e;return!!(t.successResponse||t.errorResponse||t.noResponse)},vi=function(e,t){var n=e.success,r=e.error,i=e.always,o=t;window.setTimeout((function(){o.noResponse||(o.successResponse?n(o.successResponse(),{status:mi.Ok,getResponseHeader:function(e){return""}}):o.errorResponse&&r(o.errorResponse()),i())}),function(e){var t=e.timeout||300;return t/2+(Math.floor(Math.random()*t/2)+1)}(t))},bi=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function gi(e){var t=e.fetchData,n=e.bootstrappedData,r=e.defaultExpiryTime,i=Object.freeze({key:null,url:null,type:xr.GET,normalize:!0,formatData:function(e){return e},expiryTime:r});return function(e){return function(r){return function(o){if(o.type===Rr.API_REQUEST){var a=e.getState(),c=Object.assign({},i,o.request),u=c.success,s=c.error,l=c.always,f=c.formatData,p=bi(c,["success","error","always","formatData"]),d=a.flightData.resources[p.key];if(r(o),!d||d.status!==Lr.Fetching){if(p.bootstrapName&&n[o.request.bootstrapName])return h(n[o.request.bootstrapName]),y(),void delete n[o.request.bootstrapName];var m={resource:p.url,type:p.type,data:p.data,success:h,error:function(t){e.dispatch({type:Rr.API_ERROR,errorResponse:t.responseJSON,request:o.request,timestamp:ti.currentTimestamp(),xhr:t}),s&&s(t)},always:y};return void(yi(p)?vi(m,p):t(m))}}else r(o);function h(t,n){var r=f(t),i={result:r,entities:{}};(p.normalize&&(i=qr(r,p.normalizeOptions)),e.dispatch({type:Rr.API_REPONSE,result:i.result,entities:i.entities,request:p,timestamp:ti.currentTimestamp(),xhr:n}),p.updateState)&&(Array.isArray(p.updateState)?p.updateState:[p.updateState]).forEach((function(t){var n,r,i,o;n=t,r=hi(a.flightData,n.keys),i=Object.assign({},Object.keys(a.flightData.resources).filter((function(e){return r[e]})).reduce((function(e,t){var n=a.flightData.resources[t],r=n.response;return n.request.normalize&&(r=Kr(n.response,a.flightData.entities)),e[t]=r,e}),{})),o=n.updateData(i),Object.keys(o).forEach((function(t){var n=a.flightData.resources[t],r=o[t],i={result:r,entities:{}};n.request.normalize&&(i=qr(r,n.request.normalizeOptions)),e.dispatch({type:Rr.UPDATE,result:i.result,entities:i.entities,request:n.request})}))}));if(u){var o=i.result;p.normalize&&(o=Kr(i.result,Object.assign(Object.assign({},a.flightData.entities),i.entities))),u(o)}}function y(){p.invalidationKeys&&e.dispatch({type:Rr.INVALIDATE,keys:p.invalidationKeys,request:p}),l&&l()}}}}}function Si(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ei(e,t){var n=Object.assign({},e);return Object.keys(t).forEach((function(r){e[r]?n[r]=Object.assign(Object.assign({},e[r]),t[r]):n[r]=t[r]})),n}function Oi(e,t){var n=e.resources[t.request.key];return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),Si({},t.request.key,{request:t.request,status:Lr.Fetching,response:n?n.response:null,entityIds:n?n.entityIds:null}))}}function ji(e,t){var n,r=t.entities?Object.keys(t.entities):[];return{entities:Ei(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),Si({},t.request.key,{request:t.request,status:Lr.Success,response:t.result,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status,entityIds:r}))}}function Ci(e,t){var n;return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),Si({},t.request.key,{request:t.request,status:Lr.Error,errorResponse:t.errorResponse,timestamp:t.timestamp,statusCode:null===(n=t.xhr)||void 0===n?void 0:n.status}))}}function wi(e,t){var n,r=hi(e,t.keys,null===(n=t.request)||void 0===n?void 0:n.key);return{entities:Object.assign({},e.entities),resources:Object.assign(Object.assign({},e.resources),Object.keys(e.resources).filter((function(e){return r[e]})).reduce((function(t,n){var r=e.resources[n];return t[n]=Object.assign({},r,{status:Lr.None}),t}),{}))}}function Ai(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ii,t=arguments.length>1?arguments[1]:void 0,n=t.entities?Object.keys(t.entities):[];return{entities:Ei(e.entities,t.entities),resources:Object.assign(Object.assign({},e.resources),Si({},t.request.key,Object.assign(Object.assign({},e.resources[t.request.key]),{request:t.request,response:t.result,entityIds:n})))}}var Ii={resources:{},entities:{}};function Ti(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ii,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case Rr.API_REQUEST:return Oi(e,t);case Rr.API_REPONSE:return ji(e,t);case Rr.API_ERROR:return Ci(e,t);case Rr.INVALIDATE:return wi(e,t);case Rr.UPDATE:return Ai(e,t)}return e}function ki(e){return function(e){if(Array.isArray(e))return _i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return _i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pi=function(e){return m.first(e)},Li=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=e&&e.length?e.slice():[];return t+1>i.length&&(i=[].concat(ki(i),ki(Array(t+1-i.length).fill(r)))),i.splice(t,1,n),i},xi=function(e,t,n){var r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r},Ni=function(e,t){return m.groupBy(e,t)},Ri=function(){return m.intersection.apply(m,arguments)},Di=function(e,t){var n=e.indexOf(t);return-1===n?e.push(t):e.splice(n,1),e};var Mi="id";function Ui(e,t){return localStorage.setItem(e,JSON.stringify(t)),t}function Fi(e){var t=localStorage.getItem(e);return t?JSON.parse(t):null}var Vi={getAll:function(e,t){var n=Fi(e);return n&&n.length?n:!n&&t?(t.forEach((function(t){return Vi.create(e,t)})),Fi(e)):[]},get:function(e,t){var n=Vi.getAll(e);return n.length?n.find((function(e){return e[Mi]===t})):null},create:function(e,t){var n,r,i,o=Vi.getAll(e),a=Object.assign(Object.assign({},t),(n={},r=Mi,i=t[Mi]||(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER)+1).toString(),r in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n));return o.push(a),Ui(e,o),a},update:function(e,t){var n=Vi.getAll(e);if(!n.length)return t;var r=n.findIndex((function(e){return e[Mi]===t[Mi]}));return n[r]=t,Ui(e,n),t},delete:function(e,t){var n=Vi.getAll(e);n.length&&(Array.isArray(t)||(t=[t]),t.forEach((function(e){var t=n.findIndex((function(t){return t[Mi]===e}));n.splice(t,1)})),Ui(e,n))},assoc:function(e,t,n,r,i){var o=Array.isArray(i),a=o?i:[i];"string"==typeof Pi(a)&&(a=Vi.getAll(r).filter((function(e){return a.includes(e.id)})));var c=a.map((function(e){return e.id?e:Vi.create(r,e)})),u=Vi.getAll(e);if(u.length){var s=u.find((function(e){return e.id===t}));if(s)return c.forEach((function(e){if(s[n])if(Array.isArray(s[n])){if(s[n].find((function(t){return t.id===e.id})))return;s[n].push(e)}else s[n]=e;else s[n]=o?[e]:e})),Ui(e,u=u.map((function(e){return e.id!==s.id?e:s}))),o?c:Pi(c)}},dissoc:function(e,t,n,r){var i=Vi.getAll(e);if(i.length){var o=i.find((function(e){return e.id===t}));if(o){var a=o[n];if(a)return Array.isArray(r)||(r=[r]),Array.isArray(a)||(a=[a]),r.forEach((function(e){var t=a.findIndex((function(t){return t.id===e}));a.splice(t,1)})),o[n]=a,Ui(e,i=i.map((function(e){return e.id!==o.id?e:o}))),i}}}},zi=function(e){var t="/api/master/v2/companies";return e?"".concat(t,"?cursor=").concat(e):t},Bi=function(e){return"/api/master/v2/objects/".concat(e)},Hi=function(){return"/api/master/v2/companies"},qi=function(e){return"/api/master/v2/objects/".concat(e)},Ji="companies",$i="company",Yi="update:company",Ki=function(e){return{key:"".concat(Ji).concat(e?":".concat(e):""),url:zi(e)}},Gi=function(e){return{key:"".concat($i,":").concat(e),url:Bi(e)}},Wi=function(e,t,n){return{key:$i,url:Hi(),data:e,type:xr.POST,success:t,error:n,invalidationKeys:[Ji]}},Zi=function(e,t,n){return{key:"".concat(Yi,":").concat(e),url:qi(e),data:t,type:xr.PUT,always:n}},Qi=n(12),Xi=n.n(Qi),eo=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===to}(e)}(e)};var to="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function no(e,t){return!1!==t.clone&&t.isMergeableObject(e)?io((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function ro(e,t,n){return e.concat(t).map((function(e){return no(e,n)}))}function io(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||ro,n.isMergeableObject=n.isMergeableObject||eo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=no(e[t],n)})),Object.keys(t).forEach((function(i){n.isMergeableObject(t[i])&&e[i]?r[i]=io(e[i],t[i],n):r[i]=no(t[i],n)})),r}(e,t,n):no(t,n)}io.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return io(e,n,t)}),{})};var oo=io,ao=n(6),co=ao.a.Symbol,uo=Object.prototype,so=uo.hasOwnProperty,lo=uo.toString,fo=co?co.toStringTag:void 0;var po=function(e){var t=so.call(e,fo),n=e[fo];try{e[fo]=void 0;var r=!0}catch(e){}var i=lo.call(e);return r&&(t?e[fo]=n:delete e[fo]),i},mo=Object.prototype.toString;var ho=function(e){return mo.call(e)},yo=co?co.toStringTag:void 0;var vo=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":yo&&yo in Object(e)?po(e):ho(e)};var bo=function(e,t){return function(n){return e(t(n))}},go=bo(Object.getPrototypeOf,Object);var So=function(e){return null!=e&&"object"==typeof e},Eo=Function.prototype,Oo=Object.prototype,jo=Eo.toString,Co=Oo.hasOwnProperty,wo=jo.call(Object);var Ao=function(e){if(!So(e)||"[object Object]"!=vo(e))return!1;var t=go(e);if(null===t)return!0;var n=Co.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&jo.call(n)==wo};var Io=function(){this.__data__=[],this.size=0};var To=function(e,t){return e===t||e!=e&&t!=t};var ko=function(e,t){for(var n=e.length;n--;)if(To(e[n][0],t))return n;return-1},_o=Array.prototype.splice;var Po=function(e){var t=this.__data__,n=ko(t,e);return!(n<0)&&(n==t.length-1?t.pop():_o.call(t,n,1),--this.size,!0)};var Lo=function(e){var t=this.__data__,n=ko(t,e);return n<0?void 0:t[n][1]};var xo=function(e){return ko(this.__data__,e)>-1};var No=function(e,t){var n=this.__data__,r=ko(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function Ro(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ro.prototype.clear=Io,Ro.prototype.delete=Po,Ro.prototype.get=Lo,Ro.prototype.has=xo,Ro.prototype.set=No;var Do=Ro;var Mo=function(){this.__data__=new Do,this.size=0};var Uo=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Fo=function(e){return this.__data__.get(e)};var Vo=function(e){return this.__data__.has(e)};var zo=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var Bo,Ho=function(e){if(!zo(e))return!1;var t=vo(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},qo=ao.a["__core-js_shared__"],Jo=(Bo=/[^.]+$/.exec(qo&&qo.keys&&qo.keys.IE_PROTO||""))?"Symbol(src)_1."+Bo:"";var $o=function(e){return!!Jo&&Jo in e},Yo=Function.prototype.toString;var Ko=function(e){if(null!=e){try{return Yo.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Go=/^\[object .+?Constructor\]$/,Wo=Function.prototype,Zo=Object.prototype,Qo=Wo.toString,Xo=Zo.hasOwnProperty,ea=RegExp("^"+Qo.call(Xo).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ta=function(e){return!(!zo(e)||$o(e))&&(Ho(e)?ea:Go).test(Ko(e))};var na=function(e,t){return null==e?void 0:e[t]};var ra=function(e,t){var n=na(e,t);return ta(n)?n:void 0},ia=ra(ao.a,"Map"),oa=ra(Object,"create");var aa=function(){this.__data__=oa?oa(null):{},this.size=0};var ca=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ua=Object.prototype.hasOwnProperty;var sa=function(e){var t=this.__data__;if(oa){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ua.call(t,e)?t[e]:void 0},la=Object.prototype.hasOwnProperty;var fa=function(e){var t=this.__data__;return oa?void 0!==t[e]:la.call(t,e)};var pa=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=oa&&void 0===t?"__lodash_hash_undefined__":t,this};function da(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}da.prototype.clear=aa,da.prototype.delete=ca,da.prototype.get=sa,da.prototype.has=fa,da.prototype.set=pa;var ma=da;var ha=function(){this.size=0,this.__data__={hash:new ma,map:new(ia||Do),string:new ma}};var ya=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var va=function(e,t){var n=e.__data__;return ya(t)?n["string"==typeof t?"string":"hash"]:n.map};var ba=function(e){var t=va(this,e).delete(e);return this.size-=t?1:0,t};var ga=function(e){return va(this,e).get(e)};var Sa=function(e){return va(this,e).has(e)};var Ea=function(e,t){var n=va(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Oa(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Oa.prototype.clear=ha,Oa.prototype.delete=ba,Oa.prototype.get=ga,Oa.prototype.has=Sa,Oa.prototype.set=Ea;var ja=Oa;var Ca=function(e,t){var n=this.__data__;if(n instanceof Do){var r=n.__data__;if(!ia||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ja(r)}return n.set(e,t),this.size=n.size,this};function wa(e){var t=this.__data__=new Do(e);this.size=t.size}wa.prototype.clear=Mo,wa.prototype.delete=Uo,wa.prototype.get=Fo,wa.prototype.has=Vo,wa.prototype.set=Ca;var Aa=wa;var Ia=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},Ta=function(){try{var e=ra(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var ka=function(e,t,n){"__proto__"==t&&Ta?Ta(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},_a=Object.prototype.hasOwnProperty;var Pa=function(e,t,n){var r=e[t];_a.call(e,t)&&To(r,n)&&(void 0!==n||t in e)||ka(e,t,n)};var La=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var c=t[o],u=r?r(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),i?ka(n,c,u):Pa(n,c,u)}return n};var xa=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Na=function(e){return So(e)&&"[object Arguments]"==vo(e)},Ra=Object.prototype,Da=Ra.hasOwnProperty,Ma=Ra.propertyIsEnumerable,Ua=Na(function(){return arguments}())?Na:function(e){return So(e)&&Da.call(e,"callee")&&!Ma.call(e,"callee")},Fa=Array.isArray,Va=n(20),za=/^(?:0|[1-9]\d*)$/;var Ba=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&za.test(e))&&e>-1&&e%1==0&&e<t};var Ha=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},qa={};qa["[object Float32Array]"]=qa["[object Float64Array]"]=qa["[object Int8Array]"]=qa["[object Int16Array]"]=qa["[object Int32Array]"]=qa["[object Uint8Array]"]=qa["[object Uint8ClampedArray]"]=qa["[object Uint16Array]"]=qa["[object Uint32Array]"]=!0,qa["[object Arguments]"]=qa["[object Array]"]=qa["[object ArrayBuffer]"]=qa["[object Boolean]"]=qa["[object DataView]"]=qa["[object Date]"]=qa["[object Error]"]=qa["[object Function]"]=qa["[object Map]"]=qa["[object Number]"]=qa["[object Object]"]=qa["[object RegExp]"]=qa["[object Set]"]=qa["[object String]"]=qa["[object WeakMap]"]=!1;var Ja=function(e){return So(e)&&Ha(e.length)&&!!qa[vo(e)]};var $a=function(e){return function(t){return e(t)}},Ya=n(10),Ka=Ya.a&&Ya.a.isTypedArray,Ga=Ka?$a(Ka):Ja,Wa=Object.prototype.hasOwnProperty;var Za=function(e,t){var n=Fa(e),r=!n&&Ua(e),i=!n&&!r&&Object(Va.a)(e),o=!n&&!r&&!i&&Ga(e),a=n||r||i||o,c=a?xa(e.length,String):[],u=c.length;for(var s in e)!t&&!Wa.call(e,s)||a&&("length"==s||i&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ba(s,u))||c.push(s);return c},Qa=Object.prototype;var Xa=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Qa)},ec=bo(Object.keys,Object),tc=Object.prototype.hasOwnProperty;var nc=function(e){if(!Xa(e))return ec(e);var t=[];for(var n in Object(e))tc.call(e,n)&&"constructor"!=n&&t.push(n);return t};var rc=function(e){return null!=e&&Ha(e.length)&&!Ho(e)};var ic=function(e){return rc(e)?Za(e):nc(e)};var oc=function(e,t){return e&&La(t,ic(t),e)};var ac=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},cc=Object.prototype.hasOwnProperty;var uc=function(e){if(!zo(e))return ac(e);var t=Xa(e),n=[];for(var r in e)("constructor"!=r||!t&&cc.call(e,r))&&n.push(r);return n};var sc=function(e){return rc(e)?Za(e,!0):uc(e)};var lc=function(e,t){return e&&La(t,sc(t),e)},fc=n(123);var pc=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var dc=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o};var mc=function(){return[]},hc=Object.prototype.propertyIsEnumerable,yc=Object.getOwnPropertySymbols,vc=yc?function(e){return null==e?[]:(e=Object(e),dc(yc(e),(function(t){return hc.call(e,t)})))}:mc;var bc=function(e,t){return La(e,vc(e),t)};var gc=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Sc=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)gc(t,vc(e)),e=go(e);return t}:mc;var Ec=function(e,t){return La(e,Sc(e),t)};var Oc=function(e,t,n){var r=t(e);return Fa(e)?r:gc(r,n(e))};var jc=function(e){return Oc(e,ic,vc)};var Cc=function(e){return Oc(e,sc,Sc)},wc=ra(ao.a,"DataView"),Ac=ra(ao.a,"Promise"),Ic=ra(ao.a,"Set"),Tc=ra(ao.a,"WeakMap"),kc=Ko(wc),_c=Ko(ia),Pc=Ko(Ac),Lc=Ko(Ic),xc=Ko(Tc),Nc=vo;(wc&&"[object DataView]"!=Nc(new wc(new ArrayBuffer(1)))||ia&&"[object Map]"!=Nc(new ia)||Ac&&"[object Promise]"!=Nc(Ac.resolve())||Ic&&"[object Set]"!=Nc(new Ic)||Tc&&"[object WeakMap]"!=Nc(new Tc))&&(Nc=function(e){var t=vo(e),n="[object Object]"==t?e.constructor:void 0,r=n?Ko(n):"";if(r)switch(r){case kc:return"[object DataView]";case _c:return"[object Map]";case Pc:return"[object Promise]";case Lc:return"[object Set]";case xc:return"[object WeakMap]"}return t});var Rc=Nc,Dc=Object.prototype.hasOwnProperty;var Mc=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Dc.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Uc=ao.a.Uint8Array;var Fc=function(e){var t=new e.constructor(e.byteLength);return new Uc(t).set(new Uc(e)),t};var Vc=function(e,t){var n=t?Fc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},zc=/\w*$/;var Bc=function(e){var t=new e.constructor(e.source,zc.exec(e));return t.lastIndex=e.lastIndex,t},Hc=co?co.prototype:void 0,qc=Hc?Hc.valueOf:void 0;var Jc=function(e){return qc?Object(qc.call(e)):{}};var $c=function(e,t){var n=t?Fc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Yc=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Fc(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return Vc(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return $c(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return Bc(e);case"[object Set]":return new r;case"[object Symbol]":return Jc(e)}},Kc=Object.create,Gc=function(){function e(){}return function(t){if(!zo(t))return{};if(Kc)return Kc(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Wc=function(e){return"function"!=typeof e.constructor||Xa(e)?{}:Gc(go(e))};var Zc=function(e){return So(e)&&"[object Map]"==Rc(e)},Qc=Ya.a&&Ya.a.isMap,Xc=Qc?$a(Qc):Zc;var eu=function(e){return So(e)&&"[object Set]"==Rc(e)},tu=Ya.a&&Ya.a.isSet,nu=tu?$a(tu):eu,ru={};ru["[object Arguments]"]=ru["[object Array]"]=ru["[object ArrayBuffer]"]=ru["[object DataView]"]=ru["[object Boolean]"]=ru["[object Date]"]=ru["[object Float32Array]"]=ru["[object Float64Array]"]=ru["[object Int8Array]"]=ru["[object Int16Array]"]=ru["[object Int32Array]"]=ru["[object Map]"]=ru["[object Number]"]=ru["[object Object]"]=ru["[object RegExp]"]=ru["[object Set]"]=ru["[object String]"]=ru["[object Symbol]"]=ru["[object Uint8Array]"]=ru["[object Uint8ClampedArray]"]=ru["[object Uint16Array]"]=ru["[object Uint32Array]"]=!0,ru["[object Error]"]=ru["[object Function]"]=ru["[object WeakMap]"]=!1;var iu=function e(t,n,r,i,o,a){var c,u=1&n,s=2&n,l=4&n;if(r&&(c=o?r(t,i,o,a):r(t)),void 0!==c)return c;if(!zo(t))return t;var f=Fa(t);if(f){if(c=Mc(t),!u)return pc(t,c)}else{var p=Rc(t),d="[object Function]"==p||"[object GeneratorFunction]"==p;if(Object(Va.a)(t))return Object(fc.a)(t,u);if("[object Object]"==p||"[object Arguments]"==p||d&&!o){if(c=s||d?{}:Wc(t),!u)return s?Ec(t,lc(c,t)):bc(t,oc(c,t))}else{if(!ru[p])return o?t:{};c=Yc(t,p,u)}}a||(a=new Aa);var m=a.get(t);if(m)return m;a.set(t,c),nu(t)?t.forEach((function(i){c.add(e(i,n,r,i,t,a))})):Xc(t)&&t.forEach((function(i,o){c.set(o,e(i,n,r,o,t,a))}));var h=l?s?Cc:jc:s?keysIn:ic,y=f?void 0:h(t);return Ia(y||t,(function(i,o){y&&(i=t[o=i]),Pa(c,o,e(i,n,r,o,t,a))})),c};var ou=function(e){return iu(e,4)};var au=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i};var cu=function(e){return"symbol"==typeof e||So(e)&&"[object Symbol]"==vo(e)};function uu(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(uu.Cache||ja),n}uu.Cache=ja;var su=uu;var lu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fu=/\\(\\)?/g,pu=function(e){var t=su(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(lu,(function(e,n,r,i){t.push(r?i.replace(fu,"$1"):n||e)})),t}));var du=function(e){if("string"==typeof e||cu(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},mu=co?co.prototype:void 0,hu=mu?mu.toString:void 0;var yu=function e(t){if("string"==typeof t)return t;if(Fa(t))return au(t,e)+"";if(cu(t))return hu?hu.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var vu=function(e){return null==e?"":yu(e)};var bu=function(e){return Fa(e)?au(e,du):cu(e)?[e]:pc(pu(vu(e)))};var gu=function(e,t){},Su=n(29),Eu=n(30),Ou=n.n(Eu);var ju=function(e){return iu(e,5)};function Cu(){return(Cu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function wu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Au(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Iu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Tu=function(e){return"function"==typeof e},ku=function(e){return null!==e&&"object"==typeof e},_u=function(e){return String(Math.floor(Number(e)))===e},Pu=function(e){return"[object String]"===Object.prototype.toString.call(e)},Lu=function(e){return 0===d.Children.count(e)},xu=function(e){return ku(e)&&Tu(e.then)};function Nu(e,t,n,r){void 0===r&&(r=0);for(var i=bu(t);e&&r<i.length;)e=e[i[r++]];return void 0===e?n:e}function Ru(e,t,n){for(var r=ou(e),i=r,o=0,a=bu(t);o<a.length-1;o++){var c=a[o],u=Nu(e,a.slice(0,o+1));if(u&&(ku(u)||Array.isArray(u)))i=i[c]=ou(u);else{var s=a[o+1];i=i[c]=_u(s)&&Number(s)>=0?[]:{}}}return(0===o?e:i)[a[o]]===n?e:(void 0===n?delete i[a[o]]:i[a[o]]=n,0===o&&void 0===n&&delete r[a[o]],r)}function Du(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,o=Object.keys(e);i<o.length;i++){var a=o[i],c=e[a];ku(c)?n.get(c)||(n.set(c,!0),r[a]=Array.isArray(c)?[]:{},Du(c,t,n,r[a])):r[a]=t}return r}var Mu=Object(d.createContext)(void 0),Uu=Mu.Provider,Fu=Mu.Consumer;function Vu(){var e=Object(d.useContext)(Mu);return e||gu(!1),e}function zu(e,t){switch(t.type){case"SET_VALUES":return Cu({},e,{values:t.payload});case"SET_TOUCHED":return Cu({},e,{touched:t.payload});case"SET_ERRORS":return Cu({},e,{errors:t.payload});case"SET_STATUS":return Cu({},e,{status:t.payload});case"SET_ISSUBMITTING":return Cu({},e,{isSubmitting:t.payload});case"SET_ISVALIDATING":return Cu({},e,{isValidating:t.payload});case"SET_FIELD_VALUE":return Cu({},e,{values:Ru(e.values,t.payload.field,t.payload.value)});case"SET_FIELD_TOUCHED":return Cu({},e,{touched:Ru(e.touched,t.payload.field,t.payload.value)});case"SET_FIELD_ERROR":return Cu({},e,{errors:Ru(e.errors,t.payload.field,t.payload.value)});case"RESET_FORM":return Cu({},e,t.payload);case"SET_FORMIK_STATE":return t.payload(e);case"SUBMIT_ATTEMPT":return Cu({},e,{touched:Du(e.values,!0),isSubmitting:!0,submitCount:e.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return Cu({},e,{isSubmitting:!1});default:return e}}var Bu={},Hu={};function qu(e){var t=e.validateOnChange,n=void 0===t||t,r=e.validateOnBlur,i=void 0===r||r,o=e.validateOnMount,a=void 0!==o&&o,c=e.isInitialValid,u=e.enableReinitialize,s=void 0!==u&&u,l=e.onSubmit,f=Au(e,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),p=Cu({validateOnChange:n,validateOnBlur:i,validateOnMount:a,onSubmit:l},f),m=Object(d.useRef)(p.initialValues),h=Object(d.useRef)(p.initialErrors||Bu),y=Object(d.useRef)(p.initialTouched||Hu),v=Object(d.useRef)(p.initialStatus),b=Object(d.useRef)(!1),g=Object(d.useRef)({});Object(d.useEffect)((function(){0}),[]),Object(d.useEffect)((function(){return b.current=!0,function(){b.current=!1}}),[]);var S=Object(d.useReducer)(zu,{values:p.initialValues,errors:p.initialErrors||Bu,touched:p.initialTouched||Hu,status:p.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),E=S[0],O=S[1],j=Object(d.useCallback)((function(e,t){return new Promise((function(n,r){var i=p.validate(e,t);null==i?n(Bu):xu(i)?i.then((function(e){n(e||Bu)}),(function(e){r(e)})):n(i)}))}),[p.validate]),C=Object(d.useCallback)((function(e,t){var n=p.validationSchema,r=Tu(n)?n(t):n,i=t&&r.validateAt?r.validateAt(t,e):function(e,t,n,r){void 0===n&&(n=!1);void 0===r&&(r={});var i=function e(t){var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=String(r);!0===Array.isArray(t[i])?n[i]=t[i].map((function(t){return!0===Array.isArray(t)||Ao(t)?e(t):""!==t?t:void 0})):Ao(t[i])?n[i]=e(t[i]):n[i]=""!==t[i]?t[i]:void 0}return n}(e);return t[n?"validateSync":"validate"](i,{abortEarly:!1,context:r})}(e,r);return new Promise((function(e,t){i.then((function(){e(Bu)}),(function(n){"ValidationError"===n.name?e(function(e){var t={};if(e.inner){if(0===e.inner.length)return Ru(t,e.path,e.message);var n=e.inner,r=Array.isArray(n),i=0;for(n=r?n:n[Symbol.iterator]();;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;Nu(t,a.path)||(t=Ru(t,a.path,a.message))}}return t}(n)):t(n)}))}))}),[p.validationSchema]),w=Object(d.useCallback)((function(e,t){return new Promise((function(n){return n(g.current[e].validate(t))}))}),[]),A=Object(d.useCallback)((function(e){var t=Object.keys(g.current).filter((function(e){return Tu(g.current[e].validate)})),n=t.length>0?t.map((function(t){return w(t,Nu(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=Ru(e,t[r],n)),e}),{})}))}),[w]),I=Object(d.useCallback)((function(e){return Promise.all([A(e),p.validationSchema?C(e):{},p.validate?j(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return oo.all([t,n,r],{arrayMerge:$u})}))}),[p.validate,p.validationSchema,A,j,C]),T=Ku((function(e){return void 0===e&&(e=E.values),Object(Su.unstable_runWithPriority)(Su.LowPriority,(function(){return I(e).then((function(e){return b.current&&O({type:"SET_ERRORS",payload:e}),e}))}))})),k=Ku((function(e){return void 0===e&&(e=E.values),O({type:"SET_ISVALIDATING",payload:!0}),I(e).then((function(e){return b.current&&(O({type:"SET_ISVALIDATING",payload:!1}),Xi()(E.errors,e)||O({type:"SET_ERRORS",payload:e})),e}))}));Object(d.useEffect)((function(){a&&!0===b.current&&T(p.initialValues)}),[p.initialValues,a,T]);var _=Object(d.useCallback)((function(e){var t=e&&e.values?e.values:m.current,n=e&&e.errors?e.errors:h.current?h.current:p.initialErrors||{},r=e&&e.touched?e.touched:y.current?y.current:p.initialTouched||{},i=e&&e.status?e.status:v.current?v.current:p.initialStatus;m.current=t,h.current=n,y.current=r,v.current=i,O({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:i,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"==typeof e.submitCount?e.submitCount:0}})}),[p.initialErrors,p.initialStatus,p.initialTouched]);Object(d.useEffect)((function(){s&&!0===b.current&&!Xi()(m.current,p.initialValues)&&(m.current=p.initialValues,_())}),[s,p.initialValues,_]),Object(d.useEffect)((function(){s&&!0===b.current&&!Xi()(h.current,p.initialErrors)&&(h.current=p.initialErrors||Bu,O({type:"SET_ERRORS",payload:p.initialErrors||Bu}))}),[s,p.initialErrors]),Object(d.useEffect)((function(){s&&!0===b.current&&!Xi()(y.current,p.initialTouched)&&(y.current=p.initialTouched||Hu,O({type:"SET_TOUCHED",payload:p.initialTouched||Hu}))}),[s,p.initialTouched]),Object(d.useEffect)((function(){s&&!0===b.current&&!Xi()(v.current,p.initialStatus)&&(v.current=p.initialStatus,O({type:"SET_STATUS",payload:p.initialStatus}))}),[s,p.initialStatus,p.initialTouched]);var P=Ku((function(e){if(Tu(g.current[e].validate)){var t=Nu(E.values,e),n=g.current[e].validate(t);return xu(n)?(O({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){O({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),O({type:"SET_ISVALIDATING",payload:!1})}))):(O({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return Promise.resolve()})),L=Object(d.useCallback)((function(e,t){var n=t.validate;g.current[e]={validate:n}}),[]),x=Object(d.useCallback)((function(e){delete g.current[e]}),[]),N=Ku((function(e){return O({type:"SET_TOUCHED",payload:e}),i?T(E.values):Promise.resolve()})),R=Object(d.useCallback)((function(e){O({type:"SET_ERRORS",payload:e})}),[]),D=Ku((function(e){return O({type:"SET_VALUES",payload:e}),n?T(e):Promise.resolve()})),M=Object(d.useCallback)((function(e,t){O({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),U=Ku((function(e,t,r){return void 0===r&&(r=!0),O({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),n&&r?T(Ru(E.values,e,t)):Promise.resolve()})),F=Object(d.useCallback)((function(e,t){var n,r=t,i=e;if(!Pu(e)){e.persist&&e.persist();var o=e.target,a=o.type,c=o.name,u=o.id,s=o.value,l=o.checked,f=(o.outerHTML,o.options),p=o.multiple;r=t||(c||u),i=/number|range/.test(a)?(n=parseFloat(s),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("true"==n||"false"==n)return!!t;if(t&&n)return Array.isArray(e)?e.concat(n):[n];if(!Array.isArray(e))return!e;var r=e.indexOf(n);if(r<0)return e;return e.slice(0,r).concat(e.slice(r+1))}(Nu(E.values,r),l,s):p?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(f):s}r&&U(r,i)}),[U,E.values]),V=Object(d.useCallback)((function(e){if(Pu(e))return function(t){return F(t,e)};F(e)}),[F]),z=Ku((function(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),i&&n?T(E.values):Promise.resolve()})),B=Object(d.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,i=n.id,o=(n.outerHTML,t||(r||i));z(o,!0)}),[z]),H=Object(d.useCallback)((function(e){if(Pu(e))return function(t){return B(t,e)};B(e)}),[B]),q=Object(d.useCallback)((function(e){Tu(e)?O({type:"SET_FORMIK_STATE",payload:e}):O({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),J=Object(d.useCallback)((function(e){O({type:"SET_STATUS",payload:e})}),[]),$=Object(d.useCallback)((function(e){O({type:"SET_ISSUBMITTING",payload:e})}),[]),Y={resetForm:_,validateForm:k,validateField:P,setErrors:R,setFieldError:M,setFieldTouched:z,setFieldValue:U,setStatus:J,setSubmitting:$,setTouched:N,setValues:D,setFormikState:q},K=Ku((function(){return l(E.values,Y)})),G=Ku((function(){return O({type:"SUBMIT_ATTEMPT"}),k().then((function(e){if(0===Object.keys(e).length){var t=K();if(void 0===t)return;return Promise.resolve(t).then((function(){b.current&&O({type:"SUBMIT_SUCCESS"})})).catch((function(e){if(b.current)throw O({type:"SUBMIT_FAILURE"}),e}))}b.current&&O({type:"SUBMIT_FAILURE"})}))})),W=Ku((function(e){e&&e.preventDefault&&Tu(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Tu(e.stopPropagation)&&e.stopPropagation(),G()})),Z=Ku((function(e){if(e&&e.preventDefault&&Tu(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&Tu(e.stopPropagation)&&e.stopPropagation(),p.onReset){var t=p.onReset(E.values,Y);xu(t)?t.then(_):_()}else _()})),Q=Object(d.useCallback)((function(e){return{value:Nu(E.values,e),error:Nu(E.errors,e),touched:!!Nu(E.touched,e),initialValue:Nu(m.current,e),initialTouched:!!Nu(y.current,e),initialError:Nu(h.current,e)}}),[E.errors,E.touched,E.values]),X=Object(d.useCallback)((function(e){var t=ku(e),n=t?e.name:e,r=Nu(E.values,n),i={name:n,value:r,onChange:V,onBlur:H};if(t){var o=e.type,a=e.value,c=e.as,u=e.multiple;"checkbox"===o?void 0===a?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(a)),i.value=a):"radio"===o?(i.checked=r===a,i.value=a):"select"===c&&u&&(i.value=i.value||[],i.multiple=!0)}return i}),[H,V,E.values]),ee=Object(d.useMemo)((function(){return!Xi()(m.current,E.values)}),[E.values]),te=Object(d.useMemo)((function(){return void 0!==c?ee?E.errors&&0===Object.keys(E.errors).length:!1!==c&&Tu(c)?c(p):c:E.errors&&0===Object.keys(E.errors).length}),[c,ee,E.errors,p]);return Cu({},E,{initialValues:m.current,initialErrors:h.current,initialTouched:y.current,initialStatus:v.current,handleBlur:H,handleChange:V,handleReset:Z,handleSubmit:W,resetForm:_,setErrors:R,setFormikState:q,setFieldTouched:z,setFieldValue:U,setFieldError:M,setStatus:J,setSubmitting:$,setTouched:N,setValues:D,submitForm:G,validateForm:k,validateField:P,isValid:te,dirty:ee,unregisterField:x,registerField:L,getFieldProps:X,getFieldMeta:Q,validateOnBlur:i,validateOnChange:n,validateOnMount:a})}function Ju(e){var t=qu(e),n=e.component,r=e.children,i=e.render;return Object(d.useEffect)((function(){0}),[]),Object(d.createElement)(Uu,{value:t},n?Object(d.createElement)(n,t):i?i(t):r?Tu(r)?r(t):Lu(r)?null:d.Children.only(r):null)}function $u(e,t,n){var r=e.slice();return t.forEach((function(t,i){if(void 0===r[i]){var o=!1!==n.clone&&n.isMergeableObject(t);r[i]=o?oo(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[i]=oo(e[i],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var Yu="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?d.useLayoutEffect:d.useEffect;function Ku(e){var t=Object(d.useRef)(e);return Yu((function(){t.current=e})),Object(d.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(void 0,n)}),[])}function Gu(e){var t=e.validate,n=e.name,r=e.render,i=e.children,o=e.as,a=e.component,c=Au(e,["validate","name","render","children","as","component"]),u=Vu(),s=(u.validate,u.validationSchema,Au(u,["validate","validationSchema"]));Object(d.useEffect)((function(){0}),[]);var l=s.registerField,f=s.unregisterField;Object(d.useEffect)((function(){return l(n,{validate:t}),function(){f(n)}}),[l,f,n,t]);var p=s.getFieldProps(Cu({name:n},c)),m=s.getFieldMeta(n),h={field:p,form:s};if(r)return r(Cu({},h,{meta:m}));if(Tu(i))return i(Cu({},h,{meta:m}));if(a){if("string"==typeof a){var y=c.innerRef,v=Au(c,["innerRef"]);return Object(d.createElement)(a,Cu({ref:y},p,v),i)}return Object(d.createElement)(a,Cu({field:p,form:s},c),i)}var b=o||"input";if("string"==typeof b){var g=c.innerRef,S=Au(c,["innerRef"]);return Object(d.createElement)(b,Cu({ref:g},p,S),i)}return Object(d.createElement)(b,Cu({},p,c),i)}var Wu=Object(d.forwardRef)((function(e,t){var n=e.action,r=Au(e,["action"]),i=n||"#",o=Vu(),a=o.handleReset,c=o.handleSubmit;return Object(d.createElement)("form",Object.assign({onSubmit:c,ref:t,onReset:a,action:i},r))}));function Zu(e){var t=function(t){return Object(d.createElement)(Fu,null,(function(n){return n||gu(!1),Object(d.createElement)(e,Object.assign({},t,{formik:n}))}))},n=e.displayName||e.name||e.constructor&&e.constructor.name||"Component";return t.WrappedComponent=e,t.displayName="FormikConnect("+n+")",Ou()(t,e)}Wu.displayName="Form";var Qu=function(e,t,n){var r=Xu(e);return r.splice(t,0,n),r},Xu=function(e){if(e){if(Array.isArray(e))return[].concat(e);var t=Object.keys(e).map((function(e){return parseInt(e)})).reduce((function(e,t){return t>e?t:e}),0);return Array.from(Cu({},e,{length:t+1}))}return[]},es=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var i=n.props,o=i.name,a=i.validateOnChange,c=i.formik,u=c.setFormikState,s=c.validateForm;u((function(n){var i="function"==typeof r?r:e,a="function"==typeof t?t:e;return Cu({},n,{values:Ru(n.values,o,e(Nu(n.values,o))),errors:r?Ru(n.errors,o,i(Nu(n.errors,o))):n.errors,touched:t?Ru(n.touched,o,a(Nu(n.touched,o))):n.touched})}),(function(){a&&s()}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(Xu(t),[ju(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Xu(e),i=r[t];return r[t]=r[n],r[n]=i,r}(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Xu(e),i=r[t];return r.splice(t,1),r.splice(n,0,i),r}(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return Qu(n,e,t)}),(function(t){return Qu(t,e,null)}),(function(t){return Qu(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return function(e,t,n){var r=Xu(e);return r[t]=n,r}(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(Iu(n)),n.pop=n.pop.bind(Iu(n)),n}wu(t,e);var n=t.prototype;return n.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?Xu(n):[];return t||(t=r[e]),Tu(r.splice)&&r.splice(e,1),r}),!0,!0),t},n.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,i=t.children,o=t.name,a=t.formik,c=(a.validate,a.validationSchema,Cu({},e,{form:Au(a,["validate","validationSchema"]),name:o}));return n?Object(d.createElement)(n,c):r?r(c):i?"function"==typeof i?i(c):Lu(i)?null:d.Children.only(i):null},t}(d.Component);es.defaultProps={validateOnChange:!0};var ts=Zu(function(e){function t(){return e.apply(this,arguments)||this}wu(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e){return Nu(this.props.formik.errors,this.props.name)!==Nu(e.formik.errors,this.props.name)||Nu(this.props.formik.touched,this.props.name)!==Nu(e.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length},n.render=function(){var e=this.props,t=e.component,n=e.formik,r=e.render,i=e.children,o=e.name,a=Au(e,["component","formik","render","children","name"]),c=Nu(n.touched,o),u=Nu(n.errors,o);return c&&u?r?Tu(r)?r(u):null:i?Tu(i)?i(u):null:t?Object(d.createElement)(t,a,u):u:null},t}(d.Component));(function(e){function t(t){var n;n=e.call(this,t)||this;var r=t.render,i=t.children,o=t.component,a=t.as;t.name;return r&&gu(!1),o&&r&&gu(!1),a&&i&&Tu(i)&&gu(!1),o&&i&&Tu(i)&&gu(!1),r&&i&&!Lu(i)&&gu(!1),n}wu(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e,t,n){return this.props.shouldUpdate?this.props.shouldUpdate(e,this.props):Nu(this.context.values,this.props.name)!==Nu(n.values,this.props.name)||Nu(this.context.errors,this.props.name)!==Nu(n.errors,this.props.name)||Nu(this.context.touched,this.props.name)!==Nu(n.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(e).length||this.context.isSubmitting!==n.isSubmitting},n.componentDidMount=function(){this.context.registerField(this.props.name,{validate:this.props.validate})},n.componentDidUpdate=function(e){this.props.name!==e.name&&(this.context.unregisterField(e.name),this.context.registerField(this.props.name,{validate:this.props.validate})),this.props.validate!==e.validate&&this.context.registerField(this.props.name,{validate:this.props.validate})},n.componentWillUnmount=function(){this.context.unregisterField(this.props.name)},n.render=function(){var e=this.props,t=(e.validate,e.name),n=e.render,r=e.as,i=e.children,o=e.component,a=(e.shouldUpdate,Au(e,["validate","name","render","as","children","component","shouldUpdate"])),c=this.context,u=(c.validate,c.validationSchema,Au(c,["validate","validationSchema"])),s={value:"radio"===a.type||"checkbox"===a.type?a.value:Nu(c.values,t),name:t,onChange:c.handleChange,onBlur:c.handleBlur},l={field:s,meta:{value:Nu(c.values,t),error:Nu(c.errors,t),touched:!!Nu(c.touched,t),initialValue:Nu(c.initialValues,t),initialTouched:!!Nu(c.initialTouched,t),initialError:Nu(c.initialErrors,t)},form:u};if(n)return n(l);if(Tu(i))return i(l);if(o){if("string"==typeof o){var f=a.innerRef,p=Au(a,["innerRef"]);return Object(d.createElement)(o,Cu({ref:f},s,p),i)}return Object(d.createElement)(o,Cu({field:s,form:c},a),i)}var m=r||"input";if("string"==typeof m){var h=a.innerRef,y=Au(a,["innerRef"]);return Object(d.createElement)(m,Cu({ref:h},s,y),i)}return Object(d.createElement)(m,Cu({},s,a),i)},t}(d.Component)).contextType=Mu;var ns=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function rs(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,r=e.initialValues,i=e.onSubmit,o=e.resetOnSubmit,a=ns(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit","resetOnSubmit"]),c=t&&e.validationSchema?e.validationSchema.cast(function e(t){var n=Jr.deepClone(t);return Object.keys(n).forEach((function(t){n.hasOwnProperty(t)&&(Jr.isObject(n[t])?n[t]=e(n[t]):null===n[t]&&delete n[t])})),n}(r)):r,u={allowInitialSubmit:e.allowInitialSubmit};return d.createElement(Ju,Object.assign({enableReinitialize:!0},a,{initialValues:c,onSubmit:function(t,r){var a=r.setSubmitting,c=r.resetForm,u=n&&e.validationSchema?e.validationSchema.cast(t):t;i(u,(function(){o&&c(),a(!1)}))},initialStatus:u}),mn(e.children)?function(t){return e.children(t)}:d.Children.count(e.children)?e.children:null)}rs.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0};var is=n(2),os=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),as=n(3),cs=function(e,t,n,r){var i="form-control";return Nu(t,n)&&Nu(e,n)&&(i+=" is-invalid"),r&&(i+=" ".concat(r)),i};function us(e){var t=Vu().values[e.fieldName];return"string"!=typeof t?d.createElement(d.Fragment,null):d.createElement("div",{className:"float-right text-muted"},t.length,"/",e.limit)}var ss=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function ls(e){var t=e.label,n=ss(e,["label"]);return d.createElement(as.Form.Group,null,d.createElement("div",{className:"custom-control custom-checkbox"},d.createElement(ps,Object.assign({className:"custom-control-input"},n)),d.createElement(as.Form.Label,{className:"custom-control-label",htmlFor:n.id},t)))}var fs=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function ps(e){var t=e.children,n=fs(e,["children"]);return d.createElement(Gu,Object.assign({},n),mn(t)?function(e){return t(e)}:d.Children.count(t)?t:null)}function ds(e){var t=e.label,n=e.className,r=e.showCharacterCounter,i=fs(e,["label","className","showCharacterCounter"]),o=Vu(),a=o.errors,c=o.touched;return"checkbox"===i.type?d.createElement(ls,Object.assign({},e)):d.createElement(as.Form.Group,null,!!t&&d.createElement(as.Form.Label,{htmlFor:i.id},t),d.createElement(ps,Object.assign({className:cs(a,c,i.name,n)},i)),!!r&&!!i.maxLength&&d.createElement(us,{fieldName:i.name,limit:i.maxLength}),d.createElement(ts,{name:i.name},(function(e){return d.createElement(as.Form.Control.Feedback,{type:"invalid"},e)})))}function ms(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return hs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hs(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ys(e){var t,n=ms(d.useState(!1),2),r=n[0],i=n[1];return d.useEffect((function(){var t;e.isValid&&(e.dirty||(null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit))?i(!0):i(!1)}),[e.isValid,null===(t=e.initialStatus)||void 0===t?void 0:t.allowInitialSubmit,e.dirty,e.values]),d.useEffect((function(){e.isSubmitting&&i(!1)}),[e.isSubmitting]),r}function vs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return bs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bs(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gs=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Ss(e){var t=e.showSpinner,n=e.children,r=gs(e,["showSpinner","children"]),i=d.useRef(),o=vs(d.useState({}),2),a=o[0],c=o[1];return d.useEffect((function(){var e=a.width,t=a.height;if(!e||!t){var n=i.current,r=n.offsetHeight,o=n.offsetWidth;r&&o&&c({width:o,height:r})}})),d.useEffect((function(){var e=a.width,t=a.height;if(e&&t){var n=i.current;n.style.width="".concat(e+1,"px"),n.style.height="".concat(t+1,"px")}}),[a]),d.createElement(as.Button,Object.assign({ref:i,disabled:t},r),t?d.createElement(as.Spinner,{as:"span",animation:"border",role:"status",size:"sm"}):n)}var Es=n(124),Os=n(21),js="AlertService",Cs="LanguageService";function ws(e){return(ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function As(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Is(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ts(e,t){return(Ts=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ps(e);if(t){var i=Ps(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _s(this,n)}}function _s(e,t){return!t||"object"!==ws(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ps(e){return(Ps=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ls=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ts(e,t)}(o,e);var t,n,r,i=ks(o);function o(){return As(this,o),i.apply(this,arguments)}return t=o,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"setConfig",value:function(e){this.polyglot=new Es({locale:e.locale,phrases:e.phrases.rootElement||e.phrases}),this.cache={}}},{key:"getPhrase",value:function(e,t,n){var r="".concat(e,".").concat(t);if(this.polyglot||J.throw(new Qe("LanguageService config must be set.")),!this.polyglot.has(r)){if(!k.isDevelopment){var i=window.trackJs;return i&&i.console.error("No phrase set for ".concat(r," in language config")),""}J.throw(new Qe("No phrase set for ".concat(r," in language config.")))}if(!n||m.isEmpty(n)){var o=this.cache[r];if(o)return o;var a=this.polyglot.t(r);return this.cache[r]=a,a}var c=m.omit(n,"smartCount"),u={};for(var s in c)u[s]=Os.sanitize(c[s]);m.isNumber(n.smartCount)&&(u.smart_count=n.smartCount);var l="".concat(r,":").concat(m.values(Object.assign({},u)).join(":")),f=this.cache[l];if(f)return f;var p=this.polyglot.t(r,u);return this.cache[l]=p,p}},{key:"encloseNamespace",value:function(e){var t=this;return function(n,r){return t.getPhrase(e,n,r)}}},{key:"name",get:function(){return Cs}}])&&Is(t.prototype,n),r&&Is(t,r),o}(Yt).Instance,xs=d.createContext(""),Ns=d.memo((function(e){var t=e.phrase,n=e.namespace,r=e.options,i=d.useContext(xs),o=n||i,a=Ls.getPhrase(o,t,r);return d.createElement("span",{dangerouslySetInnerHTML:{__html:a}})}),(function(e,t){return e.namespace===t.namespace&&e.phrase===t.phrase&&Jr.isEqual(e.options,t.options)}));function Rs(e){var t=Vu(),n=ys(t);d.useEffect((function(){function e(e){13===e.keyCode&&n&&t.validateForm().then((function(e){Object.keys(e).length||t.submitForm()}))}return window.addEventListener("keypress",e),function(){return window.removeEventListener("keypress",e)}}),[n]);var r="save";return e.isNew&&(r="create"),e.hasNext&&(r="next"),d.createElement(Ss,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},d.createElement(Ns,{namespace:"shared.formButtons",phrase:r}))}function Ds(e){var t=Vu();return d.createElement(Wu,null,d.createElement(ds,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this company",autoFocus:!0}),d.createElement(Rs,{isNew:e.isNew}))}function Ms(e){return d.createElement(rs,{initialValues:e.company,validationSchema:os,onSubmit:e.saveCompany},d.createElement(Ds,{isNew:!(e.company&&e.company.id)}))}function Us(e){var t=Object(vn.useDispatch)(),n=i.useBasicFetch(Gi(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(Ms,{company:n.data,saveCompany:function(n,r){return i.fetch(t,Zi(e.id,n,r))}}))}function Fs(){var e=Object(vn.useDispatch)();return d.createElement(Ms,{saveCompany:function(t,n){i.fetch(e,Wi(t,(function(e){n(),r.AppLinkHelper.trigger({application:l.PEOPLE,action:a.Companies.EDIT_COMPANY,args:[e.id]})}),n))}})}var Vs,zs=n(125);function Bs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hs(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qs(e){return(qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)"}(Vs||(Vs={}));var Js,$s={isNumber:function(e){return $s.isType(e,"number")},isString:function(e){return $s.isType(e,"string")},isType:function(e,t){return qs(e)===t}},Ys=n(14),Ks=n.n(Ys);function Gs(e){return function(e){if(Array.isArray(e))return Ws(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ws(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ws(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ws(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qs(e,t){return Jr.isObject(e)&&e.hasOwnProperty(t)&&$s.isString(e[t])}function Xs(e,t,n){return function(r){var o=r.value;if(o.length||n(),!(o.length<e.activationLength)){if(e.local){var a=mn(e.getLocalSuggestions)?e.getLocalSuggestions(o,e.local):(c=o,u=e.local,s=e.valueKey,(l=c.trim().toLowerCase()).length?u.filter((function(e){return!(!Qs(e,s)||!$s.isString(e[s]))&&e[s].trim().toLowerCase().includes(l)})):[]);t((function(e){return Object.assign(Object.assign({},e),Zs({},Js.Local,a))}))}var c,u,s,l;e.getRemoteUrl&&function(e,t,n){var r=mn(e)&&e(t);r&&i.ajaxRequest({resource:r,type:xr.GET,success:n,error:function(){}})}(e.getRemoteUrl,o,(function(n){return t((function(t){return Object.assign(Object.assign({},t),Zs({},Js.Remote,mn(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n))}))}))}}}function el(e,t,n,r,i,o){var a=function(t){return e[t]||[]},c=t?a(Js.Recent):[],u=a(Js.Local),s=a(Js.Remote),l=[];c.length&&l.push({title:n,data:c});var f=[].concat(Gs(u),Gs(s));return Number.isInteger(o)&&l.length>o&&f.slice(0,o),mn(i)?l.push.apply(l,Gs(i(f))):l.push({title:r,data:f}),l}function tl(e){return e.data}function nl(e){if(e.title)return d.createElement("strong",null,e.title)}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote"}(Js||(Js={}));var rl={container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded ".concat(Ks.a.suggestionsContainerOpen),suggestionsList:"list-unstyled m-0",suggestion:"cursor-pointer py-1 px-2",suggestionHighlighted:Ks.a.suggestionHighlighted,sectionContainer:"border-bottom py-1 ".concat(Ks.a.sectionContainer)};function il(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(rl,e)}var ol,al,cl=n(15),ul=n(32),sl=n.n(ul),ll=n(33),fl=n.n(ll),pl=n(34),dl=n.n(pl),ml=n(35),hl=n.n(ml),yl=(n(36),n(37),n(38)),vl=n.n(yl),bl=n(39),gl=n.n(bl),Sl=n(40),El=n.n(Sl),Ol=n(41),jl=n.n(Ol),Cl=n(42),wl=n.n(Cl),Al=n(43),Il=n.n(Al),Tl=n(44),kl=n.n(Tl),_l=n(45),Pl=n.n(_l),Ll=n(46),xl=n.n(Ll),Nl=n(47),Rl=n.n(Nl),Dl=n(48),Ml=n.n(Dl),Ul=n(49),Fl=n.n(Ul),Vl=n(50),zl=n.n(Vl),Bl=n(51),Hl=n.n(Bl),ql=n(52),Jl=n.n(ql),$l=n(53),Yl=n.n($l),Kl=n(54),Gl=n.n(Kl),Wl=n(55),Zl=n.n(Wl),Ql=n(56),Xl=n.n(Ql),ef=n(57),tf=n.n(ef),nf=(n(58),n(59)),rf=n.n(nf),of=n(60),af=n.n(of),cf=n(61),uf=n.n(cf),sf=(n(62),n(63),n(64)),lf=n.n(sf),ff=n(65),pf=n.n(ff),df=n(66),mf=n.n(df),hf=n(67),yf=n.n(hf),vf=n(68),bf=n.n(vf),gf=n(69),Sf=n.n(gf),Ef=(n(70),n(71)),Of=n.n(Ef),jf=n(72),Cf=n.n(jf),wf=n(73),Af=n.n(wf),If=n(74),Tf=n.n(If),kf=n(75),_f=n.n(kf),Pf=n(76),Lf=n.n(Pf),xf=n(77),Nf=n.n(xf),Rf=(n(78),n(79)),Df=n.n(Rf),Mf=n(80),Uf=n.n(Mf),Ff=n(81),Vf=n.n(Ff),zf=n(82),Bf=n.n(zf),Hf=n(83),qf=n.n(Hf),Jf=n(84),$f=n.n(Jf),Yf=n(85),Kf=n.n(Yf),Gf=n(86),Wf=n.n(Gf),Zf=n(87),Qf=n.n(Zf),Xf=n(88),ep=n.n(Xf),tp=n(89),np=n.n(tp),rp=n(90),ip=n.n(rp),op=n(91),ap=n.n(op),cp=(n(92),n(93),n(94),n(95)),up=n.n(cp),sp=(n(96),n(97),n(98),n(99),n(100)),lp=n.n(sp),fp=n(101),pp=n.n(fp),dp=(n(102),n(103),n(104),n(105)),mp=n.n(dp),hp=n(106),yp=n.n(hp),vp=n(107),bp=n.n(vp),gp=n(108),Sp=n.n(gp),Ep=n(109),Op=n.n(Ep),jp=n(110),Cp=n.n(jp),wp=n(111),Ap=n.n(wp),Ip=(n(112),n(113),n(114),n(115)),Tp=n.n(Ip),kp=n(116),_p=n.n(kp),Pp=[sl.a,dl.a,hl.a,vl.a,jl.a,wl.a,Il.a,kl.a,El.a,fl.a,Pl.a,xl.a,Rl.a,Ml.a,Fl.a,gl.a,zl.a,Hl.a,Jl.a,tf.a,Yl.a,Gl.a,Zl.a,Xl.a,rf.a,mf.a,Kf.a,Qf.a,Wf.a,ap.a,ep.a,np.a,ip.a,Tf.a,Lf.a,_f.a,af.a,uf.a,Cf.a,Af.a,Of.a,lf.a,yf.a,Uf.a,Vf.a,bf.a,Sf.a,Bf.a,pf.a,Df.a,qf.a,$f.a,Nf.a,lp.a,pp.a,up.a,bp.a,yp.a,mp.a,Sp.a,Cp.a,Op.a,Ap.a,_p.a,Tp.a];function Lp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.AddToPlaylists="add-to-playlist",e.Caret="caret",e.Delete="delete",e.Edit="edit",e.NoEdit="no-edit",e.Close="close",e.Folder="folder",e.Resources="resources",e.More="more",e.Bell="bell",e.Plus="plus",e.Search="search",e.Share="share",e.Upload="upload",e.Preview="preview",e.CircleCheck="circle-check",e.Down="down",e.Right="right",e.UpDown="up-down",e.ChevronUp="chevron-up",e.ChevronDown="chevron-down",e.ChevronLeft="chevron-left",e.ChevronRight="chevron-right",e.VisibleOff="visible-off",e.VisibleOn="visible-on",e.PublisherArchive="publisher-archive",e.Play="play",e.PlayCircle="play-circle",e.ArrowLeft="arrow-left",e.CheckCircleOutline="check-circle-o",e.CheckCircle="check-circle",e.Check="check",e.Lock="lock",e.Link="link",e.Info="info",e.Question="question",e.Star="star",e.StarOutline="star-o",e.Archive="archive",e.Warning="warning",e.WarningOutline="warning-o",e.NewWindow="new-window",e.File="file",e.FilePDF="file-pdf",e.FileExcel="file-excel",e.FilePowerpoint="file-ppt",e.FileWord="file-word",e.FileImg="file-img",e.FileZip="file-zip",e.Enter="enter",e.Calendar="calendar",e.CloseCaption="close-caption",e.CloseCaptionBadge="close-caption-badge",e.Playlist="playlist",e.Handle="handle",e.Subject="subject",e.Series="series",e.EditClickView="edit-clickview",e.Heart="heart",e.HeartOutline="heart-outline",e.WhiteWave="white-wave",e.Cog="cog",e.Video="video",e.Compass="compass",e.History="history",e.Tag="tag"}(ol||(ol={}));var xp;function Np(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}m.extend(cl.config,{autoReplaceSvg:!1,autoAddCss:!1,familyPrefix:"cv",autoA11y:!0,observeMutations:!1,replacementClass:"cv-svg",keepOriginalSource:!1}),(al=cl.library).add.apply(al,function(e){if(Array.isArray(e))return Lp(e)}(xp=Pp)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(xp)||function(e,t){if(e){if("string"==typeof e)return Lp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lp(e,t):void 0}}(xp)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var Rp=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"getSvg",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.faIconLookup(e,t),r=this.getIcon(n,t);if(r&&(!r||r.html.length))return r.html.pop()}},{key:"getIcon",value:function(e,t){return cl.icon(e,t.iconOptions||{})}},{key:"faIconLookup",value:function(e,t){var n=t.prefix,r=void 0===n?"cv":n;return cl.findIconDefinition({prefix:r,iconName:e})}}])&&Np(t.prototype,n),r&&Np(t,r),e}().Instance,Dp=ol,Mp=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return Math.floor(Math.random()*Math.floor(e))};function Up(e){var t=e.title,n=e.placement,r=e.trigger,i=e.children;return d.createElement(as.OverlayTrigger,{placement:n,overlay:d.createElement(as.Tooltip,{id:"".concat(t,"-").concat(Mp())},t),trigger:r},d.createElement("span",null,i))}Up.defaultProps={trigger:["hover","click","focus"],placement:"top"};var Fp;function Vp(e){var t=e.svgName,n=e.className,r=void 0===n?"d-inline-block svg-container":n,i=e.tagName,o=void 0===i?"span":i,a=e.size,c=void 0===a?Fp.Standard:a,u=e.onClick,s=e.title,l=e.tooltipPlacement,f=void 0===l?"right":l,p=o,m={dangerouslySetInnerHTML:{__html:Rp.getSvg(t)},className:"".concat(r," ").concat(c),onClick:mn(u)?u:null};return s?d.createElement(Up,{title:s,placement:f},d.createElement(p,Object.assign({},m))):d.createElement(p,Object.assign({},m))}!function(e){e.Standard="std",e.Small="sm",e.Medium="md",e.Large="lg",e.ExtraLarge="xlg"}(Fp||(Fp={}));var zp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},Bp=function(e){var t="d-inline-block svg-container";return mn(e)?t+" cursor-pointer":t};function Hp(e){var t=e.onClickSearchIcon,n=e.searchIconPlacement,r=e.className,i=zp(e,["onClickSearchIcon","searchIconPlacement","className"]),o="form-control ".concat(Ks.a.input),a="input-group-text bg-white";"right"===n&&(o+=" border-right-0",a+=" pl-0"),"left"===n&&(o+=" border-left-0",a+=" pr-0"),r&&(o+=" ".concat(r));var c=function(){return d.createElement("div",{className:a},d.createElement(Vp,{svgName:Dp.Search,size:Fp.Small,onClick:t,className:Bp(t)}))};return d.createElement("div",{className:"input-group"},"left"===n&&d.createElement("div",{className:"input-group-prepend"},d.createElement(c,null)),d.createElement("input",Object.assign({className:o},i)),"right"===n&&d.createElement("div",{className:"input-group-append"},d.createElement(c,null)))}function qp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $p=mn;function Yp(e){var t,n,r,i=(t=e.initialSuggestions,n=e.recentSearches,Zs(r={},Js.Recent,n),Zs(r,Js.Local,t),Zs(r,Js.Remote,[]),r),o=qp(d.useState(e.initialQuery||""),2),a=o[0],c=o[1],u=qp(d.useState(i),2),s=u[0],l=u[1],f=function(e){var t=Bs(Object(d.useState)(window.matchMedia(e).matches),2),n=t[0],r=t[1];return Object(d.useEffect)((function(){var t=window.matchMedia(e);t.matches!==n&&r(t.matches);var i=function(){return r(t.matches)};return t.addListener(i),function(){return t.removeListener(i)}}),[e]),n}(Vs.XS),p=function(){l(i)},m=function(t){t.preventDefault(),$p(e.onSubmit)&&e.onSubmit(a)};return d.createElement("form",{onSubmit:m},d.createElement(zs,{suggestions:el(s,!a,e.recentSearchHeading||Ls.getPhrase("shared.searchBar","recentSearchHeading"),e.suggestionsHeading,e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:Xs(e,l,p),onSuggestionsClearRequested:function(){e.alwaysRenderSuggestions||p()},onSuggestionSelected:function(t,n){var r=n.suggestion;e.clearQueryOnSelect&&c(""),e.onSuggestionSelected(r)},getSuggestionValue:function(t){return e.updateQueryOnSelection?function(e,t){return Qs(t,e)?t[e]:""}(e.valueKey,t):a},renderSuggestion:function(t){return $p(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return Qs(t,e)?d.createElement(d.Fragment,null,t[e]):d.createElement(d.Fragment,null)}(e.valueKey,t)},alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!f,inputProps:{placeholder:e.placeholder||Ls.getPhrase("shared.searchBar","placeholder"),value:a,onChange:function(t,n){var r=n.newValue;c(r),$p(e.onQueryChange)&&e.onQueryChange(r)},onKeyDown:function(t){8===t.keyCode&&e.onBackspace&&!a&&e.onBackspace()},autoFocus:!!e.autoFocusInput,onClickSearchIcon:!!e.submitOnClickSearchIcon&&m,searchIconPlacement:e.searchIconPlacement},renderInputComponent:Hp,theme:il(e.theme),multiSection:!0,renderSectionTitle:nl,getSectionSuggestions:tl}))}function Kp(e){var t=e.appLink,n=e.className,i=e.children,o=e.tag,a=void 0===o?"a":o;if(!t)return d.createElement("span",{className:n||""},i);var c=e.onClick;c||(c=function(e){e.preventDefault(),r.AppLinkHelper.trigger(t)});var u={onClick:c,href:r.AppLinkHelper.getHref(t),className:n};return d.createElement(a,Object.assign({},u),i)}function Gp(e){var t=e.backToName,n=e.appLink;return d.createElement(Kp,{appLink:n,className:"d-inline-flex align-items-center"},d.createElement(Vp,{svgName:Dp.ArrowLeft,size:Fp.Small}),d.createElement("span",{className:"ml-1"},"Back to ".concat(t)))}function Wp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zp(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Yp.defaultProps={updateQueryOnSelection:!0,valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialSuggestions:[],searchIconPlacement:"right"};var Qp=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Xp(e){var t=e.selected,n=e.onToggle,r=Qp(e,["selected","onToggle"]),i=Wp(d.useState(t),2),o=i[0],a=i[1];d.useEffect((function(){return a(t)}),[t]);return d.createElement(as.Form.Check,Object.assign({type:"checkbox",id:"checkbox-".concat(Mp()),checked:o,onChange:function(){a(!o),n(!o)}},r))}var ed,td,nd,rd,id=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function od(e){var t=e.onFileSelect,n=e.acceptMultiple,r=e.mimeType,i=e.label,o=e.error,a=e.touched,c=id(e,["onFileSelect","acceptMultiple","mimeType","label","error","touched"]),u="custom-file-input cursor-pointer";o&&a&&(u+=" is-invalid");var s=Object.assign({type:"file",className:u,onChange:function(e){var n=e.currentTarget.files;n&&n.length&&mn(t)&&t(n)},autoComplete:"off",value:"",multiple:!!n},r?{accept:r}:{});return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"custom-file"},d.createElement(Gu,Object.assign({},s,c),e.children),d.createElement(as.Form.Label,{className:"custom-file-label",htmlFor:c.id},i)))}!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(ed||(ed={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners"}(td||(td={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(nd||(nd={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(rd||(rd={}));var ad,cd,ud=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}};function sd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(cd||(cd={}));var ld,fd=(sd(ad={},td.Banners,cd.Banner),sd(ad,td.Thumbnails,cd.Thumbnail),ad),pd=function(e){return"/v1/category-map/".concat(e)},dd={createUrl:function(e,t){return dd._createUrl(e,t)},createBannerUrl:function(e,t,n){return e&&e.url?dd._createUrl(e.url,n):dd._createCategoryMappedUrl(t,n)},Rfc3986EncodeURIComponent:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)},_createCategoryMappedUrl:function(e,t){var n=e.fallbackBaseUrl,r=e.fallbackCategoryName,i=e.type,o=ud(n,"".concat(pd(fd[i]))),a=Object.assign({name:dd.Rfc3986EncodeURIComponent(r)},t);return dd._createUrl(o,a)},_createUrl:function(e,t){if(e){if(Jr.isEmpty(t))return e;var n=$.param(t),r=-1===e.indexOf("?")?"?":"&";return ud(e,"".concat(r).concat(n))}},legacyCreateThumbnailUrl:function(e,t){if(!e)return"";var n;if(e&&(n=e instanceof r.Model?e.get("url"):"string"==typeof e?e:e.url)){var i=Object.assign({size:ed.Small,bgColor:"000"},t);return dd._createUrl(n,i)}}};function md(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hd=(md(ld={},td.Thumbnails,{width:1280,height:720}),md(ld,td.Banners,{width:3600,height:666}),md(ld,td.Covers,{width:1080,height:1080}),md(ld,td.Posters,{width:1e3,height:1500}),md(ld,td.TallPosters,{width:1080,height:1920}),md(ld,td.HeroBanners,{width:1920,height:640}),ld),yd={onFileSelect:function(e,t,n){if(t&&t.length){var r=new FileReader;r.addEventListener("load",(function(){return yd.onReaderLoad(r,e,n)})),r.readAsDataURL(t[0])}},onReaderLoad:function(e,t,n){var r=new Image;r.src=e.result;var i=hd[t].width,o=hd[t].height;r.addEventListener("load",(function(){yd.isImageValid(t,r)&&mn(n)?n(r):alert("Image too small: minimum dimensions are ".concat(i," x ").concat(o))}))},isImageValid:function(e,t){var n=hd[e].width,r=hd[e].height;return!(n&&t.width<n)&&!(r&&t.height<r)}},vd={isItemActive:function(e,t){return t||(t=r.AppLinkHelper.getCurrentAppLink()),t.application===e.appLink.application&&(Array.isArray(e.activeActions)?e.activeActions.includes(t.action):t.action===e.appLink.action)}},bd=function(e){return Object.values(e).every((function(e){return!!e}))},gd=function(e,t){return!!e&&!!t&&e.toString()===t.toString()},Sd=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function Ed(e){return function(e){if(Array.isArray(e))return Od(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Od(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Od(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Od(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var jd={find:function(e,t){if(e&&e.children&&e.children.length)for(var n=function e(n){if(gd(n.id,t))return n;var r=n.children;if(r&&r.length)for(var i=0;i<r.length;i++){var o=e(r[i]);if(o)return o}},r=0;r<e.children.length;r++){var i=n(e.children[r]);if(i)return i}},getPath:function(e,t){for(var n=[t],r=function(e){return e.hasOwnProperty("parentIds")&&Array.isArray(e.parentIds)&&e.parentIds.length?e.parentIds[0]:e.hasOwnProperty("parentId")?e.parentId:null},i=r(t);i;){var o=jd.find(e,i);o&&(n=[o].concat(Ed(n))),i=o?r(o):null}return n}},Cd=function(e){return e&&e.groups?e.groups.map((function(e){return e.name})):[]};function wd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ad(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ad(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ad(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Id,Td=d.createContext(void 0),kd=function(e){var t=e.children,n=wd(d.useState(),2),r=n[0],i=n[1],o=wd(d.useState(!1),2),a=o[0],c=o[1],u=wd(d.useState(),2),s=u[0],l=u[1],f={getDataUrl:function(){var e=r;return i(null),e},setDataUrl:i,imageUploaded:a,getImage:function(){var e=s;return l(null),c(!1),e},setImage:function(e){l(e),c(!0)}};return d.createElement(Td.Provider,{value:f},t)};function _d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pd(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ld(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xd=(Ld(Id={},td.Thumbnails,"Thumbnail"),Ld(Id,td.Banners,"Banner"),Ld(Id,td.Avatars,"Avatar"),Ld(Id,td.Logos,"Logo"),Ld(Id,td.Covers,"Cover"),Ld(Id,td.Posters,"Poster"),Ld(Id,td.TallPosters,"Tall Poster"),Ld(Id,td.HeroBanners,"Hero Banner"),Id);function Nd(e){var t,n=Vu(),i=Nu(null===(t=n)||void 0===t?void 0:t.values,e.fieldName),o=d.useContext(Td),a=o.setDataUrl,c=o.getImage,s=o.imageUploaded,l=_d(d.useState(!1),2),f=l[0],p=l[1],m=_d(d.useState(i),2),h=m[0],y=m[1],v=_d(d.useState(!1),2),b=v[0],g=v[1];function S(t){p(!0),a(t.src),r.AppLinkHelper.trigger({application:e.application,action:e.uploadAction,args:[e.imageType]})}d.useEffect((function(){if(f){var t,r=c();if(r)p(!1),y(r),t=r,mn(e.setSelectedImage)?e.setSelectedImage(t):n&&n.setFieldValue(e.fieldName,{fileId:t.id,fileIdType:rd.ImageAPIv2})}}),[s]);var E=e.label||xd[e.imageType]||"Image";return d.createElement("div",{className:"form-group"},d.createElement("div",{className:"form-control h-auto py-2"},d.createElement("label",null,E),d.createElement("em",{className:"ml-1 text-muted"},"(Minimum dimensions are ".concat(hd[e.imageType].width,"px")+" x ".concat(hd[e.imageType].height,"px)")),d.createElement(od,{label:"Choose a ".concat(E.toLowerCase()),name:"image",mimeType:u.IMAGES,onFileSelect:function(t){return yd.onFileSelect(e.imageType,t,S)}}),!!h&&!!h.url&&d.createElement(d.Fragment,null,!b&&d.createElement("div",{className:"pb-2 ".concat(e.imageType===td.Banners?"w-100":"w-50")},d.createElement("img",{src:dd.createUrl(h.url),className:"img img-fluid"})),d.createElement("div",{className:"d-flex justify-content-center"},d.createElement(Vp,{svgName:b?Dp.ChevronDown:Dp.ChevronUp,size:Fp.Large,className:"svg-container cursor-pointer",onClick:function(){return g(!b)},title:b?"Show image":"Hide image",tooltipPlacement:"top"})))))}var Rd,Dd=n(126),Md=n.n(Dd);function Ud(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Fd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fd(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e[e.NoRestrictions=0]="NoRestrictions",e[e.RestrictToCanvas=1]="RestrictToCanvas"}(Rd||(Rd={}));var Vd,zd,Bd,Hd,qd,Jd,$d,Yd,Kd,Gd,Wd,Zd,Qd,Xd,em,tm,nm,rm,im,om,am,cm=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function um(e){var t=e.dataUrl,n=e.minHeight,r=e.minWidth,i=e.onCrop,o=e.onCancel,a=d.useRef(),c=d.useRef(),u=Ud(d.useState(!1),2),s=u[0],l=u[1],f=Ud(d.useState(!1),2),p=f[0],m=f[1];return d.useEffect((function(){var e=new Image;e.src=t;var i=a.current.offsetWidth/e.width;return c.current=new Md.a(a.current,{viewMode:Rd.RestrictToCanvas,autoCropArea:1,aspectRatio:r/n,minCropBoxWidth:r*i,minCropBoxHeight:n*i,ready:function(){return l(!0)}}),function(){return c.current.destroy()}}),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement("img",{ref:a,src:t,className:"img img-fluid mw-100"})),d.createElement("div",{className:"d-flex justify-content-end border-top pt-3"},d.createElement(as.Button,{variant:"link",onClick:o},"Cancel"),d.createElement(Ss,{onClick:function(){if(s){m(!0);var e=c.current.getCroppedCanvas().toDataURL(function(e){var t=e.match(cm);if(t)return t[1]}(t));mn(i)&&i(e)}},disabled:!s,showSpinner:p},"Crop")))}function sm(e){return(sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pm(e,t){return(pm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=hm(e);if(t){var i=hm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mm(this,n)}}function mm(e,t){return!t||"object"!==sm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hm(e){return(hm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.Stream="cv_product_stream",e.WebPlayerStream="cv_product_webplayer_stream",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(Vd||(Vd={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Restriction="restriction",e.Interactive="interactive",e.PDF="pdf",e.CustomerSetting="customer_setting",e.StaffRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.Upload="upload",e.SearchResults="search_results",e.Audience="audience",e.User="target_user"}(zd||(zd={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.VideoItemPreview="video_item_preview",e.VideoDetails="video_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.StaffRequestDetails="staff_request_details",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.TeacherManager="teacher_manager",e.TeacherManagerListItem="teacher_manager_list_item",e.StudentManager="student_manager",e.StudentManagerListItem="student_manager_list_item",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ClassroomOverview="classroom_overview",e.ClassroomOverviewStudentListItem="classroom_overview_student_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.PlayPage="play_page",e.FloatingPlayer="floating_player",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.MyUploads="my_uploads"}(Bd||(Bd={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard"}(Hd||(Hd={})),function(e){e.PageLoad="page_load"}(qd||(qd={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(Jd||(Jd={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}($d||($d={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}(Yd||(Yd={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(Kd||(Kd={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit"}(Gd||(Gd={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Thumbnail="thumbnail",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open"}(Wd||(Wd={})),function(e){e.LibraryReview="library_review"}(Zd||(Zd={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(Qd||(Qd={})),function(e){e.Edit="edit"}(Xd||(Xd={})),function(e){e.Image="image",e.User="user"}(em||(em={})),function(e){e.On="on",e.Off="off"}(tm||(tm={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(nm||(nm={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(rm||(rm={})),function(e){e.Video="videos",e.Folder="categories",e.Series="series",e.Tags="tags"}(im||(im={})),function(e){e[e.V1=1]="V1"}(om||(om={})),function(e){e.Analytics="AnalyticsService",e.Context="ContextService"}(am||(am={}));var ym,vm=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pm(e,t)}(a,e);var t,n,i,o=dm(a);function a(){var e;return lm(this,a),(e=o.apply(this,arguments)).contextHistory=[],e}return t=a,i=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"initialize",value:function(){this.listenTo(v.SHELL,r.EventNames.ROUTE,this.setContext)}},{key:"setContext",value:function(e){this.contextHistory.length>=5&&this.contextHistory.unshift(),this.contextHistory.push({pageLoad:!this.contextHistory.length,appLink:e})}},{key:"getCurrentContext",value:function(){if(this.contextHistory.length)return this.contextHistory[this.contextHistory.length-1]}},{key:"fromPageLoad",value:function(){return 1===this.contextHistory.length}},{key:"name",get:function(){return am.Context}}])&&fm(t.prototype,n),i&&fm(t,i),a}(r.Service));!function(e){e.Inlet="event:inlet",e.Outlet="event:outlet"}(ym||(ym={}));var bm="global:analytics";function gm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Sm=om.V1,Em=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.data=n,this.actionContext=r,this.eventVersion=i||Sm}var t,n,i;return t=e,(n=[{key:"isType",value:function(e){return e===this.type}},{key:"enrich",value:function(e,t){this.validateKey(e),this[e]=t}},{key:"get",value:function(e){if(e&&this[e])return this[e]}},{key:"validateKey",value:function(e){"type"!==e&&"data"!==e||r.ErrorHelper.throw(new Qe("".concat(e," is not a valid key"))),this[e]&&r.ErrorHelper.throw(new Qe("Event already contains an enrichment named ".concat(e)))}}])&&gm(t.prototype,n),i&&gm(t,i),e}(),Om=function(e,t,n,r){h.Radio.channel(bm).trigger(ym.Inlet,new Em(e,t,n,r))};function jm(){var e=vm.getCurrentContext().appLink;return m.isObject(e)||r.ErrorHelper.throw(new Qe("Applink does not exist. Check current context.")),e.application.replace(":","-")}function Cm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.location,n=e.entity,i=e.workflowPhase,o=void 0===i?null:i,a=e.descriptor,c=void 0===a?null:a;return t||r.ErrorHelper.throw(new Qe("location must be set.")),n||r.ErrorHelper.throw(new Qe("entity must be set.")),{productArea:jm(),location:t,entity:n,descriptor:c,workflowPhase:o}}function wm(){return r.LocationUtils.GetCurrentPath()+r.LocationUtils.GetCurrentQueryString()}var Am={logUserAction:function(e,t){if(function(e){return!(!m.isArray(e)||!m.every(e,(function(e){return m.isObject(e)})))||!!m.isObject(e)}(e)&&m.isObject(t)){var n=Am.buildUserActionEvent(t),r=n.userAction,i=n.action,o=n.eventVersion;Om(r,e,i,o)}},logNavigate:function(e,t){var n=Object.assign({currentLocation:wm(),appLink:e},t);Om(Vd.Navigate,n)},mergeOptions:function(e,t){return m.extend({},e,t)},buildActionContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Cm(e)},buildUserActionEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionType,n=e.eventVersion,r=t,i=Cm(e);return{userAction:r,action:i,eventVersion:n}},buildCurrentLocation:function(){return wm()},buildSearchEvent:function(e,t){return{data:{query:e},action:Cm({entity:zd.Video,location:Bd.SearchBar,descriptor:t})}},buildInstantSearchEvent:function(e,t,n){var r;n===im.Series&&(r=zd.Series),n===im.Folder&&(r=zd.Folder),n===im.Tags&&(r=zd.Tag),n===im.Video&&(r=zd.Video);var i={instant:{},query:e};return t.id&&(i.instant.selectedId=t.id),t.name&&(i.instant.selectedName=t.name),{data:i,action:Cm({entity:r,location:Bd.SearchBar})}},mapInteractionType:function(e){switch(e){case rm.DragDrop:return Qd.DragDrop;case rm.FileSelect:return Qd.FileSelect;default:return}}};function Im(e,t){return t?{application:e.application,action:e.action,args:e.args,params:Object.assign({},e.params,{cursor:t})}:null}function Tm(e){var t=e.appLink,n=e.cursors,r=e.className;function i(e){Am.logUserAction({page:e},{location:Bd.Pagination,entity:zd.Pagination,actionType:Vd.Navigate,workflowPhase:Hd.Complete})}return d.createElement(xs.Provider,{value:"shared.pagination"},d.createElement("div",{className:r},d.createElement(Kp,{appLink:Im(t,n.previous),className:"btn btn-secondary mr-1 ".concat(n.previous?"":"disabled"),onClick:function(){return i("previous")}},d.createElement(Ns,{phrase:"previous"})),d.createElement(Kp,{appLink:Im(t,n.next),className:"btn btn-secondary ".concat(n.next?"":"disabled"),onClick:function(){return i("next")}},d.createElement(Ns,{phrase:"next"}))))}function km(e){if(!e.collection)return d.createElement(d.Fragment,null);var t=e.collection,n=t.data,r=t.pagination;return d.createElement(d.Fragment,null,!!n&&d.createElement(Vm,{objects:n,getObjectAppLink:e.getObjectAppLink,newObjectAppLink:e.newObjectAppLink,objectName:e.objectName}),!!r&&!!r.cursors&&d.createElement(Tm,{cursors:r.cursors,appLink:e.collectionAppLink}))}Tm.defaultProps={className:"py-2"};var _m=n(22),Pm=n.n(_m);function Lm(e){if(!e.actions||!e.actions.length)return d.createElement(d.Fragment,null);var t="actions-dropdown-".concat(Mp()),n="px-0 ".concat(Pm.a.dropdownToggle);return e.dropdownToggleClassName&&(n+=" ".concat(e.dropdownToggleClassName)),d.createElement(as.Dropdown,{className:e.className?e.className:"",alignRight:!0},d.createElement(as.Dropdown.Toggle,{as:"button",type:"button",id:t,className:n},d.createElement(Vp,{svgName:Dp.More,size:Fp.Small})),d.createElement(as.Dropdown.Menu,null,e.actions.map((function(e,t){return d.createElement(Kp,{key:t,appLink:e.appLink,className:(n=e.className,r="dropdown-item",n&&(r+=" ".concat(n)),r)},e.label);var n,r}))))}Lm.defaultProps={dropdownToggleClassName:"btn btn-light"};var xm=n(18),Nm=n.n(xm);function Rm(e){var t=e.svgName,n=e.children,r=e.appLink,i=e.className,o=e.onClick,a="".concat(i," ").concat(Nm.a.iconButton);a+=" ".concat(n?Nm.a.iconWithText:Nm.a.iconOnly);var c=d.createElement(Vp,{svgName:t,className:Nm.a.svg});return r?d.createElement(Kp,{appLink:r,className:a,onClick:o},c,n):d.createElement("button",{className:a,onClick:o},c,n)}function Dm(e){var t=e.actionOptions,n=t.onClick,r=t.appLink,i=t.svgName,o=t.tooltip,a="ml-2";return e.actionOptions.className&&(a+=" ".concat(e.actionOptions.className)),o?d.createElement(Up,{title:o},d.createElement(Rm,{appLink:r,svgName:i,onClick:n,className:a},e.children)):i?d.createElement(Rm,{onClick:n,appLink:r,svgName:i,className:a},e.children):r?d.createElement(Kp,{onClick:n,appLink:r,className:a},e.children):d.createElement("button",{onClick:n,className:a},e.children)}function Mm(e){var t=[],n=[];e.actions.forEach((function(e){e.button?t.push(e):n.push(e)}));var r="d-flex";return e.className&&(r+=" ".concat(e.className)),d.createElement("div",{className:r},d.createElement(d.Fragment,null,!!t.length&&d.createElement("span",{className:Pm.a.buttonList},t.map((function(e,t){return d.createElement(Dm,{key:t,actionOptions:e},e.label)}))),e.sortComponent?e.sortComponent:"",!!n.length&&d.createElement(Lm,{actions:n,className:!!t.length&&"ml-2",dropdownToggleClassName:e.actionsDropdownClassName})))}function Um(e){var t=e.object,n=e.actions;return d.createElement("div",{className:"d-flex justify-content-between py-2"},!!t&&d.createElement("h5",null,t.name),!!n&&d.createElement("span",null,d.createElement(Mm,{actions:n})))}function Fm(e){return d.createElement("tr",null,d.createElement("td",null,d.createElement(Kp,{appLink:e.appLink},e.object.name)),d.createElement("td",null))}function Vm(e){return d.createElement(as.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Name"),d.createElement("th",null,d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Kp,{appLink:e.newObjectAppLink},d.createElement(Vp,{svgName:Dp.Plus,size:Fp.Small}),d.createElement("span",null,"New ".concat(e.objectName))))))),d.createElement("tbody",null,e.objects.map((function(t){return d.createElement(Fm,{key:t.id,object:t,appLink:e.getObjectAppLink(t)})}))))}function zm(e){var t=e.objects,n=e.getAppLink,r=e.emptyMessage;return t?t.length?d.createElement("ul",{className:"list-unstyled"},t.map((function(e,t){return d.createElement("li",{key:t,className:"border rounded mb-3"},d.createElement(Kp,{appLink:n(e),className:"d-block p-3"},e.name))}))):d.createElement("div",{className:"py-3"},d.createElement("p",null,r)):d.createElement(d.Fragment,null)}zm.defaultProps={emptyMessage:"There is nothing here."};function Bm(e){var t=Vu();return d.createElement(ds,{as:"select",label:"Rating",name:"rating",id:"rating",value:t.values.rating&&t.values.rating.id,onChange:function(e){return t.setFieldValue("rating",e.target.value?{id:e.target.value}:{})},disabled:e.disabled},d.createElement(d.Fragment,null,d.createElement("option",{value:""},"Please select a rating"),e.ratings.map((function(e,t){return d.createElement("option",{key:t,value:e.id},function(e){return"".concat(e.name).concat(e.code?" (".concat(e.code,")"):"")}(e))}))))}function Hm(e){var t=e.tabs,n=e.isItemActive;return d.createElement(as.Nav,{fill:!0,variant:"tabs"},t.map((function(e,t){return d.createElement(as.Nav.Item,{key:t},d.createElement(Kp,{appLink:e.appLink,className:(r=n(e),r?"nav-link active":"nav-link")},e.label));var r})))}Hm.defaultProps={isItemActive:vd.isItemActive};var qm=n(8),Jm=n.n(qm);function $m(e){var t=e.name,n=e.appLink,r=e.onSelect,i=e.isDisabled,o=e.className,a=e.actions,c=Jm.a.text;return o&&(c+=" ".concat(o)),i?d.createElement("a",{className:"".concat(c," text-muted ").concat(Jm.a.disabled)},t):d.createElement(d.Fragment,null,n?d.createElement(Kp,{appLink:n,className:c},t):d.createElement("a",{onClick:r,className:c},t),!!a&&d.createElement(Mm,{className:Jm.a.actions,actions:a}))}function Ym(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Km(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Km(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Km(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gm(e){var t=e.tree,n=e.selectedIds,r=e.getAppLink,i=e.onSelect,o=e.isDisabled,a=e.actions,c=Array.isArray(n)&&n.some((function(e){return gd(t.id,e)})),u=d.useMemo((function(){return Array.isArray(n)&&n.some((function(e){return jd.find(t,e)}))}),[t,n]),s=Ym(d.useState(u),2),l=s[0],f=s[1],p=!!t.children&&!!t.children.length,m={name:t.name,appLink:mn(r)?r(t):null,onSelect:mn(i)?function(){return i(t)}:null,isDisabled:!!mn(o)&&o(t),className:c&&Jm.a.selected||u&&Jm.a.parentOfSelected,actions:!!a&&a.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(t)})}))};return d.createElement("li",{className:"position-relative".concat(l?"":" ".concat(Jm.a.collapsed))},d.createElement("div",{className:"position-relative"},d.createElement("span",{className:Jm.a.node},p&&d.createElement(Vp,{svgName:Dp.ChevronDown,size:Fp.Small,className:"svg-container ".concat(Jm.a.chevron),onClick:function(){return f(!l)}}),d.createElement($m,Object.assign({},m))),l&&d.createElement(Zm,Object.assign({},e))))}var Wm=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Zm(e){var t=e.tree,n=Wm(e,["tree"]);return t&&t.children?d.createElement("ul",{className:"m-0 p-0 ".concat(Jm.a.tree)},t.children.map((function(e){return d.createElement(Gm,Object.assign({key:e.id,tree:e},n))}))):d.createElement(d.Fragment,null)}var Qm={getChord:function(e,t){return jd.getPath(e,t).map((function(e){return e.name})).join(" -> ")},getState:function(e,t){var n={};return Array.isArray(e)&&e.forEach((function(e){var r,i,o,a=jd.find(t,e);a&&(n=Object.assign((r={},i=e,o=Qm.getChord(t,a),i in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,r),n))})),n}};function Xm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return eh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eh(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var th=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function nh(e){var t=e.onSelect,n=e.label,r=e.hideCollapseBtn,i=e.collapse,o=e.noSelectionMessage,a=e.isNodeDisabled,c=e.getSelectedItemAppLink,u=th(e,["onSelect","label","hideCollapseBtn","collapse","noSelectionMessage","isNodeDisabled","getSelectedItemAppLink"]),s=u.tree,l=u.selectedIds,f=Xm(d.useState(Qm.getState(l,s)),2),p=f[0],m=f[1];d.useEffect((function(){return m(Qm.getState(l,s))}),[l,s]);var h=Xm(d.useState(!!i),2),y=h[0],v=h[1];d.useEffect((function(){return v(!!i)}),[i]);var b=!r||!!n;return d.createElement(d.Fragment,null,b&&d.createElement("div",{className:"pb-2"},!!n&&d.createElement("label",{className:"m-0"},n),!r&&d.createElement("a",{className:"float-right cursor-pointer",onClick:function(){return v(!y)}},y?"Expand":"Collapse")),!y&&d.createElement("div",{className:"py-2 border-top"},d.createElement(Zm,Object.assign({onSelect:function(e){return mn(t)&&t(e)},isDisabled:a},u))),(!Jr.isEmpty(p)||!!o)&&d.createElement("div",{className:"py-2 border-top"},d.createElement("label",null,"Selected:"),d.createElement("ul",{className:"m-0"},Jr.isEmpty(p)?d.createElement("li",null,o):Object.keys(p).map((function(e,t){return d.createElement("li",{key:t},mn(c)?d.createElement(Kp,{appLink:c(e)},p[e]):p[e])})))))}var rh=n(23);var ih=function(e){return e&&!(e.data&&e.data.length)},oh=function(e){return e&&e.data&&e.data.length},ah=function(e){var t="bg-white";return e&&(t+=" ".concat(e)),t};function ch(e){var t=e.video,n=e.getVideoAppLink,r=e.getVideoActions,i=e.className,o=void 0===i?"":i,a=e.itemNumber,c=mn(n)&&n(t);return d.createElement("tr",{className:ah(o)},!!a&&d.createElement("td",null,d.createElement("span",null,a)),d.createElement("td",null,c?d.createElement(Kp,{appLink:c},t.name):t.name),mn(r)&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(Mm,{actions:r(t)}))))}var uh=Object(rh.SortableElement)((function(e){return d.createElement(ch,Object.assign({sortable:!0},e))})),sh=n(11),lh=n.n(sh),fh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},ph=function(e){var t=e.sortable,n=e.getVideoActions;return d.createElement("thead",null,d.createElement("tr",null,!!t&&d.createElement("th",null,"#"),d.createElement("th",null,"Name"),!!n&&d.createElement("th",null)))},dh=d.forwardRef((function(e,t){var n=e.videos,r=e.sortable,i=fh(e,["videos","sortable"]);return d.createElement("tbody",{ref:t},!ih(n)&&n.data.map((function(e,t){return r?d.createElement(uh,Object.assign({key:e.id,index:t,itemNumber:t+1,video:e,className:lh.a.draggableVideoItem},i)):d.createElement(ch,Object.assign({video:e},i))})))}));var mh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},hh=Object(rh.SortableContainer)((function(e){var t=e.forwardedRef,n=mh(e,["forwardedRef"]);return d.createElement(dh,Object.assign({sortable:!0,ref:t},n))})),yh=function(e){return function(t){var n=t.node,r=e.current;if(r){r.classList.add(lh.a.sortingContainer);var i=r.querySelector(".".concat(lh.a.draggedVideoItem));n.childNodes.forEach((function(e,t){return i.childNodes[t].style.width="".concat(e.offsetWidth,"px")}))}}},vh=function(e,t){return function(n){var r=e.current;r&&r.classList.remove(lh.a.sortingContainer),t(n.oldIndex,n.newIndex)}};function bh(e){var t=e.onSortEnd,n=e.emptyMessage,r=mh(e,["onSortEnd","emptyMessage"]),i=d.useRef();return ih(e.videos)?d.createElement("div",null,n):d.createElement(as.Table,{responsive:!0},d.createElement(ph,Object.assign({sortable:!0},e)),d.createElement(hh,Object.assign({forwardedRef:i,onSortStart:yh(i),onSortEnd:vh(i,t),lockAxis:"y",lockToContainerEdges:!0,distance:1,helperClass:lh.a.draggedVideoItem,helperContainer:function(){return i.current}},r)))}function gh(e){var t=e.alias,n=e.onDelete;return d.createElement("li",{className:"list-group-item d-flex justify-content-between"},t.name,d.createElement(Vp,{svgName:Dp.Delete,onClick:function(){return n(t.id)}}))}function Sh(e){var t=e.aliases,n=e.onDelete;return d.createElement("ul",{className:"list-group mb-3"},t?t.map((function(e){return d.createElement(gh,{key:e.id,alias:e,onDelete:n})})):d.createElement("span",null,"Currently there are no aliases for this object."))}bh.defaultProps={emptyMessage:"There are no videos in this list."};var Eh=Object(is.object)().shape({name:Object(is.string)().trim().max(255,"Name is too long").required("Name is required").default("")});function Oh(){var e=Vu(),t=ys(e);return d.createElement(Wu,null,d.createElement(ds,{label:"Create an alias",name:"name",id:"name",value:e.values.name,placeholder:"Add an alias"}),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Ss,{showSpinner:e.isSubmitting,type:"submit",disabled:!t},"Add")))}function jh(e){var t=e.onSave;return d.createElement(rs,{initialValues:{name:""},validationSchema:Eh,onSubmit:function(e,n){t(e,n)},resetOnSubmit:!0},d.createElement(Oh,null))}function Ch(e){var t=e.onSave,n=e.aliases,r=e.onDelete;return d.createElement("div",{className:"w-50"},d.createElement("h1",null,"Aliases"),d.createElement(Sh,{aliases:n,onDelete:r}),d.createElement(jh,{onSave:t}))}var wh=l.COMPANIES,Ah=function(e){return{application:wh,action:a.Companies.EDIT_COMPANY,args:[e.id]}},Ih=function(e){return r.AppLinkHelper.trigger(Ah(e))};function Th(e){var t=i.useBasicFetch(Ki(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(Yp,{placeholder:"Search for a company",onSuggestionSelected:Ih,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/companies/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(km,{collection:t&&t.data,collectionAppLink:{application:wh,action:a.Companies.COMPANIES},newObjectAppLink:{application:wh,action:a.Companies.NEW_COMPANY},getObjectAppLink:Ah,objectName:"Company"}))}function kh(e){return(kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ph(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lh(e,t,n){return t&&Ph(e.prototype,t),n&&Ph(e,n),e}function xh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nh(e,t)}function Nh(e,t){return(Nh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mh(e);if(t){var i=Mh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Dh(this,n)}}function Dh(e,t){return!t||"object"!==kh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mh(e){return(Mh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Uh,Fh,Vh=function(e){xh(n,e);var t=Rh(n);function n(){return _h(this,n),t.apply(this,arguments)}return Lh(n,[{key:"channelName",get:function(){return l.COMPANIES}},{key:"appRoutes",get:function(){return{"manage/companies(/)":"companies","manage/companies/new(/)":"newCompany","manage/companies/:id(/)":"editCompany"}}}]),n}(r.AppRouter),zh=function(e){xh(n,e);var t=Rh(n);function n(){return _h(this,n),t.apply(this,arguments)}return Lh(n,[{key:"companies",value:function(e){var t=e.cursor;this.layout.showChildView(Tn,d.createElement(Th,{cursor:t}))}},{key:"newCompany",value:function(){this.layout.showChildView(Tn,d.createElement(Fs,null))}},{key:"editCompany",value:function(e){this.layout.showChildView(Tn,d.createElement(Us,{id:e}))}},{key:"name",get:function(){return"Companies Application"}},{key:"channelName",get:function(){return l.COMPANIES}},{key:"layoutOptions",get:function(){return{name:s.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return Vh}}]),n}(r.Application),Bh=n(31);function Hh(e){return(Hh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jh(e,t){return(Jh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Kh(e);if(t){var i=Kh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yh(this,n)}}function Yh(e,t){return!t||"object"!==Hh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Kh(e){return(Kh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.Success="success",e.Warning="warning",e.Fail="danger",e.Info="info"}(Uh||(Uh={})),function(e){e.Success="Success! 🙌",e.Warning="Whoops...",e.Fail="Oops...",e.Info="FYI"}(Fh||(Fh={}));var Gh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jh(e,t)}(o,e);var t,n,r,i=$h(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e)}return t=o,(n=[{key:"initialize",value:function(){this.alertCollection=new Re,this.listenTo(v.ALERT,"remove:alert",this.removeAlert),this.showAlerts()}},{key:"showAlerts",value:function(){var e=h.Radio.channel(v.ALERT),t={collection:this.alertCollection};this.options.alertViewCtor&&(t=m.extend({},t,{ctor:this.options.alertViewCtor})),e.trigger("show:alert",t)}},{key:"removeAlert",value:function(e){this.alertCollection.remove(e),this.showAlerts()}},{key:"createAlert",value:function(e){this.alertCollection.length===this.options.maxAlerts&&this.alertCollection.shift(),e.id||(e=m.extend({},e,{id:this.generateUniqueAlertId()})),this.alertCollection.push(new _t(e)),this.showAlerts()}},{key:"clearAllAlerts",value:function(){this.alertCollection.reset(null)}},{key:"success",value:function(e){var t=this;return"string"==typeof e?m.bind((function(){return t.createAlert(m.extend({},t.options.defaultSuccessAlert,{message:e}))}),this):e.useXHR?m.bind((function(e,n){return t.createAlert(m.extend({},t.options.defaultSuccessAlert,{message:n}))}),this):m.bind((function(){return t.createAlert(m.extend({},t.options.defaultSuccessAlert,e))}),this)}},{key:"error",value:function(e){var t=this;return"string"==typeof e?m.bind((function(){return t.createAlert(m.extend({},t.options.defaultErrorAlert,{message:e}))}),this):e.useXHR?m.bind((function(e){return t.createAlert(m.extend({},t.options.defaultErrorAlert,{message:e.message}))}),this):m.bind((function(){return t.createAlert(m.extend({},t.options.defaultErrorAlertIL_DEFAULT,e))}),this)}},{key:"generateUniqueAlertId",value:function(){return m.uniqueId("alert_")}},{key:"name",get:function(){return js}},{key:"defaults",get:function(){return{maxAlerts:3}}}])&&qh(t.prototype,n),r&&qh(t,r),o}(Yt),Wh=n(9),Zh=n.n(Wh);function Qh(e){var t=e.alert,n=e.svgName,r=e.svgClassName,i=e.closeAlert,o=t.message,a=t.heading,c=t.appLink,u=t.appLinkText,s=t.appLinkClassName,l=void 0===s?"":s,f=Object(Os.sanitize)(o);return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-inline-block ".concat(Zh.a.icon)},d.createElement(Vp,{svgName:n,className:"svg-container ".concat(r)})),d.createElement("div",{className:"pl-2 d-inline-block ".concat(Zh.a.alertContent)},d.createElement("p",{className:"p-0 m-0 pb-1 ".concat(Zh.a.heading)},a),d.createElement("p",{className:"p-0 m-0 ".concat(Zh.a.message),dangerouslySetInnerHTML:{__html:f}}),!!c&&d.createElement(Kp,{className:l,appLink:c},u)),d.createElement("div",{className:"close d-inline-block cursor-pointer",role:"button","aria-hidden":"true",onClick:i},"×"))}function Xh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ey(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ey(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ey(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ty=function(e){switch(e.type){case Uh.Success:return Dp.CheckCircleOutline;case Uh.Fail:case Uh.Warning:return Dp.Warning;case Uh.Info:default:return Dp.Info}};function ny(e){var t=e.alert,n=e.closeAlert,r=Xh(d.useState(!0),2),i=r[0],o=r[1],a=d.useRef();d.useEffect((function(){i?a.current=window.setTimeout(n,3e3):clearTimeout(a.current)}),[i]);var c="text-".concat(t.type.toLowerCase());return d.createElement("li",{className:"bg-white mt-2 p-2 show clearfix ".concat(Zh.a.alertItem),onMouseEnter:function(){return o(!1)},onMouseLeave:function(){return o(!0)}},d.createElement(Qh,{alert:t,svgName:ty(t),svgClassName:c,closeAlert:n}))}function ry(e){var t=e.alerts,n=e.removeAlert;return d.createElement("div",{className:Zh.a.alertBox},d.createElement(Bh.TransitionGroup,{component:"ul",className:"".concat(Zh.a.alertList," list-unstyled")},t&&t.map((function(e,t){return d.createElement(Bh.CSSTransition,{key:t,timeout:200,classNames:"alert"},d.createElement(ny,{alert:e,closeAlert:function(){return n(e.id)}}))}))))}function iy(){return d.createElement("div",{className:"text-center p-5"},d.createElement(as.Spinner,{as:"div",animation:"border",role:"status"}))}function oy(e){var t=e.title,n=e.closeButton,r=void 0===n||n,i=e.closePopup,o=e.onEntered,a=e.showLoadingSpinner,c=Object.assign({show:!0,onHide:i},mn(o)?{onEntered:o}:{});return d.createElement(as.Modal,Object.assign({},c),!!t&&d.createElement(as.Modal.Header,{closeButton:r},d.createElement(as.Modal.Title,null,t)),a?d.createElement(iy,null):d.createElement(as.Modal.Body,null,e.children))}var ay,cy,uy=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function sy(e){var t=e.buttons;return d.createElement("div",{className:"d-flex justify-content-end border-top pt-3 px-3 mx-n3"},t.map((function(e,t){return function(e,t){var n=e.buttonText,r=e.type,i=void 0===r?"button":r,o=e.isSpinnerButton,a=e.showSpinner,c=void 0!==a&&a,u=e.className,s=uy(e,["buttonText","type","isSpinnerButton","showSpinner","className"]),l=Object.assign({key:t,type:i,className:"ml-2".concat(u?" ".concat(u):"")},s);return o?d.createElement(Ss,Object.assign({showSpinner:c},l),n):d.createElement(as.Button,Object.assign({},l),n)}(e,t)})))}!function(e){e.Boolean="System.Boolean",e.String="System.String",e.StaffRequest="ClickView.DomainApi.Models.Options.Enums.StaffRequestOption, ClickView.DomainApi.Models, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null",e.Long="System.Int64"}(ay||(ay={})),function(e){e[e.Permanent=0]="Permanent",e[e.Temporary=1]="Temporary"}(cy||(cy={}));var ly={namespace:"domain_options"},fy=function(){return"/api/domain/v3/settings/types"},py=function(e){return"/api/domain/v3/settings/types/".concat(e)},dy=function(){return"/api/domain/v3/settings/types"},my=function(e){return"/api/domain/v3/settings/types/".concat(e)},hy=function(e){return"/api/domain/v3/settings/types/".concat(e)},yy="domain:options",vy="domain:option",by="update:domain:option",gy="delete:domain:option",Sy=function(){return{key:yy,url:fy(),normalizeOptions:ly}},Ey=function(e){return{key:"".concat(vy,":").concat(e),url:py(e),normalizeOptions:ly}},Oy=function(e,t,n){return e.type===ay.String&&(e=wy(e)),{key:vy,url:dy(),data:e,type:xr.POST,success:t,error:n,invalidationKeys:[yy],normalizeOptions:ly}},jy=function(e,t){return e.type===ay.String&&(e=wy(e)),{key:"".concat(by,":").concat(e.id),url:my(e.id),data:e,type:xr.PUT,always:t,formatData:function(){return e},normalizeOptions:ly}},Cy=function(e,t){return{key:"".concat(gy,":").concat(e),url:hy(e),type:xr.DELETE,invalidationKeys:[yy],normalizeOptions:ly,success:t}};function wy(e){var t=e.defaultValue;if('"'===t)return Object.assign(Object.assign({},e),{defaultValue:'"'.concat(t,'"')});var n=t.charAt(0),r=t.charAt(t.length-1);return'"'!==n&&(t='"'.concat(t)),'"'!==r&&(t="".concat(t,'"')),Object.assign(Object.assign({},e),{defaultValue:t})}function Ay(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Iy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Iy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Iy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ty(e){var t=Ay(d.useState(!1),2),n=t[0],o=t[1],c=i.useBasicFetch(Ey(e.optionId)),u=Object(vn.useDispatch)(),s=function(){e.closePopup(),r.AppLinkHelper.trigger({application:l.DOMAIN_OPTIONS,action:a.DomainOptions.DOMAIN_OPTIONS})};return d.createElement(oy,{title:"Delete Domain Option",closePopup:e.closePopup,showLoadingSpinner:!c.data},c.data&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,c.data.name),"?")),d.createElement(sy,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){o(!0),i.fetch(u,Cy(e.optionId,s))},buttonText:"Yes, delete this domain option",isSpinnerButton:!0,showSpinner:n}]})))}var ky,_y=function(e){return{application:l.DOMAIN_OPTIONS,action:a.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]}},Py={application:l.DOMAIN_OPTIONS,action:a.DomainOptions.NEW_DOMAIN_OPTION};function Ly(){var e=i.useBasicFetch(Sy());if(!e.data)return d.createElement(d.Fragment,null);var t=e.data.map((function(e){return e.displayName&&(e.name=e.displayName),e}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a domain option type to edit:"),d.createElement(Kp,{appLink:Py,className:"d-block"},d.createElement(Vp,{svgName:Dp.Plus,size:Fp.Small}),d.createElement("span",null,"New Domain Option"))),d.createElement(zm,{objects:t,getAppLink:_y}))}!function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience"}(ky||(ky={}));var xy=is.object().shape({id:is.string(),name:is.string().trim().max(64,"Name is too long").required("Name is required").default(""),displayName:is.string().trim().max(255,"Display name is too long").required("Display name is required").default(""),type:is.mixed().required("Type is required").default(ay.Boolean),entityType:is.mixed().required("Entity type is required").default(ky.Customer),kind:is.mixed().required("Kind is required").default(cy.Temporary),defaultValue:is.mixed().required("Default value is required").default("false")}).noUnknown();function Ny(e){var t=e.type,n=e.defaultValue;if(!t)return d.createElement(d.Fragment,null);var r={label:"Default Value",name:"defaultValue",id:"defaultValue",value:n};return t===ay.Boolean?d.createElement(ds,Object.assign({as:"select"},r),d.createElement("option",{value:"true"},"True"),d.createElement("option",{value:"false"},"False")):t===ay.Long||t===ay.StaffRequest?d.createElement(ds,Object.assign({as:"input",type:"number"},r)):t===ay.String?d.createElement(ds,Object.assign({as:"input"},r)):void 0}var Ry=[ky.Customer,ky.User];function Dy(e){var t=null===e.id||void 0===e.id,n=Vu(),r=ys(n);return d.createElement(Wu,null,d.createElement(ds,{label:"Name (snake_case)",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this domain option",autoFocus:!0}),d.createElement(ds,{label:"Display Name",type:"text",name:"displayName",id:"displayName",value:n.values.displayName,placeholder:"Enter a display name for this domain option"}),d.createElement(ds,{as:"select",label:"Kind",name:"kind",id:"kind",value:n.values.kind},Jr.getEnumKeys(cy).map((function(e){return d.createElement("option",{key:e,value:cy[e]},e)}))),d.createElement(ds,{as:"select",label:"Entity",name:"entityType",id:"entityType",value:n.values.entityType},Jr.getEnumKeys(ky).filter((function(e){return Ry.includes(ky[e])})).map((function(e){return d.createElement("option",{key:e,value:ky[e]},e)}))),d.createElement(ds,{as:"select",label:"Type",name:"type",id:"type",value:n.values.type},Jr.getEnumKeys(ay).map((function(e){return d.createElement("option",{key:e,value:ay[e]},e)}))),d.createElement(Ny,{type:n.values.type,defaultValue:n.values.defaultValue}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Ss,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(as.Button,{as:Kp,variant:"danger",appLink:{application:l.DOMAIN_OPTIONS,action:a.DomainOptions.DELETE_DOMAIN_OPTION,args:[e.id]}},"Delete")))}function My(e){return d.createElement(rs,{initialValues:e.domainOption,validationSchema:xy,onSubmit:e.saveDomainOption},d.createElement(Dy,{id:e.domainOption&&e.domainOption.id}))}function Uy(){var e=Object(vn.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Domain Option"),d.createElement(My,{saveDomainOption:function(t,n){i.fetch(e,Oy(t,(function(e){n(),r.AppLinkHelper.trigger({application:l.DOMAIN_OPTIONS,action:a.DomainOptions.EDIT_DOMAIN_OPTION,args:[e.id]})}),n))}}))}function Fy(e){var t=e.optionId,n=i.useBasicFetch(Ey(t)),r=Object(vn.useDispatch)();return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Domain Option"),n.data&&d.createElement(My,{domainOption:n.data,saveDomainOption:function(e,t){return i.fetch(r,jy(e,t))}}))}function Vy(e){return(Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function By(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hy(e,t,n){return t&&By(e.prototype,t),n&&By(e,n),e}function qy(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jy(e,t)}function Jy(e,t){return(Jy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ky(e);if(t){var i=Ky(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Yy(this,n)}}function Yy(e,t){return!t||"object"!==Vy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ky(e){return(Ky=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gy=function(e){qy(n,e);var t=$y(n);function n(){return zy(this,n),t.apply(this,arguments)}return Hy(n,[{key:"channelName",get:function(){return l.DOMAIN_OPTIONS}},{key:"appRoutes",get:function(){return{"developer/options(/)":"domainOptions","developer/options/new(/)":"newDomainOption","developer/options/:id(/)":"editDomainOption"}}},{key:"appLinks",get:function(){return["deleteDomainOption"]}}]),n}(r.AppRouter),Wy=function(e){qy(n,e);var t=$y(n);function n(){return zy(this,n),t.apply(this,arguments)}return Hy(n,[{key:"domainOptions",value:function(){this.layout.showChildView(Tn,d.createElement(Ly,null))}},{key:"newDomainOption",value:function(){this.layout.showChildView(Tn,d.createElement(Uy,null))}},{key:"editDomainOption",value:function(e){this.layout.showChildView(Tn,d.createElement(Fy,{optionId:e}))}},{key:"deleteDomainOption",value:function(e){this.layout.showChildView(kn,d.createElement(Ty,Object.assign({optionId:e},this.getPopupProps())))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(v.ALERT).trigger("remove:alert",e)};this.layout.showChildView(_n,d.createElement(ry,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Domain Options Application"}},{key:"channelName",get:function(){return l.DOMAIN_OPTIONS}},{key:"layoutOptions",get:function(){return{name:s.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return Gy}}]),n}(r.Application),Zy=function(e){return e?"".concat("/api/master/v2/people","?cursor=").concat(e):"/api/master/v2/people"},Qy=function(e){return"/api/master/v2/objects/".concat(e)},Xy=function(){return"/api/master/v2/people"},ev=function(e){return"/api/master/v2/objects/".concat(e)},tv="people",nv="person",rv="update:person",iv=function(e){return{key:"".concat(tv).concat(e?":".concat(e):""),url:Zy(e)}},ov=function(e){return{key:"".concat(nv,":").concat(e),url:Qy(e)}},av=function(e,t,n){return{key:nv,url:Xy(),data:e,type:xr.POST,success:t,error:n,invalidationKeys:[tv]}},cv=function(e,t,n){return{key:"".concat(rv,":").concat(e),url:ev(e),data:t,type:xr.PUT,always:n}},uv=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown();function sv(e){var t=Vu();return d.createElement(Wu,null,d.createElement(ds,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this person",autoFocus:!0}),d.createElement(Rs,{isNew:e.isNew}))}function lv(e){return d.createElement(rs,{initialValues:e.person,validationSchema:uv,onSubmit:e.savePerson},d.createElement(sv,{isNew:!(e.person&&e.person.id)}))}function fv(e){var t=Object(vn.useDispatch)(),n=i.useBasicFetch(ov(e.id));return d.createElement(d.Fragment,null,!!n.data&&d.createElement(lv,{person:n.data,savePerson:function(n,r){return i.fetch(t,cv(e.id,n,r))}}))}function pv(){var e=Object(vn.useDispatch)();return d.createElement(lv,{savePerson:function(t,n){i.fetch(e,av(t,(function(e){n(),r.AppLinkHelper.trigger({application:l.PEOPLE,action:a.People.EDIT_PERSON,args:[e.id]})}),n))}})}var dv=l.PEOPLE,mv=function(e){return{application:dv,action:a.People.EDIT_PERSON,args:[e.id]}},hv=function(e){return r.AppLinkHelper.trigger(mv(e))};function yv(e){var t=i.useBasicFetch(iv(e.cursor));return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3 w-50"},d.createElement(Yp,{placeholder:"Search for a person",onSuggestionSelected:hv,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/people/instant/raw","?q=").concat(e)},activationLength:2})),d.createElement(km,{collection:t&&t.data,collectionAppLink:{application:dv,action:a.People.PEOPLE},newObjectAppLink:{application:dv,action:a.People.NEW_PERSON},getObjectAppLink:mv,objectName:"Person"}))}function vv(e){return(vv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sv(e,t,n){return t&&gv(e.prototype,t),n&&gv(e,n),e}function Ev(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ov(e,t)}function Ov(e,t){return(Ov=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wv(e);if(t){var i=wv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cv(this,n)}}function Cv(e,t){return!t||"object"!==vv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wv(e){return(wv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Av=function(e){Ev(n,e);var t=jv(n);function n(){return bv(this,n),t.apply(this,arguments)}return Sv(n,[{key:"channelName",get:function(){return l.PEOPLE}},{key:"appRoutes",get:function(){return{"manage/people(/)":"people","manage/people/new(/)":"newPerson","manage/people/:id(/)":"editPerson"}}}]),n}(r.AppRouter),Iv=function(e){Ev(n,e);var t=jv(n);function n(){return bv(this,n),t.apply(this,arguments)}return Sv(n,[{key:"people",value:function(e){var t=e.cursor;this.layout.showChildView(Tn,d.createElement(yv,{cursor:t}))}},{key:"newPerson",value:function(){this.layout.showChildView(Tn,d.createElement(pv,null))}},{key:"editPerson",value:function(e){this.layout.showChildView(Tn,d.createElement(fv,{id:e}))}},{key:"name",get:function(){return"People Application"}},{key:"channelName",get:function(){return l.PEOPLE}},{key:"layoutOptions",get:function(){return{name:s.CURATOR_LAYOUT}}}],[{key:"router",get:function(){return Av}}]),n}(r.Application);function Tv(e){return(Tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _v(e,t){return(_v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xv(e);if(t){var i=xv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lv(this,n)}}function Lv(e,t){return!t||"object"!==Tv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xv(e){return(xv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_v(e,t)}(o,e);var t,n,r,i=Pv(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).constructors={},e.destructors={},e.instances={},e.singletonInstances={},e.referenceCounts={},e}return t=o,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"registerDataService",value:function(e,t){var n=this;this.validateConstructor(e);var r=e.prototype.name;return this.referenceCounts[r]=0,this.constructors[r]=function(){return new e({dataProvider:n.getInstance(t.dataProvider),cache:n.getInstance(t.cache),bootstrapData:t.bootstrapData,defaultErrorHandler:t.defaultErrorHandler,alertService:t.alertService})},this.destructors[r]=function(){n.instances[r]?n.instances[r].destroy():J.throw(new Qe("Trying to destroy a ".concat(r," instance that has already been destroyed"))),n.releaseInstance(t.dataProvider),n.releaseInstance(t.cache)},this}},{key:"registerInstance",value:function(e,t){var n=this;this.validateConstructor(e);var r=e.prototype.name;return this.referenceCounts[r]=0,this.constructors[r]=function(){return new e(t)},this.destructors[r]=function(){return m.isFunction(n.instances[r].destroy)&&n.instances[r].destroy()},this}},{key:"registerSingleton",value:function(e){var t=e.name;return this.singletonInstances[t]=e,this}},{key:"getInstance",value:function(e,t){var n=this;return this.singletonInstances[e]?this.singletonInstances[e]:(this.constructors[e]||J.throw(new Qe("".concat(e," was not registered with ").concat(this.name))),this.referenceCounts[e]++,t&&this.listenTo(t,"destroy",(function(){return n.releaseInstance(e)})),this.instances[e]||(this.instances[e]=this.constructors[e]()),this.instances[e])}},{key:"releaseInstance",value:function(e){var t=this;if(this.instances[e])return window.setTimeout((function(){t.referenceCounts[e]--,t.referenceCounts[e]<1&&(t.destructors[e](),delete t.instances[e])}),0),this}},{key:"validateConstructor",value:function(e){var t=e.prototype.name;t||J.throw(new Qe("Classes registered with ".concat(this.name," must have a unique name property."))),this.constructors[t]&&J.throw(new Qe("A class with the name: ".concat(t," has already been registered with ").concat(this.name)))}},{key:"name",get:function(){return"InstanceManager"}}])&&kv(t.prototype,n),r&&kv(t,r),o}(Yt).Instance;function Rv(e){var t,n;return t=e,n=Nv.getInstance(t),d.useEffect((function(){return function(){return Nv.releaseInstance(t)}})),n}function Dv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Mv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uv(e){var t=e.imageType,n=e.closePopup,r=d.useContext(Td),i=r.getDataUrl,o=r.setImage,a=Dv(d.useState(i()),1)[0],c=Dv(d.useState(!1),2),u=c[0],s=c[1],l=Rv(p.IMAGE_UPLOAD),f=function(e){o(e),n()},m={dataUrl:a,imageType:t,minWidth:hd[t].width,minHeight:hd[t].height,onCrop:function(e){return l.uploadBase64Image(e,t,f,n)},onCancel:n};return d.createElement(oy,{title:"Crop Image",closePopup:n,onEntered:function(){return s(!0)}},u&&d.createElement(um,Object.assign({},m)))}var Fv=function(e){var t=e.children;return d.createElement(kd,null,t)},Vv=function(){var e=Rv(js);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:Uh.Warning,heading:Fh.Warning,message:t})}}};function zv(e){var t=e.page,n=e.totalPages,r=$s.isNumber(t)&&t>0&&t<n&&t+1,i=$s.isNumber(t)&&t>1&&t-1,o={};if(r&&r<=n&&(o.next=r.toString()),i&&(o.previous=i.toString()),!Jr.isEmpty(o))return o}var Bv,Hv={convertLegacyPaginatedCollection:function(e){if(e)return{data:e.data,pagination:{cursors:zv(e.pagination),limit:e.pagination.pageSize}}}};!function(e){e.Developer="Curator Devs",e.Content="Content",e.Curator="Curators",e.Support="Support",e.SalesSupport="Sales Support"}(Bv||(Bv={}));var qv=function(){return[{value:"protected",access:"r"}]},Jv=function(e){return[Bv.Developer,Bv.Content].some((function(t){return Cd(e).includes(t)}))},$v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1";return{key:"playlists:".concat(e),url:"/ajax/playlists/curators?page=".concat(e),formatData:Hv.convertLegacyPaginatedCollection}},Yv=function(e,t){var n="/api/domain/v1/search/playlists?query=".concat(e);return t&&(n+="&filter={page:".concat(t,"}")),{key:"playlists:search:".concat(e).concat(t?":".concat(t):""),url:n,formatData:Hv.convertLegacyPaginatedCollection}},Kv=function(e){return{key:"playlist:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=cover,banner")}},Gv=function(e){var t=e.slice().sort();return{key:"playlists:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},Wv=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(t,"/playlists"),key:"playlist",data:Object.assign(Object.assign({},e),{permissions:qv()}),type:xr.POST,invalidationKeys:"playlists",success:n,error:r,always:i}},Zv=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:playlist:".concat(e),data:t,type:xr.PUT,success:n,error:r,always:i}},Qv=function(e,t,n,r){return{url:"/api/master/v1/playlists/".concat(e),key:"delete:playlist:".concat(e),type:xr.DELETE,invalidationKeys:"playlists",success:t,error:n,always:r}},Xv=function(e){return{key:"playlist:".concat(e,":videos"),url:"/api/master/v2/objects/".concat(e,"/videos?query={orderBy:orderindex,limit:100}")}},eb=function(e,t,n,r){return{key:"reorder:playlist",url:"/api/master/v1/objects/".concat(e,"/videos/reorder"),data:t,type:xr.PUT,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r}},tb=function(e,t,n,r,i){return{key:"remove:playlist:video",url:"/api/master/v1/playlists/".concat(e,"/dissociate/").concat(t),type:xr.DELETE,invalidationKeys:"playlist:".concat(e,":videos"),success:n,error:r,always:i}};function nb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return rb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rb(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ib(e){var t=Object(vn.useDispatch)(),n=Vv(),o=nb(d.useState(!1),2),c=o[0],u=o[1],s=i.useBasicFetch(Kv(e.playlistId));var f=[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0),i.fetch(t,Qv(e.playlistId,(function(){n.success("Successfully deleted playlist."),r.AppLinkHelper.trigger({application:l.PLAYLISTS,action:a.Playlists.PLAYLISTS})}),(function(){u(!1),n.error("Failed to delete playlist.")}),e.closePopup))},buttonText:"Yes, delete playlist",isSpinnerButton:!0,showSpinner:c}],p=!!s.data;return d.createElement(oy,{title:"Delete Playlist",closePopup:e.closePopup,showLoadingSpinner:!p},p&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,s.data.name),"?"),d.createElement("p",null,"Please ensure it is not being used in any widgets.")),d.createElement(sy,{buttons:f})))}var ob={url:"/api/currentUser",key:"currentuser"},ab=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:is.string().trim().max(65535,"Description is too long").default(""),cover:is.object().shape({fileId:is.string(),fileIdType:is.mixed(),url:is.string()}).default({}).noUnknown(),banner:is.object().shape({fileId:is.string(),fileIdType:is.mixed(),url:is.string()}).default({}).noUnknown()}).noUnknown(),cb=function(e,t){var n=l.PLAYLISTS,r=a.Playlists,i=[{label:"Edit Playlist Details",appLink:{application:n,action:r.EDIT_PLAYLIST,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_PLAYLIST_VIDEOS,args:[t]}}];return Jv(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_PLAYLIST_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_PLAYLIST_AUDIENCES,args:[t]}}]),i};function ub(e){var t=Vu(),n=ys(t);return d.createElement(Wu,null,d.createElement(ds,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this playlist",autoFocus:!0}),d.createElement(ds,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this playlist here"}),d.createElement(Nd,{imageType:td.Covers,fieldName:"cover",application:l.PLAYLISTS,uploadAction:a.Playlists.UPLOAD_IMAGE}),d.createElement(Nd,{imageType:td.Banners,fieldName:"banner",application:l.PLAYLISTS,uploadAction:a.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(Ss,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(Mm,{actions:e.actions})))}function sb(e){var t,n=e.playlist&&e.playlist.id;return d.createElement(rs,{initialValues:e.playlist,validationSchema:ab,onSubmit:e.savePlaylist},d.createElement(ub,{id:n,actions:!!n&&(t=n,[{label:"Delete playlist",appLink:{application:l.PLAYLISTS,action:a.Playlists.DELETE_PLAYLIST,args:[t]},className:"text-danger"}])}))}function lb(e){return d.createElement("div",{className:"py-2"},d.createElement(Hm,{tabs:cb(e.currentUser,e.playlistId),isItemActive:(t=e.activeAction,function(e){return e.appLink.action===t})}));var t}function fb(e){var t=Object(vn.useDispatch)(),n=Vv(),r=i.useBasicFetch(Kv(e.playlistId)),o=i.useBasicFetch(ob);return d.createElement(d.Fragment,null,!!o.data&&d.createElement(lb,{playlistId:e.playlistId,activeAction:a.Playlists.EDIT_PLAYLIST,currentUser:o.data}),!!r.data&&d.createElement(sb,{playlist:r.data,savePlaylist:function(r,o){i.fetch(t,Zv(e.playlistId,r,(function(){n.success("Successfully updated playlist.")}),(function(){n.error("Failed to update playlist.")}),o))}}))}var pb=function(e,t){var n=e.dataServiceName,r=e.eventPrefix,i=e.fetchData,o=e.setData,a=e.onError,c=e.deleteEventPrefix;if(mn(i)){if(mn(o)){var u=a&&mn(a),s=Nv.getInstance(n),l=h.Radio.channel(s.channelName),f="".concat(r,":request"),p="".concat(r,":sync"),d="".concat(r,":error"),m="".concat(r,":invalidate"),y=c&&"".concat(c,":sync"),v=function(){return t(!1)},b=function(){return t(!0)},g=function(){return t(!1)},S=function(){return l.off(m,g)};l.once(f,v),l.once(p,b),l.once(m,g),u&&l.once(d,a),y&&l.once(y,S);var E=i(s);return E&&(t(!0),e.setData(E)),function(){Nv.releaseInstance(n),l.off(f,v),l.off(p,b),l.off(m,g),u&&l.off(d,a),y&&l.off(y,S)}}J.throw(new Qe("A setData function must be passed to fetch"))}else J.throw(new Qe("A fetchData function must be passed to fetch"))};function db(e){return function(e){if(Array.isArray(e))return yb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||hb(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||hb(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hb(e,t){if(e){if("string"==typeof e)return yb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yb(e,t):void 0}}function yb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vb=function(e){return Array(Array.isArray(e)?e.length:0).fill(!1)};function bb(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=d.useState(vb(e)),i=mb(r,2),o=i[0],a=i[1];d.useEffect((function(){a(vb(e))}),db(t)),d.useEffect((function(){if(n){var t=[];return e&&e.forEach((function(e,n){t.push(pb(e,(function(e){e!==o[n]&&a(Li(o,n,e))})))})),function(){return t.forEach((function(e){return e()}))}}}),[o,n])}function gb(e){return function(e){if(Array.isArray(e))return Ob(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Eb(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||Eb(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Eb(e,t){if(e){if("string"==typeof e)return Ob(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ob(e,t):void 0}}function Ob(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jb(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=d.useState(!1),i=Sb(r,2),o=i[0],a=i[1];d.useEffect((function(){a(!1)}),gb(t)),d.useEffect((function(){if(n)return pb(e,a)}),[o,n])}var Cb,wb,Ab,Ib,Tb=function(e,t,n){return function(r){return e((function(e){var i=mn(n)?n:hn();return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,i(r,e)))}))}};!function(e){e[e.Subject=0]="Subject",e[e.Classification=1]="Classification"}(Cb||(Cb={})),function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos"}(wb||(wb={})),function(e){e.Root="0"}(Ab||(Ab={})),function(e){e.Root="root"}(Ib||(Ib={}));var kb,_b=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default(""),levelIds:is.array().of(is.string()).required("A level is required").default([])}).noUnknown();!function(e){e.Subject="Subject",e.Topic="Topic"}(kb||(kb={}));var Pb=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentIds:is.array().of(is.string()).default([Ib.Root]),subjectIds:is.array().of(is.string()).min(1,"A classification must be mapped to at least one subject").required("A classification must be mapped to at least one subject").default([]),type:is.mixed().required("Type is required").default(kb.Subject),emphasize:is.boolean().default(!1),comingSoon:is.boolean().default(!0),canBePreferred:is.boolean().default(!1),cover:is.object().shape({fileId:is.string(),fileIdType:is.mixed(),url:is.string()}).default({}).noUnknown(),banner:is.object().shape({fileId:is.string(),fileIdType:is.mixed(),url:is.string()}).default({}).noUnknown()}).noUnknown(),Lb=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default("")}).noUnknown(),xb=is.object().shape({name:is.string().max(255,"Name is too long").required("Name is required"),description:is.string().max(65535,"Description is too long").required("Description is required")}),Nb=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default(""),parentId:is.string().default(Ab.Root)}).noUnknown(),Rb={singularizeMemberType:function(e){switch(e){case wb.Playlists:return"playlist";case wb.Series:return"series";case wb.Videos:return"video"}},getMemberAppLink:function(e,t){var n=[t];switch(e){case wb.Playlists:return{application:l.PLAYLISTS,action:a.Playlists.EDIT_PLAYLIST,args:n};case wb.Series:return{application:l.SERIES,action:a.Series.EDIT_SERIES,args:n};case wb.Videos:return{application:l.VIDEOS,action:a.Videos.EDIT_VIDEO,args:n}}},getMemberActions:function(e,t,n,r){return[{label:"Remove ".concat(Rb.singularizeMemberType(n)),appLink:{application:l.SUBJECTS,action:t===Cb.Subject?a.Subjects.REMOVE_SUBJECT_MEMBER:a.Subjects.REMOVE_CLASSIFICATION_MEMBER,args:[e,r,n]},className:"text-danger"}]}},Db=function(){var e=l.SUBJECTS,t=a.Subjects;return[{label:"Classifications",appLink:{application:e,action:t.CLASSIFICATIONS},activeActions:[t.CLASSIFICATIONS,t.PRESENTATION_CLASSIFICATIONS,t.NEW_CLASSIFICATION,t.EDIT_CLASSIFICATION,t.EDIT_CLASSIFICATION_PLAYLISTS,t.EDIT_CLASSIFICATION_SERIES,t.EDIT_CLASSIFICATION_VIDEOS,t.DELETE_CLASSIFICATION,t.REMOVE_CLASSIFICATION_MEMBER]},{label:"Subjects",appLink:{application:e,action:t.SUBJECTS},activeActions:[t.SUBJECTS,t.NEW_SUBJECT,t.EDIT_SUBJECT,t.EDIT_SUBJECT_PLAYLISTS,t.EDIT_SUBJECT_SERIES,t.EDIT_SUBJECT_VIDEOS,t.SUBJECT_CLASSIFICATIONS,t.DELETE_SUBJECT,t.ADD_SUBJECT_MEMBERS,t.REMOVE_SUBJECT_MEMBER]},{label:"Audiences",appLink:{application:e,action:t.AUDIENCES},activeActions:[t.AUDIENCES,t.PRESENTATION_AUDIENCES,t.NEW_AUDIENCE,t.EDIT_AUDIENCE]},{label:"Levels",appLink:{application:e,action:t.LEVELS},activeActions:[t.LEVELS,t.NEW_LEVEL,t.EDIT_LEVEL]},{label:"Presentations",appLink:{application:e,action:t.PRESENTATIONS},activeActions:[t.PRESENTATIONS,t.NEW_PRESENTATION,t.EDIT_PRESENTATION]}]},Mb=function(e){var t=l.SUBJECTS,n=a.Subjects;return[{label:"Edit Subject Details",appLink:{application:t,action:n.EDIT_SUBJECT,args:[e]}},{label:"Classifications",appLink:{application:t,action:n.SUBJECT_CLASSIFICATIONS,args:[e]}},{label:"Playlists",appLink:{application:t,action:n.EDIT_SUBJECT_PLAYLISTS,args:[e]}},{label:"Series",appLink:{application:t,action:n.EDIT_SUBJECT_SERIES,args:[e]}},{label:"Videos",appLink:{application:t,action:n.EDIT_SUBJECT_VIDEOS,args:[e]}}]},Ub=function(e,t){var n=l.SUBJECTS,r=a.Subjects;return[{label:"Edit Classification Details",appLink:{application:n,action:r.EDIT_CLASSIFICATION,args:[e,t]}},{label:"Playlists",appLink:{application:n,action:r.EDIT_CLASSIFICATION_PLAYLISTS,args:[e,t]}},{label:"Series",appLink:{application:n,action:r.EDIT_CLASSIFICATION_SERIES,args:[e,t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_CLASSIFICATION_VIDEOS,args:[e,t]}}]};function Fb(e){return(Fb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vb(e){return function(e){if(Array.isArray(e))return zb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zb(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zb(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qb(e,t){return(qb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yb(e);if(t){var i=Yb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $b(this,n)}}function $b(e,t){return!t||"object"!==Fb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yb(e){return(Yb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kb=function(){return"/api/subjects/v1/subjects/tree"},Gb=function(e){return"/api/subjects/v1/subjects/".concat(e)},Wb=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/").concat(t,"?query={limit:100}")},Zb=function(e,t,n){var r="/api/subjects/v1/subjects/".concat(e,"/classifications"),i=[];return t&&i.push("presentationId=".concat(t)),n&&i.push("query=".concat(n,"{limit:100}")),i.length?"".concat(r,"?").concat(i.join("&")):r},Qb=function(){return"/api/subjects/v1/subjects"},Xb=function(e){return"/api/subjects/v1/subjects/".concat(e)},eg=function(e){return"/api/subjects/v1/subjects/".concat(e)},tg=function(e){return"/api/subjects/v1/objects/".concat(e,"/subjects")},ng=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/subjects?addToClassifications=").concat(!!t)},rg=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?addToClassifications=").concat(!!t)},ig=function(e,t){return"/api/subjects/v1/subjects/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},og=function(){return"/api/subjects/v1/presentations"},ag=function(e){return"/api/subjects/v1/presentations/".concat(e)},cg=function(){return"/api/subjects/v1/presentations"},ug=function(e){return"/api/subjects/v1/presentations/".concat(e)},sg=function(e){return"/api/subjects/v1/presentations/".concat(e,"/classifications/tree")},lg=function(e){return"/api/subjects/v1/classifications/".concat(e,"?query=cover,banner")},fg=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/").concat(t,"?query={limit:100}")},pg=function(){return"/api/subjects/v1/classifications"},dg=function(e){return"/api/subjects/v1/classifications/".concat(e)},mg=function(e){return"/api/subjects/v1/classifications/".concat(e)},hg=function(e){return"/api/subjects/v1/objects/".concat(e,"/classifications")},yg=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/classifications?presentationId=").concat(t)},vg=function(e){return"/api/subjects/v1/classifications/".concat(e,"/objects")},bg=function(e,t){return"/api/subjects/v1/classifications/".concat(e,"/objects?").concat(t.map((function(e){return"objectId=".concat(e)})).join("&"))},gg=function(){return"/api/subjects/v1/levels"},Sg=function(e){return"/api/subjects/v1/levels/".concat(e)},Eg=function(){return"/api/subjects/v1/levels"},Og=function(e){return"/api/subjects/v1/levels/".concat(e)},jg=function(e){return"/api/subjects/v1/objects/".concat(e,"/levels")},Cg=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/levels?addToAudiences=").concat(!!t)},wg=function(e){return"/api/subjects/v1/presentations/".concat(e,"/audiences")},Ag=function(e){return"/api/subjects/v1/audiences/".concat(e)},Ig=function(){return"/api/subjects/v1/audiences"},Tg=function(e){return"/api/subjects/v1/audiences/".concat(e)},kg=function(e){return"/api/subjects/v1/audiences/".concat(e)},_g=function(e){return"/api/subjects/v1/objects/".concat(e,"/audiences")},Pg=function(e,t){return"/api/subjects/v1/objects/".concat(e,"/audiences?presentationId=").concat(t)},Lg=function(e,t,n){var r="".concat(c.SUBJECT,":").concat(e);return t&&(r+=":".concat(t)),r+=":".concat(c.CLASSIFICATIONS),n&&(r+=":".concat(n)),r},xg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qb(e,t)}(o,e);var t,n,r,i=Jb(o);function o(){return Bb(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"getPresentations",value:function(e,t){return this.get({resource:og(),eventPrefix:c.PRESENTATIONS,expiryTime:Cr.STANDARD,callback:e,errorCallback:t})}},{key:"getPresentation",value:function(e,t,n){return this.get({resource:ag(e),eventPrefix:"".concat(c.PRESENTATION,":").concat(e),expiryTime:Cr.STANDARD,callback:t,errorCallback:n})}},{key:"createPresentation",value:function(e,t,n){return this.create({resource:cg(),data:e,callback:t,errorCallback:n,eventPrefix:c.PRESENTATION,invalidationKeys:[c.PRESENTATIONS],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully created presentation."),errorHandler:this.alertService.error("Failed to create presentation.")})}},{key:"updatePresentation",value:function(e,t,n,r){return this.update({resource:ug(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(c.UPDATE_PRESENTATION,":").concat(e),invalidationKeys:["".concat(c.PRESENTATION,":").concat(e),c.PRESENTATIONS],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully updated presentation."),errorHandler:this.alertService.error("Failed to update presentation.")})}},{key:"getSubjectTree",value:function(e,t){return this.get({resource:Kb(),formatData:function(e){return{children:e,name:Ab.Root,id:null}},eventPrefix:c.SUBJECTS,expiryTime:Cr.STANDARD,callback:e,errorCallback:t})}},{key:"getSubject",value:function(e,t,n){return this.get({resource:Gb(e),eventPrefix:"".concat(c.SUBJECT,":").concat(e),expiryTime:Cr.STANDARD,callback:t,errorCallback:n})}},{key:"getSubjectMemberIds",value:function(e,t,n,r){return this.get({resource:Wb(e,t),eventPrefix:"".concat(c.SUBJECT,":").concat(e,":").concat(t),expiryTime:Cr.STANDARD,callback:n,errorCallback:r})}},{key:"getSubjectClassifications",value:function(e,t,n,r,i){return this.get({resource:Zb(e,t,n),eventPrefix:Lg(e,t,n),expiryTime:Cr.STANDARD,callback:r,errorCallback:i})}},{key:"createSubject",value:function(e,t,n){return this.create({resource:Qb(),data:e,callback:t,errorCallback:n,eventPrefix:c.SUBJECT,invalidationKeys:[c.SUBJECTS],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully created subject."),errorHandler:this.alertService.error("Failed to create subject.")})}},{key:"updateSubject",value:function(e,t,n,r){return this.update({resource:Xb(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(c.UPDATE_SUBJECT,":").concat(e),invalidationKeys:["".concat(c.SUBJECT,":").concat(e),c.SUBJECTS],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully updated subject."),errorHandler:this.alertService.error("Failed to save subject.")})}},{key:"deleteSubject",value:function(e,t,n){var r=this;return this.delete({resource:eg(e),callback:t,errorCallback:n,eventPrefix:c.DELETE_SUBJECT,invalidationKeys:["".concat(c.SUBJECT,":").concat(e),c.SUBJECTS],successHandler:this.alertService.success("Successfully deleted subject."),errorHandler:function(e){var t,n=(null===(t=e)||void 0===t?void 0:t.code)===mi.Conflict?"Cannot delete a subject with child subjects and/or classifications.":"Failed to delete subject.";r.alertService.error(n)()}})}},{key:"getObjectSubjects",value:function(e,t,n,r){return this.get({resource:tg(e),eventPrefix:"".concat(t,":").concat(e,":").concat(c.SUBJECTS),expiryTime:Cr.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectSubjects",value:function(e,t,n,r,i,o){var a=Rb.singularizeMemberType(n),u=["".concat(n,":").concat(e,":").concat(c.SUBJECTS)];return r&&u.push("".concat(n,":").concat(e,":").concat(c.CLASSIFICATIONS)),u.push.apply(u,Vb(t.map((function(e){return"".concat(c.SUBJECTS,":").concat(e,":").concat(n)})))),this.update({resource:ng(e,r),data:t,callback:i,errorCallback:o,eventPrefix:"".concat(c.UPDATE_OBJECT_SUBJECTS,":").concat(e),invalidationKeys:u,successHandler:this.alertService.success("Successfully updated ".concat(a," subjects.")),errorHandler:this.alertService.error("Failed to update ".concat(a," subjects."))})}},{key:"addObjectsToSubject",value:function(e,t,n,r,i,o){var a=1===t.length?Rb.singularizeMemberType(n):n,u=["".concat(c.SUBJECT,":").concat(e,":").concat(n)].concat(Vb(t.map((function(e){return"".concat(n,":").concat(e,":").concat(c.SUBJECTS)}))),Vb(t.map((function(e){return"".concat(n,":").concat(e,":").concat(c.CLASSIFICATIONS)}))));return this.create({resource:rg(e,r),data:t,callback:i,errorCallback:o,eventPrefix:"".concat(c.ADD_TO_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:u,expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(a," to subject.")),errorHandler:this.alertService.error("Failed to add ".concat(a," to subject."))})}},{key:"removeObjectsFromSubject",value:function(e,t,n,r,i){var o=1===t.length?Rb.singularizeMemberType(n):n,a=["".concat(c.SUBJECT,":").concat(e,":").concat(n)].concat(Vb(t.map((function(e){return"".concat(n,":").concat(e,":").concat(c.SUBJECTS)}))));return this.delete({resource:ig(e,t),callback:r,errorCallback:i,eventPrefix:"".concat(c.REMOVE_FROM_SUBJECT,":").concat(e,":").concat(n),invalidationKeys:a,expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(o," from subject.")),errorHandler:this.alertService.error("Failed to remove ".concat(o," from subject."))})}},{key:"getClassificationTree",value:function(e,t,n){return this.get({resource:sg(e),formatData:function(e){return{children:e,name:Ib.Root,id:null}},eventPrefix:"".concat(c.CLASSIFICATIONS,":").concat(e),expiryTime:Cr.STANDARD,callback:t,errorCallback:n})}},{key:"getClassification",value:function(e,t,n){return this.get({resource:lg(e),eventPrefix:"".concat(c.CLASSIFICATION,":").concat(e),expiryTime:Cr.STANDARD,callback:t,errorCallback:n})}},{key:"getClassificationMembers",value:function(e,t,n,r){return this.get({resource:fg(e,t),eventPrefix:"".concat(c.CLASSIFICATION,":").concat(e,":").concat(t),expiryTime:Cr.STANDARD,callback:n,errorCallback:r})}},{key:"createClassification",value:function(e,t,n){return this.create({resource:pg(),data:e,callback:t,errorCallback:n,eventPrefix:c.CLASSIFICATION,invalidationKeys:[c.CLASSIFICATIONS],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully created classification."),errorHandler:this.alertService.error("Failed to create classification.")})}},{key:"updateClassification",value:function(e,t,n,r){return this.update({resource:dg(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(c.UPDATE_CLASSIFICATION,":").concat(e),invalidationKeys:["".concat(c.CLASSIFICATION,":").concat(e),c.CLASSIFICATIONS],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully updated classification."),errorHandler:this.alertService.error("Failed to save classification.")})}},{key:"deleteClassification",value:function(e,t,n){return this.delete({resource:mg(e),callback:t,errorCallback:n,eventPrefix:c.DELETE_CLASSIFICATION,invalidationKeys:["".concat(c.CLASSIFICATION,":").concat(e),c.CLASSIFICATIONS],successHandler:this.alertService.success("Successfully deleted classification"),errorHandler:this.alertService.error("Failed to delete classification")})}},{key:"getObjectClassifications",value:function(e,t,n,r){return this.get({resource:hg(e),eventPrefix:"".concat(t,":").concat(e,":").concat(c.CLASSIFICATIONS),expiryTime:Cr.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectClassifications",value:function(e,t,n,r,i,o){var a=Rb.singularizeMemberType(r),u=["".concat(r,":").concat(e,":").concat(c.CLASSIFICATIONS)];return u.push.apply(u,Vb(n.map((function(e){return"".concat(c.CLASSIFICATION,":").concat(e,":").concat(r)})))),this.update({resource:yg(e,t),data:n,callback:i,errorCallback:o,eventPrefix:"".concat(c.UPDATE_OBJECT_CLASSIFICATIONS,":").concat(e),invalidationKeys:u,successHandler:this.alertService.success("Successfully updated ".concat(a," classifications.")),errorHandler:this.alertService.error("Failed to update ".concat(a," classifications."))})}},{key:"addObjectsToClassification",value:function(e,t,n,r,i,o,a){var u=1===t.length?Rb.singularizeMemberType(n):n,s=["".concat(c.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&s.push(Lg(r,i,n)),s.push.apply(s,Vb(t.map((function(e){return"".concat(n,":").concat(e,":").concat(c.CLASSIFICATIONS)})))),this.create({resource:vg(e),data:t,callback:o,errorCallback:a,eventPrefix:"".concat(c.ADD_TO_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:s,expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully added ".concat(u," to classification.")),errorHandler:this.alertService.error("Failed to add ".concat(u," to classification."))})}},{key:"removeObjectsFromClassification",value:function(e,t,n,r,i,o,a){var u=1===t.length?Rb.singularizeMemberType(n):n,s=["".concat(c.CLASSIFICATION,":").concat(e,":").concat(n)];return r&&s.push(Lg(r,i,n)),s.push.apply(s,Vb(t.map((function(e){return"".concat(n,":").concat(e,":").concat(c.CLASSIFICATIONS)})))),this.delete({resource:bg(e,t),callback:o,errorCallback:a,eventPrefix:"".concat(c.REMOVE_FROM_CLASSIFICATION,":").concat(e,":").concat(n),invalidationKeys:s,expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully removed ".concat(u," from classification.")),errorHandler:this.alertService.error("Failed to remove ".concat(u," from classification."))})}},{key:"getLevels",value:function(e,t){return this.get({resource:gg(),eventPrefix:c.LEVELS,expiryTime:Cr.STANDARD,callback:e,errorCallback:t})}},{key:"getLevel",value:function(e,t,n){return this.get({resource:Sg(e),eventPrefix:"".concat(c.LEVEL,":").concat(e),expiryTime:Cr.STANDARD,callback:t,errorCallback:n})}},{key:"createLevel",value:function(e,t,n){return this.create({resource:Eg(),data:e,callback:t,errorCallback:n,eventPrefix:c.LEVEL,invalidationKeys:[c.LEVELS],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully created level."),errorHandler:this.alertService.error("Failed to create level.")})}},{key:"updateLevel",value:function(e,t,n,r){return this.update({resource:Og(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(c.UPDATE_LEVEL,":").concat(e),invalidationKeys:["".concat(c.LEVEL,":").concat(e),c.LEVELS],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully updated level."),errorHandler:this.alertService.error("Failed to save level.")})}},{key:"getObjectLevels",value:function(e,t,n,r){return this.get({resource:jg(e),eventPrefix:"".concat(t,":").concat(e,":").concat(c.LEVELS),expiryTime:Cr.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectLevels",value:function(e,t,n,r,i,o){var a=Rb.singularizeMemberType(n),u=["".concat(n,":").concat(e,":").concat(c.LEVELS)];return r&&u.push("".concat(n,":").concat(e,":").concat(c.AUDIENCES)),this.update({resource:Cg(e,r),data:t,callback:i,errorCallback:o,eventPrefix:"".concat(c.UPDATE_OBJECT_LEVELS,":").concat(e),invalidationKeys:u,successHandler:this.alertService.success("Successfully updated ".concat(a," levels.")),errorHandler:this.alertService.error("Failed to update ".concat(a," levels."))})}},{key:"getAudiences",value:function(e,t,n){return this.get({resource:wg(e),callback:t,errorCallback:n,eventPrefix:"".concat(c.AUDIENCES,":").concat(e),expiryTime:Cr.STANDARD})}},{key:"getAudience",value:function(e,t,n){return this.get({resource:Ag(e),callback:t,errorCallback:n,eventPrefix:"".concat(c.AUDIENCE,":").concat(e),expiryTime:Cr.STANDARD})}},{key:"createAudience",value:function(e,t,n){return this.create({resource:Ig(),data:e,callback:t,errorCallback:n,eventPrefix:c.AUDIENCE,invalidationKeys:[c.AUDIENCES],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully created audience."),errorHandler:this.alertService.error("Failed to create audience.")})}},{key:"updateAudience",value:function(e,t,n,r){return this.update({resource:Tg(e),data:t,callback:n,errorCallback:r,eventPrefix:"".concat(c.UPDATE_AUDIENCE,":").concat(e),invalidationKeys:["".concat(c.AUDIENCE,":").concat(e),c.AUDIENCES],expiryTime:Cr.STANDARD,successHandler:this.alertService.success("Successfully updated audience."),errorHandler:this.alertService.error("Failed to update audience.")})}},{key:"deleteAudience",value:function(e,t,n){return this.delete({resource:kg(e),callback:t,errorCallback:n,eventPrefix:c.DELETE_AUDIENCE,invalidationKeys:["".concat(c.AUDIENCE,":").concat(e),c.AUDIENCES],successHandler:this.alertService.success("Successfully deleted audience"),errorHandler:this.alertService.error("Failed to delete audience")})}},{key:"getObjectAudiences",value:function(e,t,n,r){return this.get({resource:_g(e),eventPrefix:"".concat(t,":").concat(e,":").concat(c.AUDIENCES),expiryTime:Cr.STANDARD,callback:n,errorCallback:r})}},{key:"updateObjectAudiences",value:function(e,t,n,r,i,o){var a=Rb.singularizeMemberType(r);return this.update({resource:Pg(e,t),data:n,callback:i,errorCallback:o,eventPrefix:"".concat(c.UPDATE_OBJECT_AUDIENCES,":").concat(e),invalidationKeys:["".concat(r,":").concat(e,":").concat(c.AUDIENCES)],successHandler:this.alertService.success("Successfully updated ".concat(a," audiences.")),errorHandler:this.alertService.error("Failed to update ".concat(a," audiences."))})}},{key:"name",get:function(){return p.SUBJECT}},{key:"channelName",get:function(){return f.SUBJECT}}])&&Hb(t.prototype,n),r&&Hb(t,r),o}(dr),Ng={dataServiceName:p.SUBJECT,dataChannelName:f.SUBJECT},Rg={getSubjectTreeFetchOptions:function(e,t){return Object.assign(Object.assign({},Ng),{eventPrefix:c.SUBJECTS,fetchData:function(e){return e.getSubjectTree()},setData:e,onError:t})},getSubjectFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(c.SUBJECT,":").concat(e),fetchData:function(t){return t.getSubject(e)},setData:t,onError:n,deleteEventPrefix:c.DELETE_SUBJECT})},getSubjectMemberIdsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(c.SUBJECT,":").concat(e,":").concat(t),fetchData:function(n){return n.getSubjectMemberIds(e,t)},setData:n,onError:r})},getSubjectClassificationFetchOptions:function(e,t,n,r,i){return Object.assign(Object.assign({},Ng),{eventPrefix:Lg(e,n,r),fetchData:function(t){return t.getSubjectClassifications(e,n,r)},setData:t,onError:i})},getObjectSubjectsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(t,":").concat(e,":").concat(c.SUBJECTS),fetchData:function(n){return n.getObjectSubjects(e,t)},setData:n,onError:r})},getPresentationsFetchOptions:function(e,t){return Object.assign(Object.assign({},Ng),{eventPrefix:c.PRESENTATIONS,fetchData:function(e){return e.getPresentations()},setData:e,onError:t})},getPresentationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(c.PRESENTATION,":").concat(e),fetchData:function(t){return t.getPresentation(e)},setData:t,onError:n})},getClassificationTreeFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(c.CLASSIFICATIONS,":").concat(e),fetchData:function(t){return t.getClassificationTree(e)},setData:t,onError:n})},getClassificationFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(c.CLASSIFICATION,":").concat(e),fetchData:function(t){return t.getClassification(e)},setData:t,onError:n,deleteEventPrefix:c.DELETE_CLASSIFICATION})},getClassificationMembersFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(c.CLASSIFICATION,":").concat(e,":").concat(t),fetchData:function(n){return n.getClassificationMembers(e,t)},setData:n,onError:r})},getObjectClassificationsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(t,":").concat(e,":").concat(c.CLASSIFICATIONS),fetchData:function(n){return n.getObjectClassifications(e,t)},setData:n,onError:r})},getLevelsFetchOptions:function(e,t){return Object.assign(Object.assign({},Ng),{eventPrefix:c.LEVELS,fetchData:function(e){return e.getLevels()},setData:e,onError:t})},getLevelFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(c.LEVEL,":").concat(e),fetchData:function(t){return t.getLevel(e)},setData:t,onError:n})},getObjectLevelsFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(t,":").concat(e,":").concat(c.LEVELS),fetchData:function(n){return n.getObjectLevels(e,t)},setData:n,onError:r})},getAudiencesFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(c.AUDIENCES,":").concat(e),fetchData:function(t){return t.getAudiences(e)},setData:t,onError:n})},getAudienceFetchOptions:function(e,t,n){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(c.AUDIENCE,":").concat(e),fetchData:function(t){return t.getAudience(e)},setData:t,onError:n})},getObjectAudiencesFetchOptions:function(e,t,n,r){return Object.assign(Object.assign({},Ng),{eventPrefix:"".concat(t,":").concat(e,":").concat(c.AUDIENCES),fetchData:function(n){return n.getObjectAudiences(e,t)},setData:n,onError:r})}},Dg=function(e){return{application:l.SUBJECTS,action:a.Subjects.EDIT_LEVEL,args:[e.id]}},Mg=function(e,t){var n=e.levelIds;return t.filter((function(e){return n.includes(e.id)}))};function Ug(e){var t=e.showLevels;return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,"Audiences"),!!t&&d.createElement("th",null,"Mapped Level(s)")))}function Fg(e){var t,n=e.audience,r=e.levels;return d.createElement("tr",null,d.createElement("td",null,d.createElement(Kp,{appLink:(t=n,{application:l.SUBJECTS,action:a.Subjects.EDIT_AUDIENCE,args:[t.presentationId,t.masterId]})},n.name)),d.createElement("td",null,r.map((function(e){return d.createElement(Kp,{key:e.id,appLink:Dg(e),className:"mr-2"},e.name)}))))}function Vg(e){var t=e.audiences,n=e.levels;return d.createElement(as.Table,{responsive:!0,bordered:!0},d.createElement(Ug,{showLevels:!!t.length}),d.createElement("tbody",null,t.length?t.map((function(e){return d.createElement(Fg,{key:e.masterId,audience:e,levels:Mg(e,n)})})):d.createElement("tr",null,d.createElement("td",null,"This presentation has no audiences."))))}function zg(e){var t=null===e.masterId||void 0===e.masterId,n=Vu(),r=ys(n);return d.createElement(Wu,null,d.createElement(ds,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this audience",autoFocus:!0}),d.createElement(ds,{label:"Mapped Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Ss,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(as.Button,{as:Kp,variant:"danger",appLink:{application:l.SUBJECTS,action:a.Subjects.DELETE_AUDIENCE,args:[e.presentationId,e.masterId]}},"Delete")))}function Bg(e){return d.createElement(rs,{initialValues:e.audience,validationSchema:_b,onSubmit:e.saveAudience},d.createElement(zg,{masterId:e.audience&&e.audience.masterId,presentationId:e.presentationId,levels:e.levels}))}function Hg(e){var t=e.objectAudiences,n=e.presentationAudiences;return t.filter((function(e){return n.some((function(t){return t.masterId===e.masterId}))}))}function qg(e){var t,n,r,i,o,a=Rb.singularizeMemberType(e.memberType),c=(n=(t=e).presentationAudiences,r=t.objectLevels,i=t.objectAudiences,o=r.map((function(e){return e.id})),n.filter((function(e){return Ri(e.levelIds,o).length||i.some((function(t){return t.masterId===e.masterId}))})));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Levels"),d.createElement("p",null,"Select which levels this ".concat(a," is mapped to.")),d.createElement("p",null,"To see how levels correspond to audiences, scroll down to the audience-level mappings table."),d.createElement(fS,{initialValues:{levelIds:e.objectLevels.map((function(e){return e.id})),addToAudiences:!0},saveLevels:e.saveLevels,levels:e.levels,memberType:e.memberType})),d.createElement("h6",null,"Audiences"),d.createElement("p",null,"Select a presentation to view its audiences and map them to this ".concat(a,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(mS,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),d.createElement("p",null,"Audience to level mappings for this presentation are displayed below."),d.createElement(Vg,{levels:e.levels,audiences:e.presentationAudiences}),d.createElement("p",null,"Only the audiences which are mapped to a level that this"+" ".concat(a," is mapped to are displayed below.")),!!c.length&&d.createElement($g,{initialValues:{audienceIds:Hg(e).map((function(e){return e.masterId}))},saveAudiences:e.saveAudiences,audiences:c}))}function Jg(e){var t=Vu(),n=ys(t);return d.createElement(Wu,null,d.createElement(ds,{label:"Audience(s)",as:"select",name:"audienceIds",id:"audience-ids",multiple:!0,size:e.audiences.length,value:t.values.audienceIds},e.audiences.map((function(e){return d.createElement("option",{key:e.masterId,value:e.masterId},e.name)}))),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Ss,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Audiences")))}function $g(e){return d.createElement(rs,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.audienceIds;return e.saveAudiences(r,n)},enableReinitialize:!0},d.createElement(Jg,{audiences:e.audiences}))}function Yg(e){var t=e.item,n=e.getItemAppLink,r=e.actions,i=e.pinState;return d.createElement("tr",null,d.createElement("td",null,d.createElement(Kp,{appLink:n(t)},t.name)),i.isPinnable&&d.createElement("td",null,d.createElement(Xp,{selected:parseInt(t.id)===parseInt(i.currentPinnedVideo),onToggle:function(e){return i.onChange(e,t.id)},id:t.id})),r&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(Mm,{actions:r}))))}function Kg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Zg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qg(e){var t=e.items,n=e.memberType,r=e.classification,i=e.getItemAppLink,o=e.getActions,a=e.updatePinnedVideo,c=Wg(d.useState(!1),2),u=c[0],s=c[1],l=function(e,t){var n=e.pinnedVideoMasterId||null,r=Kg(d.useState(n),2),i=r[0],o=r[1];return{currentPinnedVideo:i,onChange:function(e,t){o(e?t:null)},canSubmit:n!==i,isPinnable:t===wb.Videos}}(r,n);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this classification."));var f="".concat(Sd(Rb.singularizeMemberType(n))," Name");return d.createElement(d.Fragment,null,d.createElement(as.Table,{responsive:!0},d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",null,f),l.isPinnable&&d.createElement("th",null,"Pinned"),mn(o)&&d.createElement("th",null))),d.createElement("tbody",null,t.map((function(e){return d.createElement(Yg,{item:e,key:e.id,getItemAppLink:i,actions:mn(o)&&o(e),pinState:l})})))),l.isPinnable&&d.createElement(Ss,{showSpinner:u,onClick:function(){s(!0),a(l.currentPinnedVideo,(function(){return s(!1)}))},disabled:!l.canSubmit||u},"Save"))}function Xg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return eS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var tS=function(e){return{application:l.SUBJECTS,action:a.Subjects.EDIT_SUBJECT,args:[e]}};function nS(e){var t=Vu(),n=ys(t),r=null===e.id||void 0===e.id,i=!r||!(!t.values.parentIds||!t.values.parentIds.length),o=Xg(d.useState(i),2),c=o[0],u=o[1];d.useEffect((function(){return u(i)}),[e.id,t.values.parentIds]),d.useEffect((function(){t.values.subjectIds.length&&!t.touched.subjectIds&&t.setFieldTouched("subjectIds",!0)}),[t.values.subjectIds]);var s=function(e){return t.setFieldValue("parentIds",Di(t.values.parentIds.map((function(e){return e.toString()})),e.id.toString()))},f=function(e){return t.setFieldValue("subjectIds",Di(t.values.subjectIds.map((function(e){return e.toString()})),e.id.toString()))},p=function(e){return"".concat(cs(t.errors,t.touched,e)," h-auto py-2")};return d.createElement(Wu,null,d.createElement(ds,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this classification",autoFocus:!0}),d.createElement(ds,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},Jr.getEnumKeys(kb).map((function(e){return d.createElement("option",{key:e,value:kb[e]},e)}))),d.createElement(ds,{label:"Coming Soon",name:"comingSoon",id:"comingSoon",type:"checkbox",checked:t.values.comingSoon}),d.createElement(ds,{label:"Emphasize",name:"emphasize",id:"emphasize",type:"checkbox",checked:t.values.emphasize}),d.createElement(ds,{label:"Can Be Preferred",name:"canBePreferred",id:"canBePreferred",type:"checkbox",checked:t.values.canBePreferred}),d.createElement(ds,{name:"parentIds"},(function(){return d.createElement("div",{className:p("parentIds")},d.createElement(nh,{label:"Parent Classification(s)",tree:e.classificationTree,selectedIds:t.values.parentIds,onSelect:s,collapse:c,noSelectionMessage:"No parent selected, this will be a root classification.",isNodeDisabled:(n=e.classificationTree,r=e.id,function(e){if(e.id===r)return!0;var t=jd.find(n,r);return!!jd.find(t,e.id)})}));var n,r})),d.createElement(ds,{name:"subjectIds"},(function(){return d.createElement("div",{className:p("subjectIds")},d.createElement(nh,{label:"Mapped Subject(s)",tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:f,collapse:!r,getSelectedItemAppLink:tS}))})),d.createElement(Nd,{imageType:td.Covers,fieldName:"cover",application:l.SUBJECTS,uploadAction:a.Subjects.UPLOAD_IMAGE}),d.createElement(Nd,{imageType:td.Banners,fieldName:"banner",application:l.SUBJECTS,uploadAction:a.Subjects.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Ss,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},r?"Create":"Save"),!r&&d.createElement(as.Button,{as:Kp,variant:"danger",appLink:{application:l.SUBJECTS,action:a.Subjects.DELETE_CLASSIFICATION,args:[e.presentationId,e.id]}},"Delete")))}function rS(e){return d.createElement(rs,{initialValues:e.classification,validationSchema:Pb,onSubmit:e.saveClassification},d.createElement(nS,{id:e.classification&&e.classification.id,presentationId:e.presentationId,classificationTree:e.classificationTree,subjectTree:e.subjectTree}))}var iS=function(e){return function(t){if(!e)return t.appLink.action===a.Subjects.EDIT_CLASSIFICATION;switch(e){case wb.Playlists:return t.appLink.action===a.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;case wb.Series:return t.appLink.action===a.Subjects.EDIT_CLASSIFICATION_SERIES;case wb.Videos:return t.appLink.action===a.Subjects.EDIT_CLASSIFICATION_VIDEOS}}};function oS(e){var t=e.presentation,n=e.classificationId,r=e.memberType;return t?d.createElement(d.Fragment,null,d.createElement("h6",null,"Presentation: ".concat(!!t&&t.name)),d.createElement("div",{className:"py-2"},d.createElement(Hm,{tabs:Ub(t.id,n),isItemActive:iS(r)}))):d.createElement(d.Fragment,null)}function aS(e){var t=Vu(),n=ys(t),r=function(e){return t.setFieldValue("classificationIds",Di(t.values.classificationIds.map((function(e){return e.toString()})),e.id.toString()))},i="".concat(cs(t.errors,t.touched,"classificationIds")," h-auto py-2");return d.createElement(Wu,null,d.createElement(ds,{name:"classificationIds"},(function(){return d.createElement("div",{className:i},d.createElement(nh,{label:"Mapped Classification(s)",tree:e.classificationTree,selectedIds:t.values.classificationIds,onSelect:r,getSelectedItemAppLink:(n=e.presentationId,function(e){return{application:l.SUBJECTS,action:a.Subjects.EDIT_CLASSIFICATION,args:[n,e]}}),isNodeDisabled:e.isClassificationDisabled}));var n})),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Ss,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},"Save Classifications")))}function cS(e){return d.createElement(rs,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.classificationIds;return e.saveClassifications(r,n)},enableReinitialize:!0},d.createElement(aS,{presentationId:e.presentationId,classificationTree:e.classificationTree,isClassificationDisabled:e.isClassificationDisabled}))}function uS(e){var t=null===e.id||void 0===e.id,n=Vu(),r=ys(n);return d.createElement(Wu,null,d.createElement(ds,{label:"Name",type:"text",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this level",autoFocus:!0}),d.createElement(Ss,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"))}function sS(e){return d.createElement(rs,{initialValues:e.level,validationSchema:Lb,onSubmit:e.saveLevel},d.createElement(uS,{id:e.level&&e.level.id}))}function lS(e){var t=Rb.singularizeMemberType(e.memberType),n=Vu(),r=ys(n);return d.createElement(Wu,null,d.createElement(ds,{label:"Level(s)",as:"select",name:"levelIds",id:"level-ids",multiple:!0,size:e.levels.length,value:n.values.levelIds},e.levels.map((function(e){return d.createElement("option",{key:e.id,value:e.id},e.name)}))),d.createElement(ds,{label:"Automatically add to audiences*",name:"addToAudiences",id:"add-to-audiences",type:"checkbox",checked:n.values.addToAudiences}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(t," to a level, all of that level's")+" audiences across all presentations will also be added to.")),d.createElement("p",null,d.createElement("strong",null,"Note:")," When removing a ".concat(t," from a level, that level's audiences "),d.createElement("strong",null,"will not")," be automatically removed from."),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Ss,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},"Save Levels")))}function fS(e){return d.createElement(rs,{initialValues:e.initialValues,onSubmit:function(t,n){var r=t.levelIds,i=t.addToAudiences;return e.saveLevels(r,i,n)}},d.createElement(lS,{levels:e.levels,memberType:e.memberType}))}function pS(e){var t=e.values,n=t.name,r=t.description,i=e.id,o=e.isSubmitting,a=!i;return d.createElement(Wu,null,d.createElement(ds,{label:"Name",type:"text",name:"name",id:"name",value:n,placeholder:"Enter a name for this presentation",autoFocus:!0}),d.createElement(ds,{label:"Description",as:"textarea",name:"description",id:"description",value:r,placeholder:"Describe this presentation here"}),d.createElement(Ss,{showSpinner:o,type:"submit"},a?"Create":"Save"))}function dS(e){var t=e.presentation,n=(t=void 0===t?{}:t).id,r=void 0===n?null:n,i=t.name,o=void 0===i?"":i,a=t.description,c=void 0===a?"":a,u=e.savePresentation;return d.createElement(Ju,{initialValues:{name:o,description:c},validationSchema:xb,onSubmit:u},(function(e){return d.createElement(pS,Object.assign({id:r},e))}))}function mS(e){var t=e.presentations,n=e.currentPresentation,r=e.setCurrentPresentation,i=e.label,o=function(e){var n=function(e,t){return Pi(t.filter((function(t){return t.id.toString()===e.toString()})))}(e,t);r(n)};return d.useEffect((function(){t&&!n&&r(t[0])}),[t]),d.createElement(d.Fragment,null,!!n&&d.createElement(d.Fragment,null,d.createElement(as.Form.Label,null,i),d.createElement(as.Form.Control,{as:"select",value:n.id,onChange:function(e){return o(e.target.value)},className:"cursor-pointer"},t.map((function(e){return d.createElement("option",{value:e.id,key:e.id},e.name)})))))}function hS(e){return d.createElement(d.Fragment,null,d.createElement("h4",null,"".concat(Sd(e.memberType))),d.createElement(as.Table,{responsive:!0},d.createElement("tbody",null,e.objects&&e.objects.map((function(t){return d.createElement("tr",{key:t.id},d.createElement("td",null,d.createElement(Kp,{appLink:Rb.getMemberAppLink(e.memberType,t.id)},t.name)))})))),d.createElement(IS,{initialValues:{subjectIds:[],addToClassifications:!0},subjectTree:e.subjectTree,saveSubjects:e.onClickAddToSubject,memberType:e.memberType,saveBtnText:"Add to subject",subjectRequired:!0}))}function yS(e){return function(e){if(Array.isArray(e))return vS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return vS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vS(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bS(e){var t=Rb.singularizeMemberType(e.memberType),n=[].concat(yS(e.objectClassifications),yS(e.objectSubjectClassifications)).map((function(e){return e.id}));return d.createElement(d.Fragment,null,d.createElement("div",{className:"border-bottom pb-3 mb-3"},d.createElement("h6",null,"Subjects"),d.createElement("p",null,"Select which subjects this ".concat(t," is mapped to.")),d.createElement(IS,{initialValues:{subjectIds:e.objectSubjects.map((function(e){return e.id}))},subjectTree:e.subjectTree,saveSubjects:e.saveSubjects,memberType:e.memberType,saveBtnText:"Save Subjects",allowMultiple:!0})),d.createElement("h6",null,"Classifications"),d.createElement("p",null,"Select a presentation to view its classifications and map them to this ".concat(t,".")),d.createElement("div",{className:"w-50 pb-3"},d.createElement(mS,{presentations:e.presentations,currentPresentation:e.currentPresentation,setCurrentPresentation:e.setCurrentPresentation})),e.currentPresentation&&e.classificationTree&&e.classificationTree.children.length?d.createElement(d.Fragment,null,d.createElement("p",null,"Only classifications which are mapped to one of the subjects selected above can be selected."),d.createElement(cS,{initialValues:{classificationIds:e.objectClassifications.map((function(e){return e.id}))},presentationId:e.currentPresentation.id,classificationTree:e.classificationTree,saveClassifications:e.saveClassifications,isClassificationDisabled:function(e){return!n.includes(e.id)}})):d.createElement("p",null,"This presentation has no classifications."))}function gS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return SS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function SS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}mS.defaultProps={label:"Presentation"};function ES(e){var t=!e.id,n=Vu(),r=ys(n),i=!t||!!n.values.parentId,o=gS(d.useState(i),2),c=o[0],u=o[1];d.useEffect((function(){return u(i)}),[e.id,n.values.parentId]);var s=function(e){var t=e.id===n.values.parentId?null:e.id;n.setFieldValue("parentId",t)},f="".concat(cs(n.errors,n.touched,"parentId")," h-auto py-2");return d.createElement(Wu,null,d.createElement(ds,{label:"Name",name:"name",id:"name",value:n.values.name,placeholder:"Enter a name for this subject",autoFocus:!0}),d.createElement(ds,{name:"parentId"},(function(){return d.createElement("div",{className:f},d.createElement(nh,{label:"Parent Subject",tree:e.subjectTree,selectedIds:[n.values.parentId],onSelect:s,collapse:c,noSelectionMessage:"No parent selected, this will be a root subject.",isNodeDisabled:(t=e.subjectTree,r=e.id,function(e){if(e.id===r)return!0;var n=jd.find(t,r);return!!jd.find(n,e.id)})}));var t,r})),d.createElement("div",{className:"d-flex justify-content-between"},d.createElement(Ss,{showSpinner:n.isSubmitting,type:"submit",disabled:!r},t?"Create":"Save"),!t&&d.createElement(as.Button,{as:Kp,variant:"danger",appLink:{application:l.SUBJECTS,action:a.Subjects.DELETE_SUBJECT,args:[e.id]}},"Delete")))}function OS(e){return d.createElement(rs,{initialValues:e.subject,validationSchema:Nb,onSubmit:e.saveSubject},d.createElement(ES,{id:e.subject&&e.subject.id,subjectTree:e.subjectTree}))}var jS=function(e){return function(t){return t.appLink.action===e}};function CS(e){var t=e.subjectId,n=e.activeAction;return d.createElement(d.Fragment,null,d.createElement(as.Alert,{variant:"danger"},"Warning: You are editing the backbone subjects."),d.createElement("div",{className:"py-2"},d.createElement(Hm,{tabs:Mb(t),isItemActive:jS(n)})))}var wS=function(e){return{application:l.SUBJECTS,action:a.Subjects.EDIT_SUBJECT,args:[e]}};function AS(e){var t=Vu(),n=ys(t),r=function(n){var r=e.allowMultiple?Di(t.values.subjectIds.map((function(e){return e.toString()})),n.id.toString()):[n.id];t.setFieldValue("subjectIds",r)},i=Rb.singularizeMemberType(e.memberType),o="".concat(cs(t.errors,t.touched,"subjectIds")," h-auto py-2");return d.createElement(Wu,null,d.createElement(ds,{name:"subjectIds"},(function(){return d.createElement("div",{className:o},d.createElement(nh,{label:"Mapped Subject".concat(e.allowMultiple?"(s)":""),tree:e.subjectTree,selectedIds:t.values.subjectIds,onSelect:r,collapse:!!t.initialValues.subjectIds.length,getSelectedItemAppLink:wS}))})),d.createElement(ds,{label:"Automatically add to classifications*",name:"addToClassifications",id:"add-to-classifications",type:"checkbox",checked:t.values.addToClassifications}),d.createElement("p",null,d.createElement("em",null,"*If selected, when adding a ".concat(i," to a subject, all of that subject's")+" mapped classifications across all presentations will also be added to.")),d.createElement("div",{className:"d-flex justify-content-end"},d.createElement(Ss,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.saveBtnText)))}function IS(e){var t;return d.createElement(rs,{initialValues:e.initialValues,validationSchema:(t=e.subjectRequired,is.object().shape({subjectIds:t?is.array().of(is.string()).min(1,"A subject is required").required("A subject is required"):is.array().of(is.string()),addToClassifications:is.boolean().default(!0)}).noUnknown()),onSubmit:function(t,n){var r=t.subjectIds,i=t.addToClassifications;return e.saveSubjects(r,i,n)}},d.createElement(AS,{subjectTree:e.subjectTree,memberType:e.memberType,allowMultiple:e.allowMultiple,saveBtnText:e.saveBtnText}))}AS.defaultProps={saveBtnText:"Save"};var TS=function(e){return d.createElement("div",{className:"border rounded p-2 mb-3"},d.createElement("h6",{className:"border-bottom pb-1"},e.presentation.name),e.classifications&&e.classifications.length?d.createElement("ul",{className:"list-unstyled mb-0"},e.classifications.map((function(t){return d.createElement("li",{key:t.id,className:"py-1"},d.createElement(Kp,{appLink:(n=e.presentation.id,r=t.id,{application:l.SUBJECTS,action:a.Subjects.EDIT_CLASSIFICATION,args:[n,r]})},t.name));var n,r}))):d.createElement("p",null,d.createElement("em",null,"There are no classifications mapped to this subject in this presentation.")))},kS=function(e){return d.createElement(d.Fragment,null,!!e.presentations&&!!e.classificationDictionary&&e.presentations.map((function(t){return d.createElement(TS,{key:t.id,presentation:t,classifications:e.classificationDictionary[t.id]})})))},_S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function PS(e){return d.createElement(d.Fragment,null,e.classifications.map((function(t){return d.createElement("th",{key:t.id},d.createElement("span",{className:"d-inline-block"},d.createElement(Xp,{selected:e.getIsClassificationSelected(t),onToggle:function(n){return e.onToggleClassification(t.id,n)}})),d.createElement(Kp,{appLink:e.getClassificationAppLink(t.id)},function(e,t){return t?e.name:"Classification: ".concat(e.name)}(t,e.showClassificationSubHeader)))})))}function LS(e){var t=e.memberType,n=e.hasActions,r=e.classifications,i=_S(e,["memberType","hasActions","classifications"]),o="".concat(Sd(Rb.singularizeMemberType(t))," Name"),a=!!r&&!!r.length,c=a&&r.length>1,u=a?2:1,s=Object.assign({classifications:r,showClassificationSubHeader:c},i);return d.createElement("thead",null,d.createElement("tr",null,d.createElement("th",{rowSpan:u},o),a&&(c?d.createElement("th",{colSpan:r.length,className:"text-center"},"Classifications"):d.createElement(PS,Object.assign({},s))),n&&d.createElement("th",{rowSpan:u})),a&&c&&d.createElement("tr",null,d.createElement(PS,Object.assign({},s))))}function xS(e){var t=e.member,n=t.id,i=t.name,o=t.classifications,a=void 0===o?[]:o,c=e.getMemberAppLink,u=e.onToggleClassification,s=e.actions,l=mn(c)&&c(n);return a.length&&!mn(u)&&r.ErrorHelper.throw(new Qe("onToggleClassification must be passed to SubjectMemberItem")),d.createElement("tr",null,d.createElement("td",null,l?d.createElement(Kp,{appLink:c(n)},i):i),!!a.length&&a.map((function(e){return d.createElement("td",{key:e.id},d.createElement(Xp,{selected:e.selected,onToggle:function(t){return u(e.id,t,n)}}))})),s&&d.createElement("td",null,d.createElement("span",{className:"d-flex justify-content-end"},d.createElement(Mm,{actions:s}))))}var NS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function RS(e,t){return function(n){var r=n[e],i=oh(r);return!!i&&i===t.length}}function DS(e){var t=e.members,n=e.memberType,r=e.getActions,i=e.classifications,o=e.getClassificationAppLink,a=e.onToggleClassification,c=NS(e,["members","memberType","getActions","classifications","getClassificationAppLink","onToggleClassification"]);if(!t.length)return d.createElement("div",{className:"py-5"},"No ".concat(n," in this subject."));var u=mn(r),s={memberType:n,classifications:i,getClassificationAppLink:o,getIsClassificationSelected:RS(n,t),onToggleClassification:a,hasActions:u};return d.createElement(as.Table,{responsive:!0,bordered:!0},d.createElement(LS,Object.assign({},s)),d.createElement("tbody",null,t.map((function(e,t){return d.createElement(xS,Object.assign({key:t,member:e,actions:u&&r(e.id),onToggleClassification:a},c))}))))}function MS(e){var t=e.navItems,n=e.currentAppLink;return d.createElement(as.Container,null,d.createElement(as.Navbar,{className:"justify-content-between align-items-center"},d.createElement(as.Nav,null,!!t&&t.map((function(e,t){return d.createElement(as.Nav.Item,{key:t},d.createElement(Kp,{appLink:e.appLink,className:"nav-link".concat(vd.isItemActive(e,n)?" text-primary":"")},e.label))})))))}function US(e,t){d.useEffect((function(){e.presentations&&!e.currentPresentation&&Tb(t,"currentPresentation")(Pi(e.presentations))}),[e.presentations])}function FS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return VS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zS(e){var t=i.useBasicFetch(Kv(e.playlistId)),n=i.useBasicFetch(ob),r=FS(d.useState({}),2),o=r[0],c=r[1],u=Rv(p.SUBJECT);!function(e,t,n){var r=function(e){return Tb(n,e)};bb([Rg.getObjectLevelsFetchOptions(e,wb.Playlists,r("playlistLevels"))],[e]),jb(Rg.getObjectAudiencesFetchOptions(e,wb.Playlists,r("playlistAudiences")),[e,t.playlistLevels]),bb([Rg.getPresentationsFetchOptions(r("presentations")),Rg.getLevelsFetchOptions(r("levels"))],[]),jb(!!t.currentPresentation&&Rg.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.playlistId,o,c),US(o,c);var s=!!(o.presentations&&o.levels&&o.presentationAudiences&&o.playlistLevels&&o.playlistAudiences);return d.createElement(d.Fragment,null,!!n.data&&d.createElement(lb,{playlistId:e.playlistId,activeAction:a.Playlists.EDIT_PLAYLIST_AUDIENCES,currentUser:n.data}),d.createElement(Um,{object:t.data}),!!s&&d.createElement(qg,{objectLevels:o.playlistLevels,objectAudiences:o.playlistAudiences,presentations:o.presentations,currentPresentation:o.currentPresentation,setCurrentPresentation:Tb(c,"currentPresentation"),levels:o.levels,presentationAudiences:o.presentationAudiences,memberType:wb.Playlists,saveLevels:function(t,n,r){return u.updateObjectLevels(e.playlistId,t,wb.Playlists,n,r,r)},saveAudiences:function(t,n){return u.updateObjectAudiences(e.playlistId,o.currentPresentation.id,t,wb.Playlists,n,n)}}))}function BS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||qS(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HS(e){return function(e){if(Array.isArray(e))return JS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||qS(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qS(e,t){if(e){if("string"==typeof e)return JS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?JS(e,t):void 0}}function JS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $S(e){var t=i.useBasicFetch(Kv(e.playlistId)),n=i.useBasicFetch(ob),r=BS(d.useState({}),2),o=r[0],c=r[1],u=Rv(p.SUBJECT);!function(e,t,n){var r=function(e){return Tb(n,e)};bb([Rg.getSubjectTreeFetchOptions(r("subjectTree")),Rg.getPresentationsFetchOptions(r("presentations"))],[]),bb([Rg.getObjectSubjectsFetchOptions(e,wb.Playlists,r("playlistSubjects"))],[e]),jb(!!t.currentPresentation&&Rg.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.playlistSubjects]);var i=function(e,t){return[].concat(HS(t.subjectClassifications||[]),HS(e))},o=t.playlistSubjects&&t.playlistSubjects.map((function(e){return Rg.getSubjectClassificationFetchOptions(e.id,Tb(n,"subjectClassifications",i))}));bb(o,[t.playlistSubjects],!!o),jb(Rg.getObjectClassificationsFetchOptions(e,wb.Playlists,r("playlistClassifications")),[e,t.playlistSubjects])}(e.playlistId,o,c),US(o,c);var s=!!(o.playlistSubjects&&o.subjectTree&&o.presentations&&o.classificationTree&&o.playlistClassifications&&o.subjectClassifications);return d.createElement(d.Fragment,null,!!n.data&&d.createElement(lb,{playlistId:e.playlistId,activeAction:a.Playlists.EDIT_PLAYLIST_SUBJECTS,currentUser:n.data}),d.createElement(Um,{object:t.data}),s&&d.createElement(bS,{objectSubjects:o.playlistSubjects,subjectTree:o.subjectTree,memberType:wb.Playlists,presentations:o.presentations,currentPresentation:o.currentPresentation,setCurrentPresentation:Tb(c,"currentPresentation"),objectClassifications:o.playlistClassifications,objectSubjectClassifications:o.subjectClassifications,classificationTree:o.classificationTree,saveSubjects:function(t,n,r){return u.updateObjectSubjects(e.playlistId,t,wb.Playlists,n,r,r)},saveClassifications:function(t,n){return u.updateObjectClassifications(e.playlistId,o.currentPresentation.id,t,wb.Playlists,n,n)}}))}var YS=function(e,t,n){if(t===n)return{reorderedItems:e,reorderRequest:null};var r=xi(e,t,n),i=n<e.length-1?r[n+1].id:null;return{reorderedItems:r,reorderRequest:{sourceMemberId:r[n].id,destinationMemberId:i}}};function KS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return GS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ZS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var QS=function(e){return{application:l.VIDEOS,action:a.Videos.EDIT_VIDEO,args:[e.id]}};function XS(e){var t,n,r,o,c,u,s=Object(vn.useDispatch)(),f=Vv(),p=i.useBasicFetch(Kv(e.playlistId)),m=i.useBasicFetch(Xv(e.playlistId)),h=i.useBasicFetch(ob),y=WS((n=null===(t=m.data)||void 0===t?void 0:t.data,r=KS(Object(d.useState)(),2),o=r[0],c=r[1],Object(d.useEffect)((function(){o&&(n.length!==o.length||function(e,t){var n=!0;if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r].id!==t[r].id){n=!1;break}return n}(n,o))&&c(null)}),[n]),[o,c]),2),v=y[0],b=y[1],g=v?{data:v,pagination:null}:m.data;return d.createElement(d.Fragment,null,!!h.data&&d.createElement(lb,{playlistId:e.playlistId,activeAction:a.Playlists.EDIT_PLAYLIST_VIDEOS,currentUser:h.data}),d.createElement(Um,{object:p.data}),!!g&&d.createElement(bh,{onSortEnd:function(t,n){if(t!==n){var r=YS(m.data.data,t,n),o=r.reorderRequest,a=r.reorderedItems;b(a);i.fetch(s,eb(e.playlistId,o,null,(function(){f.error("Failed to update playlist order."),b(null)})))}},videos:g,getVideoAppLink:QS,getVideoActions:(u=e.playlistId,function(e){return[{label:"Remove video",appLink:{application:l.PLAYLISTS,action:a.Playlists.REMOVE_VIDEO,args:[u.toString(),e.id.toString()]},className:"text-danger"}]}),emptyMessage:"There are no videos in this playlist."}))}function eE(){var e=Object(vn.useDispatch)(),t=Vv(),n=i.useBasicFetch(ob);return d.createElement(d.Fragment,null,!!n.data&&d.createElement(sb,{savePlaylist:function(o,c){i.fetch(e,Wv(o,n.data.id,(function(e){t.success("Successfully created playlist."),function(e){e&&e.id&&r.AppLinkHelper.trigger({application:l.PLAYLISTS,action:a.Playlists.EDIT_PLAYLIST,args:[e.id]})}(e)}),(function(){t.error("Failed to create playlist.")}),c))}}))}var tE="rating,thumbnail,glance",nE=function(e){return{url:"/api/master/v2/objects/".concat(e,"?query=").concat(tE),key:"videos:".concat(e)}},rE=function(e){var t=e.slice().sort();return{key:"videos:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},iE=function(e){return{url:"/ajax/hostedlibraries/rightsline/programs/".concat(e),key:"rightsline:videos:".concat(e),normalizeOptions:{namespace:"rightsline"}}},oE=function(e,t,n,r,i){return{key:"videos:".concat(e),url:"/api/master/v2/objects/".concat(e),data:t,type:xr.PUT,success:n,error:r,always:i}};function aE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return cE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uE(e){var t=Object(vn.useDispatch)(),n=Vv(),r=i.useBasicFetch(Kv(e.playlistId)),o=i.useBasicFetch(nE(e.videoId)),a=aE(d.useState(!1),2),c=a[0],u=a[1];var s=!!r.data&&!!o.data;return d.createElement(oy,{title:"Remove Video",closePopup:e.closePopup,showLoadingSpinner:!s},!!s&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,o.data.name)," from ",d.createElement("strong",null,r.data.name),"?")),d.createElement(sy,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0),i.fetch(t,tb(e.playlistId,e.videoId,(function(){n.success("Successfully removed video from playlist")}),(function(){n.error("Failed to remove video from playlist")}),e.closePopup))},buttonText:"Yes, remove video",isSpinnerButton:!0,showSpinner:c}]})))}function sE(e){return r.AppLinkHelper.trigger(function(e){return{application:l.PLAYLISTS,action:a.Playlists.EDIT_PLAYLIST,args:[e.id]}}(e))}function lE(e){var t=e?{application:l.PLAYLISTS,action:a.Playlists.SEARCH_PLAYLISTS,params:{query:e}}:{application:l.PLAYLISTS,action:a.Playlists.PLAYLISTS};r.AppLinkHelper.trigger(t)}function fE(e){return d.createElement("div",{className:"pb-3 w-50"},d.createElement(Yp,{initialQuery:e.query,placeholder:"Search for a playlist",onSuggestionSelected:sE,getRemoteUrl:function(e){return"".concat("/api/domain/v1/search/playlists/instant/raw","?query=").concat(e)},activationLength:2,onSubmit:lE}))}var pE=l.PLAYLISTS,dE=function(e){return{application:pE,action:a.Playlists.EDIT_PLAYLIST,args:[e.id]}};function mE(e){var t=i.useBasicFetch($v(e.cursor));return d.createElement(d.Fragment,null,d.createElement(fE,null),d.createElement(km,{collection:t&&t.data,collectionAppLink:{application:pE,action:a.Playlists.PLAYLISTS},newObjectAppLink:{application:pE,action:a.Playlists.NEW_PLAYLIST},getObjectAppLink:dE,objectName:"Playlist"}))}var hE=l.PLAYLISTS,yE=function(e){return{application:hE,action:a.Playlists.EDIT_PLAYLIST,args:[e.id]}};function vE(e){var t=i.useBasicFetch(Yv(e.query,e.cursor));return d.createElement(d.Fragment,null,d.createElement(fE,{query:e.query}),!!t.data&&(t.data.data.length?d.createElement(km,{collection:t.data,collectionAppLink:{application:hE,action:a.Playlists.SEARCH_PLAYLISTS,params:{query:e.query}},newObjectAppLink:{application:hE,action:a.Playlists.NEW_PLAYLIST},getObjectAppLink:yE,objectName:"Playlist"}):d.createElement("p",null,"No playlists found, please try a different search query.")))}function bE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var SE=function(e,t,n){return[{variant:"link",onClick:t,buttonText:"Cancel"},{variant:"danger",onClick:e,buttonText:"Yes, delete this audience",isSpinnerButton:!0,showSpinner:n}]};function EE(e){var t=e.id,n=e.routeToOnDelete,i=e.closePopup,o=bE(d.useState(),2),a=o[0],c=o[1],u=bE(d.useState(!1),2),s=u[0],l=u[1],f=Rv(p.SUBJECT);jb(Rg.getAudienceFetchOptions(t,c),[t]);return d.createElement(oy,{title:"Delete Audience",closePopup:i,showLoadingSpinner:!a},!!a&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,a.name),"?")),d.createElement(sy,{buttons:SE((function(){l(!0);f.deleteAudience(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)}),i,s)})))}function OE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var CE=function(e){return{application:l.SUBJECTS,action:a.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function wE(e){var t=e.presentationId,n=e.audienceId,r=OE(d.useState(),2),i=r[0],o=r[1],a=OE(d.useState(),2),c=a[0],u=a[1],s=OE(d.useState(),2),l=s[0],f=s[1],m=Rv(p.SUBJECT);jb(Rg.getAudienceFetchOptions(n,o),[n]),jb(Rg.getLevelsFetchOptions(u),[]),jb(Rg.getPresentationFetchOptions(t,f),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(Gp,{appLink:CE(t),backToName:"audiences"})),!!l&&d.createElement("h6",null,"Presentation: ".concat(l.name)),!!i&&!!c&&d.createElement(Bg,{audience:i,levels:c,saveAudience:function(e,r){return m.updateAudience(n,Object.assign(Object.assign({},e),{presentationId:t}),r,r)},presentationId:t}))}function AE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return IE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var TE=function(e){return function(t){return{application:l.SUBJECTS,action:a.Subjects.EDIT_AUDIENCE,args:[e,t.masterId]}}},kE=function(e){return{application:l.SUBJECTS,action:a.Subjects.NEW_AUDIENCE,args:[e]}},_E={application:l.SUBJECTS,action:a.Subjects.AUDIENCES};function PE(e){var t=e.presentationId,n=AE(d.useState(),2),r=n[0],i=n[1];return jb(Rg.getAudiencesFetchOptions(t,i),[]),d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-3"},d.createElement(Gp,{appLink:_E,backToName:"presentations"})),d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select an audience to edit:"),d.createElement(Kp,{appLink:kE(t),className:"d-block"},d.createElement(Vp,{svgName:Dp.Plus,size:Fp.Small}),d.createElement("span",null,"New Audience"))),d.createElement(zm,{objects:r,getAppLink:TE(e.presentationId),emptyMessage:"There are no audiences in this presentation yet. Click '+ New Audience' to create one."}))}function LE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var NE=function(e){return{application:l.SUBJECTS,action:a.Subjects.PRESENTATION_AUDIENCES,args:[e]}};function RE(e){var t=e.presentationId,n=LE(d.useState(),2),i=n[0],o=n[1],c=LE(d.useState(),2),u=c[0],s=c[1],f=Rv(p.SUBJECT);jb(Rg.getLevelsFetchOptions(o),[]),jb(Rg.getPresentationFetchOptions(t,s),[t]);return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2"},d.createElement(Gp,{appLink:NE(t),backToName:"audiences"})),!!u&&d.createElement("h6",null,"Presentation: ".concat(u.name)),!!i&&d.createElement(Bg,{levels:i,presentationId:t,saveAudience:function(e,n){return f.createAudience(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),r.AppLinkHelper.trigger({application:l.SUBJECTS,action:a.Subjects.EDIT_AUDIENCE,args:[e,n.masterId]})}}(t,n),n)}}))}function DE(e){return{application:l.SUBJECTS,action:a.Subjects.NEW_CLASSIFICATION,args:[e]}}function ME(e){return[{label:"Add child",getAppLink:function(t){return Object.assign(Object.assign({},DE(e)),{args:[e],params:{parentId:t.id}})}},{label:"Delete classification",getAppLink:function(t){return{application:l.SUBJECTS,action:a.Subjects.DELETE_CLASSIFICATION,args:[e,t.id]}},className:"text-danger"}]}var UE=n(127),FE=n.n(UE);function VE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BE(e){var t=e.presentationId,n=e.selectedClassificationId,r=VE(d.useState(),2),i=r[0],o=r[1],c=VE(d.useState(),2),u=c[0],s=c[1];return function(e,t,n){bb([Rg.getClassificationTreeFetchOptions(e,t),Rg.getPresentationFetchOptions(e,n)],[e])}(t,o,s),d.createElement("div",{className:"".concat(FE.a.navContainer," h-auto pr-2 border-right")},!!u&&d.createElement("h6",{className:"border-bottom pb-2"},"Classifications (".concat(u.name,")")),d.createElement(Kp,{appLink:DE(t),className:"d-inline-block pb-2"},d.createElement(Vp,{svgName:Dp.Plus,size:Fp.Small}),d.createElement("span",null,"New Classification")),!!i&&d.createElement("div",{className:"border-top pt-1"},d.createElement(Zm,{tree:i,getAppLink:function(e){return function(e,t){return{application:l.SUBJECTS,action:a.Subjects.EDIT_CLASSIFICATION,args:[e,t.id]}}(t,e)},selectedIds:[n],actions:ME(t)})))}function HE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return qE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function JE(e){var t=e.classificationId,n=e.routeToOnDelete,i=e.closePopup,o=HE(d.useState(),2),a=o[0],c=o[1],u=HE(d.useState(!1),2),s=u[0],l=u[1];jb(Rg.getClassificationFetchOptions(t,c),[]);var f=Rv(p.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){l(!0);f.deleteClassification(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this classification",isSpinnerButton:!0,showSpinner:s}];return d.createElement(oy,{title:"Delete Classification",closePopup:i,showLoadingSpinner:!a},!!a&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,a.name),"?")),d.createElement(sy,{buttons:m})))}function $E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return YE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KE(e){var t=e.presentationId,n=e.classificationId,r=$E(d.useState(),2),i=r[0],o=r[1],a=$E(d.useState(),2),c=a[0],u=a[1],s=$E(d.useState(),2),l=s[0],f=s[1],m=$E(d.useState(),2),h=m[0],y=m[1],v=Rv(p.SUBJECT),b=Rg.getClassificationFetchOptions(n,o),g=Rg.getPresentationFetchOptions(t,u),S=Rg.getClassificationTreeFetchOptions(t,f);jb(Rg.getSubjectTreeFetchOptions(y),[]),jb(b,[n]),bb([g,S],[t]);return d.createElement("div",null,d.createElement(oS,{presentation:c,classificationId:n}),!!i&&!!l&&!!h&&d.createElement(rS,{classification:i,presentationId:t,subjectTree:h,classificationTree:l,saveClassification:function(e,t){return v.updateClassification(n,e,t,t)}}))}function GE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return WE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function WE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ZE(e){var t=e.presentationId,n=e.classificationId,r=e.memberType,i=GE(d.useState(),2),o=i[0],a=i[1],c=GE(d.useState(),2),u=c[0],s=c[1],l=GE(d.useState(),2),f=l[0],m=l[1];jb(Rg.getPresentationFetchOptions(t,a),[]),jb(Rg.getClassificationFetchOptions(n,s),[n]),jb(Rg.getClassificationMembersFetchOptions(n,r,m),[n,r]);var h=Rv(p.SUBJECT),y={items:f&&f.data,memberType:r,classification:u,updatePinnedVideo:function(e,t){var r=Object.assign(Object.assign({},u),{pinnedVideoMasterId:e});h.updateClassification(n,r,t)},getItemAppLink:function(e){return Rb.getMemberAppLink(r,e.id)},getActions:function(e){return Rb.getMemberActions(n,Cb.Classification,r,e.id)}},v={presentation:o,classificationId:n},b=bd(y);return d.createElement(d.Fragment,null,d.createElement(oS,Object.assign({},v,{memberType:r})),b&&d.createElement(Qg,Object.assign({},y)))}function QE(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return XE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XE(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function XE(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eO(e){var t=e.presentationId,n=e.parentId,i=QE(d.useState(),2),o=i[0],c=i[1],u=QE(d.useState(),2),s=u[0],f=u[1],m=Rv(p.SUBJECT),h=Rg.getClassificationTreeFetchOptions(t,c);jb(Rg.getSubjectTreeFetchOptions(f),[]),jb(h,[t]);return d.createElement("div",null,d.createElement("h4",{className:"py-2"},"Create New Classification"),!!s&&!!o&&d.createElement(rS,{classification:n?{parentIds:[n]}:{},presentationId:t,subjectTree:s,classificationTree:o,saveClassification:function(e,n){return m.createClassification(Object.assign(Object.assign({},e),{presentationId:t}),function(e,t){return function(n){t(),n&&n.id&&r.AppLinkHelper.trigger({application:l.SUBJECTS,action:a.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]})}}(t,n),n)}}))}var tO=function(e){return{key:"series:".concat(e),url:"/api/master/v2/objects/".concat(e,"?query=thumbnail,tallPoster,banner,rating")}},nO=function(e){var t=e.slice().sort();return{key:"series:".concat(t.join(",")),url:"/api/master/v2/objects?".concat(t.map((function(e){return"id=".concat(e)})).join("&"))}},rO=function(e,t,n,r){return{url:"/api/master/v2/series",key:"series",data:e,type:xr.POST,success:t,error:n,always:r}},iO=function(e,t,n,r,i){return{url:"/api/master/v2/objects/".concat(e),key:"update:series:".concat(e),data:t,type:xr.PUT,success:n,error:r,always:i}};function oO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return aO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cO(e){var t=oO(d.useState(),2),n=t[0],r=t[1],o=oO(d.useState(!1),2),a=o[0],c=o[1],u=i.useBasicFetch(function(e,t){switch(e){case wb.Playlists:return Kv(t);case wb.Series:return tO(t);case wb.Videos:return nE(t)}}(e.memberType,e.memberId)),s=Rv(p.SUBJECT);jb(Rg.getClassificationFetchOptions(e.classificationId,r),[e.classificationId]);var l=!!n&&!!u.data,f="Remove ".concat(Sd(Rb.singularizeMemberType(e.memberType)));return d.createElement(oy,{title:f,closePopup:e.closePopup,showLoadingSpinner:!l},l&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,u.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"This will not remove it from the backbone subject.")),d.createElement(sy,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),s.removeObjectsFromClassification(e.classificationId,[e.memberId],e.memberType,null,null,e.closePopup,e.closePopup),n.pinnedVideoMasterId===e.memberId&&s.updateClassification(e.classificationId,Object.assign(Object.assign({},n),{pinnedVideoMasterId:null}))},buttonText:"Yes, remove this ".concat(Rb.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:a}]})))}function uO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lO(e){var t=e.id,n=uO(d.useState(),2),r=n[0],i=n[1],o=Rv(p.SUBJECT);jb(Rg.getLevelFetchOptions(t,i),[t]);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Level"),!!r&&d.createElement(sS,{level:r,saveLevel:function(e,n){return o.updateLevel(t,e,n,n)}}))}function fO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return pO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dO=function(e){return{application:l.SUBJECTS,action:a.Subjects.EDIT_LEVEL,args:[e.id]}},mO={application:l.SUBJECTS,action:a.Subjects.NEW_LEVEL};function hO(){var e=fO(d.useState(),2),t=e[0],n=e[1];return jb(Rg.getLevelsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a level to edit:"),d.createElement(Kp,{appLink:mO,className:"d-block"},d.createElement(Vp,{svgName:Dp.Plus,size:Fp.Small}),d.createElement("span",null,"New Level"))),d.createElement(zm,{objects:t,getAppLink:dO}))}function yO(){var e=Rv(p.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Level"),d.createElement(sS,{saveLevel:function(t,n){return e.createLevel(t,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:l.SUBJECTS,action:a.Subjects.EDIT_LEVEL,args:[t.id]})}}(n),n)}}))}function vO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return bO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gO(e){var t=e.id,n=vO(d.useState(),2),r=n[0],i=n[1],o=Rv(p.SUBJECT);jb(Rg.getPresentationFetchOptions(t,i),[t]);var a={presentation:r,savePresentation:function(e,n){var r=n.setSubmitting;return o.updatePresentation(t,e,(function(){return r(!1)}),(function(){return r(!1)}))}},c=bd(a);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Edit Presentation"),!!c&&d.createElement(dS,Object.assign({},a)))}function SO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return EO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function EO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var OO=function(e){return{application:l.SUBJECTS,action:a.Subjects.EDIT_PRESENTATION,args:[e.id]}},jO={application:l.SUBJECTS,action:a.Subjects.NEW_PRESENTATION};function CO(){var e=SO(d.useState(),2),t=e[0],n=e[1];return jb(Rg.getPresentationsFetchOptions(n),[]),d.createElement("div",null,d.createElement("div",{className:"d-flex justify-content-between mb-2"},d.createElement("h5",{className:"d-inline-block m-0"},"Select a presentation to edit:"),d.createElement(Kp,{appLink:jO,className:"d-block"},d.createElement(Vp,{svgName:Dp.Plus,size:Fp.Small}),d.createElement("span",null,"New Presentation"))),d.createElement(zm,{objects:t,getAppLink:OO}))}function wO(){var e=Rv(p.SUBJECT);return d.createElement(d.Fragment,null,d.createElement("h4",{className:"py-2"},"Create New Presentation"),d.createElement(dS,{savePresentation:function(t,n){var i=n.setSubmitting;e.createPresentation(t,(function(e){return function(e,t){t(!1),e&&e.id&&r.AppLinkHelper.trigger({application:l.SUBJECTS,action:a.Subjects.EDIT_PRESENTATION,args:[e.id]})}(e,i)}),(function(){return i(!1)}))}}))}function AO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return IO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TO(e){var t=e.objectType,n=e.getAppLink,r=AO(d.useState(),2),i=r[0],o=r[1];return jb(Rg.getPresentationsFetchOptions(o),[]),d.createElement("div",null,d.createElement("h5",null,d.createElement(Ns,{namespace:"subjects.selectPresentation",phrase:"heading",options:{objectType:t}})),d.createElement(zm,{objects:i,getAppLink:n}))}function kO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return _O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _O(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function PO(e){var t=e.title,n=e.onClickConfirm,r=e.confirmButtonText,i=e.cancelButtonText,o=e.closePopup,a=kO(d.useState(!1),2),c=a[0],u=a[1],s=[{variant:"link",onClick:o,buttonText:i},{variant:"primary",onClick:function(){u(!0),n()},buttonText:r,isSpinnerButton:!0,showSpinner:c}];return d.createElement(oy,{title:t,closePopup:o},d.createElement(d.Fragment,null,e.children,d.createElement(sy,{buttons:s})))}function LO(e,t){return Tb(e,t)}function xO(e,t,n,i,o){var c=i.selectedSubject,u=function(){return LO(o,"showConfirmationPopup")(!1)};t.addObjectsToSubject(c.id,e.map((function(e){return e.id})),n.memberType,i.addToClassifications,(function(){u(),r.AppLinkHelper.trigger(function(e,t){var n={application:l.SUBJECTS,args:[e]};switch(t){case wb.Playlists:return Object.assign(Object.assign({},n),{action:a.Subjects.EDIT_SUBJECT_PLAYLISTS});case wb.Series:return Object.assign(Object.assign({},n),{action:a.Subjects.EDIT_SUBJECT_SERIES});case wb.Videos:return Object.assign(Object.assign({},n),{action:a.Subjects.EDIT_SUBJECT_VIDEOS})}}(c.id,n.memberType))}),u)}function NO(e,t,n){if(t&&n){var r=1===t.length?"this ".concat(Rb.singularizeMemberType(e)):"these ".concat(e);return"Add ".concat(r," to ").concat(n.name)}}function RO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return DO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MO(e,t){return function(n,r,i){i(),LO(t,"selectedSubject")(jd.find(e.subjectTree,Pi(n))),LO(t,"addToClassifications")(r),LO(t,"showConfirmationPopup")(!0)}}function UO(e){var t=RO(d.useState({}),2),n=t[0],r=t[1],o=i.useBasicFetch(function(e,t){switch(e){case wb.Playlists:return Gv(t);case wb.Series:return nO(t);case wb.Videos:return rE(t)}}(e.memberType,e.objectIds)),a=Rv(p.SUBJECT);!function(e,t){e.memberType,e.objectIds,jb(Rg.getSubjectTreeFetchOptions(LO(t,"subjectTree")),[])}(e,r);var c;return d.createElement(d.Fragment,null,!!o.data&&!!n.subjectTree&&d.createElement(hS,{memberType:e.memberType,objects:o.data,subjectTree:n.subjectTree,onClickAddToSubject:MO(n,r)}),n.showConfirmationPopup&&d.createElement(PO,{title:NO(e.memberType,o.data,n.selectedSubject),onClickConfirm:function(){return xO(o.data,a,e,n,r)},closePopup:function(){return e=!1,LO(r,"showConfirmationPopup")(e);var e}},d.createElement("p",null,"The following ".concat(e.memberType," will be added to "),d.createElement("strong",null,n.selectedSubject.name),n.addToClassifications?" and its mapped classifications:":":"),d.createElement("ul",null,o.data.map((function(e){return d.createElement("li",{key:e.id},e.name)}))),!n.addToClassifications&&d.createElement("p",null,"".concat(1===o.data.length?"It":"They"," will not be added to its mapped classifications.")),d.createElement("p",null,"".concat((c=e.memberType,Sd(Rb.singularizeMemberType(c)))," to classification mappings can be managed from the "),d.createElement("strong",null,"Edit Subject ".concat(Sd(e.memberType)," ")),"page.")))}function FO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return VO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zO(e){var t=e.subjectId,n=e.routeToOnDelete,i=e.closePopup,o=FO(d.useState(),2),a=o[0],c=o[1],u=FO(d.useState(!1),2),s=u[0],l=u[1];jb(Rg.getSubjectFetchOptions(t,c),[]);var f=Rv(p.SUBJECT),m=[{variant:"link",onClick:i,buttonText:"Cancel"},{variant:"danger",onClick:function(){l(!0);f.deleteSubject(t,(function(){i(),n&&r.AppLinkHelper.trigger(n)}),i)},buttonText:"Yes, delete this subject",isSpinnerButton:!0,showSpinner:s}];return d.createElement(oy,{title:"Delete Subject",closePopup:i,showLoadingSpinner:!a},!!a&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,a.name),"?"),d.createElement("p",null,"Subjects that have mapped classifications cannot be deleted.")),d.createElement(sy,{buttons:m})))}function BO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return HO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qO(e){var t=e.subjectId,n=BO(d.useState(),2),r=n[0],i=n[1],o=BO(d.useState(),2),c=o[0],u=o[1],s=Rv(p.SUBJECT),l=Rg.getSubjectFetchOptions(t,i);jb(Rg.getSubjectTreeFetchOptions(u),[]),jb(l,[t]);return d.createElement(d.Fragment,null,d.createElement(CS,{subjectId:t,activeAction:a.Subjects.EDIT_SUBJECT}),!!r&&!!c&&d.createElement(OS,{subject:r,subjectTree:c,saveSubject:function(e,n){return s.updateSubject(t,e,n,n)}}))}function JO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return $O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $O(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}PO.defaultProps={confirmButtonText:"Confirm",cancelButtonText:"Cancel"};var YO=d.createContext(void 0);function KO(e){var t=e.children,n=JO(d.useState(),2),r=n[0],i=n[1];return d.createElement(YO.Provider,{value:[r,i]},t)}var GO=function(e){var t=e.children;return d.createElement(KO,null,d.createElement(kd,null,t))};function WO(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ZO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZO(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZO(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function QO(e,t){return Tb(e,t)}function XO(e){switch(e){case wb.Playlists:return a.Subjects.EDIT_SUBJECT_PLAYLISTS;case wb.Series:return a.Subjects.EDIT_SUBJECT_SERIES;case wb.Videos:return a.Subjects.EDIT_SUBJECT_VIDEOS}}function ej(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return tj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function nj(e){var t=ej(d.useState({}),2),n=t[0],r=t[1],o=n.presentations,c=n.classifications,u=n.memberIds,s=n.membersWithClassifications,f=i.useBasicFetch(Array.isArray(u)&&function(e,t){switch(e){case wb.Playlists:return Gv(t);case wb.Series:return nO(t);case wb.Videos:return rE(t)}}(e.memberType,u)),m=ej(d.useContext(YO),2),h=m[0],y=m[1],v=Rv(p.SUBJECT);!function(e,t,n){var r=e.subjectId,i=e.memberType,o=WO(d.useContext(YO),1)[0];jb(Rg.getPresentationsFetchOptions(QO(n,"presentations")),[]),jb(Rg.getSubjectMemberIdsFetchOptions(r,i,QO(n,"memberIds")),[r,i]),jb(!!o&&Rg.getSubjectClassificationFetchOptions(r,QO(n,"classifications"),o.id,i),[r,i,o],!!o)}(e,0,r),function(e,t,n,r){var i=n.classifications;d.useEffect((function(){QO(r,"membersWithClassifications")(function(e,t,n){if(!t||!n)return;return t.map((function(t){return{id:t.id,name:t.name,classifications:n.map((function(n){return{id:n.id,selected:(r=t,i=n,!!i[e]&&!!i[e].data.filter((function(e){return e.id===r.id})).length)};var r,i}))}}))}(t.memberType,e,i))}),[e,i])}(f.data,e,n,r);var b,g,S=!!h&&!!c;return d.createElement(d.Fragment,null,d.createElement(CS,{subjectId:e.subjectId,activeAction:XO(e.memberType)}),d.createElement(as.Alert,{variant:"info",className:"m-0"},"Select which ".concat(e.memberType," are shown for each classification in this subject.")+" Change the selected presentation to view different classifications."),d.createElement("div",{className:"w-50 py-2"},!!o&&d.createElement(mS,{presentations:o,currentPresentation:h,setCurrentPresentation:y})),S&&d.createElement(DS,{members:s||[],memberType:e.memberType,getMemberAppLink:function(t){return Rb.getMemberAppLink(e.memberType,t)},getActions:function(t){return Rb.getMemberActions(e.subjectId,Cb.Subject,e.memberType,t)},classifications:c,getClassificationAppLink:h&&(b=e.memberType,g=h.id,function(e){var t,n=l.SUBJECTS,r=[g,e];switch(b){case wb.Playlists:t=a.Subjects.EDIT_CLASSIFICATION_PLAYLISTS;break;case wb.Series:t=a.Subjects.EDIT_CLASSIFICATION_SERIES;break;case wb.Videos:t=a.Subjects.EDIT_CLASSIFICATION_VIDEOS}return{application:n,action:t,args:r}}),onToggleClassification:function(t,n,r){return function(e,t,n,r,i,o,a){(a?e.addObjectsToClassification.bind(e):e.removeObjectsFromClassification.bind(e))(o,n,t,r,i)}(v,e.memberType,r?[r]:u,e.subjectId,h&&h.id,t,n)}}))}function rj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ij(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ij(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ij(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oj(e){var t=e.parentId,n=rj(d.useState(),2),i=n[0],o=n[1],c=Rv(p.SUBJECT);jb(Rg.getSubjectTreeFetchOptions(o),[]);var u={application:l.SUBJECTS,action:a.Subjects.PRESENTATIONS};return d.createElement(d.Fragment,null,d.createElement("div",{className:"pb-2 border-bottom"},d.createElement(Gp,{backToName:"Presentations",appLink:u})),d.createElement("h4",{className:"py-2"},"Create New Subject"),!!i&&d.createElement(OS,{subject:{parentId:t},subjectTree:i,saveSubject:function(e,t){return c.createSubject(e,function(e){return function(t){e(),t&&t.id&&r.AppLinkHelper.trigger({application:l.SUBJECTS,action:a.Subjects.EDIT_SUBJECT,args:[t.id]})}}(t),t)}}))}function aj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return cj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uj(e){var t=aj(d.useState(),2),n=t[0],r=t[1],o=aj(d.useState(!1),2),a=o[0],c=o[1],u=i.useBasicFetch(function(e,t){switch(e){case wb.Playlists:return Kv(t);case wb.Series:return tO(t);case wb.Videos:return nE(t)}}(e.memberType,e.memberId)),s=Rv(p.SUBJECT);jb(Rg.getSubjectFetchOptions(e.subjectId,r),[e.subjectId]);var l=!!n&&!!u.data,f="Remove ".concat(Sd(Rb.singularizeMemberType(e.memberType)));return d.createElement(oy,{title:f,closePopup:e.closePopup,showLoadingSpinner:!l},l&&d.createElement(d.Fragment,null,d.createElement("div",null,d.createElement("p",null,"Are you sure you want to remove ",d.createElement("strong",null,u.data.name)," from ",d.createElement("strong",null,n.name),"?"),d.createElement("p",null,"Please ensure that it is not in any classifications before removing.")),d.createElement(sy,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){c(!0),s.removeObjectsFromSubject(e.subjectId,[e.memberId],e.memberType,e.closePopup,e.closePopup)},buttonText:"Yes, remove this ".concat(Rb.singularizeMemberType(e.memberType)),isSpinnerButton:!0,showSpinner:a}]})))}function sj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return lj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fj(e){var t=e.subjectId,n=sj(d.useState({}),2),r=n[0];return function(e,t){var n=function(e){return Tb(t,e)};jb(Rg.getSubjectClassificationFetchOptions(e,n("classifications")),[e]),jb(Rg.getPresentationsFetchOptions(n("presentations")),[])}(t,n[1]),d.createElement(d.Fragment,null,d.createElement(CS,{subjectId:t,activeAction:a.Subjects.SUBJECT_CLASSIFICATIONS}),d.createElement(kS,{presentations:r.presentations,classificationDictionary:Ni(r.classifications,"presentationId")}))}var pj=n(128),dj=n.n(pj);function mj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return hj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yj(e){var t=e.selectedSubjectId,n=mj(d.useState(),2),r=n[0],i=n[1];jb(Rg.getSubjectTreeFetchOptions(i),[]);var o=d.useCallback((function(e){return{application:l.SUBJECTS,action:a.Subjects.EDIT_SUBJECT,args:[e.id]}}),[]),c={application:l.SUBJECTS,action:a.Subjects.NEW_SUBJECT},u=[{label:"Add child",getAppLink:function(e){return Object.assign(Object.assign({},c),{params:{parentId:e.id}})}},{label:"Delete subject",getAppLink:function(e){return{application:l.SUBJECTS,action:a.Subjects.DELETE_SUBJECT,args:[e.id]}},className:"text-danger"}];return d.createElement("div",{className:"".concat(dj.a.navContainer," h-auto pr-2 border-right")},d.createElement("h5",{className:"border-bottom pb-2"},"Subjects"),d.createElement(Kp,{appLink:c,className:"d-inline-block pb-2"},d.createElement(Vp,{svgName:Dp.Plus,size:Fp.Small}),d.createElement("span",null,"New Subject")),!!r&&d.createElement("div",{className:"border-top pt-1"},d.createElement(Zm,{tree:r,getAppLink:o,selectedIds:[t],actions:u})))}function vj(e){var t=e.currentAppLink;return d.createElement(MS,{navItems:Db(),currentAppLink:t})}function bj(e){return(bj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ej(e,t,n){return t&&Sj(e.prototype,t),n&&Sj(e,n),e}function Oj(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jj(e,t)}function jj(e,t){return(jj=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cj(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Aj(e);if(t){var i=Aj(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wj(this,n)}}function wj(e,t){return!t||"object"!==bj(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Aj(e){return(Aj=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ij=function(e){Oj(n,e);var t=Cj(n);function n(){return gj(this,n),t.apply(this,arguments)}return Ej(n,[{key:"channelName",get:function(){return l.PLAYLISTS}},{key:"appRoutes",get:function(){return{"manage/playlists(/)":"index","manage/playlists/new(/)":"newPlaylist","manage/playlists/search(/)":"searchPlaylists","manage/playlists/:id(/)":"editPlaylist","manage/playlists/:id/videos(/)":"editPlaylistVideos","manage/playlists/:id/subjects(/)":"editPlaylistSubjects","manage/playlists/:id/audiences(/)":"editPlaylistAudiences"}}},{key:"appLinks",get:function(){return["deletePlaylist","removeVideo","uploadImage","removeFromSubject"]}}]),n}(r.AppRouter),Tj=function(e){Oj(n,e);var t=Cj(n);function n(){return gj(this,n),t.apply(this,arguments)}return Ej(n,[{key:"initialize",value:function(){var e=this;Jr.values(p).forEach((function(t){return Nv.getInstance(t,e)}))}},{key:"index",value:function(e){var t;this.layout.showChildView(Tn,d.createElement(mE,{cursor:null===(t=e)||void 0===t?void 0:t.cursor}))}},{key:"searchPlaylists",value:function(e){var t,n;this.layout.showChildView(Tn,d.createElement(vE,{query:null===(t=e)||void 0===t?void 0:t.query,cursor:null===(n=e)||void 0===n?void 0:n.cursor}))}},{key:"newPlaylist",value:function(){this.layout.showChildView(Tn,d.createElement(eE,null))}},{key:"editPlaylist",value:function(e){this.layout.showChildView(Tn,d.createElement(fb,{key:e,playlistId:e}))}},{key:"editPlaylistVideos",value:function(e){this.layout.showChildView(Tn,d.createElement(XS,{key:e,playlistId:e}))}},{key:"editPlaylistSubjects",value:function(e){this.layout.showChildView(Tn,d.createElement($S,{key:e,playlistId:e}))}},{key:"editPlaylistAudiences",value:function(e){this.layout.showChildView(Tn,d.createElement(zS,{key:e,playlistId:e}))}},{key:"deletePlaylist",value:function(e){var t=Object.assign({playlistId:e},this.getPopupProps());this.layout.showChildView(kn,d.createElement(ib,Object.assign({},t)))}},{key:"removeVideo",value:function(e,t){var n=Object.assign({playlistId:e,videoId:t},this.getPopupProps());this.layout.showChildView(kn,d.createElement(uE,Object.assign({},n)))}},{key:"removeFromSubject",value:function(e,t){var n=Object.assign({subjectId:t,memberId:e,memberType:wb.Playlists},this.getPopupProps());this.layout.showChildView(kn,d.createElement(uj,Object.assign({},n)))}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(kn,d.createElement(Uv,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(v.ALERT).trigger("remove:alert",e)};this.layout.showChildView(_n,d.createElement(ry,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Playlists Application"}},{key:"channelName",get:function(){return l.PLAYLISTS}},{key:"layoutOptions",get:function(){return{name:s.CURATOR_LAYOUT,options:{provider:Fv}}}}],[{key:"router",get:function(){return Ij}}]),n}(r.Application),kj=function(e){var t=e.children;return d.createElement(kd,null,t)},_j=function(){return"/api/domain/v2/me/ratings"},Pj="ratings",Lj=function(){return{url:_j(),key:Pj}},xj=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:is.string().trim().max(350,"Description is too long").default(""),rating:is.object().shape({id:is.string()}).default({}).noUnknown(),tallPoster:is.object().shape({fileId:is.string(),fileIdType:is.mixed(),url:is.string()}).default({}).noUnknown(),banner:is.object().shape({fileId:is.string(),fileIdType:is.mixed(),url:is.string()}).default({}).noUnknown()}).noUnknown(),Nj=function(e,t){var n=l.SERIES,r=a.Series,i=[{label:"Edit Series Details",appLink:{application:n,action:r.EDIT_SERIES,args:[t]}},{label:"Videos",appLink:{application:n,action:r.EDIT_SERIES_VIDEOS,args:[t]}}];return Jv(e)&&i.push.apply(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_SERIES_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_SERIES_AUDIENCES,args:[t]}}]),i};function Rj(e){var t=Vu(),n=ys(t);return d.createElement(Wu,null,d.createElement(ds,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this series",autoFocus:!0}),d.createElement(ds,{label:"Description",as:"textarea",name:"description",id:"description",maxLength:350,value:t.values.description,placeholder:"Describe this series here",showCharacterCounter:!0}),d.createElement(Bm,{ratings:e.ratings}),d.createElement(Nd,{imageType:td.TallPosters,fieldName:"tallPoster",application:l.SERIES,uploadAction:a.Series.UPLOAD_IMAGE}),d.createElement(Nd,{imageType:td.Banners,fieldName:"banner",application:l.SERIES,uploadAction:a.Playlists.UPLOAD_IMAGE}),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(Ss,{showSpinner:t.isSubmitting,type:"submit",disabled:!n},e.id?"Save":"Create"),!!e.actions&&d.createElement(Mm,{actions:e.actions})))}function Dj(e){return d.createElement(rs,{initialValues:e.series,validationSchema:xj,onSubmit:e.saveSeries},d.createElement(Rj,{id:e.series&&e.series.id,ratings:e.ratings}))}function Mj(e){return d.createElement("div",{className:"py-2"},d.createElement(Hm,{tabs:Nj(e.currentUser,e.seriesId),isItemActive:(t=e.activeAction,function(e){return e.appLink.action===t})}));var t}function Uj(e){var t,n=Object(vn.useDispatch)(),r=Vv(),o=i.useBasicFetch(tO(e.seriesId)),c=i.useBasicFetch(Lj()),u=i.useBasicFetch(ob);return d.createElement(d.Fragment,null,!!u.data&&d.createElement(Mj,{seriesId:e.seriesId,activeAction:a.Series.EDIT_SERIES,currentUser:u.data}),!!o.data&&!!c.data&&d.createElement(Dj,{series:o.data,saveSeries:function(t,o){i.fetch(n,iO(e.seriesId,t,(function(){r.success("Successfully updated series.")}),(function(){r.error("Failed to update series.")}),o))},ratings:c.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit series page ",d.createElement(Kp,{className:"info-link",appLink:(t=e.seriesId,{application:l.SERIES,action:a.Series.LEGACY_EDIT_SERIES,args:[t]})},"here"),"."))}function Fj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zj(e){var t=Fj(d.useState({}),2),n=t[0],r=t[1],o=i.useBasicFetch(tO(e.seriesId)),c=i.useBasicFetch(ob),u=Rv(p.SUBJECT);!function(e,t,n){var r=function(e){return Tb(n,e)};jb(Rg.getObjectLevelsFetchOptions(e,wb.Series,r("seriesLevels")),[e]),jb(Rg.getObjectAudiencesFetchOptions(e,wb.Series,r("seriesAudiences")),[e,t.seriesLevels]),bb([Rg.getPresentationsFetchOptions(r("presentations")),Rg.getLevelsFetchOptions(r("levels"))],[]),jb(!!t.currentPresentation&&Rg.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.seriesId,n,r),US(n,r);var s=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.seriesLevels&&n.seriesAudiences);return d.createElement(d.Fragment,null,!!c.data&&d.createElement(Mj,{seriesId:e.seriesId,activeAction:a.Series.EDIT_SERIES_AUDIENCES,currentUser:c.data}),d.createElement(Um,{object:o.data}),!!s&&d.createElement(qg,{objectLevels:n.seriesLevels,objectAudiences:n.seriesAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:Tb(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:wb.Series,saveLevels:function(t,n,r){return u.updateObjectLevels(e.seriesId,t,wb.Series,n,r,r)},saveAudiences:function(t,r){return u.updateObjectAudiences(e.seriesId,n.currentPresentation.id,t,wb.Series,r,r)}}))}function Bj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||qj(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hj(e){return function(e){if(Array.isArray(e))return Jj(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||qj(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qj(e,t){if(e){if("string"==typeof e)return Jj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jj(e,t):void 0}}function Jj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $j(e){var t=Bj(d.useState({}),2),n=t[0],r=t[1],o=i.useBasicFetch(tO(e.seriesId)),c=i.useBasicFetch(ob),u=Rv(p.SUBJECT);!function(e,t,n){var r=function(e){return Tb(n,e)};bb([Rg.getSubjectTreeFetchOptions(r("subjectTree")),Rg.getPresentationsFetchOptions(r("presentations"))],[]),jb(Rg.getObjectSubjectsFetchOptions(e,wb.Series,r("seriesSubjects")),[e]),jb(!!t.currentPresentation&&Rg.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.seriesSubjects]);var i=function(e,t){return[].concat(Hj(t.subjectClassifications||[]),Hj(e))},o=t.seriesSubjects&&t.seriesSubjects.map((function(e){return Rg.getSubjectClassificationFetchOptions(e.id,Tb(n,"subjectClassifications",i))}));bb(o,[t.seriesSubjects],!!o),jb(Rg.getObjectClassificationsFetchOptions(e,wb.Series,r("seriesClassifications")),[e,t.seriesSubjects])}(e.seriesId,n,r),US(n,r);var s=!!(n.seriesSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.seriesClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,!!c.data&&d.createElement(Mj,{seriesId:e.seriesId,activeAction:a.Series.EDIT_SERIES_SUBJECTS,currentUser:c.data}),d.createElement(Um,{object:o.data}),s&&d.createElement(bS,{objectSubjects:n.seriesSubjects,subjectTree:n.subjectTree,memberType:wb.Series,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:Tb(r,"currentPresentation"),objectClassifications:n.seriesClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return u.updateObjectSubjects(e.seriesId,t,wb.Series,n,r,r)},saveClassifications:function(t,r){return u.updateObjectClassifications(e.seriesId,n.currentPresentation.id,t,wb.Series,r,r)}}))}function Yj(){var e=Object(vn.useDispatch)(),t=Vv(),n=i.useBasicFetch(Lj());return d.createElement(d.Fragment,null,!!n.data&&d.createElement(Dj,{saveSeries:function(n,o){var c=function(){t.error("Failed to create series.")},u=function(e){t.success("Successfully created series."),function(e){r.AppLinkHelper.trigger({application:l.SERIES,action:a.Series.EDIT_SERIES,args:[e.id]})}(e)};i.fetch(e,rO(n,(function(t){var n={permissions:qv()};i.fetch(e,iO(t.id,n,u,c,o))}),c))},ratings:n.data}))}function Kj(e){return(Kj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gj(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wj(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zj(e,t,n){return t&&Wj(e.prototype,t),n&&Wj(e,n),e}function Qj(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xj(e,t)}function Xj(e,t){return(Xj=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=nC(e);if(t){var i=nC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return tC(this,n)}}function tC(e,t){return!t||"object"!==Kj(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nC(e){return(nC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rC=function(e){Qj(n,e);var t=eC(n);function n(){return Gj(this,n),t.apply(this,arguments)}return Zj(n,[{key:"channelName",get:function(){return l.SERIES}},{key:"appRoutes",get:function(){return{"manage/series/new(/)":"newSeries","manage/series/:id(/)":"editSeries","manage/series/:id/videos(/)":"editSeriesVideos","manage/series/:id/subjects(/)":"editSeriesSubjects","manage/series/:id/audiences(/)":"editSeriesAudiences","manage/legacy/series/:id(/)":"legacyEditSeries"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),iC=function(e){Qj(n,e);var t=eC(n);function n(){return Gj(this,n),t.apply(this,arguments)}return Zj(n,[{key:"initialize",value:function(){var e=this;Jr.values(p).forEach((function(t){return Nv.getInstance(t,e)}))}},{key:"newSeries",value:function(){this.layout.showChildView(Tn,d.createElement(Yj,null))}},{key:"editSeries",value:function(e){this.layout.showChildView(Tn,d.createElement(Uj,{seriesId:e}))}},{key:"editSeriesVideos",value:function(e){this.legacyEditSeries(e)}},{key:"editSeriesSubjects",value:function(e){this.layout.showChildView(Tn,d.createElement($j,{seriesId:e}))}},{key:"editSeriesAudiences",value:function(e){this.layout.showChildView(Tn,d.createElement(zj,{seriesId:e}))}},{key:"legacyEditSeries",value:function(e){r.LocationUtils.Redirect("/manage/legacy/series/".concat(e),!0)}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(kn,d.createElement(Uv,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(v.ALERT).trigger("remove:alert",e)};this.layout.showChildView(_n,d.createElement(ry,{alerts:n,removeAlert:r}))}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Series Application"}},{key:"channelName",get:function(){return l.SERIES}},{key:"layoutOptions",get:function(){return{name:s.CURATOR_LAYOUT,options:{provider:kj}}}}],[{key:"router",get:function(){return rC}}]),n}(r.Application);function oC(e){return(oC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uC(e,t,n){return t&&cC(e.prototype,t),n&&cC(e,n),e}function sC(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lC(e,t)}function lC(e,t){return(lC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dC(e);if(t){var i=dC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pC(this,n)}}function pC(e,t){return!t||"object"!==oC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dC(e){return(dC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mC=function(e){sC(n,e);var t=fC(n);function n(){return aC(this,n),t.apply(this,arguments)}return uC(n,[{key:"channelName",get:function(){return l.SUBJECTS}},{key:"appRoutes",get:function(){return{"manage/subjects(/)":"subjects","manage/subjects/add-objects(/)":"addSubjectMembers","manage/subjects/new(/)":"newSubject","manage/subjects/:id/edit(/)":"editSubject","manage/subjects/:id/edit/playlists(/)":"editSubjectPlaylists","manage/subjects/:id/edit/series(/)":"editSubjectSeries","manage/subjects/:id/edit/videos(/)":"editSubjectVideos","manage/subjects/:id/classifications(/)":"subjectClassifications","manage/subjects/classifications(/)":"classifications","manage/subjects/presentations/:id/classifications(/)":"presentationClassifications","manage/subjects/presentations/:id/classifications/new(/)":"newClassification","manage/subjects/presentations/:id/classifications/:id/edit(/)":"editClassification","manage/subjects/presentations/:id/classifications/:id/edit/playlists(/)":"editClassificationPlaylists","manage/subjects/presentations/:id/classifications/:id/edit/series(/)":"editClassificationSeries","manage/subjects/presentations/:id/classifications/:id/edit/videos(/)":"editClassificationVideos","manage/subjects/levels(/)":"levels","manage/subjects/levels/new(/)":"newLevel","manage/subjects/levels/:id(/)":"editLevel","manage/subjects/audiences(/)":"audiences","manage/subjects/presentations/:id/audiences(/)":"presentationAudiences","manage/subjects/presentations/:id/audiences/new(/)":"newAudience","manage/subjects/presentations/:id/audiences/:id/edit(/)":"editAudience","manage/subjects/presentations(/)":"presentations","manage/subjects/presentations/new":"newPresentation","manage/subjects/presentations/:id(/)":"editPresentation"}}},{key:"appLinks",get:function(){return["deleteClassification","removeClassificationMember","deleteSubject","removeSubjectMember","deleteAudience","uploadImage"]}}]),n}(r.AppRouter),hC=function(e){sC(n,e);var t=fC(n);function n(){return aC(this,n),t.apply(this,arguments)}return uC(n,[{key:"initialize",value:function(){var e=this;this.subjectDataService=Nv.getInstance(p.SUBJECT,this),Jr.values(p).forEach((function(t){return Nv.getInstance(t,e)}))}},{key:"subjects",value:function(){this.subjectDataService.getSubjectTree((function(e){var t=!!e.children&&e.children[0];t?r.AppLinkHelper.trigger({application:l.SUBJECTS,action:a.Subjects.EDIT_SUBJECT,args:[t.id]},{replace:!0}):r.AppLinkHelper.trigger({application:l.SUBJECTS,action:a.Subjects.NEW_SUBJECT},{replace:!0})}))}},{key:"newSubject",value:function(e){var t={parentId:e.parentId};this.layout.showChildView(Tn,d.createElement(oj,Object.assign({key:e.parentId},t))),this.renderSubjectsLeftNav()}},{key:"editSubject",value:function(e){this.layout.showChildView(Tn,d.createElement(qO,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"editSubjectPlaylists",value:function(e){var t={subjectId:e,memberType:wb.Playlists};this.layout.showChildView(Tn,d.createElement(nj,Object.assign({key:"".concat(e,":playlists")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectSeries",value:function(e){var t={subjectId:e,memberType:wb.Series};this.layout.showChildView(Tn,d.createElement(nj,Object.assign({key:"".concat(e,":series")},t))),this.renderSubjectsLeftNav(e)}},{key:"editSubjectVideos",value:function(e){var t={subjectId:e,memberType:wb.Videos};this.layout.showChildView(Tn,d.createElement(nj,Object.assign({key:"".concat(e,":videos")},t))),this.renderSubjectsLeftNav(e)}},{key:"subjectClassifications",value:function(e){this.layout.showChildView(Tn,d.createElement(fj,{key:e,subjectId:e})),this.renderSubjectsLeftNav(e)}},{key:"addSubjectMembers",value:function(e){var t=e.memberType,n=e.objectIds;if(t&&n){var r={memberType:t,objectIds:Array.isArray(n)?n:[n]};this.layout.showChildView(Tn,d.createElement(UO,Object.assign({},r))),this.hideLeftNav()}}},{key:"removeSubjectMember",value:function(e,t,n){var r=Object.assign({subjectId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(kn,d.createElement(uj,Object.assign({},r)))}},{key:"deleteSubject",value:function(e){var t=e.toString()===this.currentLeftNavId.toString()?{application:l.SUBJECTS,action:a.Subjects.NEW_SUBJECT}:null,n=Object.assign({subjectId:e,routeToOnDelete:t||null},this.getPopupProps());this.layout.showChildView(kn,d.createElement(zO,Object.assign({},n)))}},{key:"classifications",value:function(){var e={objectType:"classifications",getAppLink:function(e){return{application:l.SUBJECTS,action:a.Subjects.PRESENTATION_CLASSIFICATIONS,args:[e.id]}}};this.layout.showChildView(Tn,d.createElement(TO,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationClassifications",value:function(e){this.subjectDataService.getClassificationTree(e,(function(t){var n=!!t.children&&t.children[0];n?r.AppLinkHelper.trigger({application:l.SUBJECTS,action:a.Subjects.EDIT_CLASSIFICATION,args:[e,n.id]},{replace:!0}):r.AppLinkHelper.trigger({application:l.SUBJECTS,action:a.Subjects.NEW_CLASSIFICATION,args:[e]},{replace:!0})}))}},{key:"newClassification",value:function(e,t){var n={presentationId:e,parentId:t.parentId};this.layout.showChildView(Tn,d.createElement(eO,Object.assign({key:t.parentId},n))),this.renderClassificationLeftNav(e)}},{key:"editClassification",value:function(e,t){var n={presentationId:e,classificationId:t};this.layout.showChildView(Tn,d.createElement(KE,Object.assign({key:t},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationPlaylists",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:wb.Playlists};this.layout.showChildView(Tn,d.createElement(ZE,Object.assign({key:"".concat(t,":playlists")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationSeries",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:wb.Series};this.layout.showChildView(Tn,d.createElement(ZE,Object.assign({key:"".concat(t,":series")},n))),this.renderClassificationLeftNav(e,t)}},{key:"editClassificationVideos",value:function(e,t){var n={presentationId:e,classificationId:t,memberType:wb.Videos};this.layout.showChildView(Tn,d.createElement(ZE,Object.assign({key:"".concat(t,":videos")},n))),this.renderClassificationLeftNav(e,t)}},{key:"removeClassificationMember",value:function(e,t,n){var r=Object.assign({classificationId:e,memberId:t,memberType:n},this.getPopupProps());this.layout.showChildView(kn,d.createElement(cO,Object.assign({},r)))}},{key:"deleteClassification",value:function(e,t){var n=t===this.currentLeftNavId?{application:l.SUBJECTS,action:a.Subjects.NEW_CLASSIFICATION,args:[e]}:null,r=Object.assign({classificationId:t,routeToOnDelete:n||null},this.getPopupProps());this.layout.showChildView(kn,d.createElement(JE,Object.assign({},r)))}},{key:"levels",value:function(){this.layout.showChildView(Tn,d.createElement(hO,null)),this.hideLeftNav()}},{key:"newLevel",value:function(){this.layout.showChildView(Tn,d.createElement(yO,null)),this.hideLeftNav()}},{key:"editLevel",value:function(e){this.layout.showChildView(Tn,d.createElement(lO,{key:e,id:e})),this.hideLeftNav()}},{key:"audiences",value:function(){var e={objectType:"audiences",getAppLink:function(e){return{application:l.SUBJECTS,action:a.Subjects.PRESENTATION_AUDIENCES,args:[e.id]}}};this.layout.showChildView(Tn,d.createElement(TO,Object.assign({},e))),this.hideLeftNav()}},{key:"presentationAudiences",value:function(e){this.layout.showChildView(Tn,d.createElement(PE,{presentationId:e})),this.hideLeftNav()}},{key:"newAudience",value:function(e){this.layout.showChildView(Tn,d.createElement(RE,{presentationId:e})),this.hideLeftNav()}},{key:"editAudience",value:function(e,t){var n={presentationId:e,audienceId:t};this.layout.showChildView(Tn,d.createElement(wE,Object.assign({key:t},n))),this.hideLeftNav()}},{key:"deleteAudience",value:function(e,t){var n={application:l.SUBJECTS,action:a.Subjects.PRESENTATION_AUDIENCES,args:[e]},r=Object.assign({id:t,routeToOnDelete:n},this.getPopupProps());this.layout.showChildView(kn,d.createElement(EE,Object.assign({},r)))}},{key:"presentations",value:function(){this.layout.showChildView(Tn,d.createElement(CO,null)),this.hideLeftNav()}},{key:"newPresentation",value:function(){this.layout.showChildView(Tn,d.createElement(wO,null))}},{key:"editPresentation",value:function(e){this.layout.showChildView(Tn,d.createElement(gO,{key:e,id:e})),this.hideLeftNav()}},{key:"uploadImage",value:function(e){var t=Object.assign({imageType:e},this.getPopupProps());this.layout.showChildView(kn,d.createElement(Uv,Object.assign({},t)))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],r=function(e){return h.Radio.channel(v.ALERT).trigger("remove:alert",e)};this.layout.showChildView(_n,d.createElement(ry,{alerts:n,removeAlert:r}))}},{key:"renderClassificationLeftNav",value:function(e,t){this.setCurrentLeftNavItem(t);var n={presentationId:e,selectedClassificationId:t};this.layout.showChildView(In,d.createElement(BE,Object.assign({},n)))}},{key:"renderSubjectsLeftNav",value:function(e){this.setCurrentLeftNavItem(e),this.layout.showChildView(In,d.createElement(yj,{selectedSubjectId:e}))}},{key:"setCurrentLeftNavItem",value:function(e){this.currentLeftNavId=e||null}},{key:"hideLeftNav",value:function(){this.setCurrentLeftNavItem(),this.layout.hideLeftNav()}},{key:"getTopNav",value:function(e){return d.createElement(vj,{currentAppLink:e})}},{key:"getPopupProps",value:function(){var e=this;return{closePopup:function(){return e.layout.closePopup()}}}},{key:"name",get:function(){return"Subjects Application"}},{key:"channelName",get:function(){return l.SUBJECTS}},{key:"layoutOptions",get:function(){return{name:s.CURATOR_LAYOUT,options:{provider:GO,getTopNavView:this.getTopNav}}}}],[{key:"router",get:function(){return mC}}]),n}(r.Application);function yC(e){return(yC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gC(e,t){return(gC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function SC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=OC(e);if(t){var i=OC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return EC(this,n)}}function EC(e,t){return!t||"object"!==yC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function OC(e){return(OC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jC,CC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gC(e,t)}(o,e);var t,n,r,i=SC(o);function o(){return vC(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"onShowAlert",value:function(e){if(this.layoutOptions.options.alertRegion){var t=e.ctor,n=e.collection,r=n?n.toJSON():[];this.layout.showChildView(this.layoutOptions.options.alertRegion,d.createElement(t,{alerts:r,removeAlert:function(e){return h.Radio.channel(v.ALERT).trigger("remove:alert",e)}}))}}}])&&bC(t.prototype,n),r&&bC(t,r),o}(re),wC=function(e){return{url:"/api/domain/v1/themes/".concat(e),key:"themes:".concat(e)}},AC=function(e){var t="/api/domain/v1/themes",n="themes";return e&&(t+="?type=".concat(e),n+=":type:".concat(e)),{url:t,key:n}},IC=function(e,t,n,r){return{url:"/api/domain/v1/themes",key:"theme",data:e,type:xr.POST,invalidationKeys:"themes",success:t,error:n,always:r}},TC=function(e,t,n,r,i){return{url:"/api/domain/v1/themes/".concat(e),key:"update:theme:".concat(e),data:t,type:xr.PUT,success:n,error:r,always:i}},kC=function(e,t,n,r){return{url:"/api/domain/v1/themes/".concat(e),key:"delete:theme:".concat(e),type:xr.DELETE,invalidationKeys:"themes",success:t,error:n,always:r}},_C=function(e){return{application:l.THEMES,action:a.Themes.EDIT_THEME,args:[e.id]}};function PC(){var e=i.useBasicFetch(AC());return e.data?d.createElement(Vm,{objects:e.data,getObjectAppLink:_C,newObjectAppLink:{application:l.THEMES,action:a.Themes.NEW_THEME},objectName:"Theme"}):d.createElement(d.Fragment,null)}!function(e){e.Glance="glance"}(jC||(jC={}));var LC=[{key:"topLeft",label:"Top Left"},{key:"topRight",label:"Top Right"},{key:"bottomLeft",label:"Bottom Left"},{key:"bottomRight",label:"Bottom Right"}];function xC(){var e=Vu();return d.createElement("div",{className:"form-group"},LC.map((function(t){var n="data.".concat(t.key);return d.createElement(Nd,{label:t.label,imageType:td.HeroBanners,fieldName:n,application:l.THEMES,uploadAction:a.Videos.UPLOAD_IMAGE,setSelectedImage:function(t){e.setFieldValue(n,{fileId:t.id,url:t.url,fileIdType:rd.ImageAPIv2})}})})))}var NC=is.object().shape({fileId:is.string(),fileIdType:is.mixed(),url:is.string()}).default({}).noUnknown(),RC=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default(""),type:is.mixed().required("Type is required"),data:is.mixed().when("type",{is:jC.Glance,then:is.object().shape({topLeft:NC,topRight:NC,bottomLeft:NC,bottomRight:NC}).noUnknown(),otherwise:is.mixed().strip(!0)}).default({})}).noUnknown();function DC(e){var t=Vu(),n=function(e){switch(e){case jC.Glance:return xC;default:return}}(t.values.type);return d.createElement(Wu,null,d.createElement(ds,{label:"Name",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this theme",autoFocus:!0}),d.createElement(ds,{as:"select",label:"Type",name:"type",id:"type",value:t.values.type},d.createElement("option",{value:null},"Select a type..."),Jr.getEnumKeys(jC).map((function(e){return d.createElement("option",{key:e,value:jC[e]},e)}))),!!n&&d.createElement(n,null),d.createElement("div",{className:"d-flex justify-content-between align-items-center"},d.createElement(Rs,{isNew:e.isNew}),!!e.actions&&d.createElement(Mm,{actions:e.actions})))}function MC(e){var t;return d.createElement(rs,{initialValues:e.theme,validationSchema:RC,onSubmit:e.saveTheme},d.createElement(DC,{isNew:!(null===(t=e.theme)||void 0===t?void 0:t.id),actions:e.actions}))}function UC(){var e=Object(vn.useDispatch)();return d.createElement(MC,{saveTheme:function(t,n){i.fetch(e,IC(t,(function(e){n(),r.AppLinkHelper.trigger({application:l.THEMES,action:a.Themes.EDIT_THEME,args:[e.id]})}),null,n))}})}function FC(e){var t=Object(vn.useDispatch)(),n=Vv(),r=i.useBasicFetch(wC(e.id));return r.data?d.createElement(MC,{theme:r.data,saveTheme:function(r,o){i.fetch(t,TC(e.id,r,(function(){n.success("Successfully updated theme")}),(function(){n.error("Failed to update theme")}),o))},actions:[{label:"Delete theme",className:"btn btn-danger",button:!0,appLink:{application:l.THEMES,action:a.Themes.DELETE_THEME,args:[e.id]}}]}):d.createElement(d.Fragment,null)}function VC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zC(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function BC(e){var t=Object(vn.useDispatch)(),n=Vv(),o=VC(d.useState(!1),2),c=o[0],u=o[1],s=i.useBasicFetch(wC(e.id));return d.createElement(oy,{title:"Delete Theme",closePopup:e.closePopup,showLoadingSpinner:!s.data},d.createElement(d.Fragment,null,d.createElement("p",null,"Are you sure you want to delete ",d.createElement("strong",null,s.data.name),"?"),d.createElement(sy,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:"Cancel"},{variant:"danger",onClick:function(){u(!0),i.fetch(t,kC(e.id,(function(){n.success("Successfully deleted theme"),r.AppLinkHelper.trigger({application:l.THEMES,action:a.Themes.THEMES})}),(function(){n.error("Failed to delete theme")})))},buttonText:"Yes, delete this theme",isSpinnerButton:!0,showSpinner:c}]})))}var HC=function(e){var t=e.children;return d.createElement(kd,null,t)};function qC(e){return(qC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function YC(e,t,n){return t&&$C(e.prototype,t),n&&$C(e,n),e}function KC(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GC(e,t)}function GC(e,t){return(GC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function WC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=QC(e);if(t){var i=QC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ZC(this,n)}}function ZC(e,t){return!t||"object"!==qC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function QC(e){return(QC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var XC=function(e){KC(n,e);var t=WC(n);function n(){return JC(this,n),t.apply(this,arguments)}return YC(n,[{key:"channelName",get:function(){return l.THEMES}},{key:"appRoutes",get:function(){return{"manage/themes(/)":"themes","manage/themes/new(/)":"newTheme","manage/themes/:id(/)":"editTheme"}}},{key:"appLinks",get:function(){return["deleteTheme","uploadImage"]}}]),n}(r.AppRouter),ew=function(e){KC(n,e);var t=WC(n);function n(){return JC(this,n),t.apply(this,arguments)}return YC(n,[{key:"themes",value:function(){this.layout.showChildView(Tn,d.createElement(PC,null))}},{key:"newTheme",value:function(){this.layout.showChildView(Tn,d.createElement(UC,null))}},{key:"editTheme",value:function(e){this.layout.showChildView(Tn,d.createElement(FC,{id:e}))}},{key:"deleteTheme",value:function(e){var t=this;this.layout.showChildView(kn,d.createElement(BC,{id:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(kn,d.createElement(Uv,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Themes Application"}},{key:"channelName",get:function(){return l.THEMES}},{key:"layoutOptions",get:function(){return{name:s.CURATOR_LAYOUT,options:{provider:HC}}}}],[{key:"router",get:function(){return XC}}]),n}(CC),tw=function(e){var t=e.children;return d.createElement(kd,null,t)},nw=function(e,t){var n=l.VIDEOS,r=a.Videos,i=[{label:"Edit Video Details",appLink:{application:n,action:r.EDIT_VIDEO,args:[t]}}];return Jv(e)?[].concat(i,[{label:"Subjects",appLink:{application:n,action:r.EDIT_VIDEO_SUBJECTS,args:[t]}},{label:"Audiences",appLink:{application:n,action:r.EDIT_VIDEO_AUDIENCES,args:[t]}},{label:"Aliases",appLink:{application:n,action:r.EDIT_VIDEO_ALIASES,args:[t]}}]):i};function rw(e){var t,n=nw(e.currentUser,e.videoId);return n.length<2?d.createElement(d.Fragment,null):d.createElement("div",{className:"py-2"},d.createElement(Hm,{tabs:n,isItemActive:(t=e.activeAction,function(e){return e.appLink.action===t})}))}var iw,ow=is.object().shape({name:is.string().trim().max(255,"Name is too long").required("Name is required").default(""),description:is.string().trim().default(""),status:is.mixed().required("Status is required"),productionYear:is.number().min(1900),rating:is.object().shape({id:is.string()}).default({}).noUnknown(),thumbnail:is.object().shape({fileId:is.string(),fileIdType:is.mixed(),url:is.string()}).default({}).noUnknown(),heroBanner:is.object().shape({fileId:is.string(),fileIdType:is.mixed(),url:is.string()}).default({}).noUnknown(),glance:is.object().shape({theme:is.string(),format:is.mixed(),content:is.string()}).default({}).noUnknown()}).noUnknown();!function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Pending=3]="Pending",e[e.Rejected=4]="Rejected",e[e.Processing=5]="Processing"}(iw||(iw={}));var aw,cw=n(129);function uw(e){var t,n,r,i,o,a=Vu();return d.createElement("div",{className:"form-group p-2 border"},d.createElement("div",{className:"border-bottom mb-2"},d.createElement("label",null,"Summary")),d.createElement(ds,{as:"select",label:"Theme",name:"glance.theme",id:"type",value:null===(t=a.values.glance)||void 0===t?void 0:t.theme},d.createElement("option",{value:null},"Select a theme..."),e.themes.map((function(e){return d.createElement("option",{key:e.id,value:e.name},e.name)}))),d.createElement(ds,{as:"select",label:"Format",name:"glance.format",id:"type",value:null===(n=a.values.glance)||void 0===n?void 0:n.format},d.createElement("option",{value:null},"Select a format..."),Jr.getEnumKeys(aw).map((function(e){return d.createElement("option",{key:e,value:aw[e]},e)}))),d.createElement(ds,{label:"Content",as:"textarea",name:"glance.content",id:"content",value:null===(r=a.values.glance)||void 0===r?void 0:r.content}),(null===(i=a.values.glance)||void 0===i?void 0:i.format)===aw.Markdown&&d.createElement("div",{className:"form-group"},d.createElement("label",null,"Content Preview"),d.createElement("div",{className:"border rounded py-2",dangerouslySetInnerHTML:{__html:cw(null===(o=a.values.glance)||void 0===o?void 0:o.content)}})))}function sw(e){switch(e){case iw.Published:return"badge-success";case iw.Archived:return"badge-danger";case iw.Draft:return"badge-warning";case iw.Pending:return"badge-info";case iw.Rejected:return"badge-dark";default:return"badge-secondary"}}function lw(e){var t=Vu(),n=!!e.rightslineId,r=Jv(e.currentUser);return d.createElement(Wu,null,n&&d.createElement(ds,{label:"Rightsline ID",name:"rightslineId",id:"rightslineId",value:e.rightslineId,disabled:!0}),d.createElement(ds,{label:"Name",type:"text",name:"name",id:"name",value:t.values.name,placeholder:"Enter a name for this video",disabled:n,autoFocus:!0}),d.createElement("div",{className:"form-group"},d.createElement("label",null,"Status"),d.createElement("div",null,d.createElement("span",{className:"badge ".concat(sw(t.values.status))},iw[t.values.status]))),d.createElement(ds,{label:"Description",as:"textarea",name:"description",id:"description",value:t.values.description,placeholder:"Describe this video here",disabled:n,showCharacterCounter:!0}),d.createElement(ds,{label:"Production Year",type:"number",name:"productionYear",id:"productionYear",value:t.values.productionYear,disabled:n}),d.createElement(Bm,{ratings:e.ratings,disabled:n}),d.createElement(Nd,{imageType:td.Thumbnails,fieldName:"thumbnail",application:l.VIDEOS,uploadAction:a.Videos.UPLOAD_IMAGE}),d.createElement(Nd,{imageType:td.HeroBanners,fieldName:"heroBanner",application:l.VIDEOS,uploadAction:a.Videos.UPLOAD_IMAGE}),r&&d.createElement(uw,{themes:e.themes}),d.createElement(Rs,{isNew:!e.id}))}function fw(e,t){if(e)return t?Object.assign(Object.assign({},e),t):e}function pw(e){return d.createElement(rs,{initialValues:fw(e.video,e.rightslineVideo),validationSchema:ow,onSubmit:e.saveVideo,allowInitialSubmit:!!e.rightslineVideo},d.createElement(lw,{id:e.video&&e.video.id,ratings:e.ratings,themes:e.themes,currentUser:e.currentUser,rightslineId:e.rightslineId}))}function dw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hw(e){var t,n=Object(vn.useDispatch)(),r=dw(d.useState(!1),2),o=r[0],c=r[1],u=i.useBasicFetch(nE(e.videoId)),s=i.useBasicFetch(iE(e.videoId)),f=i.useBasicFetch(Lj()),p=i.useBasicFetch(AC(jC.Glance)),m=i.useBasicFetch(ob);var h,y=!!u.data&&!!f.data&&!!p.data&&!!m.data&&s.isComplete;return d.createElement(d.Fragment,null,!!m.data&&d.createElement(rw,{videoId:e.videoId,activeAction:a.Videos.EDIT_VIDEO,currentUser:m.data}),!!s.data&&d.createElement("div",{className:"pt-3 text-right"},d.createElement(as.Button,{variant:"outline-dark",size:"sm",onClick:function(){s.isFetching||(c(!0),i.fetch(n,iE(e.videoId)))}},"Sync from Rightsline")),y&&d.createElement(pw,{video:u.data,saveVideo:function(t,r){i.fetch(n,oE(e.videoId,t,null,null,r))},ratings:f.data,themes:p.data,currentUser:m.data,rightslineId:null===(t=s.data)||void 0===t?void 0:t.rightslineId,rightslineVideo:o&&s.data}),d.createElement("div",{className:"py-3 text-right"},"Can't find what you're looking for? Try the old edit video page ",d.createElement(Kp,{className:"info-link",appLink:(h=e.videoId,{application:l.VIDEOS,action:a.Videos.LEGACY_EDIT_VIDEO,args:[h]})},"here"),"."))}function yw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bw(e){var t=yw(d.useState({}),2),n=t[0],r=t[1],o=i.useBasicFetch(nE(e.videoId)),c=i.useBasicFetch(ob),u=Rv(p.SUBJECT);!function(e,t,n){var r=function(e){return Tb(n,e)};jb(Rg.getObjectLevelsFetchOptions(e,wb.Videos,r("videoLevels")),[e]),jb(Rg.getObjectAudiencesFetchOptions(e,wb.Videos,r("videoAudiences")),[e,t.videoLevels]),bb([Rg.getPresentationsFetchOptions(r("presentations")),Rg.getLevelsFetchOptions(r("levels"))],[]),jb(!!t.currentPresentation&&Rg.getAudiencesFetchOptions(t.currentPresentation.id,r("presentationAudiences")),[t.currentPresentation],!!t.currentPresentation)}(e.videoId,n,r),US(n,r);var s=!!(n.presentations&&n.levels&&n.presentationAudiences&&n.videoLevels&&n.videoAudiences);return d.createElement(d.Fragment,null,!!c.data&&d.createElement(rw,{videoId:e.videoId,activeAction:a.Videos.EDIT_VIDEO_AUDIENCES,currentUser:c.data}),d.createElement(Um,{object:o.data}),!!s&&d.createElement(qg,{objectLevels:n.videoLevels,objectAudiences:n.videoAudiences,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:Tb(r,"currentPresentation"),levels:n.levels,presentationAudiences:n.presentationAudiences,memberType:wb.Videos,saveLevels:function(t,n,r){return u.updateObjectLevels(e.videoId,t,wb.Videos,n,r,r)},saveAudiences:function(t,r){return u.updateObjectAudiences(e.videoId,n.currentPresentation.id,t,wb.Videos,r,r)}}))}function gw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return n}(e,t)||Ew(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sw(e){return function(e){if(Array.isArray(e))return Ow(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Ew(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ew(e,t){if(e){if("string"==typeof e)return Ow(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ow(e,t):void 0}}function Ow(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jw(e){var t=gw(d.useState({}),2),n=t[0],r=t[1],o=i.useBasicFetch(nE(e.videoId)),c=i.useBasicFetch(ob),u=Rv(p.SUBJECT);!function(e,t,n){var r=function(e){return Tb(n,e)};bb([Rg.getSubjectTreeFetchOptions(r("subjectTree")),Rg.getPresentationsFetchOptions(r("presentations"))],[]),jb(Rg.getObjectSubjectsFetchOptions(e,wb.Videos,r("videoSubjects")),[e]),jb(!!t.currentPresentation&&Rg.getClassificationTreeFetchOptions(t.currentPresentation.id,r("classificationTree")),[t.currentPresentation],!!t.currentPresentation),d.useEffect((function(){return r("subjectClassifications")([])}),[t.videoSubjects]);var i=function(e,t){return[].concat(Sw(t.subjectClassifications||[]),Sw(e))},o=t.videoSubjects&&t.videoSubjects.map((function(e){return Rg.getSubjectClassificationFetchOptions(e.id,Tb(n,"subjectClassifications",i))}));bb(o,[t.videoSubjects],!!o),jb(Rg.getObjectClassificationsFetchOptions(e,wb.Videos,r("videoClassifications")),[e,t.videoSubjects])}(e.videoId,n,r),US(n,r);var s=!!(n.videoSubjects&&n.subjectTree&&n.presentations&&n.classificationTree&&n.videoClassifications&&n.subjectClassifications);return d.createElement(d.Fragment,null,!!c.data&&d.createElement(rw,{videoId:e.videoId,activeAction:a.Videos.EDIT_VIDEO_SUBJECTS,currentUser:c.data}),d.createElement(Um,{object:o.data}),s&&d.createElement(bS,{objectSubjects:n.videoSubjects,subjectTree:n.subjectTree,memberType:wb.Videos,presentations:n.presentations,currentPresentation:n.currentPresentation,setCurrentPresentation:Tb(r,"currentPresentation"),objectClassifications:n.videoClassifications,objectSubjectClassifications:n.subjectClassifications,classificationTree:n.classificationTree,saveSubjects:function(t,n,r){return u.updateObjectSubjects(e.videoId,t,wb.Videos,n,r,r)},saveClassifications:function(t,r){return u.updateObjectClassifications(e.videoId,n.currentPresentation.id,t,wb.Videos,r,r)}}))}!function(e){e.Markdown="text/markdown"}(aw||(aw={}));var Cw=function(e){return{key:"aliases:".concat(e),url:"/api/master/v2/objects/".concat(e,"/aliases")}},ww=function(e,t,n,r){return{key:"create:alias",url:"/api/master/v2/objects/".concat(e,"/aliases"),type:xr.POST,invalidationKeys:"aliases:".concat(e),data:t,success:n,error:r}},Aw=function(e,t,n,r){return{key:"delete:alias",url:"/api/domain/v2/objects/".concat(e,"/aliases/").concat(t),type:xr.DELETE,invalidationKeys:"aliases:".concat(e),success:n,error:r}};function Iw(e){var t=Object(vn.useDispatch)(),n=Vv(),r=i.useBasicFetch(Cw(e.videoId)),o=i.useBasicFetch(ob);return r.data?d.createElement(d.Fragment,null,!!o.data&&d.createElement(rw,{videoId:e.videoId,activeAction:a.Videos.EDIT_VIDEO_ALIASES,currentUser:o.data}),d.createElement(Ch,{aliases:r.data.data,onSave:function(r,o){i.fetch(t,ww(e.videoId,r,(function(){n.success("Successfully created alias"),o()}),(function(){n.error("Something went wrong creating your alias")})))},onDelete:function(r){i.fetch(t,Aw(e.videoId,r,(function(){n.success("Successfully deleted alias")}),(function(){n.error("Something went wrong deleting your alias")})))}})):d.createElement(d.Fragment,null,"Loading...")}function Tw(e){return(Tw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pw(e,t,n){return t&&_w(e.prototype,t),n&&_w(e,n),e}function Lw(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xw(e,t)}function xw(e,t){return(xw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Dw(e);if(t){var i=Dw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Rw(this,n)}}function Rw(e,t){return!t||"object"!==Tw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dw(e){return(Dw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Mw,Uw=function(e){Lw(n,e);var t=Nw(n);function n(){return kw(this,n),t.apply(this,arguments)}return Pw(n,[{key:"channelName",get:function(){return l.VIDEOS}},{key:"appRoutes",get:function(){return{"manage/videos/:id(/)":"editVideo","manage/videos/:id/audiences(/)":"editVideoAudiences","manage/videos/:id/subjects(/)":"editVideoSubjects","manage/videos/:id/aliases(/)":"editVideoAliases","tools/programlookup/:id":"legacyEditVideo"}}},{key:"appLinks",get:function(){return["uploadImage"]}}]),n}(r.AppRouter),Fw=function(e){Lw(n,e);var t=Nw(n);function n(){return kw(this,n),t.apply(this,arguments)}return Pw(n,[{key:"initialize",value:function(){var e=this;Jr.values(p).forEach((function(t){return Nv.getInstance(t,e)}))}},{key:"editVideo",value:function(e){this.layout.showChildView(Tn,d.createElement(hw,{videoId:e}))}},{key:"editVideoAudiences",value:function(e){this.layout.showChildView(Tn,d.createElement(bw,{videoId:e}))}},{key:"editVideoSubjects",value:function(e){this.layout.showChildView(Tn,d.createElement(jw,{videoId:e}))}},{key:"editVideoAliases",value:function(e){this.layout.showChildView(Tn,d.createElement(Iw,{videoId:e}))}},{key:"legacyEditVideo",value:function(e){r.LocationUtils.Redirect("/tools/programlookup/".concat(e))}},{key:"uploadImage",value:function(e){var t=this;this.layout.showChildView(kn,d.createElement(Uv,{imageType:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"name",get:function(){return"Videos Application"}},{key:"channelName",get:function(){return l.VIDEOS}},{key:"layoutOptions",get:function(){return{name:s.CURATOR_LAYOUT,options:{provider:tw,alertRegion:_n}}}}],[{key:"router",get:function(){return Uw}}]),n}(CC);function Vw(e){return(Vw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zw(e){return function(e){if(Array.isArray(e))return Bw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Bw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bw(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qw(e,t){return(qw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yw(e);if(t){var i=Yw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $w(this,n)}}function $w(e,t){return!t||"object"!==Vw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yw(e){return(Yw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.Fifo="FifoMemoryCache"}(Mw||(Mw={}));var Kw,Gw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qw(e,t)}(o,e);var t,n,r,i=Jw(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).size=e.size,t.cache={},t.cachedkeys=[],t}return t=o,(n=[{key:"removeCacheKey",value:function(e){this.cachedkeys=m.without(this.cachedkeys,e)}},{key:"has",value:function(e){return!!this.cache[e]}},{key:"get",value:function(e){return this.cache[e]}},{key:"set",value:function(e,t){e&&t||J.throw(new Qe("Must provide a cache key and a value to cache in FifoMemoryCache.")),this.has(e)&&this.removeCacheKey(e),this.cachedkeys.push(e),this.cache[e]=t,this.cachedkeys.length>this.size&&delete this.cache[this.cachedkeys.shift()]}},{key:"getOrSet",value:function(e,t){if(this.has(e))return this.get(e);var n=t();return this.set(e,n),n}},{key:"remove",value:function(e){return!!this.has(e)&&(delete this.cache[e],this.removeCacheKey(e),!0)}},{key:"invalidate",value:function(e,t){var n=this,r=m.object(this.cachedkeys,this.cachedkeys),i=[];m.each(e,(function(e){var t;r[e]&&i.push(e);var n=new RegExp(e,"i"),o=m.filter(r,(function(e){return n.test(e)}));(t=i).push.apply(t,zw(o))})),i.length&&(i=m.uniq(i),m.each(i,(function(e){delete n.cache[e],m.isFunction(t)&&t(e)})),this.cachedkeys=m.without.apply(m,[this.cachedkeys].concat(zw(i))))}},{key:"name",get:function(){return Mw.Fifo}}])&&Hw(t.prototype,n),r&&Hw(t,r),o}(Yt);!function(e){e[e.Unknown=0]="Unknown",e[e.BadRequest=1]="BadRequest",e[e.Unauthorized=2]="Unauthorized",e[e.Forbidden=3]="Forbidden",e[e.NotFound=4]="NotFound",e[e.InternalServer=5]="InternalServer"}(Kw||(Kw={}));var Ww,Zw={type:Kw.Unknown,message:"",code:0};!function(e){e.Ajax="AjaxDataProvider",e.Notifications="NotificationsSignalRDataProvider"}(Ww||(Ww={}));var Qw=function(e,t,n){if(!n||!n.errorCode)return e[t];var r="".concat(n.errorCode);return n.errorSubCode&&(r+=".".concat(n.errorSubCode)),e[r]||e[t]};function Xw(e){return(Xw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tA(e,t){return(tA=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nA(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=iA(e);if(t){var i=iA(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rA(this,n)}}function rA(e,t){return!t||"object"!==Xw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function iA(e){return(iA=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oA=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tA(e,t)}(o,e);var t,n,r,i=nA(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),t=i.call(this,e),$.ajaxSetup({cache:!1,contentType:"application/json; charset=utf-8"}),t.successMiddleware={},t.errorMiddleware={},t.dataServiceErrorMessageMappings=e.dataServiceErrorMessageMappings,t.defaultErrorMessageKey=e.defaultErrorMessageKey,t}return t=o,(n=[{key:"parseUrl",value:function(e){var t=document.createElement("a");return t.href=e,""===t.host&&(t.href=t.href),t}},{key:"makeHttps",value:function(e){var t=this.parseUrl(e);return"http:"===t.protocol&&(t.protocol="https:"),t.href}},{key:"base",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};n||(n=xr.GET);var i=m.defaults(r,{forceHttps:!1}),o={url:e,method:n,type:n};t&&(o.data=n===xr.POST||n===xr.PUT?JSON.stringify(t):t),i.forceHttps&&(o.url=this.makeHttps(o.url)),i.traditional&&(o.traditional=i.traditional);var a=$.ajax(o);return m.keys(this.successMiddleware).length&&a.done(m.values(this.successMiddleware)),m.keys(this.errorMiddleware).length&&a.fail(m.values(this.errorMiddleware)),a}},{key:"create",value:function(e,t,n){var r=n.channel,i=n.successEvent,o=n.errorEvent;this.base(e,t,xr.POST).done((function(e,t,n){return r.trigger(i,e,t,n)})).fail((function(e,t,n){return r.trigger(o,e,t,n)}))}},{key:"read",value:function(e,t){var n=t.channel,r=t.successEvent,i=t.errorEvent;this.base(e,null,xr.GET).done((function(e,t,i){n.trigger(r,e,t,i)})).fail((function(e,t,r){n.trigger(i,e,t,r)}))}},{key:"update",value:function(e,t,n){var r=n.channel,i=n.successEvent,o=n.errorEvent;this.base(e,t,xr.PUT).done((function(e,t,n){return r.trigger(i,e,t,n)})).fail((function(e,t,n){return r.trigger(o,e,t,n)}))}},{key:"delete",value:function(e,t){var n=t.channel,r=t.successEvent,i=t.errorEvent;this.base(e,null,xr.DELETE).done((function(e,t,i){return n.trigger(r,e,t,i)})).fail((function(e,t,r){return n.trigger(i,e,t,r)}))}},{key:"useMiddleware",value:function(e,t){this.successMiddleware[e]||(this.successMiddleware[e]=t)}},{key:"useErrorMiddleware",value:function(e,t){this.errorMiddleware[e]||(this.errorMiddleware[e]=t)}},{key:"parseError",value:function(e,t,n){var r=e.responseJSON,i=Zw;switch(i.code=e.status,i.message=Qw(this.dataServiceErrorMessageMappings,this.defaultErrorMessageKey,r),e.status){case 400:i.type=Kw.BadRequest;break;case 401:i.type=Kw.Unauthorized;break;case 403:i.type=Kw.Forbidden;break;case 404:i.type=Kw.NotFound;break;case 500:i.type=Kw.InternalServer}return i}},{key:"name",get:function(){return Ww.Ajax}}])&&eA(t.prototype,n),r&&eA(t,r),o}(A.Object);n.d(t,"Actions",(function(){return a})),n.d(t,"DataPrefixes",(function(){return c})),n.d(t,"FileExtensions",(function(){return u})),n.d(t,"Layouts",(function(){return s})),n.d(t,"AppChannels",(function(){return l})),n.d(t,"DataChannels",(function(){return f})),n.d(t,"DataServices",(function(){return p})),n.d(t,"CuratorLayoutView",(function(){return Bn})),n.d(t,"LayoutComponent",(function(){return Yn})),n.d(t,"CuratorAppNavService",(function(){return rr})),n.d(t,"ImageUploadDataService",(function(){return Er})),n.d(t,"LanguageDataService",(function(){return Nr})),n.d(t,"CompaniesApplication",(function(){return zh})),n.d(t,"DomainOptionsApplication",(function(){return Wy})),n.d(t,"PeopleApplication",(function(){return Iv})),n.d(t,"PlaylistsApplication",(function(){return Tj})),n.d(t,"SeriesApplication",(function(){return iC})),n.d(t,"SubjectDataService",(function(){return xg})),n.d(t,"SubjectDataServiceHelper",(function(){return Rg})),n.d(t,"SubjectsApplication",(function(){return hC})),n.d(t,"ThemesApplication",(function(){return ew})),n.d(t,"VideosApplication",(function(){return Fw})),n.d(t,"DomainOptionsApplication",(function(){return Wy})),n.d(t,"Core",(function(){return r})),n.d(t,"InstanceManager",(function(){return Nv})),n.d(t,"FifoMemoryCache",(function(){return Gw})),n.d(t,"AjaxDataProvider",(function(){return oA})),n.d(t,"AlertList",(function(){return ry})),n.d(t,"AlertType",(function(){return Uh})),n.d(t,"BaseAlertService",(function(){return Gh})),n.d(t,"LanguageService",(function(){return Ls})),n.d(t,"Flight",(function(){return i})),n.d(t,"CacheDurations",(function(){return Cr}))}])}));