PageSourceSearch

https://www.scufgaming.com/_next/static/chunks/pages/platform-6-desk-configurator-e1479fa3091b33ca.js

js scufgaming.com collected 2026-09-24 17:13:38 UTC 32,364 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3954],{14259:function(t){t.exports=function(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}},27561:function(t,e,r){var n=r(67990),o=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(o,""):t}},65776:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},16612:function(t,e,r){var n=r(77813),o=r(98612),i=r(65776),a=r(13218);t.exports=function(t,e,r){if(!a(r))return!1;var l=typeof e;return!!("number"==l?o(r)&&i(e,r.length):"string"==l&&e in r)&&n(r[e],t)}},67990:function(t){var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},8400:function(t,e,r){var n=r(14259),o=r(16612),i=r(40554),a=Math.ceil,l=Math.max;t.exports=function(t,e,r){e=(r?o(t,e,r):void 0===e)?1:l(i(e),0);var u=null==t?0:t.length;if(!u||e<1)return[];for(var c=0,s=0,f=Array(a(u/e));c<u;)f[s++]=n(t,c,c+=e);return f}},77813:function(t){t.exports=function(t,e){return t===e||t!==t&&e!==e}},33448:function(t,e,r){var n=r(44239),o=r(37005);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==n(t)}},18601:function(t,e,r){var n=r(14841),o=1/0;t.exports=function(t){return t?(t=n(t))===o||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}},40554:function(t,e,r){var n=r(18601);t.exports=function(t){var e=n(t),r=e%1;return e===e?r?e-r:e:0}},14841:function(t,e,r){var n=r(27561),o=r(13218),i=r(33448),a=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var r=l.test(t);return r||u.test(t)?c(t.slice(2),r?2:8):a.test(t)?NaN:+t}},18347:function(t,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/platform-6-desk-configurator",function(){return r(87157)}])},65793:function(t,e,r){"use strict";r.d(e,{X:function(){return d},S:function(){return p}});var n=r(34051),o=r.n(n),i=r(15005),a=r(8400),l=r.n(a);function u(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(c){return void r(c)}l.done?e(u):Promise.resolve(u).then(n,o)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,l,"next",t)}function l(t){u(i,n,o,a,l,"throw",t)}a(void 0)}))}}function s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){s(t,e,r[e])}))}return t}var d=function(){var t=c(o().mark((function t(e,r,n){var a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=[],!(null===e||void 0===e?void 0:e.length)){t.next=4;break}return t.next=4,Promise.all(null===e||void 0===e?void 0:e.map(function(){var t=c(o().mark((function t(e){var r,l,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,(0,i.Z)({sku:e,locale:n});case 3:l=t.sent,u=null===l||void 0===l||null===(r=l.productDetail)||void 0===r?void 0:r.items,a.push({productSku:e,productUrlKey:"",productData:u});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 4:if(!(null===r||void 0===r?void 0:r.length)){t.next=7;break}return t.next=7,Promise.all(null===r||void 0===r?void 0:r.map(function(){var t=c(o().mark((function t(e){var r,l,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,(0,i.Z)({url_key:e,locale:n});case 3:l=t.sent,u=null===l||void 0===l||null===(r=l.productDetail)||void 0===r?void 0:r.items,a.push({productSku:"",productUrlKey:e,productData:u});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 7:return t.abrupt("return",a);case 8:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),p=function(){var t=c(o().mark((function t(e,r){var n,a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=[],!(null===e||void 0===e?void 0:e.length)){t.next=5;break}return t.next=5,Promise.all(null===(a=l()(e,12))||void 0===a?void 0:a.map(function(){var t=c(o().mark((function t(e){var a,l,u;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,(0,i._)({skus:e,locale:r});case 3:l=t.sent,null===(u=null===l||void 0===l||null===(a=l.productDetail)||void 0===a?void 0:a.items)||void 0===u||u.forEach((function(t){n.push({productSku:(null===t||void 0===t?void 0:t.sku)||"",productUrlKey:"",productData:[f({},t)]})}));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:return t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()},66225:function(t,e,r){"use strict";r.d(e,{i:function(){return n},L:function(){return l}});var n,o=r(62035),i=r(12279),a=r(98661);!function(t){t.K70="k70_",t.P6="p6_",t.M75="m75_"}(n||(n={}));var l=function(t){var e,r,n=(0,o.jD)().data,l=(0,a.useState)(!1),u=l[0],c=l[1],s=(0,a.useState)(!1),f=s[0],d=s[1],p=(0,a.useState)([]),v=p[0],m=p[1],b=(0,a.useState)([]),h=b[0],g=b[1],y=(0,a.useState)(null),x=y[0],w=y[1],k=(0,i.l)();return(0,a.useEffect)((function(){x&&(null===h||void 0===h?void 0:h.length)>0&&(k(x,"PDP"),h.forEach((function(t){k(t,"PDP")})))}),[x,h]),(0,a.useEffect)((function(){var e,r,o,i,a;(null===n||void 0===n||null===(e=n.data)||void 0===e||null===(r=e.cart)||void 0===r?void 0:r.items)&&u&&((null===n||void 0===n||null===(o=n.data)||void 0===o||null===(i=o.cart)||void 0===i||null===(a=i.items)||void 0===a?void 0:a.find((function(e){var r,n;return null===e||void 0===e||null===(r=e.product)||void 0===r||null===(n=r.sku)||void 0===n?void 0:n.includes(t)})))&&f&&v.forEach((function(t){k(t,"extra")})))}),[u,f,null===n||void 0===n||null===(e=n.data)||void 0===e||null===(r=e.cart)||void 0===r?void 0:r.items,v,t]),{setHasConfiguratorAdded:c,setIsAddingExtraFromPDP:d,addConfiguratorToCart:function(t,e){w(t),g(e)},addExtraProductsToCart:function(t){m(t)}}}},1512:function(t,e,r){"use strict";r.d(e,{$:function(){return o}});var n="https://assets.corsair.com/image/upload/f_auto,q_auto",o=function(t,e){var r=n;return e&&(r=n.replace("image","video")),t?(t.startsWith("/")&&(t=t.
1substring(1)),"".concat(r,"/").concat(t)):r}},87157:function(t,e,r){"use strict";r.r(e),r.d(e,{__N_SSP:function(){return tt},default:function(){return et}});var n=r(7320),o=r(9008),i=r(98661),a=r(34051),l=r.n(a),u=r(44247),c=r(29811),s=r(25807),f=r(33667),d=r(66225),p=r(9316),v=r(12279);function m(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 b(t,e,r,n,o,i,a){try{var l=t[i](a),u=l.value}catch(c){return void r(c)}l.done?e(u):Promise.resolve(u).then(n,o)}function h(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g=(0,i.createContext)({selection:[],groups:[],selectedValues:[],dimensions:[],basePrice:1e4,showGroup:void 0,add:function(t){},remove:function(t){},toggle:function(t){},getGroupOfSKU:function(t){},getValueOfSKU:function(t){},setShowSKUDetail:function(){},setShowGroup:function(t){},addToCart:function(){}}),y=function(t){var e,r=t.groups,o=t.dimensions,a=t.products,s=t.children,m=(0,i.useState)(r.filter((function(t){return"single"===t.type})).map((function(t){var e;return null===(e=t.values.find((function(t){return!t.status})))||void 0===e?void 0:e.sku})).filter((function(t){return t}))),y=m[0],x=m[1],w=(0,f.t)().addToCart,k=((0,c.l8)().openSidebar,(0,v.l)()),_=(0,u.KO)().setCartError,C=(0,i.useState)(),S=C[0],N=C[1],P=(0,i.useState)(),O=P[0],Z=P[1],j=(0,d.L)(d.i.P6),E=j.setHasConfiguratorAdded,T=j.addExtraProductsToCart,D=j.setIsAddingExtraFromPDP,A=(0,i.useCallback)((function(t){x(t)}),[]),U=(0,i.useCallback)((function(t){return r.find((function(e){return e.values.find((function(e){return e.sku===t}))}))}),[r]),B=(0,i.useCallback)((function(t){var e;return null===(e=U(t))||void 0===e?void 0:e.values.find((function(e){return e.sku===t}))}),[U]),L=(0,i.useMemo)((function(){return y.map(B).filter((function(t){return!!t}))}),[B,y]),M=(0,i.useCallback)((function(t){var e=U(t);if(e)return"multi"===e.type?A(h(y).concat([t])):void A(h(y.filter((function(t){return!(null===e||void 0===e?void 0:e.values.find((function(e){return e.sku===t})))}))).concat([t]))}),[U,y,A]),$=(0,i.useCallback)((function(t){return A(y.filter((function(e){return e!==t})))}),[y,A]),X=(0,i.useCallback)((function(t){var e=U(t),r=!!y.find((function(e){return e===t}));if(e&&("single"!==e.type||!r))return(y.find((function(e){return e===t}))?$:M)(t)}),[M,U,$,y]),I=(0,i.useCallback)((e=l().mark((function t(){var e,r,n,o,i,u,c,s,f;return l().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return _(null),e=L.filter((function(t){return t.type&&"main"===t.type&&!t.sku.startsWith("simulated:")})),r=L.filter((function(t){return t.type&&"extra"===t.type&&!t.sku.startsWith("simulated:")})),e.forEach((function(t){k({sku:t.sku},"PDP")})),E(!1),t.next=7,w(e.map((function(t){return{sku:t.sku,uid:t.uid,quantity:1}})),a,[],{headers:{"x-bundle-type":"p6"}});case 7:if((n=t.sent)&&((c=null===n||void 0===n||null===(o=n.data)||void 0===o||null===(i=o.cart)||void 0===i||null===(u=i.items)||void 0===u?void 0:u.filter((function(t){var e,r;return null===t||void 0===t||null===(e=t.product)||void 0===e||null===(r=e.sku)||void 0===r?void 0:r.startsWith(d.i.P6)})))&&(null===c||void 0===c?void 0:c.length)>0&&(s=localStorage.getItem(p.F5)||null,f=s?JSON.parse(s):[],null===c||void 0===c||c.forEach((function(t){f.some((function(e){return e.sku===t.product.sku}))||k(t.product,"")}))),E(!0)),!(r.length>0)){t.next=15;break}return T(r),D(!0),t.next=14,w(r.map((function(t){return{sku:t.sku,uid:t.uid,quantity:1}})),a,[],{});case 14:D(!1);case 15:case"end":return t.stop()}}),t)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){b(i,n,o,a,l,"next",t)}function l(t){b(i,n,o,a,l,"throw",t)}a(void 0)}))}),[_,L,w,a]);return(0,n.tZ)(g.Provider,{value:{selection:y,groups:r,selectedValues:L,dimensions:o,basePrice:1e4,showSKUDetail:S,showGroup:O,add:M,remove:$,toggle:X,getGroupOfSKU:U,getValueOfSKU:B,setShowSKUDetail:N,setShowGroup:function(t){return Z(t)},addToCart:I},children:s})},x=function(){return(0,i.useContext)(g)}
1,w=r(87885),k=r(94184),_=r.n(k),C=r(50166),S=r(28045),N=r(10762),P=r.n(N),O=r(22912),Z={"\u20ac":"\u20ac","\xa3":"\xa3","\xa5":"\xa5","\u20a9":"\u20a9",$:"$","z\u0142":"z\u0142",USD:"$",EUR:"\u20ac",GBP:"\xa3",TWD:"$",PLN:"z\u0142",CNY:"\xa5",CAD:"$",KRW:"\u20a9",JPY:"\xa5"},j=function(t){var e=t.value,r=void 0===e?0:e,n=t.currency,o=void 0===n?w.T.Usd:n,i=t.currencyMap,a=void 0===i?Z:i,l=t.locale,u=void 0===l?"en-US":l,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=c.renderPlus,f=void 0!==s&&s,d=c.renderCurrency,p=void 0!==d&&d;return r||(r=0),"".concat(f&&r>0?"+":"").concat(o&&a?a[o]:"$"," ").concat(parseFloat(r.toFixed(2)).toLocaleString(u)," ").concat(p?" ".concat(o):"")},E=r(1512),T=r(31545),D=r(11163);var A=function(t){var e,r=t.price,n=t.basePrice,o=t.status,i=(0,T.d7)().base.currencyConfig,a=null===i||void 0===i||null===(e=i.corsair)||void 0===e?void 0:e.currencyMap,l=(0,C.$G)(["common","platform6"]).t,u=(0,D.useRouter)().locale;if(o)switch(o){case"coming-soon":return"Coming soon";case"out-of-stock":return"Out of stock"}var c=(r.final_price.value||0)-n;return c?j({value:c,currency:r.final_price.currency,currencyMap:a,locale:u},{renderPlus:!0,renderCurrency:!0}):l("INCLUDED")},U=function(t){var e,r,o,a=t.type,l=t.image,u=t.title,c=t.price,s=(t.description,t.basePrice),f=t.status,d=t.sku,p=t.isLarge,v=void 0!==p&&p,m=t.variation,b=void 0===m?"card":m,h=(0,C.$G)(["common","platform6"]).t,g=function(t){var e=x().selection;return(0,i.useMemo)((function(){return t&&e.indexOf(t)>=0}),[e,t])}(d),y=x(),w=y.toggle,k=y.setShowSKUDetail,N=(0,i.useMemo)((function(){return(0,n.BX)("button",{className:_()("absolute w-4 h-4 border top-2 right-2 box-content",{"rounded-full":"single"===a,"rounded-sm":"multi"===a,"bg-yellow border-yellow":"multi"===a&&g}),type:"button",onClick:function(t){t.preventDefault(),t.stopPropagation(),w(d)},"aria-label":h(g?"deselect":"select"),children:[g&&"multi"!==a&&(0,n.tZ)("div",{className:"absolute w-2 h-2 left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-yellow rounded-full"}),g&&"multi"===a&&(0,n.tZ)(S.default,{src:"".concat((0,E.$)("/table-configurator"),"/icons/check.svg"),width:12,height:12})]})}),[a,g,h,w,d]);return(0,n.BX)("div",{className:_()("flex gap-2 mt-1 text-sm",{"w-35":!v,"w-40":v,"opacity-50":f,"flex-col":"card"===b,"flex-row transition-all border w-full p-4 rounded relative cursor-pointer":"list-item"===b,"outline-yellow-2 border-transparent":"list-item"===b&&g},P()["snap-x-mandatory"]),onClick:f?void 0:function(t){t.preventDefault(),t.stopPropagation(),w(d)},children:[(0,n.BX)("div",{onClick:f||"card"!==b?void 0:function(t){t.preventDefault(),t.stopPropagation(),w(d)},className:_()("relative flex h-18 flex-shrink-0 flex-grow-0 rounded-sm cursor-pointer",(e={"transition-all border":"card"===b,"outline-yellow-2 border-transparent":"card"===b&&g,"w-35":!v,"w-40":v},r=P()["aspect-square"],o="list-item"===b,r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o,e)),children:[!!l&&(0,n.tZ)(O.ZP,{keepOrigin:!0,src:l,alt:u,layout:"fill",objectFit:"cover",className:"option-select"}),"card"===b&&f&&(0,n.tZ)("p",{className:_()(P().chip,"rounded-sm z-1 absolute right-1 top-1 px-1 text-sm"),children:h("coming-soon"===f?"Coming soon":"Out of stock")}),!f&&"card"===b&&N]}),(0,n.BX)("div",{className:_()("flex flex-col",{"gap-2":"card"===b,"gap-4 overflow-hidden":"list-item"===b}),children:[(0,n.BX)("p",{className:_()("flex items-center truncate overflow-hidden relative",{"justify-between":"card"===b,"pr-8 justify-start":"list-item"===b}),children:["card"===b?(0,n.tZ)("span",{className:"".concat(P()["config-title"]," truncate mr-1 text-sm whitespace-normal"),children:u}):(0,n.tZ)("h4",{className:"truncate mr-1",children:u}),(0,n.tZ)("button",{onClick:function(){return k(d)},className:"flex flex-shrink-0",children:(0,n.tZ)(S.default,{className:"ml-auto information-button",src:"".concat((0,E.$)("/table-configurator"),"/icons/info.svg"),width:16,height:16})})]}),(0,n.tZ)("p",{className:_()({"mr-1 text-xs":"card"===b,"flex flex-row justify-between gap-2":"list-item"===b}),children:"card"===b?(0,n.tZ)(n.HY,{children:A({price:c,status:f,basePrice:s})}):(0,n.tZ)("h5",{className:"text-base whitespace-nowrap",children:A({price:c,status:f,basePrice:s})})})]}),!f&&"list-item"===b&&N]})};function B(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var L=function(t){var e=t.side,r=t.onClick,o=(0,C.$G)(["common"]).t;return(0,n.tZ)("button",{className:_()(P()["overflowing-group-shadow-".concat(e)
1],"absolute z-1 inset-y-0 w-28 flex justify-center items-center","left"===e?"left-0":"right-0"),type:"button",onClick:r,"aria-label":o("left"===e?"previous":"next"),children:(0,n.tZ)(S.default,{src:"".concat((0,E.$)("/table-configurator"),"/icons/arrow.svg"),width:32,height:32,className:_()("transform",{"rotate-180":"left"===e})})})},M=function(t){var e=t.values,r=t.title,o=t.type,a=t.includedSKU,l=t.showTitle,u=void 0!==l&&l,c=(0,C.$G)(["common","platform6"]).t,f=(0,i.useRef)(null),d=function(t){var e=(0,i.useState)({isLeft:!0,isRight:!1}),r=e[0],n=e[1];return(0,i.useEffect)((function(){var e=function(){if(r){var t=r.scrollLeft,e=r.scrollWidth,o=r.clientWidth;n({isLeft:0===t,isRight:t+o===e})}},r=t.current;if(r)return r.addEventListener("scroll",e),window.addEventListener("resize",e),e(),function(){r.removeEventListener("scroll",e),window.removeEventListener("resize",e)}}),[t]),r}(f),p=d.isLeft,v=d.isRight,m=(0,i.useMemo)((function(){return!p||!v}),[p,v]),b=x(),h=b.selection,g=b.getValueOfSKU,y=b.setShowGroup,k=(0,i.useMemo)((function(){var t;return(a?null===(t=g(a))||void 0===t?void 0:t.price.final_price.value:void 0)||0}),[a,g]),S=(0,i.useMemo)((function(){var t,r,n=e.filter((function(t){return h.indexOf(t.sku)>=0})).reduce((function(t,e){return t+(e.price.final_price.value||0)}),0)-k;return!n||n<0?c("INCLUDED"):"".concat(n>0?"+":"","$").concat(n>0?n.toFixed(2):0," ").concat((null===(t=e.filter((function(t){return h.indexOf(t.sku)>=0&&t.price}))[0])||void 0===t||null===(r=t.price)||void 0===r?void 0:r.final_price.currency)||w.T.Usd)}),[h,e,k]),N=(0,s.a)("(max-width: 1023px)",!1);return(0,n.BX)("div",{className:_()("pt-4 border-b flex flex-col",P().group,P()["group-border"]),children:[u&&(0,n.BX)("div",{className:"flex flex-row justify-between mb-4 mx-4 xl:mx-7 uppercase items-center",children:[(0,n.tZ)("h3",{className:"text-xl",children:r}),(0,n.tZ)("h4",{className:"text-xl",children:"extras"!==r.toLowerCase()?S:S===c("INCLUDED")?"":S})]}),(0,n.BX)("div",{className:"relative",children:[(0,n.tZ)("div",{className:_()("px-4 xl:px-8 pb-6 flex gap-4 flex-row relative",N?"overflow-auto":"overflow-hidden"),ref:f,children:e.map((function(t){return(0,n.tZ)(U,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){B(t,e,r[e])}))}return t}({},t,{type:o,isLarge:!u,basePrice:k}),t.sku)}))}),!N&&m&&!v&&(0,n.tZ)(L,{onClick:function(){return y({values:e,title:r,type:o})},side:"right"})]})]})};function $(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 X(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,l=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(u){l=!0,o=u}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return $(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $(t,e)}(t,e)||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.")}()}var I={NA:["CA","US"],EU:["EU","IT","FR","DE","PL","ES","RU","PT"],UK:["UK"]},K=function(){var t,e=x(),r=e.selectedValues,o=e.addToCart,a=e.groups,l=(0,f.t)().isAdding,u=(0,C.$G)(["common","platform6"]).t,c=(0,T.d7)().base.currencyConfig,s=(0,D.useRouter)().locale,d=null===c||void 0===c||null===(t=c.corsair)||void 0===t?void 0:t.currencyMap,p=(0,i.useMemo)((function(){var t=function(t){return r.some((function(e){return(null===e||void 0===e?void 0:e.sku)===(null===t||void 0===t?void 0:t.sku)&&!(null===t||void 0===t?void 0:t.status)}))};return!a.slice(0,-1).map((function(e){return!!(null===e||void 0===e?void 0:e.values.find(t))})).includes(!1)}),[r]),v=(0,i.useMemo)((function(){var t,e,n=r.reduce((function(t,e){return t+(e.price.final_price.value||0)}),0),o=a.flatMap((function(t){return t.values})).find((function(t){var e,r="",n=!0,o=!1,i=void 0;try{for(var a,l=Object.entries(I)[Symbol.iterator]();!(n=(a=l.next()).done);
1n=!0){var u=X(a.value,2),c=u[0];u[1].includes(null===s||void 0===s?void 0:s.split("-")[1])&&(r=c)}}catch(f){o=!0,i=f}finally{try{n||null==l.return||l.return()}finally{if(o)throw i}}return null===t||void 0===t||null===(e=t.sku)||void 0===e?void 0:e.includes("CF-9500008-".concat(r))})),i=(null===o||void 0===o?void 0:o.price.final_price.value)||0;return n?{price:n+i,currency:(null===(t=r.filter((function(t){return t.price}))[0])||void 0===t||null===(e=t.price)||void 0===e?void 0:e.final_price.currency)||w.T.Usd,isNotAvailablePowerBox:!o||!!(null===o||void 0===o?void 0:o.status)}:{price:0,currency:w.T.Usd,isNotAvailablePowerBox:!o||!!(null===o||void 0===o?void 0:o.status)}}),[a,r]),m=v.price,b=v.currency,h=v.isNotAvailablePowerBox;return(0,n.BX)("div",{className:_()(P()["bottom-bar"],"border-t-2 px-4 xl:px-8 py-4 flex flex-row justify-between lg:justify-start items-center w-full h-20 sticky bottom-0 z-40"),children:[(0,n.tZ)("span",{className:_()(!h&&p?P()["text-corsair-teal"]:"text-red-500","uppercase hidden lg:flex text-md lg:text-lg"),children:u(h?"platform6||Not all bundle items are in stock":p?"In stock":"Not in stock")}),(0,n.tZ)("div",{className:"hidden lg:flex flex-1"}),!h&&p&&(0,n.BX)("div",{className:_()("flex justify-between lg:w-auto w-full"),children:[(0,n.BX)("h3",{className:"lg:mx-8 text-xl lg:text-2xl self-center",children:[j({value:m,currency:b,currencyMap:d,locale:s}),(0,n.tZ)("span",{className:"opacity-50 text-lg lg:text-xl ml-1",children:b})]}),(0,n.tZ)("button",{type:"button",className:"bg-yellow py-4 text-sm px-6 text-black uppercase font-semibold rounded-sm",onClick:o,children:u(l?"Adding...":"Add to cart")})]})]})};function z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function G(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){z(t,e,r[e])}))}return t}var R=function(){var t=x().groups,e=(0,i.useState)(0),r=e[0],o=e[1],a=(0,i.useMemo)((function(){return t[r]}),[t,r]),l=(0,s.a)("(min-width: 1024px)",!1);return(0,n.BX)("div",{className:"flex flex-col lg:max-w-xl w-full bg-blackLight md:h-screen md:justify-between h-screen/2 md:justify-end justify-center",children:[(0,n.tZ)("div",{children:l?t.map((function(t,e){return(0,i.createElement)(M,G({},t,{key:"".concat(e,"desktop"),showTitle:!0}))})):(0,n.BX)(n.HY,{children:[(0,n.tZ)("div",{className:"w-full flex flex-row overflow-auto whitespace-nowrap p-4 gap-4",children:t.map((function(t,e){return(0,n.tZ)("button",{className:"outline-none",onClick:function(){return o(e)},children:(0,n.tZ)("h3",{className:_()({"opacity-100 border-yellow text-xl uppercase":r===e,"opacity-50 border-transparent text-xl uppercase":r!==e},"border-b-2 "),children:t.title})},t.title)}))},"mobile-group-titles"),a&&(0,n.tZ)(M,G({},a),"active-group-mobile")]})}),(0,n.tZ)(K,{})]})};function q(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 F(t){return function(t){if(Array.isArray(t))return q(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return q(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return q(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var V=function(){var t=(0,C.$G)(["common","platform6"]).t,e=x(),r=e.selection,o=e.selectedValues,a=e.dimensions,l=(0,i.useState)(!1),u=l[0],c=l[1],s=(0,i.useState)(0),f=(s[0],s[1]),d=(0,i.useMemo)((function(){var t=F(o.flatMap((function(t){return t.previews}))).concat(F(u?a:[])).filter((function(t){return!t.requiredSkus||t.requiredSkus.every((function(t){return"string"===typeof t?r.indexOf(t)>=0:!!t.find((function(t){return r.indexOf(t)>=0}))}
1))}));return 0==t.length&&t.push({image:"https://assets.corsair.com/image/upload/f_auto,q_auto/table-configurator/previews/7-base-_black_-adjustable.png",z:1}),t}),[o,r,u]);return(0,i.useEffect)((function(){f(window.innerWidth);var t=function(){f(window.innerWidth)};return window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}),[]),(0,n.tZ)("div",{className:_()(P().background,"flex relative flex-col w-full"),children:(0,n.BX)("div",{className:_()(P()["background-gradient"],"w-full p-4 h-screen/2 lg:h-screen overflow-hidden sticky top-0 flex flex-col"),children:[(0,n.tZ)("div",{className:"absolute bottom-0 lg:bottom-4 top-16 lg:top-4 w-full left-1/2 transform -translate-x-1/2 max-w-6xl z-0",children:d.map((function(t){var e=t.image,r=t.z;return(0,n.tZ)("div",{className:"absolute inset-0",style:{zIndex:r},title:"".concat(e,":").concat(r),children:(0,n.tZ)(O.ZP,{keepOrigin:!0,layout:"fill",objectFit:"contain",objectPosition:"center",alt:"silhouette",src:e.includes("dimensions")?e.replace(".png","-mobile.png"):e},e)},e)}))}),(0,n.BX)("div",{className:"flex flex-row gap-4 justify-between items-center lg:ml-12 lg:mt-4",children:[(0,n.tZ)("h1",{className:"text-xl lg:text-2xl leading-7 uppercase relative z-0",children:t("PLATFORM:6 MODULAR COMPUTER DESK")}),(0,n.tZ)("button",{type:"button",className:_()("rounded-sm p-2 z-1 bg-blackLight border focus:outline-none bg-dark flex",u?"border-white":"border-transparent"),onClick:function(t){t.preventDefault(),c(!u)},children:(0,n.tZ)(O.ZP,{keepOrigin:!0,src:"".concat((0,E.$)("/table-configurator"),"/icons/dimensions.svg"),width:32,height:32,alt:"Dimensions",className:"block toggle-dimensions"})})]})]})})};function W(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var H=function(){var t=(0,C.$G)(["common"]).t,e=x(),r=e.showSKUDetail,o=e.setShowSKUDetail,a=e.showGroup,l=e.setShowGroup,u=e.getValueOfSKU,c=(0,i.useMemo)((function(){return r?u(r):void 0}),[u,r]),s=(0,i.useMemo)((function(){return a||c}),[a,c]),f=(0,i.useCallback)((function(){o(void 0),l(void 0)}),[]);(0,i.useEffect)((function(){var t;scroll({top:0,behavior:"smooth"}),null===(t=p.current)||void 0===t||t.scroll({top:0,behavior:"smooth"})}),[a,c]),(0,i.useEffect)((function(){var t,e;null!==c?t=setTimeout((function(){var t;null===(t=v.current)||void 0===t||t.classList.add("opacity-100")}),100):(t&&clearTimeout(t),null===(e=v.current)||void 0===e||e.classList.remove("opacity-100"));return function(){t&&clearTimeout(t)}}),[c]);var d=(0,i.useRef)(null),p=(0,i.useRef)(null),v=(0,i.useRef)(null);return(0,n.tZ)("div",{className:_()("absolute bg-black inset-0 flex justify-end items-start duration-300 transition-all z-50 pl-10 overflow-hidden",{"pointer-events-none":!s},s?"bg-opacity-50":"bg-opacity-0"),id:"modal",ref:d,onClick:function(t){return t.target===d.current&&f()},children:(0,n.tZ)("div",{className:_()("bg-gray-100 flex w-fit flex-col justify-start p-8 items-start h-full overflow-auto gap-4 right-0 transform duration-300 transition-all",P().sidebar,{"translate-x-full":!s,"shadow-2xl":s}),ref:p,children:s&&(0,n.BX)("div",{className:"flex flex-col justify-start items-start gap-4",children:[(0,n.tZ)("div",{className:"flex flex-row justify-end items-end w-full absolute right-5 top-7",children:(0,n.tZ)("button",{onClick:f,"aria-label":t("close"),children:(0,n.tZ)(S.default,{src:"".concat((0,E.$)("/table-configurator"),"/icons/close.svg"),width:52,height:52,alt:"Close"})})}),(0,n.BX)("div",{className:"flex flex-row justify-start items-start gap-8",children:[a&&(0,n.BX)("div",{className:_()("flex flex-col justify-start items-start gap-4",P()["sidebar-item-values"],P()["modal-seperation-border-color"],{"pr-4 border-r":c}),children:[(0,n.tZ)("h3",{children:a.title}),a.values.map((function(t){return(0,n.tZ)(U,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}
1)))),n.forEach((function(e){W(t,e,r[e])}))}return t}({variation:"list-item"},t,{type:a.type,basePrice:0}),t.sku)}))]}),c&&(0,n.BX)("div",{ref:v,className:_()("flex flex-col justify-start items-start gap-4 w-full duration-300 transition-all opacity-0",P()["sidebar-item-details"]),children:[(0,n.tZ)("h3",{className:_()("max-w-sm pr-9 md:pr-0"),children:c.title}),c.image&&(0,n.tZ)("img",{src:c.image.replace("%2Cw_96",""),alt:"Close",className:_()("ml-auto h-auto w-full",P()["sidebar-item-details"])}),!c.image&&(0,n.tZ)("img",{src:"".concat((0,E.$)("/table-configurator"),"/details/image-placeholder1.png"),alt:"Close",className:_()("ml-auto h-auto w-full",P()["sidebar-item-details"])}),c.description&&(0,n.tZ)("p",{dangerouslySetInnerHTML:{__html:c.description.html}}),(0,n.tZ)("div",{className:"flex flex-row justify-end items-end w-full absolute right-5 top-7",children:(0,n.tZ)("button",{onClick:function(){return o()},"aria-label":t("close"),children:(0,n.tZ)(S.default,{src:"".concat((0,E.$)("/table-configurator"),"/icons/close.svg"),width:52,height:52,alt:"Close"})})})]})]})]})})})},Y=function(){return(0,n.BX)("main",{className:"flex flex-col lg:flex-row text-white relative",style:{zIndex:100},children:[(0,n.tZ)(H,{}),(0,n.tZ)(V,{}),(0,n.tZ)(R,{})]})},J=r(13406),Q=r(15663),tt=!0;function et(t){var e=t.groups,r=t.dimensions,i=t.products,a=(0,C.$G)(["common","platform6"]).t;return(0,n.BX)(n.HY,{children:[(0,n.tZ)(o.default,{children:(0,n.tZ)("title",{children:a("Platform:6 Modular Computer Desk Configurator")})}),(0,n.tZ)(Q.H,{descriptionOverride:a("platform6-meta||platform6-meta")}),(0,n.tZ)(y,{dimensions:r,groups:e,products:i,children:(0,n.tZ)(Y,{})})]})}et.Layout=J.Ar},88079:function(t,e,r){"use strict";r.d(e,{j:function(){return n}});var n=function(t){var e=void 0,r=localStorage.getItem("skuCartOrder");if(r&&(e=JSON.parse(r)),!e)return t;var n=[];return e.forEach((function(e){null===t||void 0===t||t.forEach((function(t){e===(null===t||void 0===t?void 0:t.product.sku)&&"0"!==t.uid&&n.push(t)}))})),null===t||void 0===t||t.forEach((function(t){"0"===(null===t||void 0===t?void 0:t.uid)&&n.push(t)})),n.length===(null===t||void 0===t?void 0:t.length)?n:t}},10762:function(t){t.exports={background:"TableConfigurator_background___eKcB","background-gradient":"TableConfigurator_background-gradient__Dqg3h","snap-x-mandatory":"TableConfigurator_snap-x-mandatory__6_8Zr",group:"TableConfigurator_group__SA3NJ","group-border":"TableConfigurator_group-border__gHIhy","overflowing-group-shadow-left":"TableConfigurator_overflowing-group-shadow-left__7VkEq","overflowing-group-shadow-right":"TableConfigurator_overflowing-group-shadow-right__8jKjy","bottom-bar":"TableConfigurator_bottom-bar__IrqxV","text-corsair-teal":"TableConfigurator_text-corsair-teal__F7ELj",chip:"TableConfigurator_chip__b7QPB",sidebar:"TableConfigurator_sidebar__9HfwB","sidebar-item-values":"TableConfigurator_sidebar-item-values__OCPb5","sidebar-item-details":"TableConfigurator_sidebar-item-details__0svoP","modal-item-subtitle-color":"TableConfigurator_modal-item-subtitle-color__BQvyA","modal-seperation-border-color":"TableConfigurator_modal-seperation-border-color___sQXw","aspect-square":"TableConfigurator_aspect-square__Cb85f","config-title":"TableConfigurator_config-title__0B0D4"}}},function(t){t.O(0,[6066,2684,3667,1591,9774,2888,179],(function(){return e=18347,t(t.s=e);var e}));var e=t.O();_N_E=e}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.