PageSourceSearch

https://energyse.com.au/_nuxt/eXpXggEH.js

js energyse.com.au collected 2026-10-08 10:23:34 UTC 7,801 bytes, 1 lines download raw bytes

1import{_ as Z,a as ee}from"./CIZ4PrO5.js";import{d as q,_ as te}from"./I9ePJ9cb.js";import{_ as ae}from"./BVx51f_X.js";import{_ as le}from"./sTeegF-7.js";import{_ as oe}from"./CT9_lHLK.js";import{y as se,z as ne,x as V,A as ie,j as p,f as Y,M as re,B as ue,c as r,b,k as e,l as T,a as t,t as m,m as E,E as S,q as C,G as L,v as ce,w as P,T as j,F as I,s as z,u as de,o as u,d as y,C as pe}from"./BPoxQIZp.js";import{u as me}from"./n6aRGMx9.js";import{f as _e,g as fe,q as he,w as F,c as ve}from"./uRkmce9l.js";import{s as be}from"./CB_fYQ-l.js";import"./DlAUqK2U.js";const ge=["alt"],ye={class:"prose prose-slate mx-auto mt-14 mb-10"},xe={class:"text-center leading-[44px] text-[2em] sm:text-[2.25em] px-4"},we={class:"prose prose-slate mx-auto max-w-[620px] p-5 pt-0 mt-10 relative"},Te=t("p",null,"To find out, enter your postcode below so that we can find your distribution network and specific plan.",-1),ke=t("label",{class:"label mt-4 font-semibold pl-0"},[t("span",{class:"label-text"},"Select Plan Type")],-1),Ee={class:"label cursor-pointer"},Ce=t("span",{class:"label-text flex-1 ml-2"},"Residential",-1),Ae={class:"label cursor-pointer"},Ne=t("span",{class:"label-text flex-1 ml-2"},"Business",-1),De=t("label",{class:"label mt-4 font-semibold pl-0"},[t("span",{class:"label-text"},"Enter Postcode")],-1),Se={key:0},Le={key:0},Pe={key:1},Ie=t("p",null,"There is more than one electricity distributor for your postcode. Please select the distributor for your address (you can double check by looking at a recent bill).",-1),Fe={class:"label cursor-pointer"},Be=["value"],Re={class:"label-text flex-1 ml-2"},Oe={key:2},Ue={class:"flex my-6"},Me={key:0,class:"loading loading-spinner"},$e={key:1,class:"prose prose-slate mx-auto max-w-[620px] p-5 pt-0 mt-10 relative"},qe={class:"prose prose-slate mx-auto max-w-[620px] p-5 pt-0 relative"},Ze={__name:"[...slug]",async setup(Ve){let f,k;const B=se(),H=_e.getDatabase(),{path:x}=ne(),{data:s}=([f,k]=V(()=>de(`content-${x}`,()=>pe().where({_path:x,status:{$in:["Preview","Published"]}}).findOne())),f=await f,k(),f);if(!s.value)throw ie({statusCode:404,statusMessage:`Page Not Found (${x})`});const R=`https://ik.imagekit.io/energyse/meta/white-800-400.jpg?tr=w-796,h-396,b-2-DAE7DA,l-image,i-meta/original-512px.png,lx-200,ly-40,w-400,h-240,cm-pad_resize,t-false,l-end:l-text,i-${encodeURIComponent(s.value.menuTitle)},lx-5,ly-320,fs-30,w-790,tg-b,ia-center,bg-white,pa-0_20,l-end`,A=p(!1),c=p([]),n=p(),G=Y(()=>({postcode:d.value.length===0||d.value.length===4})),O=(s.value.location.toLowerCase().includes("coast")?"on the ":"in ")+s.value.location,h=p(!0),U=p(),d=p(s.value.initialPostcode),g=p(),v=p(),W=p("");async function M(){A.value=!0;const a=(()=>{if(v.value)return v.value.name;if(n.value)return n.value.name;if(c.value.length>0)return c.value[0].name})();v.value=n.value?n.value:c.value[0],v.value.name,(g.value!=d.value||a!=v.value.name)&&(g.value=d.value,w.value=await $(g.value));const _=i=>Number(i)>=2600&&Number(i)<=2617||Number(i)>=2900&&Number(i)<=2920?"ACT":be.filter(D=>D.postcodeStart===i.slice(0,1))[0].name;W.value=_(g.value),A.value=!1,U.value&&U.value.scrollIntoView()}async function $(o){const a=await fe(he(ve(H,"utility-plans"),F("fuelType","==","ELECTRICITY"),F("electricityContract.pricingModel","in",["TIME_OF_USE","TIME_OF_USE_CONT_LOAD","FLEXIBLE","FLEXIBLE_CONT_LOAD"]),F("geography.includedPostcodes","array-contains",o))),_=[];return a.forEach(i=>{(!v.value||i.data().geography.distributors.includes(v.value.name))&&_.push({docId:i.id,...i.data()})}),`${s.value.location}`,_}const w=p(([f,k]=V(()=>$(s.value.initialPostcode)),f=await f,k(),f));g.value=s.value.initialPostcode,c.value=q.filter(o=>o.fuel==="Electricity"&&o.postcodes.includes(s.value.initialPostcode)&&w.value.filter(a=>a.geography.distributors.includes(o.name)).length>0),M(),n.value=v.value,w.value.length>0&&w.value.filter(o=>o.customerType==="RESIDENTIAL").length===0&&(h.value=!1);const N=Y(()=>w.value.filter(o=>o.customerType===(h.value?"RESIDENTIAL":"BUSINESS")).filter((o,a,_)=>!_.slice(0,a).map(i=>i.brand).includes(o.brand)).sort((o,a)=>o.brandName.toLowerCase()<a.brandName.toLowerCase()?-1:1));return re(console.log("Unique Plans",N.value)),ue(d,o=>{o.length===4&&!isNaN(Number(o))?(n.value=null,c.value=q.filter(a=>a.fuel==="Electricity"&&a.postcodes.includes(o))):c.value=[]}),me({title:s.value.title.replaceAll("<year>",new Date().getFullYear()).replaceAll("<month>
1",new Date().toLocaleString("default",{month:"short"})),meta:[{name:"description",content:s.value.description}]}),(o,a)=>{const _=Z,i=te,D=ae,X=le,K=oe,J=ee;return u(),r("div",null,[b(_),b(i),R?(u(),r("img",{key:0,class:"w-5/6 mt-10 mb-8 lg:w-[800px] lg:h-[400px] object-cover m-auto rounded-sm",src:R,alt:e(s).menuTitle},null,8,ge)):T("",!0),t("div",ye,[t("h1",xe,m(e(s).title.replaceAll("<year>",new Date().getFullYear()).replaceAll("<month>",new Date().toLocaleString("default",{month:"short"}))),1)]),t("div",we,[t("p",null,"Want to take advantage of lower electricity rates by shifting your power consumption to off peak periods? Wondering when these off peak periods are "+m(O)+"?"),Te,ke,t("label",Ee,[E(t("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>C(h)?h.value=l:null),type:"radio",value:!0,name:"radio-plan-type",class:"radio bg-white",unchecked:""},null,512),[[S,e(h)]]),Ce]),t("label",Ae,[E(t("input",{"onUpdate:modelValue":a[1]||(a[1]=l=>C(h)?h.value=l:null),type:"radio",value:!1,name:"radio-plan-type",class:"radio bg-white",unchecked:""},null,512),[[S,e(h)]]),Ne]),De,t("label",{class:L(["input input-bordered flex items-center gap-2 h-8 bg-white",{"input-error":!e(G).postcode}])},[E(t("input",{"onUpdate:modelValue":a[2]||(a[2]=l=>C(d)?d.value=l:null),type:"text",class:"grow",placeholder:"2000",onKeyup:a[3]||(a[3]=l=>d.value=e(d).replaceAll(/[^0-9]/g,""))},null,544),[[ce,e(d)]])],2),b(j,{name:"slide-fade",mode:"out-in"},{default:P(()=>[e(c).length>0?(u(),r("div",Se,[b(j,{name:"slide-fade",mode:"out-in"},{default:P(()=>[e(c).length===1?(u(),r("p",Le,[y("Great! The electricity distributor for your postcode is "),t("b",null,m(e(c).filter(l=>l.fuel==="Electricity")[0].name),1),y(".")])):e(c).length>1&&!e(n)?(u(),r("div",Pe,[Ie,(u(!0),r(I,null,z(e(c),l=>(u(),r("label",Fe,[E(t("input",{"onUpdate:modelValue":a[4]||(a[4]=Q=>C(n)?n.value=Q:null),type:"radio",value:l,name:"radio-elec-distributor",class:L(["radio",{"radio-error":!e(n)}]),unchecked:""},null,10,Be),[[S,e(n)]]),t("span",Re,m(l.name),1)]))),256))])):(u(),r("p",Oe,[y("Your selected electricity distributor is "),t("b",null,m(e(n).name),1),y(".")]))]),_:1}),t("div",Ue,[t("div",{class:L(["btn btn-primary shadow-lg mx-auto",{"btn-disabled":e(c).length>1&&!e(n)}]),onClick:a[5]||(a[5]=l=>M())},[e(A)?(u(),r("span",Me)):T("",!0),y("Confirm Postcode & Distributors ")],2)])])):T("",!0)]),_:1})]),e(N).length>0?(u(),r("div",$e,[t("h2",null,"Off Peak Times Summary Table"+m(e(s).location?" - "+e(s).location:""),1),t("p",null,"Here's a summary of the different electricity usage periods in postcode "+m(e(g))+" by retailer.",1),b(D,{location:!0,planArray:e(N)},null,8,["planArray"])])):T("",!0),t("div",qe,[e(B).publishedArticles.filter(l=>l._path!=e(x)&&l._path.includes("utilities")&&l.menuTitle.toLowerCase().includes(e(s).location.toLowerCase())).length>0?(u(),r(I,{key:0},[t("h2",null,"Related "+m(e(s).location)+" Articles",1),t("p",null,"Interested in learning more about gas and electricity plans "+m(O)+"? Check out these articles:"),t("ul",null,[(u(!0),r(I,null,z(e(B).publishedArticles.filter(l=>l._path!=e(x)&&l._path.includes("utilities")&&l.menuTitle.toLowerCase().includes(e(s).location.toLowerCase())),l=>(u(),r("li",null,[b(X,{to:l._path},{default:P(()=>[y(m(l.menuTitle),1)]),_:2},1032,["to"])]))),256))])],64)):T("",!0)]),b(K),b(J)])}}};export{Ze as default};

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.