@clickview/exchange 0.7.0 → 0.7.2-dev.0

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 (84) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{13-exchange-39ccbc5ba7.chunk.css → 13-exchange-ccb8979562.chunk.css} +5 -5
  3. package/dist/css/{366-exchange-2f4d731369.chunk.css → 366-exchange-8c85984df8.chunk.css} +4 -4
  4. package/dist/css/{374-exchange-ebbe63253e.chunk.css → 374-exchange-2ff96890db.chunk.css} +1 -1
  5. package/dist/css/{445-exchange-2429d46651.chunk.css → 445-exchange-ccf1b06b70.chunk.css} +1 -1
  6. package/dist/css/{483-exchange-d0ce3b8799.chunk.css → 483-exchange-e42361a39b.chunk.css} +4 -4
  7. package/dist/css/497-exchange-5d3ec54337.chunk.css +1 -0
  8. package/dist/css/{255-exchange-d2f9046e75.chunk.css → 579-exchange-c0755122b7.chunk.css} +4 -3
  9. package/dist/css/{63-exchange-f6ae71cd8d.chunk.css → 63-exchange-e7ea6bb19f.chunk.css} +1 -1
  10. package/dist/css/{662-exchange-06c9786bd9.chunk.css → 662-exchange-d3fb3ac7d0.chunk.css} +3 -3
  11. package/dist/css/665-exchange-5d3ec54337.chunk.css +1 -0
  12. package/dist/css/{806-exchange-facfcc131d.chunk.css → 806-exchange-e95ba16155.chunk.css} +4 -4
  13. package/dist/css/{954-exchange-3f4e97314a.chunk.css → 954-exchange-60c2c30b74.chunk.css} +1 -1
  14. package/dist/css/lite-exchange-1b770ac7dd.css +17 -0
  15. package/dist/languages/en.json +1 -1
  16. package/dist/scripts/{127-c473c4f98d-exchange.chunk.js → 127-a6c0df48ef-exchange.chunk.js} +1 -1
  17. package/dist/scripts/13-e480fa003d-exchange.chunk.js +1 -0
  18. package/dist/scripts/{184-db1e7ad30e-exchange.chunk.js → 184-da12e1b2fc-exchange.chunk.js} +1 -1
  19. package/dist/scripts/254-0e9d10f00d-exchange.chunk.js +1 -0
  20. package/dist/scripts/267-4210b5c2a3-exchange.chunk.js +1 -0
  21. package/dist/scripts/{351-b7512a656c-exchange.chunk.js → 351-0ac39ec1d7-exchange.chunk.js} +1 -1
  22. package/dist/scripts/366-d716d498d9-exchange.chunk.js +1 -0
  23. package/dist/scripts/374-dbc80eb1a4-exchange.chunk.js +1 -0
  24. package/dist/scripts/{414-a623b2cbe6-exchange.chunk.js → 414-156b108bdb-exchange.chunk.js} +1 -1
  25. package/dist/scripts/433-7856ccb323-exchange.chunk.js +1 -0
  26. package/dist/scripts/439-f9b76e717c-exchange.chunk.js +1 -0
  27. package/dist/scripts/445-8a517de5b7-exchange.chunk.js +1 -0
  28. package/dist/scripts/497-a4bab99365-exchange.chunk.js +2 -0
  29. package/dist/scripts/544-4d55da5404-exchange.chunk.js +1 -0
  30. package/dist/scripts/548-8d82739b5d-exchange.chunk.js +1 -0
  31. package/dist/scripts/572-cf76344dfe-exchange.chunk.js +1 -0
  32. package/dist/scripts/579-ef019dcc38-exchange.chunk.js +2 -0
  33. package/dist/scripts/63-7ed3faa18a-exchange.chunk.js +1 -0
  34. package/dist/scripts/636-f0abef5736-exchange.chunk.js +2 -0
  35. package/dist/scripts/662-0e570d5635-exchange.chunk.js +1 -0
  36. package/dist/scripts/665-9a23aa1f38-exchange.chunk.js +2 -0
  37. package/dist/scripts/690-156f0a308e-exchange.chunk.js +1 -0
  38. package/dist/scripts/806-388da2a282-exchange.chunk.js +1 -0
  39. package/dist/scripts/{838-3f17f630f4-exchange.chunk.js → 838-d83b68bdad-exchange.chunk.js} +1 -1
  40. package/dist/scripts/85-2a5efab527-exchange.chunk.js +1 -0
  41. package/dist/scripts/854-c8642b7ea1-exchange.chunk.js +1 -0
  42. package/dist/scripts/87-7f90f293c5-exchange.chunk.js +1 -0
  43. package/dist/scripts/875-f6d6bd9677-exchange.chunk.js +1 -0
  44. package/dist/scripts/{88-7319aea112-exchange.chunk.js → 88-75348f8731-exchange.chunk.js} +2 -2
  45. package/dist/scripts/{665-cd59bb01aa-exchange.chunk.js → 923-cd7764743c-exchange.chunk.js} +1 -1
  46. package/dist/scripts/{925-5b677259ce-exchange.chunk.js → 925-046df7a817-exchange.chunk.js} +1 -1
  47. package/dist/scripts/954-06259efc8b-exchange.chunk.js +1 -0
  48. package/dist/scripts/bundle-1ebd64dbd4.min.js +2 -0
  49. package/dist/scripts/{bundle-7c2cd06fea.min.js.LICENSE.txt → bundle-1ebd64dbd4.min.js.LICENSE.txt} +12 -27
  50. package/package.json +1 -1
  51. package/dist/css/24-exchange-74522bc90f.chunk.css +0 -1
  52. package/dist/css/497-exchange-74522bc90f.chunk.css +0 -1
  53. package/dist/css/lite-exchange-f0327e6d18.css +0 -18
  54. package/dist/scripts/13-c4a1eddf32-exchange.chunk.js +0 -1
  55. package/dist/scripts/24-02795fabe4-exchange.chunk.js +0 -2
  56. package/dist/scripts/254-f6a65ea25f-exchange.chunk.js +0 -1
  57. package/dist/scripts/255-2fa12a181a-exchange.chunk.js +0 -2
  58. package/dist/scripts/267-d48442ca99-exchange.chunk.js +0 -1
  59. package/dist/scripts/366-9b1e7c5335-exchange.chunk.js +0 -1
  60. package/dist/scripts/374-89098972e2-exchange.chunk.js +0 -1
  61. package/dist/scripts/433-10cafd7ec7-exchange.chunk.js +0 -1
  62. package/dist/scripts/439-98cfc72c39-exchange.chunk.js +0 -1
  63. package/dist/scripts/445-049fd17ee9-exchange.chunk.js +0 -1
  64. package/dist/scripts/497-6dc3aeb606-exchange.chunk.js +0 -2
  65. package/dist/scripts/544-7f576a5f4b-exchange.chunk.js +0 -1
  66. package/dist/scripts/548-90a354d79f-exchange.chunk.js +0 -1
  67. package/dist/scripts/572-ea5512bc69-exchange.chunk.js +0 -1
  68. package/dist/scripts/63-cebc9b6ecd-exchange.chunk.js +0 -1
  69. package/dist/scripts/636-01b682501d-exchange.chunk.js +0 -2
  70. package/dist/scripts/662-8c69c0f77d-exchange.chunk.js +0 -1
  71. package/dist/scripts/682-75c5919756-exchange.chunk.js +0 -1
  72. package/dist/scripts/690-89a343556e-exchange.chunk.js +0 -1
  73. package/dist/scripts/806-df16fc5522-exchange.chunk.js +0 -1
  74. package/dist/scripts/85-2fb0665862-exchange.chunk.js +0 -1
  75. package/dist/scripts/854-916583e51d-exchange.chunk.js +0 -1
  76. package/dist/scripts/875-c40828d1c6-exchange.chunk.js +0 -1
  77. package/dist/scripts/954-6728b5f911-exchange.chunk.js +0 -1
  78. package/dist/scripts/bundle-7c2cd06fea.min.js +0 -2
  79. /package/dist/scripts/{483-de17262480-exchange.chunk.js → 483-0d77586db2-exchange.chunk.js} +0 -0
  80. /package/dist/scripts/{24-02795fabe4-exchange.chunk.js.LICENSE.txt → 497-a4bab99365-exchange.chunk.js.LICENSE.txt} +0 -0
  81. /package/dist/scripts/{255-2fa12a181a-exchange.chunk.js.LICENSE.txt → 579-ef019dcc38-exchange.chunk.js.LICENSE.txt} +0 -0
  82. /package/dist/scripts/{497-6dc3aeb606-exchange.chunk.js.LICENSE.txt → 636-f0abef5736-exchange.chunk.js.LICENSE.txt} +0 -0
  83. /package/dist/scripts/{636-01b682501d-exchange.chunk.js.LICENSE.txt → 665-9a23aa1f38-exchange.chunk.js.LICENSE.txt} +0 -0
  84. /package/dist/scripts/{88-7319aea112-exchange.chunk.js.LICENSE.txt → 88-75348f8731-exchange.chunk.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[127],{69834:(t,e,r)=>{r.d(e,{r:()=>j});var n=r(50242),o=r(81886),a=r(67058),i=r(23481),u=r(64364);function c(t){return c="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},c(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(o)?o:String(o)),n)}var o}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}var d="shared.privateResourceError",p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(u,t);var e,r,n,o,a=(n=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(n);if(o){var r=l(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,i.T.getPhrase(d,"title"))}return e=u,(r=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(d,"heading")}},{key:"description",get:function(){return i.T.getPhrase(d,"description")}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(u.H);function y(t){return y="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},y(t)}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==y(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===y(o)?o:String(o)),n)}var o}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}var g="shared.regionLockedResourceError",h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(u,t);var e,r,n,o,a=(n=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=m(n);if(o){var r=m(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,i.T.getPhrase(g,"title"))}return e=u,(r=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(g,"heading")}},{key:"description",get:function(){return i.T.getPhrase(g,"description")}}])&&v(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(u.H),O=r(49075),w={notFound:a.d,forbidden:{rating:p,yearLevel:p,region:h,privacy:p},badRequest:O._};function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var a;a="number"==typeof t?t:t.status;var i=Object.assign(Object.assign({},w),e);a&&o.Q.Ry.isStatusCodeError(a)&&(a!==n.o.NotFound?a!==n.o.Forbidden?r.badRequest||o.Q.Ry.throw(new i.badRequest):r.forbidden||o.Q.Ry.throw(new i.forbidden.privacy):r.notFound||o.Q.Ry.throw(new i.notFound))}}},91286:(t,e,r)=>{r.d(e,{v:()=>i});var n=r(32735),o=r(69834);function a(t){return t.map((function(t){return t.statusCode})).join(":")}function i(t,e,r){var i=Array.isArray(t)?t:[t];(0,n.useEffect)((function(){i.forEach((function(t){(0,o.r)(t.statusCode,e,r)}))}),[a(i),e,r])}},5353:(t,e,r)=>{r.d(e,{i:()=>l});var n,o=r(99940),a=r(97395),i=r(110);!function(t){t[t.AllResults=0]="AllResults",t[t.Subtitles=1]="Subtitles",t[t.TitleAndDescription=2]="TitleAndDescription"}(n||(n={}));var u=r(55812);function c(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 s(t){return Object.entries(t).reduce((function(t,e){var r,n,o=(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,o,a,i,u=[],c=!0,s=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}}(r,n)||function(t,e){if(t){if("string"==typeof t)return c(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)?c(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.")}()),a=o[0],i=o[1];return t[a.charAt(0).toLowerCase()+a.slice(1)]=i,t}),{})}function f(t){return t?Array.isArray(t)?function(t){return t.map(s)}(t):s(t):null}var l={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:f}},region:function(t){return{url:"/api/tv/api/v2/regions/".concat(t),key:"tv:region:".concat(t),normalize:!1,formatData:f}},dateRange:function(t){return{url:"/api/tv/api/v2/regions/".concat(t,"/daterange"),key:"tv:region:".concat(t,":daterange"),normalize:!1,formatData:f}},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 f(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:f}},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:f}},program:function(t){return{url:"/api/tv/api/v3/programs/".concat(t),key:"tv:programs:".concat(t),normalize:!1,formatData:function(t){var e=f(t);return e.region=f(t.Region),e}}},search:function(t,e,r){var o=e.query,i=e.dateBroadcast,c=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(e,["query","dateBroadcast"]),s=r||1,l=c.filter||n.AllResults;return{url:a._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:t,query:o,filter:l},u.a.getDateBroadcastParams(i)),c),{page:s,size:25})),key:["tv:search",o,t,Object.values(Object.assign({filter:l,dateBroadcast:i},c)).join(":"),s].join(":"),normalize:!1,formatData:function(t){var e=f(t);return e.results=f(t.Results),e.page=s,e}}},addFullVideo:function(t,e){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:o.k.POST,data:t,invalidationKeys:"tv:workspace:video:".concat(e)}},addAdFreeVideo:function(t,e){return{url:a._.urlBuilder("/api/tv/v4/programs/".concat(t.id,"/ad-free"),{customerId:t.customerId,userId:t.userId}),key:"tv:add:ad:free:video",normalize:!1,type:o.k.POST,invalidationKeys:"tv:workspace:video:".concat(e)}},adFreeCredits:function(t,e){var r=new Date;r.setHours(0,0,0,0),r.setMinutes(r.getMinutes()+r.getTimezoneOffset());var n=i.O.add(r,1,"day");return{url:a._.urlBuilder("/api/tv/api/v1/user-requests",{username:t,region:e,from:i.O.convertUTCToLocal(r).toISOString(),to:i.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:f}},createAdFreeRequest:function(t){return{url:a._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:t.userId,customerId:t.customerId}),key:"tv:create:add:free:request",normalize:!1,type:o.k.POST,data:{programId:t.programId,regionCode:t.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(t,e,r){return{url:a._.urlBuilder("/api/tv/v4/workspace/programs/".concat(t),{userId:e,customerId:r}),key:"tv:workspace:video:".concat(t),formatData:f}},requestProgram:function(t){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:o.k.POST,data:t}}}},55812:(t,e,r)=>{r.d(e,{a:()=>o});var n=r(110),o={getFormattedDateRange:function(t,e){return"".concat(n.O.format(t,"Do MMMM yyyy")," - ").concat(n.O.format(e,"Do MMMM yyyy"))},getDateBroadcastParams:function(t){var e=function(t){return n.O.format(t,"YYYY-MM-DD")},r=e(new Date);switch(t){case"yesterday":return{from:e(n.O.subtract(r,1,"day")),to:r};case"last-week":return{from:e(n.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:e(n.O.subtract(r,14,"days")),to:r}}}}},82127:(t,e,r)=>{r.r(e),r.d(e,{TvHomeView:()=>f});var n=r(32735),o=r(81886),a=r(20354),i=r(91286),u=r(73818),c=r(82329),s=r(5353);function f(){var t=a.a.useBasicFetch(s.i.regions());return(0,i.v)(t),n.useEffect((function(){var e;(null===(e=t.data)||void 0===e?void 0:e.length)&&o.Q.C$.trigger({application:c.O.TV,action:u.e.Tv.CHANNELS,args:[t.data[0].code]},{replace:!0})}),[t.data]),n.createElement(n.Fragment,null)}}}]);
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[127],{69834:(t,e,r)=>{r.d(e,{r:()=>j});var n=r(50242),o=r(81886),a=r(67058),i=r(23481),u=r(64364);function c(t){return c="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},c(t)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===c(o)?o:String(o)),n)}var o}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}var p="shared.privateResourceError",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(u,t);var e,r,n,o,a=(n=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=f(n);if(o){var r=f(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,i.T.getPhrase(p,"title"))}return e=u,(r=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(p,"heading")}},{key:"description",get:function(){return i.T.getPhrase(p,"description")}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(u.H);function d(t){return d="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},d(t)}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==d(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===d(o)?o:String(o)),n)}var o}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}var g="shared.regionLockedResourceError",h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(u,t);var e,r,n,o,a=(n=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=m(n);if(o){var r=m(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,i.T.getPhrase(g,"title"))}return e=u,(r=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(g,"heading")}},{key:"description",get:function(){return i.T.getPhrase(g,"description")}}])&&v(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),u}(u.H),O=r(49075),w={notFound:a.d,forbidden:{rating:y,yearLevel:y,region:h,privacy:y},badRequest:O._};function j(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var a;a="number"==typeof t?t:t.status;var i=Object.assign(Object.assign({},w),e);a&&o.Q.Ry.isStatusCodeError(a)&&(a!==n.o.NotFound?a!==n.o.Forbidden?r.badRequest||o.Q.Ry.throw(new i.badRequest):r.forbidden||o.Q.Ry.throw(new i.forbidden.privacy):r.notFound||o.Q.Ry.throw(new i.notFound))}}},91286:(t,e,r)=>{r.d(e,{v:()=>i});var n=r(32735),o=r(69834);function a(t){return t.map((function(t){return t.statusCode})).join(":")}function i(t,e,r){var i=Array.isArray(t)?t:[t];(0,n.useEffect)((function(){i.forEach((function(t){(0,o.r)(t.statusCode,e,r)}))}),[a(i),e,r])}},5353:(t,e,r)=>{r.d(e,{i:()=>f});var n,o=r(99940),a=r(97395),i=r(110);!function(t){t[t.AllResults=0]="AllResults",t[t.Subtitles=1]="Subtitles",t[t.TitleAndDescription=2]="TitleAndDescription"}(n||(n={}));var u=r(55812);function c(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 s(t){return Object.entries(t).reduce((function(t,e){var r,n,o=(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,o,a,i,u=[],c=!0,s=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return u}}(r,n)||function(t,e){if(t){if("string"==typeof t)return c(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)?c(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.")}()),a=o[0],i=o[1];return t[a.charAt(0).toLowerCase()+a.slice(1)]=i,t}),{})}function l(t){return t?Array.isArray(t)?function(t){return t.map(s)}(t):s(t):null}var f={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:l}},region:function(t){return{url:"/api/tv/api/v2/regions/".concat(t),key:"tv:region:".concat(t),normalize:!1,formatData:l}},dateRange:function(t){return{url:"/api/tv/api/v2/regions/".concat(t,"/daterange"),key:"tv:region:".concat(t,":daterange"),normalize:!1,formatData:l}},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 l(t).sort((function(t,e){return t.sortOrder-e.sortOrder}))}}},payTvChannels:function(){return{url:"/api/tv/v1/pay-tv/channels/all",key:"pay:tv:channels",normalize:!1,formatData:l}},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:l}},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:l}},program:function(t){return{url:"/api/tv/api/v3/programs/".concat(t),key:"tv:programs:".concat(t),normalize:!1,formatData:function(t){var e=l(t);return e.region=l(t.Region),e}}},search:function(t,e,r){var o=e.query,i=e.dateBroadcast,c=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(e,["query","dateBroadcast"]),s=r||1,f=c.filter||n.AllResults;return{url:a._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:t,query:o,filter:f},u.a.getDateBroadcastParams(i)),c),{page:s,size:25})),key:["tv:search",o,t,Object.values(Object.assign({filter:f,dateBroadcast:i},c)).join(":"),s].join(":"),normalize:!1,formatData:function(t){var e=l(t);return e.results=l(t.Results),e.page=s,e}}},addFullVideo:function(t,e){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:o.k.POST,data:t,invalidationKeys:"tv:workspace:video:".concat(e)}},addAdFreeVideo:function(t,e){return{url:a._.urlBuilder("/api/tv/v4/programs/".concat(t.id,"/ad-free"),{customerId:t.customerId,userId:t.userId}),key:"tv:add:ad:free:video",normalize:!1,type:o.k.POST,invalidationKeys:"tv:workspace:video:".concat(e)}},adFreeCredits:function(t,e){var r=new Date;r.setHours(0,0,0,0),r.setMinutes(r.getMinutes()+r.getTimezoneOffset());var n=i.O.add(r,1,"day");return{url:a._.urlBuilder("/api/tv/api/v1/user-requests",{username:t,region:e,from:i.O.convertUTCToLocal(r).toISOString(),to:i.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:l}},createAdFreeRequest:function(t){return{url:a._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:t.userId,customerId:t.customerId}),key:"tv:create:add:free:request",normalize:!1,type:o.k.POST,data:{programId:t.programId,regionCode:t.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(t,e,r){return{url:a._.urlBuilder("/api/tv/v4/workspace/programs/".concat(t),{userId:e,customerId:r}),key:"tv:workspace:video:".concat(t),formatData:l}},requestProgram:function(t){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:o.k.POST,data:t}}}},55812:(t,e,r)=>{r.d(e,{a:()=>o});var n=r(110),o={getFormattedDateRange:function(t,e){return"".concat(n.O.format(t,"Do MMMM yyyy")," - ").concat(n.O.format(e,"Do MMMM yyyy"))},getDateBroadcastParams:function(t){var e=function(t){return n.O.format(t,"YYYY-MM-DD")},r=e(new Date);switch(t){case"yesterday":return{from:e(n.O.subtract(r,1,"day")),to:r};case"last-week":return{from:e(n.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:e(n.O.subtract(r,14,"days")),to:r}}}}},82127:(t,e,r)=>{r.r(e),r.d(e,{TvHomeView:()=>l});var n=r(32735),o=r(81886),a=r(20354),i=r(91286),u=r(73818),c=r(82329),s=r(5353);function l(){var t=a.a.useBasicFetch(s.i.regions());return(0,i.v)(t),n.useEffect((function(){var e;(null===(e=t.data)||void 0===e?void 0:e.length)&&o.Q.C$.trigger({application:c.O.TV,action:u.e.Tv.CHANNELS,args:[t.data[0].code]},{replace:!0})}),[t.data]),n.createElement(n.Fragment,null)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[13],{78681:(e,t,n)=>{n.d(t,{Z:()=>a});var a={ratings:function(){return{url:"/api/domain/v2/me/ratings",key:"ratings"}}}},47399:(e,t,n)=>{n.d(t,{n:()=>d});var a=n(32735),i=n(81886),r=n(83914),l=n(35223),o=n(73818),s=n(82329);const c={searchBar:"YbmeO"};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function d(e){var t,n,d,m=(n=a.useState(null!==(t=e.query)&&void 0!==t?t:""),d=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(n,d)||function(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}(n,d)||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.")}()),p=m[0],v=m[1];return a.createElement("form",{onSubmit:function(e){e.preventDefault(),p&&i.Q.C$.trigger({application:s.O.EXCHANGE,action:o.e.Exchange.SEARCH,params:{query:p}})}},a.createElement("div",{className:"".concat(c.searchBar," d-flex border border-dark rounded align-items-center mb-3")},a.createElement(r.x,{svgName:l.vn.Search}),a.createElement("input",{type:"text",className:"form-control h-100 w-100 py-0 border-0 shadow-none",placeholder:"Search for resources in the Exchange Archive",value:p,onChange:function(e){return v(e.target.value)},autoComplete:"off"})))}},16757:(e,t,n)=>{n.r(t),n.d(t,{ExchangeSearchResultsView:()=>Ut});var a=n(32735),i=n(20354),r=n(65858),l=n(68050),o=n(69111),s=n(75896),c=n(57408),u=n(33101),d=n(83345),m=n(79967),p="search.collectionVideoList";function v(e){var t,n=(t=(0,m.k)()).xs?2:t.sm?1:3,i={analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions};return a.createElement(a.Fragment,null,a.createElement("ul",{className:"list-unstyled my-1"},e.videos.slice(0,n).map((function(t){var n,r=!!t.episodeNumber&&!!(null===(n=t.season)||void 0===n?void 0:n.id);return a.createElement("li",{key:"".concat(e.collectionId,":").concat(t.id),className:"d-flex align-items-center"},a.createElement(c.F,Object.assign({},i,{className:"clamp-1",appLink:e.getVideoAppLink(t)}),r&&a.createElement(a.Fragment,null,a.createElement(u.Q,{video:t})," "),t.name))}))),a.createElement(c.F,Object.assign({},i,{className:"info-link",appLink:e.appLink}),a.createElement(d.x,{namespace:p,phrase:"seeAll"})))}var g=n(64887),f=n(29254),y=n(17464),h=n(85473),b=n(85177),E=n(54569),A=n(9977),k=n(54610);function S(e){var t,n,i,l,s=(0,m.k)(),u="sm"===A.O.getSize(s,"md"),p=!!(null===(n=null===(t=e.collection.videos)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),S=p&&e.collection.videos.data.find((function(e){var t;return!!(null===(t=e.thumbnail)||void 0===t?void 0:t.url)})),w=(l=Object.assign(Object.assign({},e.analyticsData),{id:e.collection.id,name:e.collection.name}),S&&(l.videoId=S.id,l.videoName=S.name),l),O="series"===e.collectionType;return a.createElement("div",{className:"row g-0 ".concat(u?"":"py-2")},a.createElement(o.Z,Object.assign({},A.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(u?"pb-2 pe-2":"mb-1 px-2")}),a.createElement("div",{className:"position-relative overflow-hidden ".concat(u?"rounded":"rounded-3")},a.createElement(h.Z,{data:null==S?void 0:S.thumbnail,appLink:e.appLink,imageType:k.__.Thumbnails,analyticsData:w,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:r._S.Thumbnail})},a.createElement(E.z,{type:e.maskType}),a.createElement(b.oy,{type:e.imageFallbackType}),a.createElement("div",{className:"d-flex flex-column align-items-center justify-content-center text-white h-100 ".concat("AZSmh")},a.createElement(d.x,{namespace:"search.collectionThumbnail",phrase:"seeAll"}))))),a.createElement(o.Z,Object.assign({},A.O.getDetailsColumns(),{className:u?"pb-2":"px-2"}),!e.isPlugin&&a.createElement(g.e,{actions:e.getCollectionActions(e.collection,e.showActions,e.collectionType,e.analyticsOptions),className:"float-end mt-n1",actionsDropdownClassName:"btn btn-link ms-1"}),a.createElement(c.F,{appLink:e.appLink,analyticsData:w,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:r._S.Title})},a.createElement("h5",{className:"m-0 mb-1"},a.createElement("span",{className:"clamp-1"},e.collection.name))),O&&!e.hideBadges&&a.createElement(y.c,null,a.createElement(f.C,{type:f.g.Rating,data:e.collection.rating}),a.createElement(f.C,{type:f.g.ProductionYear,data:null===(i=e.collection.metadata)||void 0===i?void 0:i.year})),p&&a.createElement(v,{collectionId:e.collection.id,videos:e.collection.videos.data,appLink:e.appLink,analyticsData:w,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:r._S.Link}),getVideoAppLink:e.getVideoAppLink})))}const w={playlistItem:"CaRJx",playlistItemGradient:"BI7p2",playlistMetadata:"eDk1l",partialHeading:"w4lWh",ownerAvatarContainer:"JImqE"};var O=["second","minute","hour","day","week","month","year"],x=["秒","分钟","小时","天","周","个月","年"],L={},C=function(e,t){L[e]=t},j=[60,60,24,7,365/7/12,12];function N(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}var I=function(e,t,n){var a=function(e,t){return(+(t?N(t):new Date)-+N(e))/1e3}(e,n&&n.relativeDate);return function(e,t){for(var n=e<0?1:0,a=e=Math.abs(e),i=0;e>=j[i]&&i<j.length;i++)e/=j[i];return(e=Math.floor(e))>(0==(i*=2)?9:1)&&(i+=1),t(e,i,a)[n].replace("%s",e.toString())}(a,function(e){return L[e]||L.en_US}(t))};C("en_US",(function(e,t){if(0===t)return["just now","right now"];var n=O[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]})),C("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var n=x[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}));var T=n(23481),P=n(110);const F={fontSmall:"OYBRp"};var _="playlists.playlistCount";function R(e){var t=function(e){var t,n,a,i,r,l;return!!e&&(null!==(n=null===(t=e.videos)||void 0===t?void 0:t.count)&&void 0!==n?n:0)+(null!==(i=null===(a=e.interactives)||void 0===a?void 0:a.count)&&void 0!==i?i:0)+(null!==(l=null===(r=e.clips)||void 0===r?void 0:r.count)&&void 0!==l?l:0)}(e.playlist);return!1===t||Number.isNaN(t)?a.createElement(a.Fragment,null):a.createElement("span",{className:F.fontSmall},a.createElement(d.x,{namespace:_,phrase:"count",options:{smartCount:t}}))}var D=n(91374),U=n(2786);const V={avatar:"_N1vT"};function q(){return a.createElement("div",{className:V.avatar},a.createElement(U.Sd,null))}var M=n(55452);function H(e){var t,n,i,r=e.playlist._liteOwner;if(null===(t=e.playlist._isClickViewPlaylist)||void 0===t?void 0:t.value)return a.createElement(q,null);if(!(null==r?void 0:r.id)||!(null===(n=e.currentUser)||void 0===n?void 0:n.id))return a.createElement(a.Fragment,null);if(r.id.toString()===e.currentUser.id.toString())return a.createElement(a.Fragment,null);var l="string"==typeof r.avatar?r.avatar:null===(i=r.avatar)||void 0===i?void 0:i.url;return a.createElement(D.q,{imageUrl:l,imageCdnUrl:e.imageCdnUrl,initials:M.l.getInitials(r.name,r.surname)})}var Z=n(70498),G=n(38326),B=n(9085),$=n(67453),W="playlists.playlistList";function z(e){var t,n,i=$.j.createUrl(e.data.cover&&e.data.cover.url,{size:k.h2.Medium,resizeType:k.Nq.Cover}),l=e.data.subjectPresentationAudiences&&e.data.subjectPresentationAudiences.data,o=(0,G.n)(l,e.presentationAudiences),s=w.playlistItem,u=!!i||!!e.showFallbackImage;u&&(s+=" ".concat(w.playlistItemGradient)),!u&&e.bgColourClassNames&&(s+=" ".concat(w.playlistItem," ").concat((0,B.x)(e.data.name,e.bgColourClassNames))),"round"===e.itemStyle&&(s+=" rounded-3 overflow-hidden"),"round-left"===e.itemStyle&&(s+=" rounded-start-lg overflow-hidden");var d=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(n=e.data)||void 0===n?void 0:n.name}),m=Object.assign(Object.assign({},e.analyticsOptions),{entity:r.py.Playlist});return a.createElement(c.F,{appLink:e.appLink,analyticsData:d,analyticsOptions:m,title:function(){var t;return!e.data.contentModifiedDate||(null===(t=e.data._isClickViewPlaylist)||void 0===t?void 0:t.value)?"":T.T.getPhrase(W,"lastUpdated",{timeago:I(P.O.convertUTCToLocal(e.data.contentModifiedDate))})}()},a.createElement(h.Z,{data:i,alt:e.data.name,className:s},!!e.showFallbackImage&&a.createElement(b.oy,{type:b.mS.Playlist}),a.createElement("div",{className:"text-white ".concat(w.playlistMetadata)},!!e.showCount&&a.createElement(R,{playlist:e.data}),a.createElement("h5",{className:"mb-0 ".concat(e.titleClassName||"")},a.createElement("span",{className:"clamp-2"},e.data.name)),!!l&&!!l.length&&!!o&&a.createElement(Z.P,{className:"".concat(e.audienceLabelClass?e.audienceLabelClass:""," mt-1"),audience:o,border:"white"})),!!e.showOwner&&!!e.imageCdnUrl&&a.createElement("div",{className:w.ownerAvatarContainer},a.createElement(H,{playlist:e.data,currentUser:e.currentUser,imageCdnUrl:e.imageCdnUrl}))))}z.defaultProps={itemStyle:"square"},r.Vw.Click,r.py.Playlist,r.LZ.PlaylistListItem,r._S.Cover;var Y=n(55577),X=n(7733);function Q(e){var t,n=(t=(0,m.k)()).xl||t.xxl?3:2,i=e.playlist.videos.data.slice(0,n),s={actionType:r.Vw.Click,entity:r.py.Playlist,location:r.LZ.PlaylistWithVideos},u=Object.assign(Object.assign({},e.analyticsData),{id:e.playlist.id,name:e.playlist.name});return a.createElement("div",{className:"ps-2 py-2"},a.createElement(l.Z,{className:"g-0 border border-light rounded-3"},a.createElement(o.Z,{xs:4,lg:3,className:"pe-3"},a.createElement(z,{appLink:e.playlistAppLink,analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},s),{descriptor:r._S.Cover}),data:e.playlist,presentationAudiences:e.presentationAudiences,bgColourClassNames:X.o,itemStyle:"round-left",imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,showCount:!1,showOwner:!0})),a.createElement(o.Z,{xs:8,lg:9},a.createElement("div",{className:"d-flex justify-content-between"},a.createElement("div",{className:"pt-3 ".concat("eEZEe")},null==i?void 0:i.map((function(t){var n=Object.assign(Object.assign({},u),{videoId:t.id,videoName:t.name});return a.createElement(Y.m,{key:t.id,video:t,getSeriesAppLink:e.getSeriesAppLink,canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:e.getVideoAppLink,analyticsData:n,analyticsOptions:{entity:r.py.Video,location:r.LZ.PlaylistWithVideos},size:"sm",yearGroups:e.yearGroups})}))),a.createElement("div",{className:"text-end pt-3 pe-3"},a.createElement(c.F,{className:"info-link fw-semibold",appLink:e.playlistAppLink,analyticsData:u,analyticsOptions:Object.assign(Object.assign({},s),{descriptor:r._S.Link})},a.createElement(d.x,{namespace:"search.playlistWithVideos",phrase:"seeAllVideos"})))))))}var J=n(49439);const K={labelContainer:"ieonz",hoverActive:"vqHCl",mask:"qEOPN",largeHoverTitle:"ZYApF",smallHoverTitle:"qcfHO",largeHoverDescription:"Uh4gM",smallHoverDescription:"TiqqV"};function ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function te(e){var t,n,i=(t=(0,J.L)({className:K.hoverActive}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return ee(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)?ee(e,t):void 0}}(t,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.")}()),r=i[0],l=i[1],o=e.series&&e.series.subjectPresentationAudiences&&e.series.subjectPresentationAudiences.data||[],s=(0,G.n)(o,e.presentationAudiences),c=!!(o&&o.length&&s);return a.createElement("div",{ref:r},l&&a.createElement("div",{className:"py-3 text-white text-center mb-3 ".concat(K.mask)},a.createElement("h3",{className:"fw-semibold ".concat(K.hoverTitle," ").concat(e.isSmall?K.smallHoverTitle:K.largeHoverTitle)},a.createElement("span",{className:"clamp-3"},e.series.name)),!!e.series.description&&a.createElement("p",{className:"".concat(K.hoverDescription," ").concat(e.isSmall?K.smallHoverDescription:K.largeHoverDescription," mb-0")},e.series.description)),a.createElement(h.Z,{data:e.series.tallPoster,alt:e.series.name,imageType:k.__.TallPosters,preload:e.preloadImage,imageOptions:{size:k.h2.Large},imageClassName:e.imageClass?e.imageClass:"rounded-3"},a.createElement(b.oy,{type:b.mS.Series}),a.createElement("div",{className:"position-absolute text-white ".concat(K.labelContainer)},c?a.createElement(Z.P,{audience:s,border:"white"}):a.createElement(f.C,{type:f.g.Rating,data:e.series.rating}))))}function ne(e){var t,n=(t=(0,m.k)()).xl||t.xxl?5:t.lg||t.md?4:3,i=e.series.videos.data.slice(0,n),s={actionType:r.Vw.Click,entity:r.py.Series,location:r.LZ.SeriesWithVideos},u=Object.assign(Object.assign({},e.analyticsData),{id:e.series.id,name:e.series.name});return a.createElement("div",{className:"ps-2 py-2"},a.createElement(l.Z,{className:"g-0 border border-light rounded-3"},a.createElement(o.Z,{xs:4,lg:3,className:"pe-3"},a.createElement(c.F,{appLink:e.seriesAppLink,className:"position-relative",analyticsData:u,analyticsOptions:Object.assign(Object.assign({},s),{descriptor:r._S.TallPoster})},a.createElement(te,{series:e.series,presentationAudiences:e.presentationAudiences,preloadImage:e.preloadImage,imageClass:"rounded-start-lg"}))),a.createElement(o.Z,{xs:8,lg:9},a.createElement("div",{className:"d-flex justify-content-between"},a.createElement("div",{className:"pt-3 ".concat("UT8bc")},null==i?void 0:i.map((function(t){var n=Object.assign(Object.assign({},u),{videoId:t.id,videoName:t.name});return t=Object.assign(Object.assign({},t),{series:e.series}),a.createElement(Y.m,{key:t.id,video:t,getSeriesAppLink:function(){return e.seriesAppLink},canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:function(t){return e.getVideoAppLink(t)},analyticsData:n,analyticsOptions:{entity:r.py.Video,location:r.LZ.SeriesWithVideos},size:"sm",yearGroups:e.yearGroups})}))),a.createElement("div",{className:"text-end pt-3 pe-3"},a.createElement(c.F,{className:"info-link fw-semibold",appLink:e.seriesAppLink,analyticsData:u,analyticsOptions:Object.assign(Object.assign({},s),{descriptor:r._S.Link})},a.createElement(d.x,{namespace:"search.seriesWithVideos",phrase:"seeAllVideos"})))))))}var ae=n(1048);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},ie(e)}function re(e){return function(e){if(Array.isArray(e))return oe(e)}(e)||se(e)||le(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 le(e,t){if(e){if("string"==typeof e)return oe(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)?oe(e,t):void 0}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function se(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}var ce={"featured-result":1,"topic-list":8,company:8,"playlist-with-videos":1,"series-with-videos":1,"series-thumbnail":1,"playlist-thumbnail":1,"video-item":1,"companies-and-topics":16},ue={flattenResults:function(e){return e?e.results?Object.assign(Object.assign({},e),{results:s.m.flatten(e.results)}):Object.assign(Object.assign({},e),{results:[]}):null},getContextualSearchQueryParams:function(e){return e&&e.get("filterParam")?(t={},n=e.get("filterParam"),a=e.get("filterValue"),(n=function(e){var t=function(e,t){if("object"!==ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==ie(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ie(t)?t:String(t)}(n))in t?Object.defineProperty(t,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[n]=a,t):{};var t,n,a},mapMaxScoreToSearchResults:function(e,t){return e.map((function(e){return t?Object.assign(Object.assign({},e),{_maxScore:t}):e}))},groupResults:function(e,t,n,a,i){var r,l;if(!(null==e?void 0:e.length)&&!(null===(r=null==t?void 0:t.results)||void 0===r?void 0:r.length)&&!(null===(l=null==n?void 0:n.results)||void 0===l?void 0:l.length))return[];var o,s,c,u,d=function(e){if(Array.isArray(e))return e}(u=e)||se(u)||le(u)||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.")}(),m=d[0],p=d.slice(1),v=i.xs||i.sm,g=function(e,t,n,a,i){var r,l,o,s,c,u,d,m=i?"playlist-thumbnail":"playlist-with-videos",p=i?"series-thumbnail":"series-with-videos",v=[{type:"companies-and-topics",items:null!==(c=[].concat(re(null!==(l=null===(r=null==n?void 0:n.results)||void 0===r?void 0:r.slice(0,ce.company))&&void 0!==l?l:[]),re(null!==(s=null===(o=null==t?void 0:t.results)||void 0===o?void 0:o.slice(0,ce["topic-list"]))&&void 0!==s?s:[])))&&void 0!==c?c:[]},{type:"featured-result",items:ae.t.isEmpty(a)?[]:[a]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:m,items:[]},{type:p,items:[]},{heading:T.T.getPhrase("sharedSearch.utils","relatedTopics"),type:"topic-list",items:null!==(d=null===(u=null==t?void 0:t.results)||void 0===u?void 0:u.slice(ce["topic-list"],2*ce["topic-list"]))&&void 0!==d?d:[]}],g=!1;return null==e||e.forEach((function(e){var t=de(e,i);if(!e._featured||g||"video"!==e._index)if(v[2].items.length<ce["video-item"]&&"video-item"===t)v[2].items.push(e);else if(v[3].items.length<ce["video-item"]&&"video-item"===t)v[3].items.push(e);else if(v[4].items.length<ce["video-item"]&&"video-item"===t)v[4].items.push(e);else if(v[5].items.length<ce[m]&&t===m)v[5].items.push(e);else if(v[6].items.length<ce[p]&&t===p)v[6].items.push(e);else{var n=v[v.length-1];if((null==n?void 0:n.type)===t){var a=ce[t];n.items.length>=a?v.push({type:t,items:[e]}):n.items.push(e)}else v.push({type:t,items:[e]})}else g=!0})),v.filter((function(e){var t;return null===(t=e.items)||void 0===t?void 0:t.length}))}(m,t,n,a,v);return(null==p?void 0:p.length)?(s=g,c=v,(o=p)?(o.forEach((function(e){var t=s[s.length-1],n=!0;e.forEach((function(e){var a=de(e,c);if(n&&t.type===a)t.items.length>=ce[a]?(n=!1,s.push({type:a,items:[e]})):t.items.push(e);else{var i=s[s.length-1];(null==i?void 0:i.type)===a?i.items.length>=ce[a]?s.push({type:a,items:[e]}):i.items.push(e):s.push({type:a,items:[e]})}}))})),s):s):g}};function de(e,t){var n;return"video"===e._index||"interactive"===e._index||"clip"===e._index?"video-item":"series"===e._index?(null===(n=e.tallPoster)||void 0===n?void 0:n.id)&&!t?"series-with-videos":"series-thumbnail":"classification"===e._index?"topic-list":"playlist"===e._index?t?"playlist-thumbnail":"playlist-with-videos":void 0}var me=n(49985),pe=n(92452),ve=n(12788),ge=n(78479),fe=function(e){return e.xs||e.sm};function ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(e,t)||function(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}}(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 he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var be=a.forwardRef((function(e,t){var n=ye(a.useState(!1),2),i=n[0],r=n[1],l=ye(a.useState(null),2),o=l[0],s=l[1],c=a.useRef(),u=ye((0,J.X)(),2),d=u[0],p=u[1],v=(0,m.k)(),g=a.useCallback((function(){p||e.show||e.tagIsHovering?r(!0):(r(!1),s(null))}),[p,e.show,e.tagIsHovering]),f=a.useCallback((function(){var n,a,i,r,l=null===(n=c.current)||void 0===n?void 0:n.getBoundingClientRect(),o=null===(a=t.current)||void 0===a?void 0:a.getBoundingClientRect(),u=null===(r=null===(i=e.containerRef)||void 0===i?void 0:i.current)||void 0===r?void 0:r.getBoundingClientRect();if(l){var d=function(e,t,n,a,i){var r={padding:"".concat(10,"px 0"),visibility:"visible"},l=a.top-n.bottom;if(fe(i)){var o=t.height+l+20,s=document.documentElement.clientWidth-n.right+10,c=n.bottom+window.scrollY-t.height-20;return Object.assign(Object.assign({},r),{top:c,right:s,height:o})}switch(e){case ge.f.ThumbnailHeroMedia:var u=t.height+(l+20),d=document.documentElement.clientWidth-n.right+10,m=n.bottom+window.scrollY-t.height-20;return Object.assign(Object.assign({},r),{top:m,right:d,height:u});case ge.f.ThumbnailFeaturedMedia:var p=t.height+20,v=document.documentElement.clientWidth-n.right-t.width-20,g=n.bottom+window.scrollY-t.height-a.height-20;return Object.assign(Object.assign({},r),{top:g,right:v,height:p});case ge.f.ThumbnailFixedListMediaLarge:var f=n.height+l,y=document.documentElement.clientWidth-n.right+10,h=n.bottom+window.scrollY-t.height-20;return Object.assign(Object.assign({},r),{top:h,right:y,height:f})}}(e.widgetTemplate,l,u,o,v);s(d)}}),[c.current,t.current,e.containerRef,e.widgetTemplate,v]);if(a.useEffect((function(){var e=setTimeout(g,150),t=setTimeout(f,200);return function(){clearTimeout(e),clearTimeout(t)}}),[g,f]),!t.current)return a.createElement(a.Fragment,null);var y=e.childComponent;return i?(0,ve.createPortal)(a.createElement("div",{ref:d,className:"gZ3Ae",style:o},a.createElement(y,Object.assign({ref:c,isShowing:i&&o},e.childProps))),document.body):a.createElement(a.Fragment,null)}));function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Ae=function(e){var t,n,i=(t=a.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Ee(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)?Ee(e,t):void 0}}(t,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.")}()),r=i[0],l=i[1];return a.useEffect((function(){l(!!e)}),[e]),{active:r,setActive:l}},ke=n(98495),Se=n(83914);function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Oe(e){var t,n,i,r,l=(i=a.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(i,r)||function(e,t){if(e){if("string"==typeof e)return we(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)?we(e,t):void 0}}(i,r)||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=l[0],s=l[1],c=(0,m.k)(),u=null===(n=null===(t=e.containerRef)||void 0===t?void 0:t.current)||void 0===n?void 0:n.getBoundingClientRect(),d=function(e,t,n){if(fe(n))return(null==e?void 0:e.height)-20;switch(t){case ge.f.ThumbnailHeroMedia:return e.y<0?window.innerHeight-e.bottom-62:(null==e?void 0:e.height)-20;case ge.f.ThumbnailFeaturedMedia:return(null==e?void 0:e.height)-52+20;default:return(null==e?void 0:e.height)-20}}(u,e.widgetTemplate,c),p=function(e,t,n){var a=window.scrollY+10;if(e.top+window.scrollY<a)return{width:null==e?void 0:e.width,maxWidth:480};if(fe(n))return{width:e.width-20};switch(t){case ge.f.ThumbnailHeroMedia:return{width:480,maxWidth:e.width-20};case ge.f.ThumbnailFeaturedMedia:return{width:null==e?void 0:e.width};case ge.f.ThumbnailFixedListMediaLarge:return{width:(null==e?void 0:e.width)-20}}}(u,e.widgetTemplate,c);return a.createElement("div",{className:"bg-white rounded-3 box-shadow overflow-hidden",style:Object.assign({maxHeight:d},p)},a.createElement("div",{className:"".concat("kiea4"," d-flex align-items-center px-3 py-2 ").concat(o?"box-shadow":"")},a.createElement("div",{className:"".concat("C3rvx"," bg-").concat(e.iconVariant," text-white rounded-circle")},a.createElement(Se.x,{svgName:e.svgName,size:Se.S.Large})),a.createElement("h2",{className:"h6 mb-0 ps-2"},e.heading)),a.createElement(ke.ZP,{onUpdate:function(e){var t=e.top;o&&0===t?s(!1):!o&&t>0&&s(!0)},autoHeight:!0,autoHeightMax:d-52},a.createElement("div",{className:"pb-3 px-3"},e.children)))}var xe=n(35223),Le=n(92827),Ce=T.T.encloseNamespace("shared.whatsIncluded"),je=a.forwardRef((function(e,t){return a.createElement("div",{ref:t},a.createElement(Oe,{iconVariant:"blue",heading:Ce("whatsIncluded"),svgName:xe.vn.Video,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate},a.createElement(Le.V,{video:e.video,imageCdnUrl:e.imageCdnUrl,isShowing:e.isShowing})))})),Ne=n(6296),Ie=n(40370);function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Pe(e){var t,n,i=(t=(0,J.L)({delay:50}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Te(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)?Te(e,t):void 0}}(t,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.")}()),r=i[0],l=i[1],o=Ae(l),s=o.active,c=o.setActive;return a.useMemo((function(){return Ie.M.showWhatsIncluded(e.video)}),[e.video])?a.createElement(a.Fragment,null,a.createElement(Ne.V,{ref:r,active:s}),a.createElement(be,{childComponent:je,childProps:{video:e.video,imageCdnUrl:e.imageCdnUrl,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate},show:s,ref:r,setActive:c,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate,tagIsHovering:l})):a.createElement(a.Fragment,null)}var Fe=n(20684),_e=T.T.encloseNamespace("shared.whyThisVideo"),Re=a.forwardRef((function(e,t){return a.createElement("div",{ref:t},a.createElement(Oe,{iconVariant:"navy",heading:_e("whyThisVideo"),svgName:xe.vn.StarOutline,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate},a.createElement(Fe.p,{video:e.video,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest})))})),De=n(16226);function Ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Ve(e){var t,n,i=(t=(0,J.L)({delay:50}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Ue(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)?Ue(e,t):void 0}}(t,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.")}()),r=i[0],l=i[1],o=Ae(l),s=o.active,c=o.setActive;return a.useMemo((function(){return Ie.M.showWhyThisVideo(e.video)}),[e.video])?a.createElement(a.Fragment,null,a.createElement(De.A,{ref:r,active:s}),a.createElement(be,{childComponent:Re,childProps:{video:e.video,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest},show:s,ref:r,setActive:c,tagIsHovering:l,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate})):a.createElement(a.Fragment,null)}var qe=n(85784),Me=n(70872),He=n(68626);function Ze(e){var t,n=e.video,i=e.presentationAudiences,s=e.videoAppLink,c=e.seriesAppLink,d=e.hideInteractiveBadge,m=null===(t=null==n?void 0:n.subjectPresentationAudiences)||void 0===t?void 0:t.data,p=(0,G.n)(m,i),v=(null==n?void 0:n.series)&&!!(null==n?void 0:n.series.id),g=me.k.mergeOptions(e.analyticsOptions,{location:r.LZ.ClassificationHero,entity:Ie.M.getAnalyticsEntity(n)}),h=a.useRef();return n?a.createElement(l.Z,null,a.createElement(o.Z,{xs:12,md:6},a.createElement("div",{ref:h},a.createElement(pe.u,{analyticsData:e.analyticsData,analyticsOptions:g,video:n,appLink:s,seriesAppLink:v?c:null,imageOptions:{size:k.h2.Medium},textPosition:He.z.Independent,type:"static",setFavourite:e.setFavourite,canFavourite:e.canFavourite,audience:"thumbnail"===e.badgePosition?p:null,newDurationStyle:e.newDurationStyle,hideRating:"thumbnail"!==e.badgePosition||!!p}))),a.createElement(o.Z,{xs:12,md:6,className:"".concat("MRyVe"," position-relative")},a.createElement(qe.Q,{analyticsData:e.analyticsData,analyticsOptions:g,video:n}),v&&a.createElement(u.M,{analyticsData:e.analyticsData,analyticsOptions:g,video:n,appLink:c,className:"text-reset"}),a.createElement(Me.u,{video:n,analyticsData:e.analyticsData,analyticsOptions:g,appLink:s,linkClassName:"d-inline-block",textClassName:"h4",yearGroups:e.yearGroups}),"info-panel"===e.badgePosition&&a.createElement(y.c,{className:"pb-1"},!d&&a.createElement(f.C,{type:f.g.Interactive,data:n.interactives}),a.createElement(f.C,{type:f.g.Rating,data:n.rating}),a.createElement(f.C,{type:f.g.ProductionYear,data:n.productionYear})),a.createElement("p",{className:"mb-1"},a.createElement("span",{className:"zejMP"},n.description)),"info-panel"===e.badgePosition&&a.createElement(Z.P,{audience:p,className:"mt-1",border:"dark"}),e.showVideoGuidance&&a.createElement("div",{className:"d-flex ".concat("Ax9h2")},a.createElement(Ve,{containerRef:h,widgetTemplate:ge.f.ThumbnailFeaturedMedia,video:n,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest}),a.createElement(Pe,{containerRef:h,widgetTemplate:ge.f.ThumbnailFeaturedMedia,video:n,imageCdnUrl:e.imageCdnUrl})))):a.createElement(a.Fragment,null)}Ze.defaultProps={newDurationStyle:!0,badgePosition:"thumbnail"};var Ge=n(50333),Be=n(54293),$e=n(45157);const We={appLink:"fFjKN",name:"A_by9",widgetItem:"Ys9W_",text:"JfAoy",imagePanel:"aUNDc",partialLargeImage:"RuLxv",image:"LkTep",dragHandle:"CJqvP",large:"R5clw",comingSoonPanel:"Wa2PG",editSubjectsItem:"gGNFD",allSubjectsItem:"IHdlJ",logoContainer:"Nzaes",draggingItem:"zUOye",partialLargeFallback:"FmJP9",partialIcon:"sdZuo"};var ze=function(e){var t=e.name,n=e.multiline,i="".concat(We.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),r="";return n?r+=" ".concat(We.clamped," clamp-2"):(i+=" text-nowrap",r+=" text-truncate"),a.createElement("div",{className:i},a.createElement("small",{className:"text-muted"},a.createElement(d.x,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),a.createElement("p",{className:"".concat(We.name," h6")},a.createElement("span",{className:r},t)))},Ye=function(e){var t=e.name,n=e.multiline,i=e.subtitle,r="px-3 d-flex flex-column justify-content-center",l="".concat(We.name," h6");return n?l+=" clamp-2 text-start":(r+=" text-nowrap text-truncate",l+=" text-truncate mb-0 pb-1"),a.createElement("div",{className:r},i&&a.createElement("div",{className:"text-secondary clamp-1 ".concat(We.text)},i),a.createElement("div",{className:l,title:n?"":t},t))};function Xe(e){var t=$.j.createUrl(e.coverUrl,{size:e.isLarge?k.h2.Medium:k.h2.Small}),n={name:e.data.name,multiline:e.isLarge||e.multiline,subtitle:e.subtitle};return a.createElement("div",{className:"border d-flex position-relative ".concat(We.widgetItem),id:"".concat(e.data.id,"-").concat($e.Y.getRandomInt())},a.createElement("div",{className:"".concat(We.imagePanel," ").concat(e.isLarge?We.large:"")},a.createElement("div",{className:We.image,style:e.coverUrl?{backgroundImage:"url('".concat(t,"')")}:{}}),a.createElement(b.oy,{type:b.mS.Subject,extraClasses:e.isLarge?We.large:""})),e.isComingSoon?a.createElement(ze,Object.assign({},n)):a.createElement(Ye,Object.assign({},n)))}function Qe(e){var t,n=e.getChildAppLink?e.getChildAppLink(e.data):null;return a.createElement(a.Fragment,null,n?a.createElement(c.F,{className:We.appLink,appLink:n,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLinkOptions:null===(t=e.getChildAppLinkOptions)||void 0===t?void 0:t.call(e)},a.createElement(Xe,Object.assign({},e))):a.createElement(Xe,Object.assign({},e)))}var Je,Ke=n(52641);!function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(Je||(Je={}));var et=a.memo((function(e){var t,n,i,l,o,s=(null===(t=e.data)||void 0===t?void 0:t.status)===Je.ComingSoon,c=function(e,t){var n;if((null==t?void 0:t.length)>=Ke._.MULTI_PRESENTATION_THRESHOLD)return null===(n=null==t?void 0:t.find((function(t){return t.id===e})))||void 0===n?void 0:n.name}(e.data.presentationId,null==e?void 0:e.availablePresentations),u=Object.assign(Object.assign({},e.analyticsData),{id:null===(n=e.data)||void 0===n?void 0:n.id,name:null===(i=e.data)||void 0===i?void 0:i.name,presentationId:e.data.presentationId,comingSoon:!!s}),d=Object.assign(Object.assign({location:r.LZ.ClassificationListItem},e.analyticsOptions),{actionType:r.Vw.Click,entity:r.py.Classification,descriptor:r._S.Cover});return a.createElement(Qe,Object.assign({},e,{analyticsData:u,analyticsOptions:d,coverUrl:null===(l=e.data.cover)||void 0===l?void 0:l.url,subtitle:(null===(o=e.getSubtitle)||void 0===o?void 0:o.call(e,e.data))||c,isComingSoon:s}))}));function tt(e){var t,n,i,l=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(n=e.data)||void 0===n?void 0:n.name}),o=Object.assign(Object.assign({location:r.LZ.ClassificationListItem},e.analyticsOptions),{actionType:r.Vw.Click,entity:r.py.Company,descriptor:r._S.Cover});return a.createElement(Qe,Object.assign({},e,{analyticsData:l,analyticsOptions:o,coverUrl:null===(i=e.data.logo)||void 0===i?void 0:i.url}))}r.Vw.Click,r.py.UserSetting,r._S.Tile,r.Vw.Click,r.py.Url,r._S.Tile;var nt=n(51365);const at="ZhLPS";var it=a.memo((function(e){var t,n,i,c=(0,m.k)();if(!(null===(t=e.results)||void 0===t?void 0:t.totalResults)&&!(null===(n=e.topics)||void 0===n?void 0:n.totalResults)&&!(null===(i=e.companies)||void 0===i?void 0:i.totalResults))return a.createElement(a.Fragment,null);var u=e.featuredResult,d=void 0===u?{}:u,p=ue.groupResults(e.results.results,e.topics,e.companies,d,c),v=e.availablePresentations;return a.createElement("div",{className:"position-relative"},p.map((function(t,n){switch(t.type){case"featured-result":if(!d||"video"!==d._index)return a.createElement(a.Fragment,{key:"featured-result"});var i=d;return a.createElement("div",{key:"featured-result",className:"pb-3"},a.createElement(nt.M.Provider,{value:e.getVideoItemActions},a.createElement(Ze,{key:"featured-result",video:i,presentationAudiences:e.audiences,videoAppLink:e.appLinks.getVideoAppLink(i),seriesAppLink:e.appLinks.getSeriesAppLink(i.series),setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.query,score:i._score,maxScore:i._maxScore,featured:i._featured},pagePositionIndex:n},hideInteractiveBadge:!0,yearGroups:e.yearGroups})));case"companies-and-topics":var c=t.items.length<4;return a.createElement(a.Fragment,{key:"".concat(t.type,":").concat(n)},a.createElement(l.Z,{className:"g-0 pb-3 mx-n1"},t.items.map((function(t,i){switch(t.type){case"company":return a.createElement(o.Z,{key:t.id,sm:6,md:c?6:4,lg:c?4:3},a.createElement("div",{className:"position-relative px-1 mb-2"},a.createElement(tt,{data:t,getChildAppLink:e.appLinks.getCompanyAppLink,getChildAppLinkOptions:e.appLinks.getCompanyAppLinkOptions,analyticsData:{itemIndex:i,search:{query:e.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:n},isLarge:c})));case"Subject":return a.createElement(o.Z,{key:t.id,sm:6,md:c?6:4,lg:c?4:3},a.createElement("div",{className:"position-relative px-1 mb-2"},a.createElement(et,{data:t,getChildAppLink:e.appLinks.getClassificationAppLink,getChildAppLinkOptions:function(){return e.appLinks.getClassificationAppLinkOptions(t)},availablePresentations:v,analyticsData:{itemIndex:i,search:{query:e.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:n},isLarge:c})))}}))));case"video-item":var u=s.m.first(t.items),m=function(e){return Ie.M.isClip(e)?Ge.I:Ie.M.isInteractive(e)?Be.H:Y.m}(u);return a.createElement("div",{key:"".concat(t.type,":").concat(n),className:"position-relative ".concat(at)},a.createElement(nt.M.Provider,{value:e.getVideoItemActions},a.createElement(m,{video:u,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink,presentationAudiences:e.audiences,setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.query,score:u._score,maxScore:u._maxScore,featured:u._featured},pagePositionIndex:n}})));case"playlist-with-videos":var p=s.m.first(t.items);return a.createElement("div",{key:"".concat(t.type,":").concat(n),className:"mx-n2"},a.createElement(Q,{playlist:p,yearGroups:e.yearGroups,playlistAppLink:e.appLinks.getPlaylistAppLink(p),presentationAudiences:e.audiences,analyticsData:{search:{query:e.query,score:p._score,maxScore:p._maxScore,featured:p._featured},pagePositionIndex:n},imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,preloadImage:!0,getSeriesAppLink:e.appLinks.getSeriesAppLink,getVideoAppLink:e.appLinks.getVideoAppLink}));case"playlist-thumbnail":var g=s.m.first(t.items);return a.createElement("div",{className:"position-relative ".concat(at),key:"".concat(t.type,":").concat(n)},a.createElement(S,{analyticsData:{search:{query:e.query,score:g._score,maxScore:g._maxScore,featured:g._featured},pagePositionIndex:n},analyticsOptions:{entity:r.py.Playlist,actionType:r.Vw.Click,location:r.LZ.PlaylistListItem},appLink:e.appLinks.getPlaylistAppLink(g),showActions:e.showActions,collection:g,collectionType:"playlist",maskType:E.O.Playlist,imageFallbackType:b.mS.PlaylistThumbnail,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}));case"series-with-videos":var f=s.m.first(t.items);return a.createElement("div",{key:"".concat(t.type,":").concat(n),className:"mx-n2"},a.createElement(ne,{yearGroups:e.yearGroups,presentationAudiences:e.audiences,series:f,seriesAppLink:e.appLinks.getSeriesAppLink(f),getVideoAppLink:e.appLinks.getVideoAppLink,analyticsData:{search:{query:e.query,score:f._score,maxScore:f._maxScore,featured:f._featured},pagePositionIndex:n},preloadImage:!0}));case"series-thumbnail":var y=s.m.first(t.items);return a.createElement("div",{className:"position-relative ".concat(at),key:"".concat(t.type,":").concat(n)},a.createElement(S,{analyticsData:{search:{query:e.query,score:y._score,maxScore:y._maxScore,featured:y._featured},pagePositionIndex:n},analyticsOptions:{entity:r.py.Series,actionType:r.Vw.Click,location:r.LZ.SeriesListItem},appLink:e.appLinks.getSeriesAppLink(y),collectionType:"series",collection:y,showActions:e.showActions,maskType:E.O.Series,imageFallbackType:b.mS.SeriesThumbnail,hideBadges:!0,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}))}})))})),rt=n(44854),lt="search.searchSubstitute";function ot(e){return e.substitute?a.createElement("p",{className:"mb-3"},a.createElement(d.x,{namespace:lt,phrase:"showingFor"})," ",a.createElement(c.F,{className:"info-link",appLink:e.getAppLink(e.substitute,e.queryParams),appLinkOptions:{replace:!0}},e.substitute)):a.createElement(a.Fragment,null)}var st="search.searchSuggestions";function ct(e){return e.suggestions.length?a.createElement("div",{className:"d-flex align-items-center mb-3"},a.createElement(d.x,{namespace:st,phrase:"didYouMean"})," ",e.suggestions.map((function(t,n){return a.createElement(a.Fragment,{key:"".concat(t,":").concat(n)},0!==n&&a.createElement("span",{className:"mx-1"},"•"),a.createElement(c.F,{className:"info-link",appLink:e.getAppLink(t,e.queryParams),appLinkOptions:{replace:!0}},t))}))):a.createElement(a.Fragment,null)}ct.defaultProps={suggestions:[],queryParams:{}};var ut=n(97395),dt={search:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,l="search:".concat(e,":").concat(t,":").concat(a);l+=Object.keys(n).map((function(e){return n[e]})).join(";");var o=Object.assign({},Object.assign({index:t,cursor:null!=a?a:void 0,query:e},n));return{url:ut._.urlBuilder("{gateway}/v3/search",o),publicUrl:ut._.urlBuilder("/api/search",o),key:l,formatData:function(e){var t,n,a,i=e.totalResults,r=null!==(n=null===(t=null==e?void 0:e.results)||void 0===t?void 0:t.filter((function(e){var t,n,a,r,l,o,s,c;if("series"!==e._index&&"playlist"!==e._index)return!0;if("playlist"===e._index){var u=e;return!!((null===(n=null===(t=u.clips)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)||(null===(r=null===(a=u.interactives)||void 0===a?void 0:a.data)||void 0===r?void 0:r.length)||(null===(o=null===(l=u.videos)||void 0===l?void 0:l.data)||void 0===o?void 0:o.length))||(i--,!1)}return 0!==(null===(c=null===(s=e.videos)||void 0===s?void 0:s.data)||void 0===c?void 0:c.length)||(i--,!1)})))&&void 0!==n?n:[];e.results=r,e.totalResults=i;var l=null===(a=r[0])||void 0===a?void 0:a._score;return Object.assign(Object.assign({},e),{results:ue.mapMaxScoreToSearchResults(r,l)})},normalize:!1,success:i,error:r}},tagsAndClassifications:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,l=Object.assign({},Object.assign({index:t,cursor:a,query:e},n));return{url:ut._.urlBuilder("{gateway}/v3/search/tags-and-classifications",l),publicUrl:ut._.urlBuilder("/api/search/tags-and-classifications",l),key:"filter:options:".concat(e,":").concat(t.join(":"),":").concat(a),success:i,error:r,normalize:!1}}},mt=n(32299),pt=n(70212),vt=n(63545),gt=n(71471),ft=n(69834),yt=n(39151),ht=n(78681),bt=n(31949),Et=n(8843),At=n(79612),kt=n(73818),St=n(82329),wt=n(47399),Ot=n(83145),xt=n(71925),Lt=n(28400),Ct=n(2997);function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Nt={useOnFilterChange:function(e,t){var n=Object.assign({},t);delete n.query;var i=Object.keys(n).map((function(e){return n[e]})).sort((function(e,t){return e-t}));a.useEffect((function(){e()}),[i.join(":")])},getCollectionActions:function(e,t,n,a){return[]},getSeriesAppLink:function(e){return(null==e?void 0:e.id)?{application:St.O.EXCHANGE,action:kt.e.Exchange.SERIES,args:[e.id,Lt.m.slugify(e.name)]}:null},getVideoAppLink:function(e){return(null==e?void 0:e.id)?{application:St.O.EXCHANGE,action:kt.e.Exchange.PREVIEW,args:[e.id,Lt.m.slugify(e.name)]}:null},getAppliedIndices:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type;if(e){if(!Array.isArray(e))return[e];if(e.length)return e}return["video"]},getNestedCategoryIds:function(e,t){var n=function(e){var n=[],a=t.find((function(t){return+t.data.id==+e}));return(null==a?void 0:a.children.length)?(function e(t){t&&(t.data&&n.push(t.data.id),t.children.length&&t.children.forEach((function(t){e(t)})))}(a),n):[e]};if(!Array.isArray(e))return n(e);var a,i=(a=e,function(e){if(Array.isArray(e))return jt(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return jt(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)?jt(e,t):void 0}}(a)||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.")}()).map((function(e){return n(e)}));return s.m.flatten(i)},buildBackendFilterParams:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3?arguments[3]:void 0;if(t.categoryId){var i=null==t?void 0:t.categoryId;t.categoryId=this.getNestedCategoryIds(i,a)}var r=pt.qr.buildBackendFilterParams(t,n,null,!1);return r["".concat(Ct.w.FILTER_PARAM_PREFIX,"library")]=e,r}},It=n(15800),Tt=n(99742),Pt="exchange.searchResultsEmptyState";function Ft(e){return a.createElement(d.D.Provider,{value:Pt},a.createElement(It.u,null,a.createElement(It.u.Image,{src:Tt.W.EmptyStates.SEARCH}),a.createElement(It.u.Heading,null,e.query?a.createElement(d.x,{phrase:"headingWithQuery",options:{query:e.query}}):a.createElement(d.x,{phrase:"headingWithoutQuery"})),a.createElement(It.u.Info,null,a.createElement(d.x,{phrase:"info"}),a.createElement(c.F,{className:"info-link",appLink:{application:St.O.EXCHANGE,action:kt.e.Exchange.INDEX}},a.createElement(d.x,{phrase:"topicsAppLink"})))))}function _t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,l,o=[],s=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(e,t)||Rt(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 Rt(e,t){if(e){if("string"==typeof e)return Dt(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)?Dt(e,t):void 0}}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Ut(e){var t,n,l,o,s=e.queryParams,c=s.query,u=i.a.useGetFetch(),d=_t(a.useState(null),2),m=d[0],p=d[1],v=_t(a.useState(!1),2),g=v[0],f=v[1],y=_t(a.useState(),2),h=y[0],b=y[1],E=_t(a.useState(null),2),A=E[0],k=E[1],S=_t(a.useState(!1),2),w=S[0],O=S[1],x=!!(null===(n=null===(t=null==m?void 0:m.pagination)||void 0===t?void 0:t.cursors)||void 0===n?void 0:n.next),L=i.a.useBasicFetch(bt.N.currentUser()),C=i.a.useBasicFetch(Ot.U.exchange()),j=i.a.useBasicFetch(yt.L.config()),N=i.a.useBasicFetch(ht.Z.ratings()),I=i.a.useBasicFetch(Ot.U.categories()),T=function(e,t){var n,a=ue.flattenResults(e),r=null===(n=null==a?void 0:a.results)||void 0===n?void 0:n.find((function(e){return!!e._featured&&"video"===e._index})),l=i.a.useBasicFetch(r&&"video"===r._index?mt.R.video(r.id):null);if(l.data){var o=r._index,s=r._score,c=r._featured;return Object.assign(Object.assign({},l.data),{_index:o,_score:s,_featured:c,_maxScore:t})}}(m,h);(0,At.M)({title:null!=c?c:""}),(0,Et.M)({fetchNextPage:function(){var e,t;return _(null===(t=null===(e=m.pagination)||void 0===e?void 0:e.cursors)||void 0===t?void 0:t.next)},hasMore:x,isFetching:g}),Nt.useOnFilterChange(_,s);var P=(0,xt.A)("video-list"),F=L.hasCompleted&&j.hasCompleted&&N.hasCompleted&&C.data&&I.hasCompleted;function _(e){if(F){f(!0),e||O(!0);var t=Nt.buildBackendFilterParams(C.data.id,s,N.data,I.data),n=Nt.getAppliedIndices(s);if(!n.length)return p({results:[],totalResults:0,pagination:null}),f(!1),void O(!1);u(dt.search(c,n,t,e,(function(t){var n,a;if(e)p(Object.assign(Object.assign({},m),{results:[].concat((a=m.results,function(e){if(Array.isArray(e))return Dt(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||Rt(a)||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.")}()),[ue.mapMaxScoreToSearchResults(t.results,h)]),pagination:t.pagination}));else{var i=null===(n=null==t?void 0:t.results[0])||void 0===n?void 0:n._score;b(i),p(Object.assign(Object.assign({},t),{results:[ue.mapMaxScoreToSearchResults(t.results,i)]}))}f(!1)}),(function(e){(0,ft.r)(e.status),f(!1)}))),e||u(dt.tagsAndClassifications(c,n,t,e,(function(e){k(e),O(!1)}),(function(){O(!1)})))}}a.useEffect((function(){_()}),[c,F]);var R=[pt.x$.Categories(I.data),pt.x$.Rating(N.data,null),pt.x$.HasResources(),pt.x$.HasSubtitles(),pt.x$.TagOrClassification(A)],D=pt.qr.getMoreFilters([pt.x$.ProductionYear(),pt.x$.IsHD(),pt.x$.Duration()]),U=function(e,t){return{application:St.O.EXCHANGE,action:kt.e.Exchange.SEARCH,params:Object.assign(Object.assign({},t),{query:e})}};return a.createElement(a.Fragment,null,a.createElement(wt.n,{query:c}),m&&a.createElement(a.Fragment,null,a.createElement(ot,{substitute:m.substituteQuery,queryParams:s,getAppLink:U}),!m.substituteQuery&&a.createElement(ct,{suggestions:null==m?void 0:m.suggestions,queryParams:s,getAppLink:U})),a.createElement(rt.J,{queryParams:s,mainFilters:R,moreFilters:D,analyticsOptions:{entity:r.py.SearchResults,location:r.LZ.SearchFilters},appLink:{application:St.O.EXCHANGE,action:kt.e.Exchange.SEARCH},isFetchingOptions:w}),F&&m?a.createElement("section",null,m.totalResults?a.createElement(it,{query:c,results:m,topics:null,featuredResult:T,getVideoItemActions:P,setFavourite:function(){},canFavourite:function(){return!1},audiences:null,currentUser:L.data,imageCdnUrl:j.data.imageCdnUrl,availablePresentations:null,showActions:!0,yearGroups:null,isPlugin:!1,companies:null,appLinks:{getCollectionActions:Nt.getCollectionActions,getSeriesAppLink:Nt.getSeriesAppLink,getVideoAppLink:Nt.getVideoAppLink,getClassificationAppLink:function(){return null},getClassificationAppLinkOptions:function(){return null},getPlaylistAppLink:function(){return null},getCompanyAppLink:function(){return null}}}):a.createElement(Ft,{query:c}),x&&a.createElement(vt._,{isFetching:g,fetchNext:_,nextCursor:null===(o=null===(l=m.pagination)||void 0===l?void 0:l.cursors)||void 0===o?void 0:o.next})):a.createElement("div",{className:"mx-n2"},a.createElement(gt.S,null)))}Ut.defaultProps={queryParams:{}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[184],{88818:(e,t,r)=>{r.d(t,{r:()=>l});var a=r(32735),n=r(49985),i=r(57408),o=r(29254),c=r(11607);const s={pillTabSelector:"Hdi6o",pillItem:"hUJx1"};function l(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(s.pillTabSelector)},e.tabs.map((function(e){return a.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a.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(s.pillItem)},e.name,"number"==typeof e.count&&a.createElement("div",{className:"pl-2"},a.createElement(o.C,{type:o.g.Count,data:e.count}))):a.createElement(c.L,{className:"".concat(s.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&n.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&a.createElement("div",{className:"pl-2"},a.createElement(o.C,{type:o.g.Count,data:e.count}))))}))))}},98064:(e,t,r)=>{r.d(t,{D:()=>c});var a=r(99940),n=r(97395),i=r(75896),o=r(62803),c={domainLibraries:function(e,t,r,a){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:e,maxCategoryDepth:0}),key:"libraries:".concat(e.sort().join(":")),formatData:function(e){return e.map((function(e){return e.data}))},success:t,error:r,always:a}},libraryRequestLibraries:function(){return{url:"{gateway}/v1/library-requests/libraries",key:"libraries"}},librariesWithCategories:function(){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:["sharedLibrary","customLibrary","unpublishedCustomLibrary"],maxCategoryDepth:5}),key:"libraries:with:categories",normalize:!1}},librariesWithOwnerLogos:function(e,t,r,a){return e.sort(),{url:n._.urlBuilder("/api/domain/v2/objects",{query:o.v.LIBRARY_COLLECTION,id:e}),key:"libraries:owner:logo:".concat(e.join(",")),success:t,error:r,always:a}},library:function(e,t,r,a){return{url:n._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:o.v.LIBRARY}),key:"library:".concat(e),success:t,error:r,always:a}},exchange:function(e){return{url:n._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"categorytree"}),key:"exchange"}},librarySubscribers:function(e,t){var r={};return t&&(r.cursor=t),{url:n._.urlBuilder("{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers"),r),key:"library:subscribers:".concat(e,":").concat(t)}},libraryOwner:function(e){return{url:"{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers?ownerOnly=true"),key:"library:owner:".concat(e),formatData:function(e){return i.m.first(e.data)}}},updateSubscriberPermissions:function(e,t,r,n,i){return{url:"{gateway}/v1/libraries/".concat(e,"/library-request-permissions"),key:"update:subscriber:permissions:".concat(e,":").concat(t),type:a.k.PUT,data:{customerId:t,granted:r},invalidationKeys:["library:owner:".concat(e),"library:subscribers:".concat(e)],success:n,error:i}},removeSubscriber:function(e,t,r,n){return{url:"{gateway}/v1/objects/".concat(e,"/subscribedcustomers?memberId=").concat(t),key:"revoke:subscription:".concat(e,":").concat(t),type:a.k.DELETE,invalidationKeys:["library:subscribers:".concat(e)],success:r,error:n}},folder:function(e,t,r,a){return{url:"{gateway}/v1/objects/".concat(e,"?query=banner,libraries"),key:"library:folder:".concat(e),success:t,error:r,always:a}},folderParentTree:function(e,t,r,a){return{url:"/api/domain/v2/categories/".concat(e,"/parent-tree?includeAll=false"),key:"folder:parent:tree".concat(e),success:t,error:r,always:a}},childFolders:function(e,t,r,a,n){var i="{gateway}/v1/objects/".concat(e,"/categories?query={limit:100}thumbnail"),o="child:folders:".concat(e);return t&&(i+="&cursor=".concat(t),o+=":".concat(t)),{url:i,key:o,formatData:function(e){var t=e.data.sort((function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}));return Object.assign(Object.assign({},e),{data:t})},success:r,error:a,always:n}},addToLibrary:function(e){return{url:"{gateway}/v1/library-requests",key:"add:".concat(e.objectId,":to:").concat(e.destinationLibraryId,":").concat(e.metadata.destinationCategoryId),type:a.k.POST,data:e}},libraries:function(){return{url:"{gateway}/v1/users/me/libraries",key:"objects:libraries"}}}},45719:(e,t,r)=>{r.d(t,{P:()=>l});var a=r(32735),n=r(70680),i=r(50242),o=r(79014),c=r(20354);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function l(e,t,r){function i(e){if(e)return o.q.isFunction(t)?t(e):e.data}function l(e){var t,a;if(e)return r?r(e):null===(a=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===a?void 0:a.next}return(0,n.v9)((0,a.useMemo)((function(){return function(t){if(o.q.isFunction(e)){for(var r=e,a=o.q.isFunction(e)&&r(),n=a&&c.a.getResponse(t,a),u=n&&n.isFetching,y=n&&n.statusCode,m=n&&n.hasCompleted,f=n&&n.shouldFetch,p=i(n&&n.data),d=l(n&&n.data),b=function(e){if(e)return null==e?void 0:e.count}(n&&n.data);d&&(n=c.a.getResponse(t,r(d)),u=u||n.isFetching,y=n.statusCode,m=n.hasCompleted,!n.shouldFetch);){var g=i(n.data);g&&p.push.apply(p,function(e){if(Array.isArray(e))return s(e)}(E=g)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(E)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(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.")}());var v=l(n.data);d=v===d?null:v}var h={shouldInitialFetch:f,items:p,nextCursor:d,isFetching:u,statusCode:y,hasCompleted:m};return"number"==typeof b&&(h.totalItems=b),h}var E}}),[e]))}i.o.Ok},47399:(e,t,r)=>{r.d(t,{n:()=>y});var a=r(32735),n=r(81886),i=r(83914),o=r(35223),c=r(73818),s=r(82329);const l={input:"TfBoK"};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function y(e){var t,r,y,m=(r=a.useState(null!==(t=e.query)&&void 0!==t?t:""),y=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,i,o,c=[],s=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=i.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){l=!0,n=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw n}}return c}}(r,y)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(r,y)||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.")}()),f=m[0],p=m[1];return a.createElement("form",{className:"border border-dark form-control d-flex align-items-center mb-3",onSubmit:function(e){e.preventDefault(),f&&n.Q.C$.trigger({application:s.O.EXCHANGE,action:c.e.Exchange.SEARCH,params:{query:f}})}},a.createElement(i.x,{svgName:o.vn.Search}),a.createElement("input",{type:"text",className:"form-control h-100 w-100 border-0 ".concat(l.input),placeholder:"Search for resources in the Exchange Archive",value:f,onChange:function(e){return p(e.target.value)},autoComplete:"off"}))}},7482:(e,t,r)=>{r.d(t,{B:()=>p});var a=r(32735),n=r(81886),i=r(23481),o=r(65858),c=r(88818),s=r(73818),l=r(82329),u="exchange.exchangeTabs",y=i.T.encloseNamespace(u),m={categories:{application:l.O.EXCHANGE,action:s.e.Exchange.INDEX},mostRecent:{application:l.O.EXCHANGE,action:s.e.Exchange.MOST_RECENT}},f={actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs};function p(e){var t=e.active;return a.createElement(c.r,{tabs:[{name:y("categories"),appLink:m.categories,active:"categories"===t,analyticsData:{name:y("categories"),url:n.Q.C$.getHref(m.categories)},analyticsOptions:f},{name:y("mostRecent"),appLink:m.mostRecent,active:"most-recent"===t,analyticsData:{name:i.T.getPhrase(u,"mostRecent"),url:n.Q.C$.getHref(m.mostRecent)},analyticsOptions:f}]})}},87440:(e,t,r)=>{r.d(t,{Bf:()=>b,a5:()=>d,cL:()=>p,lS:()=>f});var a=r(23481),n=r(20354),i=r(28400),o=(r(7733),r(23788)),c=r(98064),s=r(73818),l=r(82329);function u(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(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 y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var m=a.T.encloseNamespace("exchange.exchangeUtils");function f(e){return{application:l.O.EXCHANGE,action:s.e.Exchange.PREVIEW,args:[e.id,i.m.slugify(e.name)]}}function p(e,t){return{application:l.O.EXCHANGE,action:s.e.Exchange.SERIES,args:[e.id,i.m.slugify(e.name)],params:{sort:null!=t?t:o.D.Series}}}function d(e,t){return e?{application:l.O.EXCHANGE,action:s.e.Exchange.FOLDER,args:[e.id,i.m.slugify(e.name)],params:{sort:t}}:null}function b(e,t,r){var a=n.a.useBasicFetch(c.D.folderParentTree(e));if(!a.data||!t)return[];for(var i=a.data.children.map((function(e){return{node:e,path:[e]}})),o=[],y=function(){var t=i.pop(),a=t.node,n=t.path;a.data.id.toString()===e.toString()&&(o=n.map((function(e){return{name:e.data.name,appLink:d(e.data,r)}}))),a.children&&i.push.apply(i,u(a.children.map((function(e){return{node:e,path:[].concat(u(n),[e])}}))))};i.length;)y();return o.unshift({name:m("exchangeArchive"),appLink:{application:l.O.EXCHANGE,action:s.e.Exchange.INDEX}}),o[o.length-1].active=!0,o}}}]);
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[184],{88818:(e,t,r)=>{r.d(t,{r:()=>l});var a=r(32735),n=r(49985),i=r(57408),o=r(29254),c=r(11607);const s={pillTabSelector:"Hdi6o",pillItem:"hUJx1"};function l(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(s.pillTabSelector)},e.tabs.map((function(e){return a.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a.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(s.pillItem)},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(o.C,{type:o.g.Count,data:e.count}))):a.createElement(c.L,{className:"".concat(s.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&n.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(o.C,{type:o.g.Count,data:e.count}))))}))))}},98064:(e,t,r)=>{r.d(t,{D:()=>c});var a=r(99940),n=r(97395),i=r(75896),o=r(62803),c={domainLibraries:function(e,t,r,a){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:e,maxCategoryDepth:0}),key:"libraries:".concat(e.sort().join(":")),formatData:function(e){return e.map((function(e){return e.data}))},success:t,error:r,always:a}},libraryRequestLibraries:function(){return{url:"{gateway}/v1/library-requests/libraries",key:"libraries"}},librariesWithCategories:function(){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:["sharedLibrary","customLibrary","unpublishedCustomLibrary"],maxCategoryDepth:5}),key:"libraries:with:categories",normalize:!1}},librariesWithOwnerLogos:function(e,t,r,a){return e.sort(),{url:n._.urlBuilder("/api/domain/v2/objects",{query:o.v.LIBRARY_COLLECTION,id:e}),key:"libraries:owner:logo:".concat(e.join(",")),success:t,error:r,always:a}},library:function(e,t,r,a){return{url:n._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:o.v.LIBRARY}),key:"library:".concat(e),success:t,error:r,always:a}},exchange:function(e){return{url:n._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"categorytree"}),key:"exchange"}},librarySubscribers:function(e,t){var r={};return t&&(r.cursor=t),{url:n._.urlBuilder("{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers"),r),key:"library:subscribers:".concat(e,":").concat(t)}},libraryOwner:function(e){return{url:"{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers?ownerOnly=true"),key:"library:owner:".concat(e),formatData:function(e){return i.m.first(e.data)}}},updateSubscriberPermissions:function(e,t,r,n,i){return{url:"{gateway}/v1/libraries/".concat(e,"/library-request-permissions"),key:"update:subscriber:permissions:".concat(e,":").concat(t),type:a.k.PUT,data:{customerId:t,granted:r},invalidationKeys:["library:owner:".concat(e),"library:subscribers:".concat(e)],success:n,error:i}},removeSubscriber:function(e,t,r,n){return{url:"{gateway}/v1/objects/".concat(e,"/subscribedcustomers?memberId=").concat(t),key:"revoke:subscription:".concat(e,":").concat(t),type:a.k.DELETE,invalidationKeys:["library:subscribers:".concat(e)],success:r,error:n}},folder:function(e,t,r,a){return{url:"{gateway}/v1/objects/".concat(e,"?query=banner,libraries"),key:"library:folder:".concat(e),success:t,error:r,always:a}},folderParentTree:function(e,t,r,a){return{url:"/api/domain/v2/categories/".concat(e,"/parent-tree?includeAll=false"),key:"folder:parent:tree".concat(e),success:t,error:r,always:a}},childFolders:function(e,t,r,a,n){var i="{gateway}/v1/objects/".concat(e,"/categories?query={limit:100}thumbnail"),o="child:folders:".concat(e);return t&&(i+="&cursor=".concat(t),o+=":".concat(t)),{url:i,key:o,formatData:function(e){var t=e.data.sort((function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}));return Object.assign(Object.assign({},e),{data:t})},success:r,error:a,always:n}},addToLibrary:function(e){return{url:"{gateway}/v1/library-requests",key:"add:".concat(e.objectId,":to:").concat(e.destinationLibraryId,":").concat(e.metadata.destinationCategoryId),type:a.k.POST,data:e}},libraries:function(){return{url:"{gateway}/v1/users/me/libraries",key:"objects:libraries"}}}},45719:(e,t,r)=>{r.d(t,{P:()=>l});var a=r(32735),n=r(70680),i=r(50242),o=r(79014),c=r(20354);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function l(e,t,r){function i(e){if(e)return o.q.isFunction(t)?t(e):e.data}function l(e){var t,a;if(e)return r?r(e):null===(a=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===a?void 0:a.next}return(0,n.v9)((0,a.useMemo)((function(){return function(t){if(o.q.isFunction(e)){for(var r=e,a=o.q.isFunction(e)&&r(),n=a&&c.a.getResponse(t,a),u=n&&n.isFetching,y=n&&n.statusCode,m=n&&n.hasCompleted,d=n&&n.shouldFetch,f=i(n&&n.data),p=l(n&&n.data),b=function(e){if(e)return null==e?void 0:e.count}(n&&n.data);p&&(n=c.a.getResponse(t,r(p)),u=u||n.isFetching,y=n.statusCode,m=n.hasCompleted,!n.shouldFetch);){var g=i(n.data);g&&f.push.apply(f,function(e){if(Array.isArray(e))return s(e)}(E=g)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(E)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(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.")}());var v=l(n.data);p=v===p?null:v}var h={shouldInitialFetch:d,items:f,nextCursor:p,isFetching:u,statusCode:y,hasCompleted:m};return"number"==typeof b&&(h.totalItems=b),h}var E}}),[e]))}i.o.Ok},47399:(e,t,r)=>{r.d(t,{n:()=>y});var a=r(32735),n=r(81886),i=r(83914),o=r(35223),c=r(73818),s=r(82329);const l={searchBar:"YbmeO"};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}function y(e){var t,r,y,m=(r=a.useState(null!==(t=e.query)&&void 0!==t?t:""),y=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,i,o,c=[],s=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=i.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){l=!0,n=e}finally{try{if(!s&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw n}}return c}}(r,y)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(r,y)||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=m[0],f=m[1];return a.createElement("form",{onSubmit:function(e){e.preventDefault(),d&&n.Q.C$.trigger({application:s.O.EXCHANGE,action:c.e.Exchange.SEARCH,params:{query:d}})}},a.createElement("div",{className:"".concat(l.searchBar," d-flex border border-dark rounded align-items-center mb-3")},a.createElement(i.x,{svgName:o.vn.Search}),a.createElement("input",{type:"text",className:"form-control h-100 w-100 py-0 border-0 shadow-none",placeholder:"Search for resources in the Exchange Archive",value:d,onChange:function(e){return f(e.target.value)},autoComplete:"off"})))}},7482:(e,t,r)=>{r.d(t,{B:()=>f});var a=r(32735),n=r(81886),i=r(23481),o=r(65858),c=r(88818),s=r(73818),l=r(82329),u="exchange.exchangeTabs",y=i.T.encloseNamespace(u),m={categories:{application:l.O.EXCHANGE,action:s.e.Exchange.INDEX},mostRecent:{application:l.O.EXCHANGE,action:s.e.Exchange.MOST_RECENT}},d={actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs};function f(e){var t=e.active;return a.createElement(c.r,{tabs:[{name:y("categories"),appLink:m.categories,active:"categories"===t,analyticsData:{name:y("categories"),url:n.Q.C$.getHref(m.categories)},analyticsOptions:d},{name:y("mostRecent"),appLink:m.mostRecent,active:"most-recent"===t,analyticsData:{name:i.T.getPhrase(u,"mostRecent"),url:n.Q.C$.getHref(m.mostRecent)},analyticsOptions:d}]})}},87440:(e,t,r)=>{r.d(t,{Bf:()=>b,a5:()=>p,cL:()=>f,lS:()=>d});var a=r(23481),n=r(20354),i=r(28400),o=(r(7733),r(23788)),c=r(98064),s=r(73818),l=r(82329);function u(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(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 y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var m=a.T.encloseNamespace("exchange.exchangeUtils");function d(e){return{application:l.O.EXCHANGE,action:s.e.Exchange.PREVIEW,args:[e.id,i.m.slugify(e.name)]}}function f(e,t){return{application:l.O.EXCHANGE,action:s.e.Exchange.SERIES,args:[e.id,i.m.slugify(e.name)],params:{sort:null!=t?t:o.D.Series}}}function p(e,t){return e?{application:l.O.EXCHANGE,action:s.e.Exchange.FOLDER,args:[e.id,i.m.slugify(e.name)],params:{sort:t}}:null}function b(e,t,r){var a=n.a.useBasicFetch(c.D.folderParentTree(e));if(!a.data||!t)return[];for(var i=a.data.children.map((function(e){return{node:e,path:[e]}})),o=[],y=function(){var t=i.pop(),a=t.node,n=t.path;a.data.id.toString()===e.toString()&&(o=n.map((function(e){return{name:e.data.name,appLink:p(e.data,r)}}))),a.children&&i.push.apply(i,u(a.children.map((function(e){return{node:e,path:[].concat(u(n),[e])}}))))};i.length;)y();return o.unshift({name:m("exchangeArchive"),appLink:{application:l.O.EXCHANGE,action:s.e.Exchange.INDEX}}),o[o.length-1].active=!0,o}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[254],{29254:(e,t,r)=>{r.d(t,{C:()=>C,g:()=>y});var n=r(32735),i=r(23481),a=r(83914),o=r(76177),c=r(5960),u=r(9366),s=function(e,t,r){var n=t-(e=e.toString()).length;return n<=0?e:new Array(n+1).join(r)+e},l={ToDisplayDuration:function(e){if(!u.isNumber(e))return"";var t=new Date(e),r=t.getUTCHours(),n=s(t.getUTCMinutes(),2,"0"),i=s(t.getUTCSeconds(),2,"0");return r>0?"".concat(r,":").concat(n,":").concat(i):"".concat(n,":").concat(i)},ToDisplayDurationNewStyle:function(e){if(!u.isNumber(e))return"";var t=new Date(e),r=t.getUTCHours(),n=t.getUTCMinutes(),i=t.getUTCSeconds();if((r>0||n>0)&&i>=30&&(n+=1),r>0){var a=r>1?"hrs":"hr";return n>0?"".concat(r).concat(a," ").concat(n,"m"):"".concat(r," ").concat(a)}return n>0?"".concat(n,"m"):"".concat(i,"s")}},d=r(26361),g=r(35223),p=r(96560),v=r(1164);function m(e){return m="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},m(e)}function f(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==m(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==m(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===m(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var y,b="shared.shared-utils",h={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case p.r.HostedLibrary:case p.r.CustomLibrary:return e.name;case p.r.Exchange:return i.T.getPhrase(b,"exchange");case p.r.Workspace:return i.T.getPhrase(b,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case p.r.HostedLibrary:case p.r.CustomLibrary:return"bg-info";case p.r.Exchange:return"bg-green";case p.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,r;return!!(null===(r=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===r?void 0:r.length)},mapTypeToSvg:function(e){var t,r=(f(t={},v.L.Pdf,g.vn.FilePDF),f(t,v.L.Image,g.vn.FileImg),f(t,v.L.PowerPoint,g.vn.FilePowerpoint),f(t,v.L.Document,g.vn.FileWord),f(t,v.L.Excel,g.vn.FileExcel),f(t,v.L.Zip,g.vn.FileZip),f(t,v.L.File,g.vn.File),t)[e];return r||(r=g.vn.Folder),r},mapTypeToClass:function(e){switch(e){case v.L.Pdf:return"icon-red";case v.L.Image:return"icon-purple";case v.L.Document:return"icon-blue";case v.L.Excel:return"icon-green";case v.L.PowerPoint:return"icon-orange";case v.L.Zip:return"icon-teal";case v.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case v.L.Pdf:return i.T.getPhrase(b,"pdf");case v.L.Image:return i.T.getPhrase(b,"image");case v.L.Document:return i.T.getPhrase(b,"document");case v.L.Excel:return i.T.getPhrase(b,"spreadsheet");case v.L.PowerPoint:return i.T.getPhrase(b,"presentation");case v.L.Zip:return i.T.getPhrase(b,"zipArchive");case v.L.File:return i.T.getPhrase(b,"file");default:return""}}},T=i.T.encloseNamespace("shared.badges");function C(e){var t=e.type,r=e.data;if(!function(e,t){var r,n,i;return"boolean"==typeof t?!!t:e===y.Rating?t&&!!t.value:e===y.Resources?!!(null==t?void 0:t.length)||!!(null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.length):e===y.Interactive?!!(null==t?void 0:t.length)||!!(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length):e===y.Captions?!!(null==t?void 0:t.length)||!!(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.length):e===y.Status?"number"==typeof t:!!t}(t,r))return n.createElement(n.Fragment,null);var i=function(e,t){var r="";if(e===y.DurationApproximate&&(r="duration-badge-new px-2 rounded-pill text-nowrap d-flex align-items-center"),e===y.DurationExact&&(r="duration-badge"),e===y.Interactive&&(r="interactive-badge"),e===y.Rating&&(r="rating-badge ".concat(h.mapRatingToClass(t.value))),e===y.ProductionYear&&(r="production-year-badge"),e===y.Resources&&(r="resources-badge"),e===y.Captions)return"p-0";if(e===y.Status)return"badge ".concat(function(e){switch(e){case c.X.Published:return"bg-success";case c.X.Archived:case c.X.Rejected:return"bg-danger";case c.X.Draft:return"draft-badge px-2 rounded-pill text-nowrap d-flex align-items-center";case c.X.Pending:case c.X.Processing:return"bg-warning"}}(t));if(e===y.Trending)return"trending-badge px-2 d-flex align-items-center";if(e===y.Count&&(r="count-badge px-1 rounded"),e===y.Restriction){var n=d.l.mapRestrictionToClass(t.restrictions);return"restriction-badge rounded-pill px-2 d-flex align-items-center ".concat(n)}return"".concat("badge"," ").concat(r)}(t,r);i="".concat(i," ").concat(e.inline?"d-inline-block":"d-flex justify-content-center"," ").concat(e.className||"");var u=function(e,t){return e===y.Interactive?T("interactive"):e===y.DurationApproximate?l.ToDisplayDurationNewStyle(t):e===y.DurationExact?l.ToDisplayDuration(t):e===y.Rating?t.code:e===y.ProductionYear?t:e===y.Resources?T("resources"):e===y.Captions?n.createElement(a.x,{svgName:g.vn.CloseCaptionBadge}):e===y.Status?c.X[t]:e===y.Trending?n.createElement(n.Fragment,null,n.createElement(a.x,{svgName:g.vn.Trending}),n.createElement("span",{className:"ps-1"},t)):e===y.Count?t:e===y.Restriction?n.createElement(n.Fragment,null,n.createElement(a.x,{svgName:d.l.mapRestrictionToSvg(t.restrictions)}),n.createElement("span",null,d.l.mapRestrictionToText(t.restrictions,t.yearGroups))):void 0}(t,r),s=function(e,t){return e===y.Rating?{title:t.name,placement:"top"}:null}(t,r),p=e.inline&&"d-inline-block";return s?n.createElement("div",{className:"badge-wrapper d-inline"},n.createElement(o.u,Object.assign({},s,{spanHack:!0,spanHackClassName:p}),n.createElement("span",{className:i},u))):n.createElement("span",{className:"".concat(i," badge-wrapper")},u)}!function(e){e.DurationExact="duration-exact",e.DurationApproximate="duration-approximate",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Resources="resources",e.Captions="captions",e.Status="status",e.Trending="trending",e.Count="count",e.Restriction="restriction"}(y||(y={}))},96560:(e,t,r)=>{var n;r.d(t,{r:()=>n}),function(e){e.Folder="category",e.CategoryTree="category_tree",e.CustomLibrary="custom_library",e.HostedLibrary="hosted_library",e.Exchange="exchange",e.Workspace="workspace",e.Video="video",e.Clip="clip",e.Interactive="interactive"}(n||(n={}))},1164:(e,t,r)=>{var n;r.d(t,{L:()=>n}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(n||(n={}))},5345:(e,t,r)=>{var n;r.d(t,{c:()=>n}),function(e){e.Custom="custom",e.User="year_group"}(n||(n={}))},26361:(e,t,r)=>{r.d(t,{l:()=>h});var n,i,a,o,c=r(23481),u=r(110),s=r(86474),l=r(5345),d=r(35223);function g(e){return g="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},g(e)}function p(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==g(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==g(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===g(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var v=c.T.encloseNamespace("shared.shared-utils"),m=(p(n={},l.c.Custom,s.Z.restrictionBadgeCustom),p(n,l.c.User,s.Z.restrictionBadgeUser),n),f=(p(i={},l.c.Custom,d.vn.Timer),p(i,l.c.User,d.vn.Lock),i),y=(p(a={},l.c.Custom,"restrictionCustom"),p(a,l.c.User,"restrictionYearGroup"),a),b=(p(o={},l.c.Custom,200),p(o,l.c.User,100),o),h={mapRestrictionToClass:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return"";var r=h.getWeightedRestriction(e.value);return m[r.type]},mapRestrictionToSvg:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return d.vn.Lock;var r=h.getWeightedRestriction(e.value);return f[r.type]},mapRestrictionToText:function(e,t){var r;if(!(null===(r=null==e?void 0:e.value)||void 0===r?void 0:r.length)||!(null==t?void 0:t.length))return"";var n=h.getWeightedRestriction(e.value),i=t.find((function(e){return e.value===n.yearGroup})),a=y[n.type];if(n.type===l.c.User)return i?v(a,{yearGroup:i.name}):v("restrictionStaff");if(n.type===l.c.Custom){var o=h.getRestrictionDuration(n);return o?v(a,{duration:o,smartCount:o}):v("restrictionCustomLessThanDay",{duration:o,smartCount:1})}return""},getWeightedRestriction:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"highest";if(e.length)return 1===e.length?e[0]:e.reduce((function(e,r){var n=b[e.type],i=b[r.type];return"highest"===t&&n>i||"lowest"===t&&n<i?e:r}))},getRestrictionByType:function(e,t){if(!h.hasRestrictions(e))return null;var r=Array.isArray(t)?t:[t],n=e._restrictions.value.filter((function(e){return r.includes(e.type)}));return h.getWeightedRestriction(n)},getRestrictionDuration:function(e){if(e.type===l.c.Custom&&e.expiresOn){var t=u.O.convertUTCToLocal(e.expiresOn);if(t)return u.O.diffBetween(t,new Date,"day")}},hasCustomRestriction:function(e){return!!h.getRestrictionByType(e,[l.c.Custom])},hasRestrictions:function(e){var t,r;return!!(null===(r=null===(t=null==e?void 0:e._restrictions)||void 0===t?void 0:t.value)||void 0===r?void 0:r.length)}}},86474:(e,t,r)=>{r.d(t,{Z:()=>n});const n={minHeight:"jEh7m",restrictionBadgeCustom:"WQ2eS",restrictionBadgeUser:"z4DeQ"}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[267],{23455:(e,a,t)=>{t.d(a,{h:()=>c});var s=t(32735),r=t(81886),l=t(20470);function c(){for(var e=arguments.length,a=new Array(e),t=0;t<e;t++)a[t]=arguments[t];s.useEffect((function(){a.length&&a.some(r.Q.Ry.isStatusCodeError)&&r.Q.Ry.throw(new l.x)}),a)}},45267:(e,a,t)=>{t.r(a),t.d(a,{TvAdFreeRequestView:()=>b});var s=t(32735),r=t(23481),l=t(20354),c=t(33025),n=t(13876),i=t(83345),m=t(31949),d=t(23455),o=t(99742),u=t(5353),p=t(8519),h="tv.adFreeRequest",E=r.T.encloseNamespace(h);function b(e){var a=l.a.useBasicFetch(m.N.currentUser()),t=l.a.useBasicFetch(u.i.region(e.region)),r=l.a.useBasicFetch(u.i.program(e.id)),b=l.a.useBasicFetch(a.data&&t.data&&u.i.adFreeCredits(a.data.username,t.data.code));(0,p.e)(t,!0),(0,d.h)(r.statusCode);var v=a.hasCompleted&&t.hasCompleted&&r.hasCompleted&&b.hasCompleted,C=b.data.maxAvailableCredit-b.data.userRequests;return s.createElement(c.G,{title:E("title"),closePopup:e.closePopup,showLoadingSpinner:!v},v&&s.createElement("div",{className:"text-center"},s.createElement("img",{src:o.W.General.PAPER_PLANE,className:"img-fluid w-50 mb-3",draggable:!1}),s.createElement("h2",{className:"h4 mb-2"},s.createElement(i.x,{namespace:h,phrase:"requestSent"})),s.createElement("div",{className:"bg-dark rounded-pill text-white d-inline-block fw-semibold border border-dark py-0 px-2 mb-2"},s.createElement(i.x,{namespace:h,phrase:"remaining",options:{smartCount:C}})),s.createElement("div",{className:"pb-1"},s.createElement("p",{className:"mb-2"},s.createElement(i.x,{namespace:h,phrase:"requestDaily",options:{dailyLimit:b.data.maxAvailableCredit}})),s.createElement("p",{className:"mb-3"},s.createElement(i.x,{namespace:h,phrase:"requestHours",options:{dailyLimit:b.data.maxAvailableCredit}})))),s.createElement(n.u,null,s.createElement(n.u.Cancel,{text:E("close"),onClick:e.closePopup,variant:"link"})))}}}]);
@@ -1 +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)}}]);
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 $=[["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 Z{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 $)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 Z(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,$]=(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 Z(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 Z(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}),$e=ue?(0,i.IH)(ue,j):null,Ze=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(Ze),et=Se(Ze,[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:$e}):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),$(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)((()=>{$(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:$e,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 $e="Droppable",Ze={timeout:25};function Qe(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const l=(0,i.Ld)($e),{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}={...Ze,...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),$=!I&&H,Z=$&&V?K:null,Q=V?null!=Z?Z:(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:$&&!(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:()=>c});var r=n(40841),o=n.n(r),i=n(32735),a=n(46304),l=n(74512);const s=i.forwardRef((({bsPrefix:e,className:t,as:n="div",...r},i)=>{const s=(0,a.vE)(e,"row"),c=(0,a.pi)(),u=(0,a.zG)(),d=`${s}-cols`,f=[];return c.forEach((e=>{const t=r[e];let n;delete r[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const o=e!==u?`-${e}`:"";null!=n&&f.push(`${d}${o}-${n}`)})),(0,l.jsx)(n,{ref:i,...r,className:o()(t,s,...f)})}));s.displayName="Row";const c=s},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,t){var n,r,o,i={};if(e===l)o=document.createElement("div");else{if(e!==s)throw new Error('Invalid element type "'+e+'" for createPortalNode: must be "html" or "svg".');o=document.createElementNS("http://www.w3.org/2000/svg","g")}if(t&&"object"==typeof t)for(var a=0,c=Object.entries(t.attributes);a<c.length;a++){var u=c[a],d=u[0],f=u[1];o.setAttribute(d,f)}var h={element:o,elementType:e,setPortalProps:function(e){i=e},getInitialPortalProps:function(){return i},mount:function(t,o){if(o!==r){if(h.unmount(),t!==n&&!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.')}(t,e))throw new Error('Invalid element type for portal: "'+e+'" portalNodes must be used with '+e+" elements, but OutPortal is within <"+t.tagName+">.");t.replaceChild(h.element,o),n=t,r=o}},unmount:function(e){e&&e!==r||n&&r&&(n.replaceChild(r,h.element),n=void 0,r=void 0)}};return h},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.setPortalProps({}),this.currentPortalNode=e);var t=this.placeholderNode.current,n=t.parentNode;e.mount(n,t),this.passPropsThroughPortal()},t.prototype.componentWillUnmount=function(){var e=this.props.node;e.unmount(this.placeholderNode.current),e.setPortalProps({})},t.prototype.render=function(){return o.createElement("div",{ref:this.placeholderNode})},t}(o.PureComponent),f=c.bind(null,l);c.bind(null,s)}}]);