1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4513],{3679:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/events/preflight/test",function(){return n(29560)}])},29560:function(e,t,n){"use strict";n.r(t),n.d(t,{PreflightEventPage:function(){return y},__N_SSP:function(){return m}});var r=n(26042),i=n(828),s=n(7297),a=n(85893),l=n(16027),o=n(86534),u=n(30504),f=n(22865),c=n(46170),d=n(47708),h=n(58209),p=n(67294);function g(){var e=(0,s.Z)(['\n query GetPreflightData {\n unstructured_data_by_pk(title: "preflight") {\n jitsiLink: data(path: "$.jitsiLink")\n videoStream: data(path: "$.videoStream")\n }\n }\n']);return g=function(){return e},e}function x(){var e=(0,s.Z)(['\n mutation UpdatePreflightData($data: jsonb) {\n deleteJitsi: update_unstructured_data_by_pk(\n pk_columns: { title: "preflight" }\n _delete_key: { data: "jitsiLink" }\n ) {\n data\n }\n deleteVideo: update_unstructured_data_by_pk(\n pk_columns: { title: "preflight" }\n _delete_key: { data: "videoStream" }\n ) {\n data\n }\n update_unstructured_data_by_pk(\n pk_columns: { title: "preflight" }\n _append: { data: $data }\n ) {\n data\n }\n }\n']);return x=function(){return e},e}(0,f.ZP)(g()),(0,f.ZP)(x());var m=!0,y=function(e){var t=e.jitsiLinkData,n=e.videoStreamData,s=(0,h.a)().userData,f=(0,c.Gl)(t),g=(0,c.Gl)(n),x=(0,p.useState)(!1),m=x[0],y=x[1],b=(0,c.Gl)(""),v=(0,c.Gl)(null),j=(0,p.useState)("jitsi"),_=j[0],w=j[1],k=(0,d.LDB
1)(),N=k.data,S=k.refetch,C=((0,c.Gl)(""),(0,i.Z)((0,d.Rbv)({refetchQueries:["GetPreflightData"]}),1)[0]);return(0,a.jsx)(u.A,{pageName:"Preflight",children:(0,a.jsxs)("article",{className:"max-w-screen-2xl mx-auto px-4 2xl:px-0 flex flex-col space-y-8 pb-8",children:[(0,a.jsxs)("header",{className:"bg-green-light py-16 space-y-8",children:[(0,a.jsx)("h1",{className:"header text-4xl text-center text-white",children:"Welcome to the Event preflight test page!"}),(0,a.jsxs)("p",{className:"mx-auto text-center max-w-prose text-white text-lg",children:["The purpose of this page is to test that all the event tech is working properly - so that everyone can enter the event feeling confident that ",(0,a.jsx)("i",{children:"everything will be ok!"})]})]}),(null===s||void 0===s?void 0:s.role)===d.P8B.Bookseller&&(0,a.jsxs)("form",{className:"border-2 p-8 rounded flex flex-col space-y-8",children:[(0,a.jsx)("p",{className:"text-gray-800 italic",children:"Only Lighthouse admin users can see this section"}),(0,a.jsx)("p",{children:"Enter the details for a test run - please do this before asking an author to come to this page to test their tech!"}),(0,a.jsx)(o.rC,{id:"jitsi",name:"jitsi",label:"Jitsi Link",bind:(0,r.Z)({},f.bind),type:"text"}),(0,a.jsx)(o.rC,{id:"stream",name:"stream",label:"Stream Embed",type:"text",bind:(0,r.Z)({},g.bind)}),(0,a.jsx)("section",{children:(0,a.jsx)(l.z,{type:"submit",buttonType:"primary",onClick:function(e){e.preventDefault(),C({variables:{data:{jitsiLink:f.value,videoStream:g.value}}}).then((function(){S().then((function(e){f.init(e.data.unstructured_data_by_pk.jitsiLink),g.init(e.data.unstructured_data_by_pk.videoStream)}))}))},disabled:!(""!==g.value&&""!==f.value&&(f.isModified||g.isModified)),children:"Save"})})]}),!m&&(null===s||void 0===s?void 0:s.role)!==d.P8B.Bookseller&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("form",{className:"flex flex-col border-2 rounded p-4 space-y-8",children:[null!==v.value&&(0,a.jsxs)("section",{className:"border-2 border-red-dark bg-red-50 text-red-800 flex flex-col space-y-4 p-4 rounded",children:[(0,a.jsx)("h2",{className:"text-center text-xl",children:"Error"}),(0,a.jsx)("p",{className:"text-center",children:v.value})]}),(0,a.jsx)("p",{className:"text-gray-800 text-center",children:"This page is password protected - please enter the password that the lighthouse staff have kindly provided you with!"}),(0,a.jsx)(o.rC,{type:"password",name:"pw",id:"pw",label:"Password",className:"max-w-sm mx-auto",bind:(0,r.Z)({},b.bind)}),(0,a.jsx)(l.z,{type:"submit",buttonType:"primary",className:"mx-auto",onClick:function(e){e.preventDefault(),v.setValue(null),fetch("/api/auth/validate-preflight-password",{method:"POST",body:JSON.stringify({password:b.value})}).then((function(e){return y(200===e.status),e.json()})).then((function(e){e.error&&v.setValue(e.error.message)}))},children:"Submit"})]})}),m&&(0,a.jsxs)("section",{className:"bg-yellow-50 border-2 border-yellow-500 text-yellow-800 p-4",children:[(0,a.jsx)("h2",{className:"text-center text-xl",children:"Warning:"}),(0,a.jsx)("p",{className:"text-center",children:"If you refresh this page you will need to re-enter the password!"})]}),(m||(null===s||void 0===s?void 0:s.role)===d.P8B.Bookseller)&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("section",{children:[(0,a.jsxs)("ul",{className:"flex flex-row justify-center space-x-8 ",children:[(0,a.jsx)("li",{className:"flex -mb-px",children:(0,a.jsx)("button",{type:"button",onClick:function(){return w("jitsi")},className:"".concat("jitsi"===_?"border-green-default text-green-default":"border-transparent text-gray-500"," border-b-2 -mb-px hover:border-green-default hover:text-green-default whitespace-nowrap py-4 px-1 font-medium"),children:"Jitsi"})}),(null===s||void 0===s?void 0:s.role)===d.P8B.Bookseller&&(0,a.jsx)("li",{className:"flex -mb-px",children:(0,a.jsx)("button",{type:"button",onClick:function(){return w("stream")},className:"".concat("stream"===_?"border-green-default text-green-default":"border-transparent text-gray-500"," border-b-2 -mb-px hover:border-green-default hover:text-green-default whitespace-nowrap py-4 px-1 font-medium"),children:"Video"})})]}),"jitsi"===_?(0,a.jsxs)("section",{className:"flex",children:[(0,a.jsx)("div",{className:"mx-auto min-h-96 w-full max-w-2xl",dangerouslySetInnerHTML:{__html:N.unstructured_data_by_pk.jitsiLink}})," "]}):(0,a.jsx)("section",{className:"flex",children:(0,a.jsx)("div",{className:"mx-auto video w-full min-h-96 max-w-2xl",dangerouslySetInnerHTML:{__html:N.unstructured_data_by_pk.videoStream}})})]})})]})})};t.default=y},23207:function(e){e.exports=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})}
1,t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e){"use strict";function t(e,t,r){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},s={offset:r.offset,length:r.length},a=[];return e&&a.push(e),{component:n(t),range:s,data:i,children:a}}function n(e){return e}function r(e,t,n){return{range:{offset:e.offset,length:e.length},text:n.substr(t.offset,t.length)}}e.exports={createChild:t,replaceChild:function(e,t,n){Array.prototype.splice.apply(e,[t,1].concat(n))},splitChild:function(e,n,i,s){var a=[],l=n.offset-e.range.offset,o=n.offset+n.length,u=e.range.offset+e.range.length,f=r(n,{offset:l,length:n.length},e.text);return 0<l&&a.push(r({offset:e.range.offset,length:l},{offset:0,length:l},e.text)),a.push(t(f,i,n,s)),o<u&&a.push(r({offset:o,length:u-o},{offset:l+n.length,length:u-o},e.text)),a}}},function(e,t,n){"use strict";function r(e,t,n){var s=e.range.offset+e.range.length,a=t.offset+t.length;if(e.range.offset<=t.offset&&s>=a){if(e.hasOwnProperty("text"))return i(e,t,n);e.children&&e.children.forEach((function(i,s){l(e.children,s,r(i,t,n))}))}return e}function i(e,t,n){var r=n[t.key],i=r.type,s=r.data;return a(e,t,i,s)}var s=n(0),a=(s.createChild,s.splitChild),l=s.replaceChild;e.exports=function(e,t,n){return t.reduce((function(e,t){return e.forEach((function(i,s){l(e,s,r(i,t,n))})),e}),[e])}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){var n=t.style;return c(e,t,n)}function s(e,t){for(var n,i=[],u=e.children,c=[],d=[],h=[];0!==u.length;){var p=u.shift(),g=void 0,x=void 0,m=l(t,p.range),y=p.range.offset+p.range.length,b=t.offset+t.length;if(m.leftTo)c.push(p);else if(m.rightTo)h.push(p);else if(p.hasOwnProperty("text")){if(m.inside)x=Object.assign({},t);else if(m.middleStart)x={offset:t.offset,length:y-t.offset,style:t.style};else if(m.middleEnd)x={offset:p.range.offset,length:b-p.range.offset,style:t.style};else if(m.wrapped){d.push(p);continue}(g=o(p,x)).leftSiblings&&c.push(g.leftSiblings),g.styledChildren&&d.push.apply(d,r(g.styledChildren)),g.rightSiblings&&h.unshift(g.rightSiblings)}else p.children&&(m.wrapped?d.push(p):(p.children=s(p,t),m.middleStart?c.push(p):h.push(p)))}var v;return i.push.apply(i,c),0<d.length&&((v=(n=f(null,t.style,a(d))).children).push.apply(v,d),i.push(n)),i.push.apply(i,h),i}function a(e){return{offset:e[0].range.offset,length:e.reduce((function(e,t){return e+t.range.length}),0)}}function l(e,t){var n=t.offset+t.length,r=e.offset+e.length,i=e.offset<=t.offset&&r>=n,s=e.offset>=t.offset&&r<=n&&e.length!==t.length,a=e.offset>t.offset&&e.offset<n&&r>n,l=e.offset<t.offset&&t.offset<r&&r<n,o=t.offset>=r;return{inside:s,middleStart:a,wrapped:i,middleEnd:l,leftTo:e.offset>=n,rightTo:o}}function o(e,t){var n=i(e,t);return 3===n.length?{leftSiblings:n[0],styledChildren:n[1].children,rightSiblings:n[2]}:2===n.length?n[0].children?{styledChildren:n[0].children,rightSiblings:n[1]}:{leftSiblings:n[0],styledChildren:n[1].children}:{styledChildren:n[0].children}}var u=n(0),f=u.createChild,c=u.splitChild;e.exports=function(e,t){return t.sort((function(e,t){return e.offset>=t.offset})).reduce((function(e,t){return e.forEach((function(e){e.children&&(e.children=s(e,t))})),e}),e)}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){var n={offset:0,length:e.text.length},r={range:n,text:e.text},i=l(r,e.type,n),o=s(i,e.entityRanges,t);return a(o,e.inlineStyleRanges)}var s=n(1),a=n(2),l=n(0).createChild;e.exports=function(e){var t,n=e.blocks.map((function(t){return i(t,e.entityMap)}));return{component:"root",children:(t=[]).concat.apply(t,r(n))}}}])},99534:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:function(){return r}})},828:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(13375);var i=n(91566);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||(0,r.Z)(e,t)||(0,i.Z)(e,t)||function(){throw new TypeError("Invalid attempt to de
1structure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},51351:function(e,t,n){"use strict";function r(e){throw e}n.d(t,{Z:function(){return r}})}},function(e){e.O(0,[3662,1664,8585,9189,504,9774,2888,179],(function(){return t=3679,e(e.s=t);var t}));var t=e.O();_N_E=t}]); 2//# sourceMappingURL=test-69fa58f57ea58148.js.map
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.