1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="a0fb872e-b74f-4e5d-94cb-bec706b2c665",e._sentryDebugIdIdentifier="sentry-dbid-a0fb872e-b74f-4e5d-94cb-bec706b2c665")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8849],{2470:(e,r,a)=>{"use strict";a.d(r,{A:()=>s});var t=a(7876),i=a(7474);function n(e,r){let{value:a,label:i,...n}=e;return(0,t.jsx)("option",{value:a,...n,children:i},"option-".concat(r))}let s=e=>{var r;let{formId:a,name:s,id:o,type:l="text",value:u,htmlFor:d,label:c,description:m,descriptionBelowField:_=!1,tabindex:p=0,validators:h,errors:b,methods:y,styles:x,selectOptions:f,defaultValue:g=null,disabled:v=!1,...j}=e,A=o?"_auto_"!==o?o:(0,i.kV)(a,{name:s,value:u}):null,k=d||A,w=null!=h&&!!h.required,q=w?x["is-required"]:void 0,N=v?x.disabled:void 0,C=[x.field,x[l],x[s],x[(0,i.yx)({name:s,value:u})],N,q].filter(Boolean).join(" "),{register:I,formState:T}=y,O=((null==(r=T.errors[s])?void 0:r.type)||"").toString(),P={},S=null;m&&(P={"aria-describedby":"".concat(A,"--description")},S=(0,t.jsx)("div",{id:"".concat(A,"--description"),className:x.description,children:m}));let W=w?{"aria-required":"true"}:null,F=v?{disabled:!0}:null;return(0,t.jsxs)("div",{className:"".concat(C," ").concat(T.errors[s]?x.error:""),children:[(()=>{let e={id:A},r={htmlFor:k},a=c?"checkbox"===l||"radio"===l?(0,t.jsx)("label",{...r,children:c}):(0,t.jsxs)("label",{...r,children:[c,w&&(0,t.jsx)("span",{"aria-hidden":"true"})]}):null;switch(l){case"checkbox":case"radio":return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{name:s,value:u,type:l,...e,tabIndex:p,...W,...I(s,h||{}),...F,...j}),a]});case"textarea":return(0,t.jsxs)(t.Fragment,{children:[a,m&&!_&&S,(0,t.jsx)("textarea",{name:s,...e,...P,tabIndex:p,...W,...I(s,h||{}),...F,...j})]});case"date":case"datetime-local":case"email":case"month":case"password":case"search":case"tel":case"text":case"time":case"url":case"week":case"file":case"number":return(0,t.jsxs)(t.Fragment,{children:[a,m&&!_&&S,(0,t.jsx)("input",{name:s,type:l,...e,...P,tabIndex:p,...W,...I(s,h||{}),...F,...j})]});case"select":if(null===g&&f&&f.length>0){let e;f.some(r=>{let{optgroup:a,options:t}=r;if(e=a||(null==t?void 0:t.length)?t.find(e=>e.default):(null==r?void 0:r.default)?r:null)return g=e.value,!0})}return(0,t.jsxs)(t.Fragment,{children:[c&&a,m&&!_&&S,(0,t.jsx)("select",{name:s,...null!==g?{defaultValue:g}:{},...e,...P,...I(s,h||{}),...W,...F,...j,children:f&&f.length>0&&f.map((e,r)=>{let{optgroup:a,options:i}=e;return a?(0,t.jsx)("optgroup",{label:a,children:i.map(n)},"optgroup-".concat(r)):(null==i?void 0:i.length)?i.map(n):n(e,r)})})]});default:return console.error("Form field type ".concat(l," is not currently supported")),null}})(),m&&_&&S,O&&b&&O in b?(0,t.jsx)("div",{role:"alert",children:b[O]}):null]})}},7135:e=>{e.exports={form:"formTradeQualifying_form__0FTUc",submitting:"formTradeQualifying_submitting__wyVxH",submitWrapper:"formTradeQualifying_submitWrapper__W77lw",second:"formTradeQualifying_second__DO5xM",field:"formTradeQualifying_field__6V_8A","is-required":"formTradeQualifying_is-required__UvnJ6",fieldGroup:"formTradeQualifying_fieldGroup__YcGr5",error:"formTradeQualifying_error__a6oOy",description:"formTradeQualifying_description__vBGuD"}},7474:(e,r,a)=>{"use strict";a.d(r,{LL:()=>s,kV:()=>n,yx:()=>i});let t=function(e){let r=0,a=e.length,t=0;if(a>0)for(;t<a;)r=(r<<5)-r+e.charCodeAt(t++)|0;return new Uint32Array([r])[0]},i=e=>{let{name:r,value:a}=e;return"".concat(r).concat(a?"__".concat(t(a).toString(36)):"")},n=(e,r)=>"".concat(e,"__").concat(i(r)),s=(e,r)=>{if(r){let r=null==e?void 0:e.querySelectorAll("input, select, textarea, button");r&&r.forEach(e=>{e.disabled=!0})}else{let r=null==e?void 0:e.querySelectorAll("input, select, textarea, button");r&&r.forEach(e=>{e.disabled=!1})}}},7670:e=>{e.exports={submit:"FormSubmit_submit__EsYyk"}},8210:(e,r,a)=>{"use strict";a.d(r,{A:()=>l});var t=a(7876),i=a(7670),n=a.n(i),s=a(7460),o=a(1041);let l=e=>{let{formId:r,styles:a,submitting:i,isUploading:l}=e,u=i||l;return(0,t.jsxs)("button",{form:r,type:"submit",className:"".concat(a.submit," ").concat(n().submit," ").concat(u?a.disabled:""),disabled:u,children:[i&&(0,t.jsxs)(t.Fragment,{children:["Sending",(0,t.jsx)(s.g,{className:"".concat(n().spinner," fa-spin"),icon:o.VNe})]}),l&&!i&&(0,t.jsxs)(t.Fragment,{children:["Uploading files",(0,t.jsx)(s.g,{className:"".concat(n().spinner," fa-spin"),icon:o.VNe})]}),!i&&!l&&"Submit"]})}},8551:(e,r,a)=>{"use strict";a.d(r,{A:()=>i});var t=a(8754);let i=async(e,r)=>{let a=await (0,t.Hh)("6Lfsw_0nAAAAAKHQhvRpOtD-c8c4eSgpSTin0-wH"),i=await a.execute("submit"),n=await fetch("/api/form-handler",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i,formId:r,data:e})});return await n.json()}},8849:(e,r,a)=>{"use strict";a.r(r),a.d(r,{default:()=>p});var t=a(7876),i=a(8992),n=a(4232),s=a(2470),o=a(7135),l=a.n(o),u=a(9345),d=a(8551),c=a(8210),m=a(7474),_=a(9099);let p=()=>
1{let e=(0,n.useRef)(null),r=(0,_.useRouter)(),[a,o]=(0,n.useState)(!1),[p,h]=(0,n.useState)(!1),b=(0,i.mN)({mode:"onSubmit"}),{control:y,setValue:x,register:f}=b,g="tradeQualifyingForm",v=(0,i.FH)({control:y,name:"partner_source"}),j=(0,i.FH)({control:y,name:"marketing_channels"}),A=Array.isArray(v)&&v.includes("Other"),k=Array.isArray(j)&&j.includes("Other");(0,n.useEffect)(()=>{f("partner_source",{validate:e=>!(!e||!1===e||Array.isArray(e)&&0===e.length)||"Please select at least one partner source"})},[f]);let w={formId:g,methods:b,styles:l()},q="Are you sure you want to leave this page? Your form will not be submitted.";(0,n.useEffect)(()=>{let e=e=>{if(p)return e.preventDefault(),e.returnValue=q},a=()=>{if(p&&!window.confirm(q))throw r.events.emit("routeChangeError"),"routeChange aborted."};return window.addEventListener("beforeunload",e),r.events.on("routeChangeStart",a),()=>{window.removeEventListener("beforeunload",e),r.events.off("routeChangeStart",a)}},[p,r.events]),(0,n.useEffect)(()=>{let r=e.current;(0,m.LL)(r,p)},[p]);let N=()=>{h(!1),o(!0)},C=async e=>{console.log("Form submission attempted with data:",e),console.log("Form validation state:",b.formState),console.log("Form errors:",b.formState.errors),h(!0),!1===e.partner_source?e.partner_source=[]:e.partner_source&&Array.isArray(e.partner_source)&&(e.partner_source=e.partner_source.filter(Boolean),e.partner_source.includes("Other")&&e.partner_source_other&&(e.partner_source=e.partner_source.filter(e=>"Other"!==e),e.partner_source.push(e.partner_source_other))),delete e.partner_source_other,!1===e.itinerary_inclusion_optional?e.itinerary_inclusion_optional=[]:e.itinerary_inclusion_optional&&Array.isArray(e.itinerary_inclusion_optional)&&(e.itinerary_inclusion_optional=e.itinerary_inclusion_optional.filter(Boolean)),!1===e.marketing_channels?e.marketing_channels=[]:e.marketing_channels&&Array.isArray(e.marketing_channels)&&(e.marketing_channels=e.marketing_channels.filter(Boolean),e.marketing_channels.includes("Other")&&e.marketing_channels_other&&(e.marketing_channels=e.marketing_channels.filter(e=>"Other"!==e),e.marketing_channels.push(e.marketing_channels_other))),delete e.marketing_channels_other;let r=await (0,d.A)(e,g);if(!r.success){alert(r.message),h(!1);return}setTimeout(N,1e3)};return a?(0,t.jsx)("div",{className:l().form,children:(0,t.jsx)("p",{children:"Thank you for your trade qualifying form submission. We will review your application and be in touch shortly."})}):(0,t.jsxs)("form",{id:g,ref:e,className:"".concat(l().form," ").concat(p?l().submitting:""),onSubmit:b.handleSubmit(C),children:[(0,t.jsxs)("fieldset",{className:l().fieldset,children:[(0,t.jsx)("legend",{children:"Company Information"}),(0,t.jsx)(s.A,{name:"registered_company_name",label:"Registered Company Name",type:"text",validators:{required:!0},errors:{required:"Registered Company Name is required"},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"trading_name",label:"Trading Name",type:"text",validators:{required:!1},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"company_certificate_number",label:"Company Certificate Number",type:"text",validators:{required:!1},...w})]}),(0,t.jsxs)("fieldset",{className:l().fieldset,children:[(0,t.jsx)("legend",{children:"Contact Details"}),(0,t.jsx)(s.A,{id:"_auto_",name:"address",label:"Primary Address",type:"textarea",rows:3,validators:{required:!0},errors:{required:"Primary Address is required"},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"phone",label:"Primary Phone Number",type:"tel",validators:{required:!0},errors:{required:"Primary Phone Number is required"},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"email",label:"Primary Email Address",type:"email",validators:{required:!0},errors:{required:"Primary Email Address is required"},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"webpage_url",label:"Please provide the URL of your webpage",type:"text",validators:{required:!0},errors:{required:"Webpage URL is required"},...w})]}),(0,t.jsxs)("fieldset",{className:l().fieldset,children:[(0,t.jsx)("legend",{children:"Business Information"}),(0,t.jsx)(s.A,{id:"_auto_",name:"company_bio",label:"Please provide a brief bio of your company",type:"textarea",rows:5,validators:{required:!0},errors:{required:"Company bio is required"},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"establishment_year",label:"What year was your company established?",type:"text",validators:{required:!0},errors:{required:"Establishment year is required"},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"guests_sent_to_wellington",label:"How many guests did you send to Wellington last calendar year?",type:"text",validators:{required:!0},errors:{required:"Number of guests sent to Wellington is required"},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"markets_serviced",label:"Which markets do you service?",type:"textarea",rows:3,validators:{required:!1},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"business_split_fit_group_other",label:"Please indicate your business split of FIT, Group or other (for example, 75% FIT, 25% group)",type:"textarea",rows:3,validators:{required:!0},errors:{required:"Business split information is required"},...w})]}),(0,t.jsxs)("fieldset",{className:l().fieldset,children:[(0,t.jsx)("legend",{children:"Partnership & Services"}),(0,t.jsxs)(u.A,{name:"partner_source",legend:"What source of partner is your company?",validators:{required:!0},errors:{validate:"Please select at least one partner source"},...w,children:[(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Inbound Tour Operator (IBO) or Destination Management Company (DMC)",type:"checkbox",value:"Inbound Tour Operator (IBO) or Destination Management Company (DMC)",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Wholesaler",type:"checkbox",value:"Wholesaler",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Coach series operator",type:"checkbox",value:"Coach series operator",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Online Travel Agent (OTA)",type:"checkbox",value:"Online Travel Agent (OTA)",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Cruise operator",type:"checkbox",value:"Cruise operator",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"isite or Visitor Information Centre",type:"checkbox",value:"isite or Visitor Information Centre",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Accommodation",type:"checkbox",value:"Accommodation",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Travel Agent",type:"checkbox",value:"Travel Agent",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Education",type:"checkbox",value:"Education",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Corporate",type:"checkbox",value:"Corporate",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source",label:"Other",type:"checkbox",value:"Other",...w})]}),A&&(0,t.jsx)(s.A,{id:"_auto_",name:"partner_source_other",label:"Please specify other partner source",type:"text",validators:{required:!0},errors:{required:"Please specify the other partner source"},...w}),(0,t.jsxs)(u.A,{name:"itinerary_inclusion_optional",legend:"Will you sell our experiences as an inclusion or an optional experience in your itineraries?",...w,children:[(0,t.jsx)(s.A,{id:"_auto_",name:"itinerary_inclusion_optional",label:"Inclusion",type:"checkbox",value:"Inclusion",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"itinerary_inclusion_optional",label:"Optional",type:"checkbox",value:"Optional",...w})]}),(0,t.jsx)(s.A,{id:"_auto_",name:"previous_collaboration",label:"Have you worked with us before? If yes, please let us know when.",type:"textarea",rows:3,validators:{required:!0},errors:{required:"Previous collaboration information is required"},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"existing_relationships",label:"Do you have existing relationships with other New Zealand based operators? If yes, please provide some examples of who you work with, especially if they're based in Wellington.",type:"textarea",rows:6,validators:{required:!1},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"booking_systems",label:"Which booking systems does your company use?",type:"textarea",rows:3,validators:{required:!1},...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"api_connection_capability",label:"Do you have the ability to connect to Rezdy via API?",type:"select",selectOptions:[{value:"",label:"- Select -",disabled:!0,default:!1},{value:"Yes",label:"Yes"},{value:"No",label:"No"},{value:"I don't know",label:"I don't know"}
1],validators:{required:!0},...w})]}),(0,t.jsxs)("fieldset",{className:l().fieldset,children:[(0,t.jsx)("legend",{children:"Marketing"}),(0,t.jsxs)(u.A,{name:"marketing_channels",legend:"Which channels will you use to market Te Papa experiences:",...w,children:[(0,t.jsx)(s.A,{id:"_auto_",name:"marketing_channels",label:"Your website",type:"checkbox",value:"Your website",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"marketing_channels",label:"Social Media",type:"checkbox",value:"Social Media",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"marketing_channels",label:"WeChat",type:"checkbox",value:"Weibo",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"marketing_channels",label:"Little Red Book",type:"checkbox",value:"Little Red Book",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"marketing_channels",label:"Print Advertising: brochures",type:"checkbox",value:"Print Advertising: brochures",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"marketing_channels",label:"Print Media: magazines",type:"checkbox",value:"Print Media: magazines",...w}),(0,t.jsx)(s.A,{id:"_auto_",name:"marketing_channels",label:"Other",type:"checkbox",value:"Other",...w})]}),k&&(0,t.jsx)(s.A,{id:"_auto_",name:"marketing_channels_other",label:"Please specify other marketing channel",type:"text",validators:{required:!0},errors:{required:"Please specify the other marketing channel"},...w})]}),(0,t.jsxs)("fieldset",{className:l().fieldset,children:[(0,t.jsx)("legend",{children:"Disclaimer"}),(0,t.jsx)(s.A,{id:"_auto_",name:"disclaimer_confirmed",label:"I declare that the information I have provided is truthful and correct.",type:"checkbox",validators:{required:!0},errors:{required:"You must confirm the declaration to proceed"},...w})]}),(0,t.jsx)("div",{className:l().submitWrapper,children:(0,t.jsx)(c.A,{formId:g,styles:l(),submitting:p})})]})}},9345:(e,r,a)=>{"use strict";a.d(r,{A:()=>i});var t=a(7876);let i=e=>{var r;let{name:a,validators:i,errors:n,styles:s,methods:o,children:l,legend:u}=e,{formState:d}=o,c=((null==(r=d.errors[a])?void 0:r.type)||"").toString(),m=null!=i&&!!i.required,_=m?s["is-required"]:void 0,p=d.errors[a]?s.error:void 0,h=[s.fieldGroup,s[a],_,p].filter(Boolean).join(" "),b=u?(0,t.jsxs)("legend",{children:[u,m&&(0,t.jsx)("span",{"aria-hidden":"true"})]}):null;return(0,t.jsxs)("fieldset",{className:h,children:[u&&b,l,c&&n&&c in n?(0,t.jsx)("div",{role:"alert",children:n[c]}):null]})}}}]);
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.