1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[967],{4192:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/campaign/[slug]",function(){return r(8460)}])},8460:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSG:function(){return j},default:function(){return w}});var a=r(7568),n=r(828),s=r(7582),i=r(5893),l=r(1664),o=r.n(l),c=r(1163),u=r(7294),d=r(7516),h=r(3990),f=r(1993),g=r(448),p=r(8159),m=function(){function e(t,r,a,n){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),this.red=t,this.green=r,this.blue=a,this.alpha=void 0!=n?n:null}var t=e.prototype;return t.withAlpha=function(t){return new e(this.red,this.green,this.blue,t)},t.toString=function(){var e=null,t=[this.red,this.green,this.blue];return null==this.alpha?e="rgb":(e="rgba",t.push(this.alpha)),"".concat(e,"(").concat(t.join(","),")")},e.fromRgb=function(t){var r=t.trim(),a=[];if(r.startsWith("#"))for(r=r.substring(1);r.length>=2;)a.push(parseInt(r.substring(0,2),16)),r=r.substring(2);else if(r.startsWith("rgb")){var n=r.slice(r.indexOf("(")+1,r.indexOf(")")).split(", ");a[0]=parseInt(n[0]),a[1]=parseInt(n[1]),a[2]=parseInt(n[2]),n[3]&&(a[3]=parseFloat(n[3]))}if(a.length<3||a.length>4)throw Error("Wrong number of colours: ".concat(t));return new e(a[0],a[1],a[2],a[3])},e}(),x=r(3454),v="https://petitions.getup.org.au",b="campaigns-by-me",y=function(e){var t=e.pillar;return(0,i.jsx)(i.Fragment,{children:t&&(0,i.jsx)("h1",{className:"text-6xl text-right opacity-25 flex-shrink-0 tracking-tight mr-4 font-bold md:text-7xl hover:opacity-100",children:(0,i.jsx)(o(),{href:"/campaign/".concat(t.slug),children:(0,i.jsx)("a",{children:t.heading})})})})},j=!0,w=function(e){var t=e.selected,r=e.pillars,n=e.footer,l=e.controlshiftCategories,o=(0,c.useRouter)(),h=t.slug===b,x=r.findIndex(function(e){return e.slug===t.slug}),j=(0,u.useState)(t.campaigns||[]),w=j[0],C=j[1],A=(0,u.useState)(l||[]),S=A[0],E=A[1],O=m.fromRgb(t.colour);return(0,u.useEffect)(function(){if(h){var e;(e=(0,a.Z)(function(){var e,t,r,a;return(0,s.__generator)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,function(){return I.apply(this,arguments)}()];case 1:return t=Array.isArray(null==(e=n.sent())?void 0:e.featured)?_(e.featured):[],r=Array.isArray(null==e?void 0:e.categories)?e.categories.map(function(e){return{name:e.category_name,slug:e.slug,url:e.url,count:e.category_count}}):[],t.length&&C(t),r.length&&E(r),[3,3];case 2:return a=n.sent(),console.error("Error loading ControlShift data",a),[3,3];case 3:return[2]}})}),function(){return e.apply(this,arguments)})()}},[h]),(0,i.jsxs)(p.Z,{meta:{title:t.heading},pillars:r,children:[(0,i.jsxs)("div",{className:"relative section-grid overflow-hidden lg:h-176",children:[(0,i.jsx)("div",{className:"absolute h-full w-full inset-0 object-cover ".concat(t.tintImage?"opacity-85":""),style:{backgroundColor:t.tintImage?O.toString():"",zIndex:-1}}),(0,i.jsx)("img",{src:t.image,className:"absolute h-full w-full inset-0 object-cover",style:{zIndex:-2,filter:t.tintImage?"blur(0px)":""}}),(0,i.jsxs)("header",{className:"py-16 md:py-24 lg:py-32 text-gray-50 col-start-2 max-w-3xl mx-auto",children:[(0,i.jsxs)("div",{className:"group flex mx-auto items-center relative w-max mb-8",children:[(0,i.jsxs)("div",{className:"flex relative z-10 mx-auto items-center border border-white border-opacity-40 w-max px-3 py-1 pr-1 rounded group-hover:border-opacity-100",children:["CAMPAIGNS ",(0,i.jsx)(d.OrA,{className:"h-6 w-6"})]}),(0,i.jsx)("select",{className:"absolute top-0 border-none z-20 appearance-none bg-transparent h-full w-full text-black opacity-0",name:"pillars",defaultValue:"",onChange:function(e){return o.push("/campaign/".concat(e.target.value))},children:r.map(function(e){var t=e.slug===b?"CBM":e.heading;return(0,i.jsx)("option",{value:e.slug,children:t},e.slug)})})]}),(0,i.jsxs)("div",{className:"flex md:w-max mx-auto relative",children:[(0,i.jsxs)("div",{className:"hidden md:flex absolute right-full justify-end",style:{width:"100vw"},children:[(0,i.jsx)(y,{pillar:r[x-2]}),(0,i.jsx)(y,{pillar:r[x-1]})]}),(0,i.jsx)("h1",{className:"text-5xl mx-auto md:flex-shrink-0 text-center tracking-tight font-bold md:text-7xl",children:t.heading}),(0,i.jsxs)("div",{className:"hidden md:flex absolute left-full ml-4",children:[(0,i.jsx)(y,{pillar:r[x+1]}),(0,i.jsx)(y,{pillar:r[x+2]})]})]}),(0,i.jsx)("p",{className:"text-2xl md:text-3xl mt-12 max-w-4xl font-bold mb-4 ",children:t.subhead}
1),(0,i.jsx)("p",{className:"text-base md:text-xl col-span-full opacity-90",children:t.blurb}),h&&(0,i.jsx)("div",{className:"mt-8 flex justify-center",children:(0,i.jsxs)("a",{href:"".concat(v,"/petition/start?source=getup-org-au"),target:"_blank",rel:"noreferrer",className:"inline-flex items-center px-6 py-3 border-2 border-white text-white text-lg font-semibold hover:bg-white hover:text-primary-500 transition",children:["Start a petition ",(0,i.jsx)(k,{})]})})]})]}),h?(0,i.jsx)(N,{campaigns:w,categories:S}):(0,i.jsx)("div",{className:"relative section-grid overflow-hidden",children:(0,i.jsx)("main",{className:"grid md:grid-cols-2 lg:grid-cols-3 grid-flow-row-dense gap-x-8 gap-y-12 col-start-2 py-16 max-w-screen-lg mx-auto",children:t.campaigns.map(function(e){return(0,i.jsx)(f.Z,{href:e.href,image:e.image,title:e.title,excerpt:e.excerpt,external:!0,openInNewTab:!0,imageClasses:"",tag:e.tag||e.pillar,tagBaseColour:e.colour?m.fromRgb(e.colour):void 0,featured:e.featured,appendAfterActionDonate:!0},"".concat(e.pillar,": ").concat(e.title))})})}),(0,i.jsx)(g.Z,{data:n})]})},N=function(e){var t=e.campaigns,r=e.categories;return(0,i.jsx)("div",{className:"relative section-grid overflow-hidden",children:(0,i.jsx)("section",{className:"col-start-2 py-16 max-w-screen-lg mx-auto w-full",children:(0,i.jsxs)("div",{className:"grid gap-y-12",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"text-3xl md:text-4xl font-bold text-primary-500 mb-6",children:"Featured petitions"}),t.length>0?(0,i.jsx)("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 grid-flow-row-dense gap-x-8 gap-y-12",children:t.map(function(e){return(0,i.jsx)(f.Z,{href:e.href,image:e.image,title:e.title,excerpt:e.excerpt,external:!0,openInNewTab:!0,imageClasses:"",featured:e.featured,tag:e.tag,tagBaseColour:e.colour?m.fromRgb(e.colour):void 0,appendAfterActionDonate:!0},e.href)})}):(0,i.jsx)("p",{className:"text-gray-600",children:"No featured petitions are available right now. Check out the categories below to find a campaign to support."})]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsx)("h2",{className:"text-3xl md:text-4xl font-bold text-primary-500",children:"Categories"}),(0,i.jsx)("a",{href:"".concat(v,"/categories"),target:"_blank",rel:"noreferrer",className:"text-sm text-primary-500 hover:underline font-medium uppercase",children:"View all"})]}),r.length>0?(0,i.jsx)("div",{className:"grid gap-4 md:grid-cols-2",children:r.map(function(e){return(0,i.jsxs)("a",{href:"".concat(v,"/categories/").concat(e.slug),target:"_blank",rel:"noreferrer",className:"flex items-center justify-between border border-gray-200 rounded-lg px-4 py-3 hover:border-primary-400 hover:shadow-sm",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-lg font-semibold",children:e.name}),(0,i.jsxs)("p",{className:"text-sm text-gray-500",children:["Petitions: ",e.count]})]}),(0,i.jsx)(h.OJV,{className:"text-primary-500 h-5 w-5"})]},e.slug)})}):(0,i.jsx)("p",{className:"text-gray-600",children:"Categories are unavailable at the moment. Visit the GetUp petitions platform to explore campaigns."})]})]})})})},_=function(e){return e.map(function(e){return{title:e.title,excerpt:A(e.what||e.why||""),image:e.image_url||"/images/just.jpg",href:C(e.url),featured:!0,pillar:"Campaigns by Me",colour:"#f05a24"}})},C=function(e){return e?e.startsWith("http")?e.replace("http://","https://"):"".concat(v).concat(e):v},A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:220;if(!e)return"";var r=e.replace(/\s+/g," ").trim();return r.length<=t?r:"".concat(r.slice(0,t),"...")},k=function(){return(0,i.jsx)("svg",{className:"ml-2 h-4 w-4 inline-block align-middle",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:(0,i.jsx)("path",{d:"M12 4v16M4 12h16",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})})};function I(){return(I=(0,a.Z)(function(){var e,t,r,a,i,l,o,c,u,d,h,f,g,p,m,v,b,y,j,w,N;return(0,s.__generator)(this,function(t){switch(t.label){case 0:e=["/.netlify/functions/control
1shift"],("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname)&&e.push("http://localhost:8888/.netlify/functions/controlshift"),(r=x.env.NEXT_PUBLIC_CONTROL_SHIFT_FUNCTION_URL)&&e.push(r),l=!0,o=!1,c=void 0,t.label=1;case 1:t.trys.push([1,10,11,12]),u=e[Symbol.iterator](),t.label=2;case 2:if(l=(d=u.next()).done)return[3,9];h=d.value,t.label=3;case 3:return t.trys.push([3,7,,8]),[4,fetch(h)];case 4:if(!(f=t.sent()).ok)return[3,6];return[4,f.json()];case 5:if(Array.isArray(null==(g=t.sent())?void 0:g.featured)&&(a=g.featured),Array.isArray(null==g?void 0:g.categories)&&(i=g.categories),(null!==(p=null==a?void 0:a.length)&&void 0!==p?p:0)&&(null!==(m=null==i?void 0:i.length)&&void 0!==m?m:0))return[3,9];t.label=6;case 6:return[3,8];case 7:return v=t.sent(),console.error("ControlShift fetch failed for ".concat(h),v),[3,8];case 8:return l=!0,[3,2];case 9:return[3,12];case 10:return b=t.sent(),o=!0,c=b,[3,12];case 11:try{l||null==u.return||u.return()}finally{if(o)throw c}return[7];case 12:return t.trys.push([12,14,,15]),[4,Promise.all([S("https://petitions.getup.org.au/petitions/featured.json"),S("https://petitions.getup.org.au/categories.json")])];case 13:return j=(y=n.Z.apply(void 0,[t.sent(),2]))[0],w=y[1],!(null==a?void 0:a.length)&&Array.isArray(null==j?void 0:j.data)&&(a=j.data),!(null==i?void 0:i.length)&&Array.isArray(w)&&(i=w),[3,15];case 14:return N=t.sent(),console.error("JSONP ControlShift fetch failed",N),[3,15];case 15:return[2,{featured:Array.isArray(a)?a:[],categories:Array.isArray(i)?i:[]}]}})})).apply(this,arguments)}function S(e){return new Promise(function(t,r){var a="jsonp_cb_".concat(Date.now(),"_").concat(Math.random().toString(16).slice(2));window[a]=function(e){t(e),n()};var n=function(){delete window[a],s.parentNode&&s.parentNode.removeChild(s)},s=document.createElement("script");s.src="".concat(e).concat(e.includes("?")?"&":"?","callback=").concat(a),s.onerror=function(){n(),r(Error("JSONP request failed for ".concat(e)))},document.body.appendChild(s)})}}},function(e){e.O(0,[228,937,445,955,866,609,556,874,568,230,149,641,839,774,888,179],function(){return e(e.s=4192)}),_N_E=e.O()}]);
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.