@clickview/exchange 0.0.0 → 0.0.1-dev.1

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.
Files changed (60) hide show
  1. package/.eslintrc.json +2 -2
  2. package/dist/bundles.json +2 -2
  3. package/dist/css/214-exchange-a6069ef511.chunk.css +1 -0
  4. package/dist/css/243-exchange-98ea4f6ba6.chunk.css +51 -0
  5. package/dist/css/268-exchange-5147d7dafc.chunk.css +31 -0
  6. package/dist/css/273-exchange-376789f053.chunk.css +2 -0
  7. package/dist/css/498-exchange-bda8919aee.chunk.css +50 -0
  8. package/dist/css/637-exchange-7b8b1d8597.chunk.css +7 -0
  9. package/dist/css/867-exchange-9212311cc7.chunk.css +3 -0
  10. package/dist/css/90-exchange-34558cb09b.chunk.css +33 -0
  11. package/dist/css/920-exchange-e0232d3271.chunk.css +4 -0
  12. package/dist/css/967-exchange-8a06d563ce.chunk.css +8 -0
  13. package/dist/css/{lite-exchange-e07742bb7a.css → lite-exchange-11da8fa6e3.css} +2 -1
  14. package/dist/languages/en.json +1 -1
  15. package/dist/scripts/127-3669c03115-exchange.chunk.js +1 -0
  16. package/dist/scripts/214-d730199dbd-exchange.chunk.js +1 -0
  17. package/dist/scripts/243-1a6c42f0c1-exchange.chunk.js +2 -0
  18. package/dist/scripts/243-1a6c42f0c1-exchange.chunk.js.LICENSE.txt +1 -0
  19. package/dist/scripts/251-d60c2f8458-exchange.chunk.js +2 -0
  20. package/dist/scripts/251-d60c2f8458-exchange.chunk.js.LICENSE.txt +13 -0
  21. package/dist/scripts/267-c794745bc7-exchange.chunk.js +2 -0
  22. package/dist/scripts/267-c794745bc7-exchange.chunk.js.LICENSE.txt +1 -0
  23. package/dist/scripts/268-82f484e07a-exchange.chunk.js +1 -0
  24. package/dist/scripts/273-6b51338fa0-exchange.chunk.js +1 -0
  25. package/dist/scripts/351-bb632828a4-exchange.chunk.js +1 -0
  26. package/dist/scripts/442-f089c95007-exchange.chunk.js +1 -0
  27. package/dist/scripts/498-f12ae3d243-exchange.chunk.js +1 -0
  28. package/dist/scripts/{601-147be3249c-exchange.chunk.js → 601-749f701fb0-exchange.chunk.js} +1 -1
  29. package/dist/scripts/611-8f619aff9d-exchange.chunk.js +1 -0
  30. package/dist/scripts/612-62874e57da-exchange.chunk.js +2 -0
  31. package/dist/scripts/612-62874e57da-exchange.chunk.js.LICENSE.txt +1 -0
  32. package/dist/scripts/637-f312680f75-exchange.chunk.js +1 -0
  33. package/dist/scripts/649-cb5a724c81-exchange.chunk.js +1 -0
  34. package/dist/scripts/{682-f4ddb59bee-exchange.chunk.js → 682-b7bdcbe2a8-exchange.chunk.js} +1 -1
  35. package/dist/scripts/70-f24936c4d3-exchange.chunk.js +1 -0
  36. package/dist/scripts/725-c1517598e5-exchange.chunk.js +1 -0
  37. package/dist/scripts/851-d71bd07a22-exchange.chunk.js +1 -0
  38. package/dist/scripts/867-108de6a060-exchange.chunk.js +1 -0
  39. package/dist/scripts/90-73fc8286c0-exchange.chunk.js +1 -0
  40. package/dist/scripts/91-2e27cf99bd-exchange.chunk.js +1 -0
  41. package/dist/scripts/920-3f8ab3dd21-exchange.chunk.js +1 -0
  42. package/dist/scripts/{925-0da46826f4-exchange.chunk.js → 925-f30ba100dc-exchange.chunk.js} +1 -1
  43. package/dist/scripts/952-245618ec68-exchange.chunk.js +1 -0
  44. package/dist/scripts/967-2db4e1019e-exchange.chunk.js +1 -0
  45. package/dist/scripts/972-b81f6f8450-exchange.chunk.js +1 -0
  46. package/dist/scripts/bundle-59eb82b596.min.js +2 -0
  47. package/dist/scripts/{bundle-c827892a13.min.js.LICENSE.txt → bundle-59eb82b596.min.js.LICENSE.txt} +58 -0
  48. package/dist/scripts/bundle-900e34e13e.min.js +2 -0
  49. package/dist/scripts/bundle-900e34e13e.min.js.LICENSE.txt +178 -0
  50. package/jest.config.js +11 -11
  51. package/package.json +36 -36
  52. package/typings/libs/CVLanguages.d.ts +24 -0
  53. package/typings/libs/cloneDeep.d.ts +4 -4
  54. package/typings/libs/intersection-observer.d.ts +82 -82
  55. package/typings/libs/trackjs.d.ts +2 -2
  56. package/typings/libs/videojs-contrib-quality-levels.d.ts +29 -0
  57. package/typings/utils/imports.d.ts +11 -11
  58. package/dist/scripts/171-b84a29422d-exchange.chunk.js +0 -1
  59. package/dist/scripts/268-511d97d8ee-exchange.chunk.js +0 -1
  60. package/dist/scripts/bundle-c827892a13.min.js +0 -2
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Programatically add the following
3
+ */
4
+
5
+ /*! @name @videojs/http-streaming @version 2.8.2 @license Apache-2.0 */
6
+
7
+ /*! @name aes-decrypter @version 3.1.2 @license Apache-2.0 */
8
+
9
+ /*! @name m3u8-parser @version 4.7.0 @license Apache-2.0 */
10
+
11
+ /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
12
+
13
+ /*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 267-c794745bc7-exchange.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[267],{55110:(t,e,r)=>{r.d(e,{Z:()=>c});var n=r(32735),a=r(71365);var o=r(60139),i=r(79976);function c(){var t,e,r,c=(t=i.P.ALERT,e=t,r=a.u.getInstance(e),n.useEffect((function(){return function(){a.u.releaseInstance(e)}})),r);return{success:function(t){c.success(t)()},error:function(t){c.error(t)()},warning:function(t){c.createAlert({type:o.NK.Warning,heading:o.R6.Warning,message:t})}}}},85854:(t,e,r)=>{r.d(e,{i:()=>l});var n=r(99940),a=r(97395),o=r(110);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t){return Object.entries(t).reduce((function(t,e){var r,n,a=(n=2,function(t){if(Array.isArray(t))return t}(r=e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,a,o,i,c=[],u=!0,l=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,a=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw a}}return c}}(r,n)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(r,n)||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.")}()),o=a[0],c=a[1];return t[o.charAt(0).toLowerCase()+o.slice(1)]=c,t}),{})}function u(t){return t?Array.isArray(t)?function(t){return t.map(c)}(t):c(t):null}var l={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:u}},region:function(t){return{url:"/api/tv/api/v2/regions/".concat(t),key:"tv:region:".concat(t),normalize:!1,formatData:u}},channels:function(t){return{url:a._.urlBuilder("/api/tv/api/v2/channels",{region:t}),key:"tv:channels:".concat(t),normalize:!1,formatData:function(t){return u(t).sort((function(t,e){return t.sortOrder-e.sortOrder}))}}},programsByChannel:function(t,e,r,n){return{url:a._.urlBuilder("/api/tv/api/v3/regions/".concat(t,"/channels/programs"),{channel:e,startDate:r,endDate:n}),key:["tv:programs:by:channel",t,e,r,n].join(":"),normalize:!1,formatData:u}},programsByLetter:function(t,e,r,n){return{url:a._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:t,startsWith:e,startDate:r,endDate:n}),key:["tv:programs:by:letter",t,e,r,n].join(":"),normalize:!1,formatData:u}},program:function(t){return{url:"/api/tv/api/v3/programs/".concat(t),key:"tv:programs:".concat(t),normalize:!1,formatData:u}},search:function(t,e,r,n){var o=n||0;return{url:a._.urlBuilder("/api/tv/api/v3/search",{region:t,query:e,filter:r,page:o,size:25}),key:["tv:search",t,e,r,o].join(":"),normalize:!1,formatData:function(t){var e=u(t);return e.results=u(t.Results),e.page=o,e}}},addFullVideo:function(t){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:n.k.POST,data:t}},adFreeCredits:function(t,e){var r=new Date;r.setHours(0,0,0,0),r.setMinutes(r.getMinutes()+r.getTimezoneOffset());var n=o.O.add(r,1,"day");return{url:a._.urlBuilder("/api/tv/api/v1/user-requests",{username:t,region:e,from:o.O.convertUTCToLocal(r).toISOString(),to:o.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:u}},createAdFreeRequest:function(t){return{url:"/api/tv/api/v1/user-requests",key:"tv:create:add:free:request",normalize:!1,type:n.k.POST,data:t,invalidationKeys:["tv:add:free:credits"]}}}},45267:(t,e,r)=>{r.r(e),r.d(e,{TvAdFreeRequestView:()=>L});var n=r(32735),a=r(20354),o=r(85854),i=r(31949),c=r(21132),u=r(82329),l=r(73818),s=r(81886),f=r(83345),p=r(23481),h=r(75230),d=r(65185),v=r(60139),y=r(55110),m=r(99742);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function w(){w=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,a){var o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),c=new _(a||[]);return n(i,"_invoke",{value:L(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function p(){}function h(){}function d(){}var v={};u(v,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(C([])));m&&m!==e&&r.call(m,o)&&(v=m);var b=d.prototype=p.prototype=Object.create(v);function x(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function a(n,o,i,c){var u=s(t[n],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==g(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){a("next",t,i,c)}),(function(t){a("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return a("throw",t,i,c)}))}c(u.arg)}var o;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){a(t,r,e,n)}))}return o=o?o.then(n,n):n()}})}function L(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return{value:void 0,done:!0}}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=k(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function k(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=s(n,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,f;var o=a.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:T}}function T(){return{value:void 0,done:!0}}return h.prototype=d,n(b,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:h,configurable:!0}),h.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},x(E.prototype),u(E.prototype,i,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new E(l(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},x(b),u(b,c,"Generator"),u(b,o,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=C,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;S(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var b=function(t,e,r,n){return new(r||(r=Promise))((function(a,o){function i(t){try{u(n.next(t))}catch(t){o(t)}}function c(t){try{u(n.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?a(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}u((n=n.apply(t,e||[])).next())}))},x="tv.adFreeRequest",E=p.T.encloseNamespace(x);function L(t){var e=a.a.useGetFetchAsync(),r=(0,y.Z)(),p=a.a.useBasicFetch(i.N.currentUser()),g=a.a.useBasicFetch(o.i.region(t.region)),L=a.a.useBasicFetch(o.i.program(t.id)),k=a.a.useBasicFetch(p.data&&g.data&&o.i.adFreeCredits(p.data.username,g.data.code)),O=p.hasCompleted&&g.hasCompleted&&L.hasCompleted&&k.hasCompleted,S=k.data.maxAvailableCredit-k.data.userRequests;return n.createElement(c.G,{title:E("title"),closePopup:t.closePopup,showLoadingSpinner:!O},O&&n.createElement(n.Fragment,null,n.createElement("img",{src:m.W.General.TICKET,className:"img-fluid py-3 px-4",draggable:!1}),n.createElement("h2",{className:"h6"},n.createElement(f.x,{namespace:x,phrase:"remaining",options:{smartCount:S}})),n.createElement("p",null,n.createElement(f.x,{namespace:x,phrase:"requestInfo",options:{dailyLimit:k.data.maxAvailableCredit}})),n.createElement("p",null,n.createElement(f.x,{namespace:x,phrase:"addInfo",options:{dailyLimit:k.data.maxAvailableCredit}})),n.createElement(h.u,null,n.createElement(h.u.Cancel,{text:E("back"),onClick:function(){s.Q.AppLinkHelper.trigger({application:u.O.TV,action:l.e.Tv.ADD,args:[g.data.code,L.data.id]})},variant:"link"}),n.createElement(h.u.Submit,{text:E("request"),onClick:function(){return b(this,void 0,void 0,w().mark((function n(){return w().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,e(o.i.createAdFreeRequest({cost:1,globalId:L.data.globalId,name:L.data.title,programId:L.data.id,regionCode:g.data.code,username:p.data.username}));case 3:r.success({heading:d.R.Success,message:"<strong>".concat(L.data.title,"</strong> will be added to My Videos"),appLinkText:"Go to My Videos",appLink:{application:u.O.TV,action:l.e.Tv.INDEX},type:v.NK.Success}),n.next=9;break;case 6:n.prev=6,n.t0=n.catch(0),r.error("Something went wrong.");case 9:return n.prev=9,t.closePopup(),n.finish(9);case 12:case"end":return n.stop()}}),n,null,[[0,6,9,12]])})))},variant:"dark"}))))}}}]);
@@ -0,0 +1 @@
1
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[268],{81194:(e,t,r)=>{r.r(t),r.d(t,{ExchangeSeriesView:()=>j});var a=r(83141),n=r(71925),c=r(87440),i=r(65858),o=r(23481),s=r(20354),u=r(75553),l=r(49935),d=r(63545),v=r(50273),p=r(71471),h=r(79718),m=r(7733),E=r(51365),y=r(69834),g=r(39151),f=r(97395),b=r(62803),k=function(e,t){return f._.urlBuilder("/api/objects/".concat(e),{query:b.v.SERIES,shareId:t})},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return"{gateway}/v1/objects/".concat(e,"?query=banner,videos[season,thumbnail,_canBeConsumed]{limit:").concat(t,"}")},x={series:function(e){var t={query:b.v.SERIES};return{url:f._.urlBuilder("{gateway}/v1/objects/".concat(e),t),publicUrl:f._.urlBuilder("/api/objects/".concat(e),t),key:"series:".concat(e)}},sharedSeries:function(e,t){return{url:k(e,t),key:"shared:series:".concat(e,":").concat(t)}},seriesWithVideos:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return{url:C(e,t),key:"series:".concat(e,":with:videos:").concat(t)}},seriesVideos:function(e,t,r){return{url:f._.urlBuilder("{gateway}/v1/collections/".concat(e,"/videos"),{query:"{orderby:seriessort}".concat(b.v.VIDEO_COLLECTION),cursor:r}),publicUrl:f._.urlBuilder("/api/objects/collections/".concat(e,"/videos"),{query:"{orderby:seriessort}".concat(b.t.VIDEO_COLLECTION),cursor:r}),key:"series:".concat(e,":videos:").concat(r)}}},S=r(31949),w=r(55110),L=r(91286),_=r(63936),I=r(45082),O=r(68140),B=r(9085),N=r(32735),V=r(73818),A=r(82329),F=o.T.encloseNamespace("exchange.exchangeSeries");function j(e){var t,r=s.a.useGetFetch(),o=(0,w.Z)(),f=s.a.useBasicFetch(x.series(e.seriesId)),b=s.a.useBasicFetch(S.N.currentUser()),k=s.a.useBasicFetch(g.L.config());(0,I.M)({title:null===(t=f.data)||void 0===t?void 0:t.name}),(0,L.v)(f);var C=!!b.data&&O.d.getOrSetSortType(b.data.id,e.sort),j=(0,_.K)(G,M,(function(e,t){if(1===e)return(0,y.r)(t);o.error(F("error"))})),T=j.items,U=j.hasMore,q=j.isFetching,D=j.nextCursor;function G(t){return a.R.seriesVideos(e.seriesId,C,t)}function M(e){return r(G(e))}var P=(0,n.A)("video-list"),R=f.data?[{name:F("exchangeArchive"),appLink:{application:A.O.EXCHANGE,action:V.e.Exchange.INDEX}},{name:f.data.name}]:[];return N.createElement(E.M.Provider,{value:P},f.data&&k.data?N.createElement(u.p,{heading:f.data.name,banner:f.data.banner,imageCdnUrl:k.data.imageCdnUrl,blockColourClass:(0,B.x)(f.data.name,m.o)}):N.createElement(u.v,null),N.createElement("div",{className:"d-flex justify-content-between align-items-center py-3 mx-3"},f.data?N.createElement(l.Oo,{breadcrumbs:R}):N.createElement(l.b2,null),f.data&&N.createElement(h.p,{variant:"outline-dark",type:C,getSortAppLink:function(e){return(0,c.cL)(f.data,e)},analyticsOptions:{location:i.LocationContext.VideoListHeader,entity:i.EntityType.Video,actionType:i.UserAction.Sort,workflowPhase:i.WorkflowPhase.Complete}})),T?N.createElement("div",{className:"px-3 pb-3"},N.createElement(v.E4,{videos:T,yearGroups:null,getVideoAppLink:c.lS,getSeriesAppLink:c.cL,canFavourite:function(){return!1},setFavourite:function(){},presentationAudiences:null}),(U||q)&&N.createElement(d._,{isFetching:q,fetchNext:M,nextCursor:D})):N.createElement(p.S,null))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[273],{88818:(e,t,a)=>{a.d(t,{r:()=>s});var n=a(32735),r=a(11607),i=a(8493),o=a(49985);const c={pillTabSelector:"Hdi6o",pillItem:"hUJx1"};var l=a(29254);function s(e){var t;return n.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},n.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(c.pillTabSelector)},e.tabs.map((function(e){return n.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?n.createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(c.pillItem)},e.name,"number"==typeof e.count&&n.createElement("div",{className:"pl-2"},n.createElement(l.C,{type:l.g.Count,data:e.count}))):n.createElement(r.L,{className:"".concat(c.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&o.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&n.createElement("div",{className:"pl-2"},n.createElement(l.C,{type:l.g.Count,data:e.count}))))}))))}},91286:(e,t,a)=>{a.d(t,{v:()=>o});var n=a(32735),r=a(69834);function i(e){return e.map((function(e){return e.statusCode})).join(":")}function o(e,t,a){var o=Array.isArray(e)?e:[e];(0,n.useEffect)((function(){o.forEach((function(e){(0,r.r)(e.statusCode,t,a)}))}),[i(o),t,a])}},65643:(e,t,a)=>{a.d(t,{R:()=>i});var n=a(8493),r=a(32735);function i(e){var t=e.currentRegion,a=e.regions,i=e.appLink;return r.createElement("div",{className:"d-flex align-items-center mb-3"},r.createElement("span",null,"Region: "),r.createElement("div",{className:"dropdown"},r.createElement("a",{className:"btn btn-outline-dark ml-2 dropdown-toggle",id:"region-select",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},t.stateFull),r.createElement("div",{className:"dropdown-menu dropdown-menu-right","aria-labelledby":"region-select"},a.map((function(e,a){return e.id===t.id?r.createElement(r.Fragment,{key:a}):r.createElement(n.F,{key:a,className:"dropdown-item",appLink:Object.assign(Object.assign({},i),{args:[e.code]})},e.stateFull)})))))}},55102:(e,t,a)=>{a.d(t,{u:()=>m});var n=a(32735),r=a(83914),i=a(35223),o=a(81886);const c={input:"rBtDt"};var l=a(82329),s=a(73818);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function m(e){var t,a,m,p=(a=n.useState(null!==(t=e.query)&&void 0!==t?t:""),m=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,c=[],l=!0,s=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=i.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(a,m)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?u(e,t):void 0}}(a,m)||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.")}()),d=p[0],v=p[1];return n.createElement("form",{className:"border border-dark form-control d-flex align-items-center mb-3",onSubmit:function(t){t.preventDefault(),d&&o.Q.AppLinkHelper.trigger({application:l.O.TV,action:s.e.Tv.SEARCH,args:[e.region.code],params:{query:d}})}},n.createElement(r.x,{svgName:i.vn.Search}),n.createElement("input",{type:"text",className:"form-control h-100 w-100 border-0 ".concat(c.input),placeholder:"Search for programs in ClickView TV",value:d,onChange:function(e){return v(e.target.value)},autoComplete:"off"}))}},32530:(e,t,a)=>{a.d(t,{Y:()=>v});var n=a(32735),r=a(88818),i=a(23481),o=a(82329),c=a(73818),l=a(81886),s=a(65858),u="tv.tvTabs",m=i.T.encloseNamespace(u),p={channels:{application:o.O.TV,action:c.e.Tv.CHANNELS},programs:{application:o.O.TV,action:c.e.Tv.PROGRAMS},tvGuide:{application:o.O.TV,action:c.e.Tv.INDEX}},d={actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs};function v(e){var t=e.active,a=e.currentRegion;return n.createElement("div",{className:"mb-3"},n.createElement(r.r,{tabs:[{name:m("channels"),appLink:Object.assign(Object.assign({},p.channels),{args:[a.code]}),active:"channels"===t,analyticsData:{name:m("channels"),url:l.Q.AppLinkHelper.getHref(p.channels)},analyticsOptions:d},{name:m("programs"),appLink:Object.assign(Object.assign({},p.programs),{args:[a.code]}),active:"programs"===t,analyticsData:{name:i.T.getPhrase(u,"programs"),url:l.Q.AppLinkHelper.getHref(p.programs)},analyticsOptions:d},{name:m("tvGuide"),appLink:p.tvGuide,active:"tv-guide"===t,analyticsData:{name:i.T.getPhrase(u,"tvGuide"),url:l.Q.AppLinkHelper.getHref(p.tvGuide)},analyticsOptions:d}]}))}},85854:(e,t,a)=>{a.d(t,{i:()=>s});var n=a(99940),r=a(97395),i=a(110);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function c(e){return Object.entries(e).reduce((function(e,t){var a,n,r=(n=2,function(e){if(Array.isArray(e))return e}(a=t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,c=[],l=!0,s=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;l=!1}else for(;!(l=(n=i.call(a)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(a,n)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?o(e,t):void 0}}(a,n)||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.")}()),i=r[0],c=r[1];return e[i.charAt(0).toLowerCase()+i.slice(1)]=c,e}),{})}function l(e){return e?Array.isArray(e)?function(e){return e.map(c)}(e):c(e):null}var s={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:l}},region:function(e){return{url:"/api/tv/api/v2/regions/".concat(e),key:"tv:region:".concat(e),normalize:!1,formatData:l}},channels:function(e){return{url:r._.urlBuilder("/api/tv/api/v2/channels",{region:e}),key:"tv:channels:".concat(e),normalize:!1,formatData:function(e){return l(e).sort((function(e,t){return e.sortOrder-t.sortOrder}))}}},programsByChannel:function(e,t,a,n){return{url:r._.urlBuilder("/api/tv/api/v3/regions/".concat(e,"/channels/programs"),{channel:t,startDate:a,endDate:n}),key:["tv:programs:by:channel",e,t,a,n].join(":"),normalize:!1,formatData:l}},programsByLetter:function(e,t,a,n){return{url:r._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:e,startsWith:t,startDate:a,endDate:n}),key:["tv:programs:by:letter",e,t,a,n].join(":"),normalize:!1,formatData:l}},program:function(e){return{url:"/api/tv/api/v3/programs/".concat(e),key:"tv:programs:".concat(e),normalize:!1,formatData:l}},search:function(e,t,a,n){var i=n||0;return{url:r._.urlBuilder("/api/tv/api/v3/search",{region:e,query:t,filter:a,page:i,size:25}),key:["tv:search",e,t,a,i].join(":"),normalize:!1,formatData:function(e){var t=l(e);return t.results=l(e.Results),t.page=i,t}}},addFullVideo:function(e){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:n.k.POST,data:e}},adFreeCredits:function(e,t){var a=new Date;a.setHours(0,0,0,0),a.setMinutes(a.getMinutes()+a.getTimezoneOffset());var n=i.O.add(a,1,"day");return{url:r._.urlBuilder("/api/tv/api/v1/user-requests",{username:e,region:t,from:i.O.convertUTCToLocal(a).toISOString(),to:i.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:l}},createAdFreeRequest:function(e){return{url:"/api/tv/api/v1/user-requests",key:"tv:create:add:free:request",normalize:!1,type:n.k.POST,data:e,invalidationKeys:["tv:add:free:credits"]}}}},90273:(e,t,a)=>{a.r(t),a.d(t,{TvChannelsView:()=>v});var n=a(65643),r=a(55102),i=a(32530),o=a(85854),c=a(8493),l=a(32735),s=a(73818),u=a(82329);function m(e){var t=e.region,a=e.channel;return l.createElement("div",{className:"col-3 mb-3"},l.createElement(c.F,{className:"border rounded-lg p-4 d-block text-center",appLink:{application:u.O.TV,action:s.e.Tv.CHANNEL,args:[t.code,a.id]}},l.createElement("img",{src:"https://tv.clickview.com.au/content/channels/au/logoImages/".concat(a.thumb),className:"mw-100 mx-auto d-block"}),l.createElement("div",{className:"mt-3 font-weight-500"},a.displayName)))}var p=a(20354),d=a(91286);function v(e){var t=p.a.useBasicFetch(o.i.region(e.region)),a=p.a.useBasicFetch(o.i.regions()),c=p.a.useBasicFetch(t.data&&o.i.channels(t.data.code));return(0,d.v)(t),t.hasCompleted&&a.hasCompleted&&c.hasCompleted?l.createElement("div",{className:"px-2"},l.createElement("div",{className:"d-flex justify-content-between"},l.createElement(i.Y,{active:"channels",currentRegion:t.data}),l.createElement(n.R,{currentRegion:t.data,regions:a.data,appLink:{application:u.O.TV,action:s.e.Tv.CHANNELS}})),l.createElement(r.u,{region:t.data}),l.createElement("div",{className:"row"},c.data.map((function(e,a){return l.createElement(m,{key:a,channel:e,region:t.data})})))):l.createElement(l.Fragment,null)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[351],{20455:(e,t,n)=>{n.d(t,{LB:()=>_e,y9:()=>ut,g4:()=>ne,Lg:()=>le,we:()=>fe,pE:()=>N,ey:()=>S,VK:()=>A,_8:()=>R,hI:()=>B,Cj:()=>Ve,O1:()=>Ge,Zj:()=>Qe,VT:()=>p,Dy:()=>m});var r=n(32735),o=n(12788),i=n(17592);const a={display:"none"};function l(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:a},n)}const s={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function c(e){let{id:t,announcement:n}=e;return r.createElement("div",{id:t,style:s,role:"status","aria-live":"assertive","aria-atomic":!0},n)}const u=(0,r.createContext)(null),d={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},f={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function h(e){let{announcements:t=f,container:n,hiddenTextDescribedById:a,screenReaderInstructions:s=d}=e;const{announce:h,announcement:v}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),g=(0,i.Ld)("DndLiveRegion"),[p,m]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{m(!0)}),[]),function(e){const t=(0,r.useContext)(u);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;h(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&h(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;h(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;h(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;h(t.onDragCancel({active:n,over:r}))}})),[h,t])),!p)return null;const b=r.createElement(r.Fragment,null,r.createElement(l,{id:a,value:s.draggable}),r.createElement(c,{id:g,announcement:v}));return n?(0,o.createPortal)(b,n):b}var v;function g(){}function p(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(v||(v={}));const b=Object.freeze({x:0,y:0});function y(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function w(e,t){const n=(0,i.DC)(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function C(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function E(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function R(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function D(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const N=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=D(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=y(D(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(x)},S=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=E(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=E(r),a=o.reduce(((e,t,r)=>e+y(n[r],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(x)};function I(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const M=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=I(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(C)};function O(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:b}function k(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const L=k(1);function T(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const P={ignoreTransform:!1};function A(e,t){void 0===t&&(t=P);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:t}=(0,i.Jj)(e),{transform:r,transformOrigin:o}=t(e);r&&(n=function(e,t,n){const r=T(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s}}(n,r,o))}const{top:r,left:o,width:a,height:l,bottom:s,right:c}=n;return{top:r,left:o,width:a,height:l,bottom:s,right:c}}function j(e){return A(e,{ignoreTransform:!0})}function B(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,i.qk)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,i.Re)(o)||(0,i.vZ)(o))return n;if(n.includes(o))return n;const{getComputedStyle:a}=(0,i.Jj)(o),l=a(o);return o!==e&&function(e,t){void 0===t&&(t=(0,i.Jj)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,l)&&n.push(o),function(e,t){return void 0===t&&(t=(0,i.Jj)(e).getComputedStyle(e)),"fixed"===t.position}(o,l)?n:r(o.parentNode)}(e):n}function z(e){const[t]=B(e,1);return null!=t?t:null}function X(e){return i.Nq&&e?(0,i.FJ)(e)?e:(0,i.UG)(e)?(0,i.qk)(e)||e===(0,i.r3)(e).scrollingElement?window:(0,i.Re)(e)?e:null:null:null}function F(e){return(0,i.FJ)(e)?e.scrollX:e.scrollLeft}function U(e){return(0,i.FJ)(e)?e.scrollY:e.scrollTop}function Y(e){return{x:F(e),y:U(e)}}var J;function H(e){return!(!i.Nq||!e)&&e===document.scrollingElement}function _(e){const t={x:0,y:0},n=H(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(J||(J={}));const q={x:.2,y:.2};function K(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=q);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=_(e),h={x:0,y:0},v={x:0,y:0},g=t.height*o.y,p=t.width*o.x;return!c&&i<=t.top+g?(h.y=J.Backward,v.y=r*Math.abs((t.top+g-i)/g)):!u&&s>=t.bottom-g&&(h.y=J.Forward,v.y=r*Math.abs((t.bottom-g-s)/g)),!f&&l>=t.right-p?(h.x=J.Forward,v.x=r*Math.abs((t.right-p-l)/p)):!d&&a<=t.left+p&&(h.x=J.Backward,v.x=r*Math.abs((t.left+p-a)/p)),{direction:h,speed:v}}function W(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function G(e){return e.reduce(((e,t)=>(0,i.IH)(e,Y(t))),b)}function V(e,t){if(void 0===t&&(t=A),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);z(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Z=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+F(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+U(t)),0)}]];class ${constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=B(t),r=G(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of Z)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Q{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function ee(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var te,ne;function re(e){e.preventDefault()}function oe(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(te||(te={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(ne||(ne={}));const ie={start:[ne.Space,ne.Enter],cancel:[ne.Esc],end:[ne.Space,ne.Enter]},ae=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ne.Right:return{...n,x:n.x+25};case ne.Left:return{...n,x:n.x-25};case ne.Down:return{...n,y:n.y+25};case ne.Up:return{...n,y:n.y-25}}};class le{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Q((0,i.r3)(t)),this.windowListeners=new Q((0,i.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(te.Resize,this.handleCancel),this.windowListeners.add(te.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(te.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&V(n),t(b)}handleKeyDown(e){if((0,i.vd)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=ie,coordinateGetter:a=ae,scrollBehavior:l="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:b;this.referenceCoordinates||(this.referenceCoordinates=u);const d=a(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,i.$X)(d,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:c,maxScroll:u,minScroll:f}=_(n),h=W(n),v={x:Math.min(o===ne.Right?h.right-h.width/2:h.right,Math.max(o===ne.Right?h.left:h.left+h.width/2,d.x)),y:Math.min(o===ne.Down?h.bottom-h.height/2:h.bottom,Math.max(o===ne.Down?h.top:h.top+h.height/2,d.y))},g=o===ne.Right&&!a||o===ne.Left&&!s,p=o===ne.Down&&!c||o===ne.Up&&!i;if(g&&v.x!==d.x){const e=n.scrollLeft+t.x,i=o===ne.Right&&e<=u.x||o===ne.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===ne.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(p&&v.y!==d.y){const e=n.scrollTop+t.y,i=o===ne.Down&&e<=u.y||o===ne.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===ne.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,(0,i.IH)((0,i.$X)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function se(e){return Boolean(e&&"distance"in e)}function ce(e){return Boolean(e&&"delay"in e)}le.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=ie,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class ue{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,i.Jj)(e);return e instanceof t?e:(0,i.r3)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:a}=o;this.props=e,this.events=t,this.document=(0,i.r3)(a),this.documentListeners=new Q(this.document),this.listeners=new Q(n),this.windowListeners=new Q((0,i.Jj)(a)),this.initialCoordinates=null!=(r=(0,i.DC)(o))?r:b,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(te.Resize,this.handleCancel),this.windowListeners.add(te.DragStart,re),this.windowListeners.add(te.VisibilityChange,this.handleCancel),this.windowListeners.add(te.ContextMenu,re),this.documentListeners.add(te.Keydown,this.handleKeydown),t){if(se(t))return;if(ce(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(te.Click,oe,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(te.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:a,options:{activationConstraint:l}}=o;if(!r)return;const s=null!=(t=(0,i.DC)(e))?t:b,c=(0,i.$X)(r,s);if(!n&&l){if(ce(l))return ee(c,l.tolerance)?this.handleCancel():void 0;if(se(l))return null!=l.tolerance&&ee(c,l.tolerance)?this.handleCancel():ee(c,l.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===ne.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const de={move:{name:"pointermove"},end:{name:"pointerup"}};class fe extends ue{constructor(e){const{event:t}=e,n=(0,i.r3)(t.target);super(e,de,n)}}fe.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const he={move:{name:"mousemove"},end:{name:"mouseup"}};var ve;!function(e){e[e.RightClick=2]="RightClick"}(ve||(ve={})),class extends ue{constructor(e){super(e,he,(0,i.r3)(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ve.RightClick&&(null==r||r({event:n}),!0)}}];const ge={move:{name:"touchmove"},end:{name:"touchend"}};var pe,me;(class extends ue{constructor(e){super(e,ge)}static setup(){return window.addEventListener(ge.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ge.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(pe||(pe={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(me||(me={}));const be={x:{[J.Backward]:!1,[J.Forward]:!1},y:{[J.Backward]:!1,[J.Forward]:!1}};var ye,we;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(ye||(ye={})),function(e){e.Optimized="optimized"}(we||(we={}));const xe=new Map;function Ce(e,t){return(0,i.Gj)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ee(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}function Re(e){return new $(A(e),e)}function De(e,t,n){void 0===t&&(t=Re);const[o,a]=(0,r.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),l=function(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Ee({callback:a});return(0,i.LI)((()=>{a(),e?(null==s||s.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==l||l.disconnect())}),[e]),o}const Ne=[];function Se(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==b;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,i.$X)(e,n.current):b}function Ie(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Me=[];function Oe(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,i.Re)(t)?t:e}const ke=[{sensor:fe,options:{}},{sensor:le,options:{}}],Le={current:{}},Te={draggable:{measure:j},droppable:{measure:j,strategy:ye.WhileDragging,frequency:we.Optimized},dragOverlay:{measure:A}};class Pe extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ae={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Pe,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:g},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Te,measureDroppableContainers:g,windowRect:null,measuringScheduled:!1},je={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:g,draggableNodes:new Map,over:null,measureDroppableContainers:g},Be=(0,r.createContext)(je),ze=(0,r.createContext)(Ae);function Xe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Pe}}}function Fe(e,t){switch(t.type){case v.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case v.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case v.DragEnd:case v.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case v.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Pe(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case v.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Pe(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case v.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Pe(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Ue(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:a}=(0,r.useContext)(Be),l=(0,i.D9)(o),s=(0,i.D9)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&l&&null!=s){if(!(0,i.vd)(l))return;if(document.activeElement===l.target)return;const e=a.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,i.so)(e);if(t){t.focus();break}}}))}}),[o,t,a,s,l]),null}function Ye(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Je=(0,r.createContext)({...b,scaleX:1,scaleY:1});var He;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(He||(He={}));const _e=(0,r.memo)((function(e){var t,n,a,l;let{id:s,accessibility:c,autoScroll:d=!0,children:f,sensors:g=ke,collisionDetection:p=M,measuring:m,modifiers:y,...w}=e;const x=(0,r.useReducer)(Fe,void 0,Xe),[C,E]=x,[D,N]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[S,I]=(0,r.useState)(He.Uninitialized),k=S===He.Initialized,{draggable:{active:T,nodes:P,translate:j},droppable:{containers:F}}=C,U=T?P.get(T):null,_=(0,r.useRef)({initial:null,translated:null}),q=(0,r.useMemo)((()=>{var e;return null!=T?{id:T,data:null!=(e=null==U?void 0:U.data)?e:Le,rect:_}:null}),[T,U]),W=(0,r.useRef)(null),[V,Z]=(0,r.useState)(null),[Q,ee]=(0,r.useState)(null),te=(0,i.Ey)(w,Object.values(w)),ne=(0,i.Ld)("DndDescribedBy",s),re=(0,r.useMemo)((()=>F.getEnabled()),[F]),oe=(ie=m,(0,r.useMemo)((()=>({draggable:{...Te.draggable,...null==ie?void 0:ie.draggable},droppable:{...Te.droppable,...null==ie?void 0:ie.droppable},dragOverlay:{...Te.dragOverlay,...null==ie?void 0:ie.dragOverlay}})),[null==ie?void 0:ie.draggable,null==ie?void 0:ie.droppable,null==ie?void 0:ie.dragOverlay]));var ie;const{droppableRects:ae,measureDroppableContainers:le,measuringScheduled:se}=function(e,t){let{dragging:n,dependencies:o,config:a}=t;const[l,s]=(0,r.useState)(null),c=null!=l,{frequency:u,measure:d,strategy:f}=a,h=(0,r.useRef)(e),v=function(){switch(f){case ye.Always:return!1;case ye.BeforeDragging:return n;default:return!n}}(),g=(0,i.Ey)(v),p=(0,r.useCallback)((function(e){void 0===e&&(e=[]),g.current||s((t=>t?t.concat(e):e))}),[g]),m=(0,r.useRef)(null),b=(0,i.Gj)((t=>{if(v&&!n)return xe;const r=l;if(!t||t===xe||h.current!==e||null!=r){const t=new Map;for(let n of e){if(!n)continue;if(r&&r.length>0&&!r.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new $(d(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,l,n,v,d]);return(0,r.useEffect)((()=>{h.current=e}),[e]),(0,r.useEffect)((()=>{v||requestAnimationFrame((()=>p()))}),[n,v]),(0,r.useEffect)((()=>{c&&s(null)}),[c]),(0,r.useEffect)((()=>{v||"number"!=typeof u||null!==m.current||(m.current=setTimeout((()=>{p(),m.current=null}),u))}),[u,v,p,...o]),{droppableRects:b,measureDroppableContainers:p,measuringScheduled:c}}(re,{dragging:k,dependencies:[j.x,j.y],config:oe.droppable}),ce=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,i.Gj)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(P,T),ue=(0,r.useMemo)((()=>Q?(0,i.DC)(Q):null),[Q]),de=function(){const e=!1===(null==V?void 0:V.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,n=k&&!e&&!t;return"object"==typeof d?{...d,enabled:n}:{enabled:n}}(),fe=function(e,t){return Ce(e,t)}(ce,oe.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:a=!0}=e;const l=(0,r.useRef)(!1),{x:s,y:c}="boolean"==typeof a?{x:a,y:a}:a;(0,i.LI)((()=>{if(!s&&!c||!t)return void(l.current=!1);if(l.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=O(n(e),o);if(s||(r.x=0),c||(r.y=0),l.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=z(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,s,c,o,n])}({activeNode:T?P.get(T):null,config:de.layoutShiftCompensation,initialRect:fe,measure:oe.draggable.measure});const he=De(ce,oe.draggable.measure,fe),ve=De(ce?ce.parentElement:null),ge=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:P,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),we=F.getNodeFor(null==(t=ge.current.over)?void 0:t.id),Re=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),a=Ee({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,i.Re)(n)){o((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),l=(0,r.useCallback)((e=>{const n=Oe(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),o(n?t(n):null)}),[t,a]),[s,c]=(0,i.wm)(l);return(0,r.useMemo)((()=>({nodeRef:s,rect:n,setRef:c})),[n,s,c])}({measure:oe.dragOverlay.measure}),Pe=null!=(n=Re.nodeRef.current)?n:ce,Ae=k?null!=(a=Re.rect)?a:he:null,je=Boolean(Re.nodeRef.current&&Re.rect),_e=O(qe=je?null:he,Ce(qe));var qe;const Ke=Ie(Pe?(0,i.Jj)(Pe):null),We=function(e){const t=(0,r.useRef)(e),n=(0,i.Gj)((n=>e?n&&n!==Ne&&e&&t.current&&e.parentNode===t.current.parentNode?n:B(e):Ne),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(k?null!=we?we:ce:null),Ge=function(e,t){void 0===t&&(t=A);const[n]=e,o=Ie(n?(0,i.Jj)(n):null),[a,l]=(0,r.useReducer)((function(){return e.length?e.map((e=>H(e)?o:new $(t(e),e))):Me}),Me),s=Ee({callback:l});return e.length>0&&a===Me&&l(),(0,i.LI)((()=>{e.length?e.forEach((e=>null==s?void 0:s.observe(e))):(null==s||s.disconnect(),l())}),[e]),a}(We),Ve=Ye(y,{transform:{x:j.x-_e.x,y:j.y-_e.y,scaleX:1,scaleY:1},activatorEvent:Q,active:q,activeNodeRect:he,containerNodeRect:ve,draggingNodeRect:Ae,over:ge.current.over,overlayNodeRect:Re.rect,scrollableAncestors:We,scrollableAncestorRects:Ge,windowRect:Ke}),Ze=ue?(0,i.IH)(ue,j):null,$e=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),a=(0,r.useCallback)((e=>{const t=X(e.target);t&&n((e=>e?(e.set(t,Y(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=o.current;if(e!==t){r(t);const i=e.map((e=>{const t=X(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,Y(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=X(e);null==t||t.removeEventListener("scroll",a)}))}}),[a,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,i.IH)(e,t)),b):G(e):b),[e,t])}(We),Qe=Se($e),et=Se($e,[he]),tt=(0,i.IH)(Ve,Qe),nt=Ae?L(Ae,Ve):null,rt=q&&nt?p({active:q,collisionRect:nt,droppableRects:ae,droppableContainers:re,pointerCoordinates:Ze}):null,ot=R(rt,"id"),[it,at]=(0,r.useState)(null),lt=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(je?Ve:(0,i.IH)(Ve,et),null!=(l=null==it?void 0:it.rect)?l:null,he),st=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==W.current)return;const i=P.get(W.current);if(!i)return;const a=e.nativeEvent,l=new n({active:W.current,activeNode:i,event:a,options:r,context:ge,onStart(e){const t=W.current;if(null==t)return;const n=P.get(t);if(!n)return;const{onDragStart:r}=te.current,i={active:{id:t,data:n.data,rect:_}};(0,o.unstable_batchedUpdates)((()=>{null==r||r(i),I(He.Initializing),E({type:v.DragStart,initialCoordinates:e,active:t}),D({type:"onDragStart",event:i})}))},onMove(e){E({type:v.DragMove,coordinates:e})},onEnd:s(v.DragEnd),onCancel:s(v.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ge.current;let l=null;if(t&&i){const{cancelDrop:o}=te.current;l={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===v.DragEnd&&"function"==typeof o&&await Promise.resolve(o(l))&&(e=v.DragCancel)}W.current=null,(0,o.unstable_batchedUpdates)((()=>{E({type:e}),I(He.Uninitialized),at(null),Z(null),ee(null);const t=e===v.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=te.current[t];null==e||e(l),D({type:t,event:l})}}))}}(0,o.unstable_batchedUpdates)((()=>{Z(l),ee(e.nativeEvent)}))}),[P]),ct=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=P.get(r);if(null!==W.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},W.current=r,st(n,t))}),[P,st]),ut=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(g,ct);!function(e){(0,r.useEffect)((()=>{if(!i.Nq)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(g),(0,i.LI)((()=>{he&&S===He.Initializing&&I(He.Initialized)}),[he,S]),(0,r.useEffect)((()=>{const{onDragMove:e}=te.current,{active:t,activatorEvent:n,collisions:r,over:i}=ge.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:tt.x,y:tt.y},over:i};(0,o.unstable_batchedUpdates)((()=>{null==e||e(a),D({type:"onDragMove",event:a})}))}),[tt.x,tt.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ge.current;if(!e||null==W.current||!t||!i)return;const{onDragOver:a}=te.current,l=r.get(ot),s=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,o.unstable_batchedUpdates)((()=>{at(s),null==a||a(c),D({type:"onDragOver",event:c})}))}),[ot]),(0,i.LI)((()=>{ge.current={activatorEvent:Q,active:q,activeNode:ce,collisionRect:nt,collisions:rt,droppableRects:ae,draggableNodes:P,draggingNode:Pe,draggingNodeRect:Ae,droppableContainers:F,over:it,scrollableAncestors:We,scrollAdjustedTranslate:tt},_.current={initial:Ae,translated:nt}}),[q,ce,rt,nt,P,Pe,Ae,ae,F,it,We,tt]),function(e){let{acceleration:t,activator:n=pe.Pointer,canScroll:o,draggingRect:a,enabled:l,interval:s=5,order:c=me.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:h,threshold:v}=e;const g=function(e){let{delta:t,disabled:n}=e;const r=(0,i.D9)(t);return(0,i.Gj)((e=>{if(n||!r||!e)return be;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[J.Backward]:e.x[J.Backward]||-1===o,[J.Forward]:e.x[J.Forward]||1===o},y:{[J.Backward]:e.y[J.Backward]||-1===i,[J.Forward]:e.y[J.Forward]||1===i}}}),[n,t,r])}({delta:h,disabled:!l}),[p,m]=(0,i.Yz)(),b=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case pe.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case pe.DraggableRect:return a}}),[n,a,u]),x=(0,r.useRef)(null),C=(0,r.useCallback)((()=>{const e=x.current;if(!e)return;const t=b.current.x*y.current.x,n=b.current.y*y.current.y;e.scrollBy(t,n)}),[]),E=(0,r.useMemo)((()=>c===me.TreeOrder?[...d].reverse():d),[c,d]);(0,r.useEffect)((()=>{if(l&&d.length&&w){for(const e of E){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=K(e,r,w,t,v);for(const e of["x","y"])g[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return m(),x.current=e,p(C,s),b.current=a,void(y.current=i)}b.current={x:0,y:0},y.current={x:0,y:0},m()}else m()}),[t,C,o,m,l,s,JSON.stringify(w),JSON.stringify(g),p,d,E,f,JSON.stringify(v)])}({...de,delta:j,draggingRect:nt,pointerCoordinates:Ze,scrollableAncestors:We,scrollableAncestorRects:Ge});const dt=(0,r.useMemo)((()=>({active:q,activeNode:ce,activeNodeRect:he,activatorEvent:Q,collisions:rt,containerNodeRect:ve,dragOverlay:Re,draggableNodes:P,droppableContainers:F,droppableRects:ae,over:it,measureDroppableContainers:le,scrollableAncestors:We,scrollableAncestorRects:Ge,measuringConfiguration:oe,measuringScheduled:se,windowRect:Ke})),[q,ce,he,Q,rt,ve,Re,P,F,ae,it,le,We,Ge,oe,se,Ke]),ft=(0,r.useMemo)((()=>({activatorEvent:Q,activators:ut,active:q,activeNodeRect:he,ariaDescribedById:{draggable:ne},dispatch:E,draggableNodes:P,over:it,measureDroppableContainers:le})),[Q,ut,q,he,E,ne,P,it,le]);return r.createElement(u.Provider,{value:N},r.createElement(Be.Provider,{value:ft},r.createElement(ze.Provider,{value:dt},r.createElement(Je.Provider,{value:lt},f)),r.createElement(Ue,{disabled:!1===(null==c?void 0:c.restoreFocus)})),r.createElement(h,{...c,hiddenTextDescribedById:ne}))})),qe=(0,r.createContext)(null),Ke="button",We="Droppable";function Ge(e){let{id:t,data:n,disabled:o=!1,attributes:a}=e;const l=(0,i.Ld)(We),{activators:s,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:h,over:v}=(0,r.useContext)(Be),{role:g=Ke,roleDescription:p="draggable",tabIndex:m=0}=null!=a?a:{},b=(null==u?void 0:u.id)===t,y=(0,r.useContext)(b?Je:qe),[w,x]=(0,i.wm)(),[C,E]=(0,i.wm)(),R=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),D=(0,i.Ey)(n);return(0,i.LI)((()=>(h.set(t,{id:t,key:l,node:w,activatorNode:C,data:D}),()=>{const e=h.get(t);e&&e.key===l&&h.delete(t)})),[h,t]),{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:g,tabIndex:m,"aria-disabled":o,"aria-pressed":!(!b||g!==Ke)||void 0,"aria-roledescription":p,"aria-describedby":f.draggable})),[o,g,m,b,p,f.draggable]),isDragging:b,listeners:o?void 0:R,node:w,over:v,setNodeRef:x,setActivatorNodeRef:E,transform:y}}function Ve(){return(0,r.useContext)(ze)}const Ze="Droppable",$e={timeout:25};function Qe(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const l=(0,i.Ld)(Ze),{active:s,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(Be),f=(0,r.useRef)({disabled:n}),h=(0,r.useRef)(!1),g=(0,r.useRef)(null),p=(0,r.useRef)(null),{disabled:m,updateMeasurementsFor:b,timeout:y}={...$e,...a},w=(0,i.Ey)(null!=b?b:o),x=Ee({callback:(0,r.useCallback)((()=>{h.current?(null!=p.current&&clearTimeout(p.current),p.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),p.current=null}),y)):h.current=!0}),[y]),disabled:m||!s}),C=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),h.current=!1),e&&x.observe(e))}),[x]),[E,R]=(0,i.wm)(C),D=(0,i.Ey)(t);return(0,r.useEffect)((()=>{x&&E.current&&(x.disconnect(),h.current=!1,x.observe(E.current))}),[E,x]),(0,i.LI)((()=>(c({type:v.RegisterDroppable,element:{id:o,key:l,disabled:n,node:E,rect:g,data:D}}),()=>c({type:v.UnregisterDroppable,key:l,id:o}))),[o]),(0,r.useEffect)((()=>{n!==f.current.disabled&&(c({type:v.SetDroppableDisabled,id:o,key:l,disabled:n}),f.current.disabled=n)}),[o,l,n,c]),{active:s,rect:g,isOver:(null==u?void 0:u.id)===o,node:E,over:u,setNodeRef:R}}function et(e){let{animation:t,children:n}=e;const[o,a]=(0,r.useState)(null),[l,s]=(0,r.useState)(null),c=(0,i.D9)(n);return n||o||!c||a(c),(0,i.LI)((()=>{if(!l)return;const e=null==o?void 0:o.key,n=null==o?void 0:o.props.id;null!=e&&null!=n?Promise.resolve(t(n,l)).then((()=>{a(null)})):a(null)}),[t,o,l]),r.createElement(r.Fragment,null,n,o?(0,r.cloneElement)(o,{ref:s}):null)}const tt={x:0,y:0,scaleX:1,scaleY:1};function nt(e){let{children:t}=e;return r.createElement(Be.Provider,{value:je},r.createElement(Je.Provider,{value:tt},t))}const rt={position:"fixed",touchAction:"none"},ot=e=>(0,i.vd)(e)?"transform 250ms ease":void 0,it=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:o,adjustScale:a,children:l,className:s,rect:c,style:u,transform:d,transition:f=ot}=e;if(!c)return null;const h=a?d:{...d,scaleX:1,scaleY:1},v={...rt,width:c.width,height:c.height,top:c.top,left:c.left,transform:i.ux.Transform.toString(h),transformOrigin:a&&o?w(o,c):void 0,transition:"function"==typeof f?f(o):f,...u};return r.createElement(n,{className:s,style:v,ref:t},l)})),at=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,t]of Object.entries(i.active))void 0!==t&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},lt={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:i.ux.Transform.toString(t)},{transform:i.ux.Transform.toString(n)}]},sideEffects:at({styles:{active:{opacity:"0"}}})};let st=0;function ct(e){return(0,r.useMemo)((()=>{if(null!=e)return st++,st}),[e])}const ut=r.memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:a,transition:l,modifiers:s,wrapperElement:c="div",className:u,zIndex:d=999}=e;const{activatorEvent:f,active:h,activeNodeRect:v,containerNodeRect:g,draggableNodes:p,droppableContainers:m,dragOverlay:b,over:y,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:C,windowRect:E}=Ve(),R=(0,r.useContext)(Je),D=ct(null==h?void 0:h.id),N=Ye(s,{activatorEvent:f,active:h,activeNodeRect:v,containerNodeRect:g,draggingNodeRect:b.rect,over:y,overlayNodeRect:b.rect,scrollableAncestors:x,scrollableAncestorRects:C,transform:R,windowRect:E}),S=Ce(v),I=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,i.zX)(((e,a)=>{if(null===t)return;const l=n.get(e);if(!l)return;const s=l.node.current;if(!s)return;const c=Oe(a);if(!c)return;const{transform:u}=(0,i.Jj)(a).getComputedStyle(a),d=T(u);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...lt,...e};return e=>{let{active:i,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c=a.rect.left-i.rect.left,u=a.rect.top-i.rect.top,d={scaleX:1!==l.scaleX?i.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?i.rect.height*l.scaleY/a.rect.height:1},f={x:l.x-c,y:l.y-u,...d},h=o({...s,active:i,dragOverlay:a,transform:{initial:l,final:f}}),[v]=h,g=h[h.length-1];if(JSON.stringify(v)===JSON.stringify(g))return;const p=null==r?void 0:r({active:i,dragOverlay:a,...s}),m=a.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{m.onfinish=()=>{null==p||p(),e()}}))}}(t);return V(s,o.draggable.measure),f({active:{id:e,data:l.data,node:s,rect:o.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:d})}))}({config:o,draggableNodes:p,droppableContainers:m,measuringConfiguration:w}),M=S?b.setRef:void 0;return r.createElement(nt,null,r.createElement(et,{animation:I},h&&D?r.createElement(it,{key:D,id:h.id,ref:M,as:c,activatorEvent:f,adjustScale:t,className:u,transition:l,rect:S,style:{zIndex:d,...a},transform:N},n):null))}))},95339:(e,t,n)=>{n.d(t,{DL:()=>r}),n(17592);const r=({transform:e})=>({...e,x:0})},67445:(e,t,n)=>{n.d(t,{Fo:()=>v,U2:()=>c,is:()=>R,nB:()=>x,qw:()=>d});var r=n(32735),o=n(20455),i=n(17592);function a(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function l(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function s(e){return null!==e&&e>=0}const c=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=a(t,r,n),l=t[o],s=i[o];return s&&l?{x:s.left-l.left,y:s.top-l.top,scaleX:s.width/l.width,scaleY:s.height/l.height}:null},u={scaleX:1,scaleY:1},d=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:r;if(!l)return null;if(o===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...u}:null}const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}(i,o,n);return o>n&&o<=a?{x:0,y:-l.height-s,...u}:o<n&&o>=a?{x:0,y:l.height+s,...u}:{x:0,y:0,...u}},f="Sortable",h=r.createContext({activeIndex:-1,containerId:f,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:c,disabled:{draggable:!1,droppable:!1}});function v(e){let{children:t,id:n,items:a,strategy:s=c,disabled:u=!1}=e;const{active:d,dragOverlay:v,droppableRects:g,over:p,measureDroppableContainers:m,measuringScheduled:b}=(0,o.Cj)(),y=(0,i.Ld)(f,n),w=Boolean(null!==v.rect),x=(0,r.useMemo)((()=>a.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[a]),C=null!=d,E=d?x.indexOf(d.id):-1,R=p?x.indexOf(p.id):-1,D=(0,r.useRef)(x),N=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(x,D.current),S=-1!==R&&-1===E||N,I=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);(0,i.LI)((()=>{N&&C&&!b&&m(x)}),[N,x,C,m,b]),(0,r.useEffect)((()=>{D.current=x}),[x]);const M=(0,r.useMemo)((()=>({activeIndex:E,containerId:y,disabled:I,disableTransforms:S,items:x,overIndex:R,useDragOverlay:w,sortedRects:l(x,g),strategy:s})),[E,y,I.draggable,I.droppable,S,x,R,g,w,s]);return r.createElement(h.Provider,{value:M},t)}const g=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return a(n,r,o).indexOf(t)},p=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!(!c||!r||l!==i&&o===a||!n&&(a===o||t!==s))},m={duration:200,easing:"ease"},b="transform",y=i.ux.Transition.toString({property:b,duration:0,easing:"linear"}),w={roleDescription:"sortable"};function x(e){let{animateLayoutChanges:t=p,attributes:n,disabled:a,data:l,getNewIndex:c=g,id:u,strategy:d,resizeObserverConfig:f,transition:v=m}=e;const{items:x,containerId:C,activeIndex:E,disabled:R,disableTransforms:D,sortedRects:N,overIndex:S,useDragOverlay:I,strategy:M}=(0,r.useContext)(h),O=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(a,R),k=x.indexOf(u),L=(0,r.useMemo)((()=>({sortable:{containerId:C,index:k,items:x},...l})),[C,l,k,x]),T=(0,r.useMemo)((()=>x.slice(x.indexOf(u))),[x,u]),{rect:P,node:A,isOver:j,setNodeRef:B}=(0,o.Zj)({id:u,data:L,disabled:O.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...f}}),{active:z,activatorEvent:X,activeNodeRect:F,attributes:U,setNodeRef:Y,listeners:J,isDragging:H,over:_,setActivatorNodeRef:q,transform:K}=(0,o.O1)({id:u,data:L,attributes:{...w,...n},disabled:O.draggable}),W=(0,i.HB)(B,Y),G=Boolean(z),V=G&&!D&&s(E)&&s(S),Z=!I&&H,$=Z&&V?K:null,Q=V?null!=$?$:(null!=d?d:M)({rects:N,activeNodeRect:F,activeIndex:E,overIndex:S,index:k}):null,ee=s(E)&&s(S)?c({id:u,items:x,activeIndex:E,overIndex:S}):k,te=null==z?void 0:z.id,ne=(0,r.useRef)({activeId:te,items:x,newIndex:ee,containerId:C}),re=x!==ne.current.items,oe=t({active:z,containerId:C,isDragging:H,isSorting:G,id:u,index:k,items:x,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:v,wasDragging:null!=ne.current.activeId}),ie=function(e){let{disabled:t,index:n,node:a,rect:l}=e;const[s,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,i.LI)((()=>{if(!t&&n!==u.current&&a.current){const e=l.current;if(e){const t=(0,o.VK)(a.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)}),[t,n,a,l]),(0,r.useEffect)((()=>{s&&requestAnimationFrame((()=>{c(null)}))}),[s]),s}({disabled:!oe,index:k,node:A,rect:P});return(0,r.useEffect)((()=>{G&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),C!==ne.current.containerId&&(ne.current.containerId=C),x!==ne.current.items&&(ne.current.items=x)}),[G,ee,C,x]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:z,activeIndex:E,attributes:U,data:L,rect:P,index:k,newIndex:ee,items:x,isOver:j,isSorting:G,isDragging:H,listeners:J,node:A,overIndex:S,over:_,setNodeRef:W,setActivatorNodeRef:q,setDroppableNodeRef:B,setDraggableNodeRef:Y,transform:null!=ie?ie:Q,transition:ie||re&&ne.current.newIndex===k?y:Z&&!(0,i.vd)(X)||!v?void 0:G||oe?i.ux.Transition.toString({...v,property:b}):void 0}}function C(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const E=[o.g4.Down,o.g4.Right,o.g4.Up,o.g4.Left],R=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:a,droppableContainers:l,over:s,scrollableAncestors:c}}=t;if(E.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];l.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const i=a.get(n.id);if(i)switch(e.code){case o.g4.Down:r.top<i.top&&t.push(n);break;case o.g4.Up:r.top>i.top&&t.push(n);break;case o.g4.Left:r.left>i.left&&t.push(n);break;case o.g4.Right:r.left<i.left&&t.push(n)}}));const f=(0,o.ey)({active:n,collisionRect:r,droppableRects:a,droppableContainers:t,pointerCoordinates:null});let h=(0,o._8)(f,"id");if(h===(null==s?void 0:s.id)&&f.length>1&&(h=f[1].id),null!=h){const e=l.get(n.id),t=l.get(h),s=t?a.get(t.id):null,f=null==t?void 0:t.node.current;if(f&&s&&e&&t){const n=(0,o.hI)(f).some(((e,t)=>c[t]!==e)),a=D(e,t),l=(d=t,!(!C(u=e)||!C(d))&&!!D(u,d)&&u.data.current.sortable.index<d.data.current.sortable.index),h=n||!a?{x:0,y:0}:{x:l?r.width-s.width:0,y:l?r.height-s.height:0},v={x:s.left,y:s.top};return h.x&&h.y?v:(0,i.$X)(v,h)}}}var u,d};function D(e,t){return!(!C(e)||!C(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}},17592:(e,t,n)=>{n.d(t,{$X:()=>R,D9:()=>y,DC:()=>N,Ey:()=>p,FJ:()=>a,Gj:()=>m,HB:()=>o,IH:()=>E,Jj:()=>s,LI:()=>h,Ld:()=>x,Nq:()=>i,Re:()=>u,UG:()=>l,Yz:()=>g,qk:()=>c,r3:()=>f,so:()=>M,ux:()=>S,vZ:()=>d,vd:()=>D,wm:()=>b,zX:()=>v});var r=n(32735);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function l(e){return"nodeType"in e}function s(e){var t,n;return e?a(e)?e:l(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=s(e);return e instanceof t}function u(e){return!a(e)&&e instanceof s(e).HTMLElement}function d(e){return e instanceof s(e).SVGElement}function f(e){return e?a(e)?e.document:l(e)?c(e)?e:u(e)?e.ownerDocument:document:document:document}const h=i?r.useLayoutEffect:r.useEffect;function v(e){const t=(0,r.useRef)(e);return h((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function g(){const e=(0,r.useRef)(null);return[(0,r.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function p(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return h((()=>{n.current!==e&&(n.current=e)}),t),n}function m(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function b(e){const t=v(e),n=(0,r.useRef)(null),o=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function y(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function x(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function C(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const E=C(1),R=C(-1);function D(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function N(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const S=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[S.Translate.toString(e),S.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),I="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function M(e){return e.matches(I)?e:e.querySelector(I)}},68050:(e,t,n)=>{n.d(t,{Z:()=>f});var r=n(20011),o=n(66017),i=n(40841),a=n.n(i),l=n(32735),s=n(46304),c=["bsPrefix","className","noGutters","as"],u=["xl","lg","md","sm","xs"],d=l.forwardRef((function(e,t){var n=e.bsPrefix,i=e.className,d=e.noGutters,f=e.as,h=void 0===f?"div":f,v=(0,o.Z)(e,c),g=(0,s.vE)(n,"row"),p=g+"-cols",m=[];return u.forEach((function(e){var t,n=v[e];delete v[e];var r="xs"!==e?"-"+e:"";null!=(t=null!=n&&"object"==typeof n?n.cols:n)&&m.push(""+p+r+"-"+t)})),l.createElement(h,(0,r.Z)({ref:t},v,{className:a().apply(void 0,[i,g,d&&"no-gutters"].concat(m))}))}));d.displayName="Row",d.defaultProps={noGutters:!1};const f=d},17082:(e,t,n)=>{n.d(t,{Nq:()=>u,oD:()=>f,t0:()=>d});var r,o=n(32735),i=n(12788),a=(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l="html",s="svg",c=function(e){var t,n,r,o={};if(e===l)r=document.createElement("div");else{if(e!==s)throw new Error('Invalid element type "'+e+'" for createPortalNode: must be "html" or "svg".');r=document.createElementNS("http://www.w3.org/2000/svg","g")}var i={element:r,elementType:e,setPortalProps:function(e){o=e},getInitialPortalProps:function(){return o},mount:function(r,o){if(o!==n){if(i.unmount(),r!==t&&!function(e,t){if(t===l)return e instanceof HTMLElement;if(t===s)return e instanceof SVGElement;throw new Error('Unrecognized element type "'+t+'" for validateElementType.')}(r,e))throw new Error('Invalid element type for portal: "'+e+'" portalNodes must be used with '+e+" elements, but OutPortal is within <"+r.tagName+">.");r.replaceChild(i.element,o),t=r,n=o}},unmount:function(e){e&&e!==n||t&&n&&(t.replaceChild(n,i.element),t=void 0,n=void 0)}};return i},u=function(e){function t(t){var n=e.call(this,t)||this;return n.addPropsChannel=function(){Object.assign(n.props.node,{setPortalProps:function(e){n.setState({nodeProps:e})}})},n.state={nodeProps:n.props.node.getInitialPortalProps()},n}return a(t,e),t.prototype.componentDidMount=function(){this.addPropsChannel()},t.prototype.componentDidUpdate=function(){this.addPropsChannel()},t.prototype.render=function(){var e=this,t=this.props,n=t.children,r=t.node;return i.createPortal(o.Children.map(n,(function(t){return o.isValidElement(t)?o.cloneElement(t,e.state.nodeProps):t})),r.element)},t}(o.PureComponent),d=function(e){function t(t){var n=e.call(this,t)||this;return n.placeholderNode=o.createRef(),n.passPropsThroughPortal(),n}return a(t,e),t.prototype.passPropsThroughPortal=function(){var e=Object.assign({},this.props,{node:void 0});this.props.node.setPortalProps(e)},t.prototype.componentDidMount=function(){var e=this.props.node;this.currentPortalNode=e;var t=this.placeholderNode.current,n=t.parentNode;e.mount(n,t),this.passPropsThroughPortal()},t.prototype.componentDidUpdate=function(){var e=this.props.node;this.currentPortalNode&&e!==this.currentPortalNode&&(this.currentPortalNode.unmount(this.placeholderNode.current),this.currentPortalNode=e);var t=this.placeholderNode.current,n=t.parentNode;e.mount(n,t),this.passPropsThroughPortal()},t.prototype.componentWillUnmount=function(){this.props.node.unmount(this.placeholderNode.current)},t.prototype.render=function(){return o.createElement("div",{ref:this.placeholderNode})},t}(o.PureComponent),f=c.bind(null,l);c.bind(null,s)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[442],{85854:(e,r,t)=>{t.d(r,{i:()=>s});var a=t(99940),n=t(97395),i=t(110);function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=new Array(r);t<r;t++)a[t]=e[t];return a}function l(e){return Object.entries(e).reduce((function(e,r){var t,a,n=(a=2,function(e){if(Array.isArray(e))return e}(t=r)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,n,i,o,l=[],u=!0,s=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;u=!1}else for(;!(u=(a=i.call(t)).done)&&(l.push(a.value),l.length!==r);u=!0);}catch(e){s=!0,n=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(s)throw n}}return l}}(t,a)||function(e,r){if(e){if("string"==typeof e)return o(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?o(e,r):void 0}}(t,a)||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.")}()),i=n[0],l=n[1];return e[i.charAt(0).toLowerCase()+i.slice(1)]=l,e}),{})}function u(e){return e?Array.isArray(e)?function(e){return e.map(l)}(e):l(e):null}var s={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:u}},region:function(e){return{url:"/api/tv/api/v2/regions/".concat(e),key:"tv:region:".concat(e),normalize:!1,formatData:u}},channels:function(e){return{url:n._.urlBuilder("/api/tv/api/v2/channels",{region:e}),key:"tv:channels:".concat(e),normalize:!1,formatData:function(e){return u(e).sort((function(e,r){return e.sortOrder-r.sortOrder}))}}},programsByChannel:function(e,r,t,a){return{url:n._.urlBuilder("/api/tv/api/v3/regions/".concat(e,"/channels/programs"),{channel:r,startDate:t,endDate:a}),key:["tv:programs:by:channel",e,r,t,a].join(":"),normalize:!1,formatData:u}},programsByLetter:function(e,r,t,a){return{url:n._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:e,startsWith:r,startDate:t,endDate:a}),key:["tv:programs:by:letter",e,r,t,a].join(":"),normalize:!1,formatData:u}},program:function(e){return{url:"/api/tv/api/v3/programs/".concat(e),key:"tv:programs:".concat(e),normalize:!1,formatData:u}},search:function(e,r,t,a){var i=a||0;return{url:n._.urlBuilder("/api/tv/api/v3/search",{region:e,query:r,filter:t,page:i,size:25}),key:["tv:search",e,r,t,i].join(":"),normalize:!1,formatData:function(e){var r=u(e);return r.results=u(e.Results),r.page=i,r}}},addFullVideo:function(e){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:a.k.POST,data:e}},adFreeCredits:function(e,r){var t=new Date;t.setHours(0,0,0,0),t.setMinutes(t.getMinutes()+t.getTimezoneOffset());var a=i.O.add(t,1,"day");return{url:n._.urlBuilder("/api/tv/api/v1/user-requests",{username:e,region:r,from:i.O.convertUTCToLocal(t).toISOString(),to:i.O.convertUTCToLocal(a).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:u}},createAdFreeRequest:function(e){return{url:"/api/tv/api/v1/user-requests",key:"tv:create:add:free:request",normalize:!1,type:a.k.POST,data:e,invalidationKeys:["tv:add:free:credits"]}}}},85949:(e,r,t)=>{t.d(r,{Y:()=>o});var a=t(35223),n=t(73818),i=t(82329);function o(e,r){return function(t){if(!r)return[];var o="preview"===e;return[{label:o?"Add video":"",tooltip:o?"":"Add video",svgName:a.vn.AddVideo,className:o?"btn btn-dark mr-2":"",button:!0,appLink:{application:i.O.TV,action:n.e.Tv.ADD,args:[r.code,t.id]}},{label:"Edit video",className:"",appLink:{application:i.O.TV,action:n.e.Tv.ADD,args:[r.code,t.id]}}]}}},70442:(e,r,t)=>{t.r(r),t.d(r,{TvPreviewView:()=>f});var a=t(85854),n=t(20354),i=t(21132),o=t(39151),l=t(32735),u=t(18177),s=t(31949),c=t(97395),p=t(74462),d=t(57264),v=t(85949);function f(e){var r=n.a.useBasicFetch(a.i.region(e.region)),t=n.a.useBasicFetch(o.L.config()),f=n.a.useBasicFetch(a.i.program(e.id)),m=n.a.useBasicFetch(s.N.currentUser()),g=r.hasCompleted&&f.hasCompleted&&t.hasCompleted&&m.hasCompleted,y=g&&function(e){var r=e.currentUser,t=e.region,a=e.config,n=e.program,i=a.tvPreviewUrls[t.code],o=n.globalId.replace(/-/g,""),l=c._.safeUrlConcat(i,"/thumbnail/".concat(o,".jpg")),u=c._.safeUrlConcat(i,"/144p/".concat(o.toUpperCase(),"_144p.mp4")),s=c._.safeUrlConcat(i,"/subtitle/".concat(o.toUpperCase(),".srt")),p=c._.urlBuilder(c._.safeUrlConcat(a.playerApiUrl,"/api/srt-to-vtt"),{url:s});return{videoId:null,episodeNumber:0,seriesName:null,mediaId:null,mediaType:null,ratingCode:null,region:r.instanceRegion,seasonNumber:null,viewerId:r.id,viewerCustomerId:r.customerId,files:{fileToken:"",progressive:[{mimeType:"video/mp4",profile:"144",url:u}]},chapters:{list:[]},instanceRegion:r.instanceRegion,localCacheAddresses:[],posterUrl:l,resources:{list:[]},settings:{showSubtitles:!1,playbackProfile:"144",playbackProfileLocalCache:"144",playbackSubtitleSizeDefault:"medium"},subtitles:{list:[{url:p,isDefault:!1,language:"en-AU",mimeType:"text/vtt",label:"English"}]},title:n.title}}({currentUser:m.data,region:r.data,config:t.data,program:f.data}),h=(0,v.Y)("preview",r.data);return l.createElement(i.G,{closePopup:e.closePopup,showLoadingSpinner:!g,size:"lg",bodyClassName:"p-0 overflow-hidden rounded-lg position-relative"},g&&l.createElement(l.Fragment,null,l.createElement(u.L,{viewKey:null,offlinePlaybackObject:y,playerApi:new URL(t.data.playerApiUrl),autoplay:!0,hotkeyElQuerySelector:"body",startTime:e.startTime||0}),l.createElement(p.d,{program:f.data,title:f.data.title,description:f.data.description,getVideoActions:h}),l.createElement(d.$,{closePopup:e.closePopup})))}}}]);