sdcc-rent-calculator 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,23 @@
1
- (()=>{var V,y,he,Qe,F,ue,ge,ve,K,O,U,ye,ne,Z,ee,Ve,Y={},B=[],qe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,q=Array.isArray;function S(e,t){for(var n in t)e[n]=t[n];return e}function oe(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function re(e,t,n){var o,s,r,l={};for(r in t)r=="key"?o=t[r]:r=="ref"?s=t[r]:l[r]=t[r];if(arguments.length>2&&(l.children=arguments.length>3?V.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)l[r]===void 0&&(l[r]=e.defaultProps[r]);return $(e,l,o,s,null)}function $(e,t,n,o,s){var r={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++he,__i:-1,__u:0};return s==null&&y.vnode!=null&&y.vnode(r),r}function R(e){return e.children}function j(e,t){this.props=e,this.context=t}function I(e,t){if(t==null)return e.__?I(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?I(e):null}function Ge(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],s=[],r=S({},t);r.__v=t.__v+1,y.vnode&&y.vnode(r),ie(e.__P,r,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??I(t),!!(32&t.__u),s),r.__v=t.__v,r.__.__k[r.__i]=r,ke(o,r,s),t.__e=t.__=null,r.__e!=n&&be(r)}}function be(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),be(e)}function de(e){(!e.__d&&(e.__d=!0)&&F.push(e)&&!Q.__r++||ue!=y.debounceRendering)&&((ue=y.debounceRendering)||ge)(Q)}function Q(){try{for(var e,t=1;F.length;)F.length>t&&F.sort(ve),e=F.shift(),t=F.length,Ge(e)}finally{F.length=Q.__r=0}}function xe(e,t,n,o,s,r,l,p,_,c,f){var i,d,u,h,x,g,v,m=o&&o.__k||B,N=t.length;for(_=Je(n,t,m,_,N),i=0;i<N;i++)(u=n.__k[i])!=null&&(d=u.__i!=-1&&m[u.__i]||Y,u.__i=i,g=ie(e,u,d,s,r,l,p,_,c,f),h=u.__e,u.ref&&d.ref!=u.ref&&(d.ref&&ae(d.ref,null,u),f.push(u.ref,u.__c||h,u)),x==null&&h!=null&&(x=h),(v=!!(4&u.__u))||d.__k===u.__k?(_=we(u,_,e,v),v&&d.__e&&(d.__e=null)):typeof u.type=="function"&&g!==void 0?_=g:h&&(_=h.nextSibling),u.__u&=-7);return n.__e=x,_}function Je(e,t,n,o,s){var r,l,p,_,c,f=n.length,i=f,d=0;for(e.__k=new Array(s),r=0;r<s;r++)(l=t[r])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[r]=$(null,l,null,null,null):q(l)?l=e.__k[r]=$(R,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[r]=$(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[r]=l,_=r+d,l.__=e,l.__b=e.__b+1,p=null,(c=l.__i=Xe(l,n,_,i))!=-1&&(i--,(p=n[c])&&(p.__u|=2)),p==null||p.__v==null?(c==-1&&(s>f?d--:s<f&&d++),typeof l.type!="function"&&(l.__u|=4)):c!=_&&(c==_-1?d--:c==_+1?d++:(c>_?d--:d++,l.__u|=4))):e.__k[r]=null;if(i)for(r=0;r<f;r++)(p=n[r])!=null&&(2&p.__u)==0&&(p.__e==o&&(o=I(p)),Ce(p,p));return o}function we(e,t,n,o){var s,r;if(typeof e.type=="function"){for(s=e.__k,r=0;s&&r<s.length;r++)s[r]&&(s[r].__=e,t=we(s[r],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=I(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Xe(e,t,n,o){var s,r,l,p=e.key,_=e.type,c=t[n],f=c!=null&&(2&c.__u)==0;if(c===null&&p==null||f&&p==c.key&&_==c.type)return n;if(o>(f?1:0)){for(s=n-1,r=n+1;s>=0||r<t.length;)if((c=t[l=s>=0?s--:r++])!=null&&(2&c.__u)==0&&p==c.key&&_==c.type)return l}return-1}function fe(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||qe.test(t)?n:n+"px"}function L(e,t,n,o,s){var r,l;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||fe(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||fe(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")r=t!=(t=t.replace(ye,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o?n[U]=o[U]:(n[U]=ne,e.addEventListener(t,r?ee:Z,r)):e.removeEventListener(t,r?ee:Z,r);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function me(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[O]==null)t[O]=ne++;else if(t[O]<n[U])return;return n(y.event?y.event(t):t)}}}function ie(e,t,n,o,s,r,l,p,_,c){var f,i,d,u,h,x,g,v,m,N,E,A,H,P,M,k=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(_=!!(32&n.__u),r=[p=t.__e=n.__e]),(f=y.__b)&&f(t);e:if(typeof k=="function")try{if(v=t.props,m=k.prototype&&k.prototype.render,N=(f=k.contextType)&&o[f.__c],E=f?N?N.props.value:f.__:o,n.__c?g=(i=t.__c=n.__c).__=i.__E:(m?t.__c=i=new k(v,E):(t.__c=i=new j(v,E),i.constructor=k,i.render=Ze),N&&N.sub(i),i.state||(i.state={}),i.__n=o,d=i.__d=!0,i.__h=[],i._sb=[]),m&&i.__s==null&&(i.__s=i.state),m&&k.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=S({},i.__s)),S(i.__s,k.getDerivedStateFromProps(v,i.__s))),u=i.props,h=i.state,i.__v=t,d)m&&k.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),m&&i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(m&&k.getDerivedStateFromProps==null&&v!==u&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(v,E),t.__v==n.__v||!i.__e&&i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(v,i.__s,E)===!1){t.__v!=n.__v&&(i.props=v,i.state=i.__s,i.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(T){T&&(T.__=t)}),B.push.apply(i.__h,i._sb),i._sb=[],i.__h.length&&l.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(v,i.__s,E),m&&i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(u,h,x)})}if(i.context=E,i.props=v,i.__P=e,i.__e=!1,A=y.__r,H=0,m)i.state=i.__s,i.__d=!1,A&&A(t),f=i.render(i.props,i.state,i.context),B.push.apply(i.__h,i._sb),i._sb=[];else do i.__d=!1,A&&A(t),f=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++H<25);i.state=i.__s,i.getChildContext!=null&&(o=S(S({},o),i.getChildContext())),m&&!d&&i.getSnapshotBeforeUpdate!=null&&(x=i.getSnapshotBeforeUpdate(u,h)),P=f!=null&&f.type===R&&f.key==null?Ne(f.props.children):f,p=xe(e,q(P)?P:[P],t,n,o,s,r,l,p,_,c),i.base=t.__e,t.__u&=-161,i.__h.length&&l.push(i),g&&(i.__E=i.__=null)}catch(T){if(t.__v=null,_||r!=null)if(T.then){for(t.__u|=_?160:128;p&&p.nodeType==8&&p.nextSibling;)p=p.nextSibling;r[r.indexOf(p)]=null,t.__e=p}else{for(M=r.length;M--;)oe(r[M]);te(t)}else t.__e=n.__e,t.__k=n.__k,T.then||te(t);y.__e(T,t,n)}else r==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):p=t.__e=Ke(n.__e,t,n,o,s,r,l,_,c);return(f=y.diffed)&&f(t),128&t.__u?void 0:p}function te(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(te))}function ke(e,t,n){for(var o=0;o<n.length;o++)ae(n[o],n[++o],n[++o]);y.__c&&y.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(r){r.call(s)})}catch(r){y.__e(r,s.__v)}})}function Ne(e){return typeof e!="object"||e==null||e.__b>0?e:q(e)?e.map(Ne):e.constructor!==void 0?null:S({},e)}function Ke(e,t,n,o,s,r,l,p,_){var c,f,i,d,u,h,x,g=n.props||Y,v=t.props,m=t.type;if(m=="svg"?s="http://www.w3.org/2000/svg":m=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),r!=null){for(c=0;c<r.length;c++)if((u=r[c])&&"setAttribute"in u==!!m&&(m?u.localName==m:u.nodeType==3)){e=u,r[c]=null;break}}if(e==null){if(m==null)return document.createTextNode(v);e=document.createElementNS(s,m,v.is&&v),p&&(y.__m&&y.__m(t,r),p=!1),r=null}if(m==null)g===v||p&&e.data==v||(e.data=v);else{if(r=m=="textarea"&&v.defaultValue!=null?null:r&&V.call(e.childNodes),!p&&r!=null)for(g={},c=0;c<e.attributes.length;c++)g[(u=e.attributes[c]).name]=u.value;for(c in g)u=g[c],c=="dangerouslySetInnerHTML"?i=u:c=="children"||c in v||c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v||L(e,c,null,u,s);for(c in v)u=v[c],c=="children"?d=u:c=="dangerouslySetInnerHTML"?f=u:c=="value"?h=u:c=="checked"?x=u:p&&typeof u!="function"||g[c]===u||L(e,c,u,g[c],s);if(f)p||i&&(f.__html==i.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(i&&(e.innerHTML=""),xe(t.type=="template"?e.content:e,q(d)?d:[d],t,n,o,m=="foreignObject"?"http://www.w3.org/1999/xhtml":s,r,l,r?r[0]:n.__k&&I(n,0),p,_),r!=null)for(c=r.length;c--;)oe(r[c]);p&&m!="textarea"||(c="value",m=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[c]||m=="progress"&&!h||m=="option"&&h!=g[c])&&L(e,c,h,g[c],s),c="checked",x!=null&&x!=e[c]&&L(e,c,x,g[c],s))}return e}function ae(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(s){y.__e(s,n)}}function Ce(e,t,n){var o,s;if(y.unmount&&y.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||ae(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){y.__e(r,t)}o.base=o.__P=null}if(o=e.__k)for(s=0;s<o.length;s++)o[s]&&Ce(o[s],t,n||typeof e.type!="function");n||oe(e.__e),e.__c=e.__=e.__e=void 0}function Ze(e,t,n){return this.constructor(e,n)}function se(e,t,n){var o,s,r,l;t==document&&(t=document.documentElement),y.__&&y.__(e,t),s=(o=typeof n=="function")?null:n&&n.__k||t.__k,r=[],l=[],ie(t,e=(!o&&n||t).__k=re(R,null,[e]),s||Y,Y,t.namespaceURI,!o&&n?[n]:s?null:t.firstChild?V.call(t.childNodes):null,r,!o&&n?n:s?s.__e:t.firstChild,o,l),ke(r,e,l)}V=B.slice,y={__e:function(e,t,n,o){for(var s,r,l;t=t.__;)if((s=t.__c)&&!s.__)try{if((r=s.constructor)&&r.getDerivedStateFromError!=null&&(s.setState(r.getDerivedStateFromError(e)),l=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,o||{}),l=s.__d),l)return s.__E=s}catch(p){e=p}throw e}},he=0,Qe=function(e){return e!=null&&e.constructor===void 0},j.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=S({},this.state),typeof e=="function"&&(e=e(S({},n),this.props)),e&&S(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),de(this))},j.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),de(this))},j.prototype.render=R,F=[],ge=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ve=function(e,t){return e.__v.__b-t.__v.__b},Q.__r=0,K=Math.random().toString(8),O="__d"+K,U="__a"+K,ye=/(PointerCapture)$|Capture$/i,ne=0,Z=me(!1),ee=me(!0),Ve=0;var J,b,le,Ee,ce=0,Ie=[],w=y,Se=w.__b,Te=w.__r,Fe=w.diffed,Ae=w.__c,Pe=w.unmount,De=w.__;function Re(e,t){w.__h&&w.__h(b,e,ce||t),ce=0;var n=b.__H||(b.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function D(e){return ce=1,et(He,e)}function et(e,t,n){var o=Re(J++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):He(void 0,t),function(p){var _=o.__N?o.__N[0]:o.__[0],c=o.t(_,p);_!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=b,!b.__f)){var s=function(p,_,c){if(!o.__c.__H)return!0;var f=o.__c.__H.__.filter(function(d){return d.__c});if(f.every(function(d){return!d.__N}))return!r||r.call(this,p,_,c);var i=o.__c.props!==p;return f.some(function(d){if(d.__N){var u=d.__[0];d.__=d.__N,d.__N=void 0,u!==d.__[0]&&(i=!0)}}),r&&r.call(this,p,_,c)||i};b.__f=!0;var r=b.shouldComponentUpdate,l=b.componentWillUpdate;b.componentWillUpdate=function(p,_,c){if(this.__e){var f=r;r=void 0,s(p,_,c),r=f}l&&l.call(this,p,_,c)},b.shouldComponentUpdate=s}return o.__N||o.__}function We(e,t){var n=Re(J++,7);return ot(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function tt(){for(var e;e=Ie.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(G),t.__h.some(pe),t.__h=[]}catch(n){t.__h=[],w.__e(n,e.__v)}}}w.__b=function(e){b=null,Se&&Se(e)},w.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),De&&De(e,t)},w.__r=function(e){Te&&Te(e),J=0;var t=(b=e.__c).__H;t&&(le===b?(t.__h=[],b.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(G),t.__h.some(pe),t.__h=[],J=0)),le=b},w.diffed=function(e){Fe&&Fe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ie.push(t)!==1&&Ee===w.requestAnimationFrame||((Ee=w.requestAnimationFrame)||nt)(tt)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),le=b=null},w.__c=function(e,t){t.some(function(n){try{n.__h.some(G),n.__h=n.__h.filter(function(o){return!o.__||pe(o)})}catch(o){t.some(function(s){s.__h&&(s.__h=[])}),t=[],w.__e(o,n.__v)}}),Ae&&Ae(e,t)},w.unmount=function(e){Pe&&Pe(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(o){try{G(o)}catch(s){t=s}}),n.__H=void 0,t&&w.__e(t,n.__v))};var Me=typeof requestAnimationFrame=="function";function nt(e){var t,n=function(){clearTimeout(o),Me&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);Me&&(t=requestAnimationFrame(n))}function G(e){var t=b,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),b=t}function pe(e){var t=b;e.__c=e.__(),b=t}function ot(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function He(e,t){return typeof t=="function"?t(e):t}var rt={RATE_2025:.1,FIXED_CHARGE_2025:3,MIN_RENT_2025:27.4,OAP_THRESHOLD_2025:289.3,RATE_2026:.125,MIN_RENT_2026:35,OAP_THRESHOLD_2026:299.3,OAP_DISCOUNT:10,CHILD_DISCOUNT:2,SUBSIDIARY_INCOME_FLAG:320,WFP_FORMULA_RATE:.6,WFP_THRESHOLDS:{1:705,2:806,3:907,4:998,5:1124}};function Ue({currentRent:e,earners:t,children:n,wfp:o,wfpAmount:s,oap:r}){let l=rt,p=Number(e)||0,_=Math.max(1,Number(t)||1),c=Math.max(0,Number(n)||0),i=r&&_===1&&c===0?l.OAP_DISCOUNT:0,d=p>0&&p<=l.MIN_RENT_2025,u=d?l.MIN_RENT_2025:p,h=p>0?Math.max(0,(u+i-l.FIXED_CHARGE_2025)/l.RATE_2025):0,x=c>=1?l.WFP_THRESHOLDS[Math.min(c,5)]??l.WFP_THRESHOLDS[5]:0,g=o&&c>0?Math.max(0,(x-h)*l.WFP_FORMULA_RATE):0,v=s!==""&&!isNaN(parseFloat(s))?parseFloat(s):null,m=0,N=!1,E=!1;o&&c>0&&(v!==null?m=v:(m=g,N=!0,E=g===0));let A=h*l.RATE_2026-c*l.CHILD_DISCOUNT,H=h>0?Math.max(l.MIN_RENT_2026,A)-i:0,P=m*l.RATE_2026,M=H+P,k=p>0&&h>0?M-p:0,T=k*52,Be=_>1&&h>l.SUBSIDIARY_INCOME_FLAG,X=p>0&&h>0;return{hasResult:X,currentRent:p,proposed2026:X?M:null,proposed2026ExclWfp:X?H:null,wfpExtraRent:P,weeklyIncrease:k,annualIncrease:T,impliedIncome:h,atMin:d,oapDiscount:i,wfpUsed:m,wfpEstimated:N,wfpOverThreshold:E,subsidiaryCapFlag:Be,childCount:c,wfpThreshold:x,wfp:o&&c>0}}function C(e,{showSign:t=!1,decimals:n=2}={}){return e==null||isNaN(e)?"\u2014":`${t&&e>0?"+":e<0?"\u2212":""}\u20AC${Math.abs(e).toFixed(n)}`}function ze(e){return e==null||isNaN(e)?"\u2014":`${e>0?"+":e<0?"\u2212":""}\u20AC${Math.abs(Math.round(e)).toLocaleString("en-IE")}`}var it=0;function a(e,t,n,o,s,r){t||(t={});var l,p,_=t;if("ref"in _)for(p in _={},t)p=="ref"?l=t[p]:_[p]=t[p];var c={type:e,props:_,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--it,__i:-1,__u:0,__source:s,__self:r};if(typeof e=="function"&&(l=e.defaultProps))for(p in l)_[p]===void 0&&(_[p]=l[p]);return y.vnode&&y.vnode(c),c}var at="https://www.peoplebeforeprofit.ie/take-action/";function W({label:e,hint:t,children:n}){return a("div",{className:"field",children:[a("label",{className:"field-label",children:e}),t&&a("p",{className:"field-hint",children:t}),a("div",{className:"field-control",children:n})]})}function Le({value:e,onChange:t,placeholder:n="0.00"}){return a("div",{className:"money-input",children:[a("span",{className:"money-prefix",children:"\u20AC"}),a("input",{type:"number",inputMode:"decimal",min:"0",step:"0.01",placeholder:n,value:e,onInput:o=>t(o.target.value)})]})}function Oe({value:e,setValue:t,min:n=0,max:o=99}){return a("div",{className:"stepper",children:[a("button",{type:"button",className:"stepper-btn",onClick:()=>t(Math.max(n,e-1)),disabled:e<=n,"aria-label":"Decrease",children:"\u2212"}),a("div",{className:"stepper-value",children:e}),a("button",{type:"button",className:"stepper-btn",onClick:()=>t(Math.min(o,e+1)),disabled:e>=o,"aria-label":"Increase",children:"+"})]})}function $e({value:e,options:t,onChange:n}){return a("div",{className:"segmented",role:"radiogroup",children:t.map(o=>a("button",{type:"button",role:"radio","aria-checked":e===o.value,className:"segmented-opt"+(e===o.value?" is-active":""),onClick:()=>n(o.value),children:o.label},o.value))})}function st({currentRent:e,setCurrentRent:t,earners:n,setEarners:o,children:s,setChildren:r,wfp:l,setWfp:p,wfpAmount:_,setWfpAmount:c,oap:f,setOap:i}){let d=s>0;return a("div",{className:"calc-form",children:[a(W,{label:"Question 1 \u2014 What is your current weekly rent?",hint:"Enter the weekly amount from your rent notice.",children:a(Le,{value:e,onChange:t})}),a(W,{label:"Question 2 \u2014 How many wage earners are on the rent book?",hint:"Everyone whose income is assessed in your rent.",children:a(Oe,{value:n,setValue:o,min:1,max:8})}),a(W,{label:"Question 3 \u2014 How many non-earning children under 18 are in the household?",hint:"Children with no income of their own \u2014 enter 0 if none.",children:a(Oe,{value:s,setValue:r,min:0,max:10})}),d&&a(W,{label:"Question 4 \u2014 Do you receive Working Family Payment (WFP)?",hint:"WFP is a weekly social welfare payment for working families with children. Under the proposed 2026 scheme, WFP would be counted as income for the first time.",children:a($e,{value:l?"yes":"no",options:[{value:"no",label:"No"},{value:"yes",label:"Yes"}],onChange:h=>p(h==="yes")})}),d&&l&&a(W,{label:"Question 4b \u2014 If you know your weekly WFP amount, enter it here (optional)",hint:"Check your payment letter or MyWelfare.ie. Leave blank and we will estimate it for you using the standard DSP formula.",children:a(Le,{value:_,onChange:c,placeholder:"e.g. 153.00"})}),n===1&&s===0&&a(W,{label:"Question 5 \u2014 Are you the sole occupant, aged 65 or over, on the state pension or less?",hint:"This applies only to single occupants aged 65+ on the state pension rate.",children:a($e,{value:f?"yes":"no",options:[{value:"no",label:"No"},{value:"yes",label:"Yes"}],onChange:h=>i(h==="yes")})})]})}function lt({result:e}){if(!e||!e.hasResult)return a("div",{className:"result-empty",children:[a("p",{className:"result-empty-label",children:"Your estimate"}),a("h2",{className:"result-empty-title",children:"Your figures appear here."}),a("p",{className:"result-empty-sub",children:"Enter your current weekly rent on the left \u2014 the estimate updates as you type."})]});let t=e.annualIncrease,n=t>.5,o=t<-.5,s=[];return s.push({text:"This is an estimate. SDCC will calculate your actual 2026 rent using full income information they hold on file. Your actual increase may differ."}),e.wfp?e.wfpOverThreshold?s.push({highlight:!0,text:"WFP NOTE: You said you receive WFP but your implied income may be above the eligibility threshold. If you do receive it, enter the exact amount in Q4b for accuracy."}):e.wfpEstimated?s.push({highlight:!0,text:`WFP ESTIMATED using standard formula (60% of threshold minus your income). Amount used: ${C(e.wfpUsed)}/wk. Enter your actual amount in Q4b if known.`}):s.push({text:`WFP INCLUDED: ${C(e.wfpUsed)}/wk adds ${C(e.wfpExtraRent)}/wk to your 2026 rent (${ze(e.wfpExtraRent*52)} from WFP alone).`}):s.push({text:"Working Family Payment: not applicable based on your answers."}),e.subsidiaryCapFlag?s.push({highlight:!0,text:"ADDITIONAL EARNERS \u2014 YOUR RENT MAY BE LOWER: If any additional earner on your rent book earns more than approximately \u20AC420\u2013\u20AC470/week net, the 2026 scheme could be cheaper for you than shown. The cap of \u20AC40/week per additional earner can outweigh the rate increase on the principal income. This estimate assumes no cap benefit applies \u2014 contact SDCC for a precise calculation."}):s.push({text:"Additional earners: the subsidiary earner cap does not appear to produce a saving at your income level based on your answers."}),e.atMin?s.push({highlight:!0,text:"MINIMUM RENT: Your current rent is at or near the minimum of \u20AC27.40. The 2026 minimum rises to \u20AC35.00 \u2014 an increase of at least \u20AC7.60/week (\u20AC395/year) regardless of income. This is already reflected in the estimate above."}):s.push({text:"Minimum rent: the minimum rises from \u20AC27.40 to \u20AC35.00 in 2026. Already reflected in your estimate above."}),a("div",{className:"result-filled",children:[a("p",{className:"result-eyebrow",children:"Estimated annual rent change"}),a("div",{className:"result-headline"+(n?" up":o?" down":""),children:[n&&a("span",{className:"result-sign",children:"+"}),o&&a("span",{className:"result-sign",children:"\u2212"}),a("span",{className:"result-amount",children:["\u20AC",Math.abs(Math.round(t)).toLocaleString("en-IE")]}),a("span",{className:"result-per",children:"/ year"})]}),a("p",{className:"result-weekly",children:[C(e.weeklyIncrease,{showSign:!0})," per week"]}),a("div",{className:"result-rows",children:[a("div",{className:"result-row",children:[a("span",{children:"Weekly rent now (2025)"}),a("span",{className:"result-row-val",children:C(e.currentRent)})]}),a("div",{className:"result-row",children:[a("span",{children:"2026 rent (excluding WFP impact)"}),a("span",{className:"result-row-val",children:C(e.proposed2026ExclWfp)})]}),e.wfp&&a("div",{className:"result-row",children:[a("span",{children:["Additional rent from WFP (",C(e.wfpUsed)," \xD7 12.5%)"]}),a("span",{className:"result-row-val",children:C(e.wfpExtraRent)})]}),a("div",{className:"result-row",children:[a("span",{children:"Total weekly rent proposed (2026)"}),a("span",{className:"result-row-val",children:C(e.proposed2026)})]}),a("div",{className:"result-row strong",children:[a("span",{children:"Weekly change"}),a("span",{className:"result-row-val",children:C(e.weeklyIncrease,{showSign:!0})})]})]}),a("p",{className:"result-notes-label",children:"Important \u2014 please read"}),a("div",{className:"result-notes",children:s.map((r,l)=>a("div",{className:"result-note"+(r.highlight?" note-highlight":""),children:[a("strong",{children:[l+1,"."]})," ",r.text]},l))})]})}function ct({result:e,campaignUrl:t}){let n=e.annualIncrease,o=n>=400;return a("section",{className:"cta",children:a("div",{className:"cta-inner",children:[a("div",{className:"cta-main",children:[a("p",{className:"cta-eyebrow",children:"What to do now"}),a("h2",{className:"cta-title",children:["The vote hasn't happened yet."," ",a("em",{children:"Tell your councillor to oppose it."})]}),a("p",{className:"cta-sub",children:o?`An extra \u20AC${Math.round(n).toLocaleString("en-IE")} a year is a serious hit. Councillors vote on this scheme \u2014 and they pay attention when constituents write in.`:"Even smaller increases compound over time, and many tenants face much larger hikes. Councillors vote on this scheme \u2014 and they pay attention when constituents write in."}),a("div",{className:"cta-actions",children:a("a",{href:t,className:"btn btn-primary",children:["Contact your councillor ",a("span",{className:"btn-arrow",children:"\u2192"})]})}),a("p",{className:"cta-meta",children:"Pre-filled message \xB7 Takes about 2 minutes"})]}),a("div",{className:"cta-side",children:[a("p",{className:"cta-side-label",children:"How it works"}),a("ol",{className:"cta-side-list",children:[a("li",{children:"Find your local SDCC councillors using your address."}),a("li",{children:"Send a pre-filled message \u2014 edit it however you like."}),a("li",{children:"Share this calculator with neighbours and family who rent from the Council."})]})]})]})})}var pt=[{what:"How rent is calculated",now:"10% of total household income + \u20AC3/week fixed charge",proposed:"12.5% of income \u2014 higher rate, fixed charge removed"},{what:"Additional earners",now:"All income counted in full \u2014 no cap",proposed:"Capped at \u20AC40/week per additional earner (= \u20AC320 net weekly income). Higher secondary earners may see rent fall."},{what:"Minimum weekly rent",now:"\u20AC27.40",proposed:"\u20AC35.00 (+\u20AC7.60/wk = +\u20AC395/yr minimum increase)"},{what:"Discount for non-earning children",now:"No discount",proposed:"\u20AC2/week per non-earning child under 18"},{what:"OAP discount (65+, sole occupant, on state pension)",now:"\u20AC10/week (income threshold: \u20AC289.30/wk)",proposed:"\u20AC10/week (income threshold: \u20AC299.30/wk)"},{what:"Working Family Payment (WFP)",now:"Excluded \u2014 did not affect rent",proposed:"Included \u2014 WFP \xD7 12.5% added to weekly rent"},{what:"Child income under 18",now:"Counted as income",proposed:"No longer counted"},{what:"Child maintenance received",now:"Counted as income",proposed:"No longer counted"},{what:"Disablement Benefit",now:"Counted as income",proposed:"No longer counted"}];function _t(){return a("section",{className:"section changes",children:[a("p",{className:"section-label",children:"For reference"}),a("h2",{className:"section-h",children:"What's actually changing in the proposed 2026 scheme."}),a("div",{className:"changes-table",role:"table",children:[a("div",{className:"changes-head",role:"row",children:[a("div",{role:"columnheader",children:"Item"}),a("div",{role:"columnheader",children:"2025 \u2014 now"}),a("div",{role:"columnheader",children:"2026 \u2014 proposed"})]}),pt.map((e,t)=>a("div",{className:"changes-row",role:"row",children:[a("div",{className:"changes-what",role:"cell",children:e.what}),a("div",{className:"changes-now",role:"cell",children:e.now}),a("div",{className:"changes-proposed",role:"cell",children:e.proposed})]},t))]})]})}function ut(){return a("footer",{className:"disclaimer",children:a("div",{className:"disclaimer-inner",children:[a("p",{className:"disclaimer-title",children:"Notes & sources"}),a("ol",{className:"disclaimer-list",children:[a("li",{children:"This is an estimate. SDCC will calculate your actual 2026 rent using the full income information they hold on file. Your real increase may differ."}),a("li",{children:"WFP is estimated using the standard DSP formula: 60% of (income threshold minus household income). Thresholds used are the 2025 DSP rates. Budget 2026 increased thresholds by \u20AC60/week from January 2026 \u2014 if your WFP changed, enter the actual amount in Q4b for accuracy."}),a("li",{children:"Source: SDCC Differential Rent Scheme 2025 (eff. 1 Jan 2025) and proposed 2026 scheme presented to Housing SPC, 14 May 2026. Note: SDCC's own presentation contained an arithmetic error in the 2-child WFP example \u2014 this calculator uses the correct DSP formula throughout. This calculator is for information only and is not an official SDCC document."}),a("li",{children:"Do not change what you pay until SDCC notifies you. The 2026 scheme is a proposal \u2014 it has not been adopted."})]})]})})}function je({campaignUrl:e=at}){let[t,n]=D(""),[o,s]=D(1),[r,l]=D(0),[p,_]=D(!1),[c,f]=D(""),[i,d]=D(!1),u=g=>{l(g),g===0&&(_(!1),f(""))},h=g=>{s(g),g>1&&d(!1)},x=We(()=>{let g=parseFloat(t);return!g||g<=0?null:Ue({currentRent:g,earners:o,children:r,wfp:p,wfpAmount:c,oap:i})},[t,o,r,p,c,i]);return a("div",{className:"root",children:a("main",{className:"main",children:[a("section",{className:"section",children:[a("p",{className:"section-label",children:"The calculator"}),a("h2",{className:"section-h",children:"Your details, your estimate."}),a("div",{className:"grid",children:[a(st,{currentRent:t,setCurrentRent:n,earners:o,setEarners:h,children:r,setChildren:u,wfp:p,setWfp:_,wfpAmount:c,setWfpAmount:f,oap:i,setOap:d}),a("div",{className:"result-card",children:a(lt,{result:x})})]})]}),x&&x.hasResult&&a(ct,{result:x,campaignUrl:e}),a(_t,{}),a(ut,{})]})})}var Ye=`
1
+ (()=>{var q,v,ve,Ge,F,fe,ye,be,Z,$,U,xe,oe,ee,te,Je,Q={},Y=[],Xe=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,G=Array.isArray;function S(e,t){for(var n in t)e[n]=t[n];return e}function re(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ae(e,t,n){var o,i,r,l={};for(r in t)r=="key"?o=t[r]:r=="ref"?i=t[r]:l[r]=t[r];if(arguments.length>2&&(l.children=arguments.length>3?q.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)l[r]===void 0&&(l[r]=e.defaultProps[r]);return j(e,l,o,i,null)}function j(e,t,n,o,i){var r={type:e,props:t,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++ve,__i:-1,__u:0};return i==null&&v.vnode!=null&&v.vnode(r),r}function I(e){return e.children}function B(e,t){this.props=e,this.context=t}function R(e,t){if(t==null)return e.__?R(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?R(e):null}function Ke(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,o=[],i=[],r=S({},t);r.__v=t.__v+1,v.vnode&&v.vnode(r),ie(e.__P,r,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,o,n??R(t),!!(32&t.__u),i),r.__v=t.__v,r.__.__k[r.__i]=r,Ce(o,r,i),t.__e=t.__=null,r.__e!=n&&we(r)}}function we(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),we(e)}function me(e){(!e.__d&&(e.__d=!0)&&F.push(e)&&!V.__r++||fe!=v.debounceRendering)&&((fe=v.debounceRendering)||ye)(V)}function V(){try{for(var e,t=1;F.length;)F.length>t&&F.sort(be),e=F.shift(),t=F.length,Ke(e)}finally{F.length=V.__r=0}}function ke(e,t,n,o,i,r,l,p,u,c,f){var a,d,_,g,k,y,h,m=o&&o.__k||Y,b=t.length;for(u=Ze(n,t,m,u,b),a=0;a<b;a++)(_=n.__k[a])!=null&&(d=_.__i!=-1&&m[_.__i]||Q,_.__i=a,y=ie(e,_,d,i,r,l,p,u,c,f),g=_.__e,_.ref&&d.ref!=_.ref&&(d.ref&&se(d.ref,null,_),f.push(_.ref,_.__c||g,_)),k==null&&g!=null&&(k=g),(h=!!(4&_.__u))||d.__k===_.__k?(u=Ne(_,u,e,h),h&&d.__e&&(d.__e=null)):typeof _.type=="function"&&y!==void 0?u=y:g&&(u=g.nextSibling),_.__u&=-7);return n.__e=k,u}function Ze(e,t,n,o,i){var r,l,p,u,c,f=n.length,a=f,d=0;for(e.__k=new Array(i),r=0;r<i;r++)(l=t[r])!=null&&typeof l!="boolean"&&typeof l!="function"?(typeof l=="string"||typeof l=="number"||typeof l=="bigint"||l.constructor==String?l=e.__k[r]=j(null,l,null,null,null):G(l)?l=e.__k[r]=j(I,{children:l},null,null,null):l.constructor===void 0&&l.__b>0?l=e.__k[r]=j(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):e.__k[r]=l,u=r+d,l.__=e,l.__b=e.__b+1,p=null,(c=l.__i=et(l,n,u,a))!=-1&&(a--,(p=n[c])&&(p.__u|=2)),p==null||p.__v==null?(c==-1&&(i>f?d--:i<f&&d++),typeof l.type!="function"&&(l.__u|=4)):c!=u&&(c==u-1?d--:c==u+1?d++:(c>u?d--:d++,l.__u|=4))):e.__k[r]=null;if(a)for(r=0;r<f;r++)(p=n[r])!=null&&(2&p.__u)==0&&(p.__e==o&&(o=R(p)),Se(p,p));return o}function Ne(e,t,n,o){var i,r;if(typeof e.type=="function"){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=Ne(i[r],t,n,o));return t}e.__e!=t&&(o&&(t&&e.type&&!t.parentNode&&(t=R(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function et(e,t,n,o){var i,r,l,p=e.key,u=e.type,c=t[n],f=c!=null&&(2&c.__u)==0;if(c===null&&p==null||f&&p==c.key&&u==c.type)return n;if(o>(f?1:0)){for(i=n-1,r=n+1;i>=0||r<t.length;)if((c=t[l=i>=0?i--:r++])!=null&&(2&c.__u)==0&&p==c.key&&u==c.type)return l}return-1}function he(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Xe.test(t)?n:n+"px"}function O(e,t,n,o,i){var r,l;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof o=="string"&&(e.style.cssText=o=""),o)for(t in o)n&&t in n||he(e.style,t,"");if(n)for(t in n)o&&n[t]==o[t]||he(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")r=t!=(t=t.replace(xe,"$1")),l=t.toLowerCase(),t=l in e||t=="onFocusOut"||t=="onFocusIn"?l.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?o?n[U]=o[U]:(n[U]=oe,e.addEventListener(t,r?te:ee,r)):e.removeEventListener(t,r?te:ee,r);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function ge(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[$]==null)t[$]=oe++;else if(t[$]<n[U])return;return n(v.event?v.event(t):t)}}}function ie(e,t,n,o,i,r,l,p,u,c){var f,a,d,_,g,k,y,h,m,b,E,P,H,M,D,N=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),r=[p=t.__e=n.__e]),(f=v.__b)&&f(t);e:if(typeof N=="function")try{if(h=t.props,m=N.prototype&&N.prototype.render,b=(f=N.contextType)&&o[f.__c],E=f?b?b.props.value:f.__:o,n.__c?y=(a=t.__c=n.__c).__=a.__E:(m?t.__c=a=new N(h,E):(t.__c=a=new B(h,E),a.constructor=N,a.render=nt),b&&b.sub(a),a.state||(a.state={}),a.__n=o,d=a.__d=!0,a.__h=[],a._sb=[]),m&&a.__s==null&&(a.__s=a.state),m&&N.getDerivedStateFromProps!=null&&(a.__s==a.state&&(a.__s=S({},a.__s)),S(a.__s,N.getDerivedStateFromProps(h,a.__s))),_=a.props,g=a.state,a.__v=t,d)m&&N.getDerivedStateFromProps==null&&a.componentWillMount!=null&&a.componentWillMount(),m&&a.componentDidMount!=null&&a.__h.push(a.componentDidMount);else{if(m&&N.getDerivedStateFromProps==null&&h!==_&&a.componentWillReceiveProps!=null&&a.componentWillReceiveProps(h,E),t.__v==n.__v||!a.__e&&a.shouldComponentUpdate!=null&&a.shouldComponentUpdate(h,a.__s,E)===!1){t.__v!=n.__v&&(a.props=h,a.state=a.__s,a.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(T){T&&(T.__=t)}),Y.push.apply(a.__h,a._sb),a._sb=[],a.__h.length&&l.push(a);break e}a.componentWillUpdate!=null&&a.componentWillUpdate(h,a.__s,E),m&&a.componentDidUpdate!=null&&a.__h.push(function(){a.componentDidUpdate(_,g,k)})}if(a.context=E,a.props=h,a.__P=e,a.__e=!1,P=v.__r,H=0,m)a.state=a.__s,a.__d=!1,P&&P(t),f=a.render(a.props,a.state,a.context),Y.push.apply(a.__h,a._sb),a._sb=[];else do a.__d=!1,P&&P(t),f=a.render(a.props,a.state,a.context),a.state=a.__s;while(a.__d&&++H<25);a.state=a.__s,a.getChildContext!=null&&(o=S(S({},o),a.getChildContext())),m&&!d&&a.getSnapshotBeforeUpdate!=null&&(k=a.getSnapshotBeforeUpdate(_,g)),M=f!=null&&f.type===I&&f.key==null?Ee(f.props.children):f,p=ke(e,G(M)?M:[M],t,n,o,i,r,l,p,u,c),a.base=t.__e,t.__u&=-161,a.__h.length&&l.push(a),y&&(a.__E=a.__=null)}catch(T){if(t.__v=null,u||r!=null)if(T.then){for(t.__u|=u?160:128;p&&p.nodeType==8&&p.nextSibling;)p=p.nextSibling;r[r.indexOf(p)]=null,t.__e=p}else{for(D=r.length;D--;)re(r[D]);ne(t)}else t.__e=n.__e,t.__k=n.__k,T.then||ne(t);v.__e(T,t,n)}else r==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):p=t.__e=tt(n.__e,t,n,o,i,r,l,u,c);return(f=v.diffed)&&f(t),128&t.__u?void 0:p}function ne(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ne))}function Ce(e,t,n){for(var o=0;o<n.length;o++)se(n[o],n[++o],n[++o]);v.__c&&v.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(r){r.call(i)})}catch(r){v.__e(r,i.__v)}})}function Ee(e){return typeof e!="object"||e==null||e.__b>0?e:G(e)?e.map(Ee):e.constructor!==void 0?null:S({},e)}function tt(e,t,n,o,i,r,l,p,u){var c,f,a,d,_,g,k,y=n.props||Q,h=t.props,m=t.type;if(m=="svg"?i="http://www.w3.org/2000/svg":m=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),r!=null){for(c=0;c<r.length;c++)if((_=r[c])&&"setAttribute"in _==!!m&&(m?_.localName==m:_.nodeType==3)){e=_,r[c]=null;break}}if(e==null){if(m==null)return document.createTextNode(h);e=document.createElementNS(i,m,h.is&&h),p&&(v.__m&&v.__m(t,r),p=!1),r=null}if(m==null)y===h||p&&e.data==h||(e.data=h);else{if(r=m=="textarea"&&h.defaultValue!=null?null:r&&q.call(e.childNodes),!p&&r!=null)for(y={},c=0;c<e.attributes.length;c++)y[(_=e.attributes[c]).name]=_.value;for(c in y)_=y[c],c=="dangerouslySetInnerHTML"?a=_:c=="children"||c in h||c=="value"&&"defaultValue"in h||c=="checked"&&"defaultChecked"in h||O(e,c,null,_,i);for(c in h)_=h[c],c=="children"?d=_:c=="dangerouslySetInnerHTML"?f=_:c=="value"?g=_:c=="checked"?k=_:p&&typeof _!="function"||y[c]===_||O(e,c,_,y[c],i);if(f)p||a&&(f.__html==a.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(a&&(e.innerHTML=""),ke(t.type=="template"?e.content:e,G(d)?d:[d],t,n,o,m=="foreignObject"?"http://www.w3.org/1999/xhtml":i,r,l,r?r[0]:n.__k&&R(n,0),p,u),r!=null)for(c=r.length;c--;)re(r[c]);p&&m!="textarea"||(c="value",m=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[c]||m=="progress"&&!g||m=="option"&&g!=y[c])&&O(e,c,g,y[c],i),c="checked",k!=null&&k!=e[c]&&O(e,c,k,y[c],i))}return e}function se(e,t,n){try{if(typeof e=="function"){var o=typeof e.__u=="function";o&&e.__u(),o&&t==null||(e.__u=e(t))}else e.current=t}catch(i){v.__e(i,n)}}function Se(e,t,n){var o,i;if(v.unmount&&v.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||se(o,null,t)),(o=e.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(r){v.__e(r,t)}o.base=o.__P=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&Se(o[i],t,n||typeof e.type!="function");n||re(e.__e),e.__c=e.__=e.__e=void 0}function nt(e,t,n){return this.constructor(e,n)}function le(e,t,n){var o,i,r,l;t==document&&(t=document.documentElement),v.__&&v.__(e,t),i=(o=typeof n=="function")?null:n&&n.__k||t.__k,r=[],l=[],ie(t,e=(!o&&n||t).__k=ae(I,null,[e]),i||Q,Q,t.namespaceURI,!o&&n?[n]:i?null:t.firstChild?q.call(t.childNodes):null,r,!o&&n?n:i?i.__e:t.firstChild,o,l),Ce(r,e,l)}q=Y.slice,v={__e:function(e,t,n,o){for(var i,r,l;t=t.__;)if((i=t.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(e)),l=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,o||{}),l=i.__d),l)return i.__E=i}catch(p){e=p}throw e}},ve=0,Ge=function(e){return e!=null&&e.constructor===void 0},B.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=S({},this.state),typeof e=="function"&&(e=e(S({},n),this.props)),e&&S(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),me(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),me(this))},B.prototype.render=I,F=[],ye=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,be=function(e,t){return e.__v.__b-t.__v.__b},V.__r=0,Z=Math.random().toString(8),$="__d"+Z,U="__a"+Z,xe=/(PointerCapture)$|Capture$/i,oe=0,ee=ge(!1),te=ge(!0),Je=0;var z,x,ce,Te,X=0,We=[],w=v,Fe=w.__b,Ae=w.__r,Pe=w.diffed,Me=w.__c,De=w.unmount,Re=w.__;function ue(e,t){w.__h&&w.__h(x,e,X||t),X=0;var n=x.__H||(x.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function A(e){return X=1,ot(Le,e)}function ot(e,t,n){var o=ue(z++,2);if(o.t=e,!o.__c&&(o.__=[n?n(t):Le(void 0,t),function(p){var u=o.__N?o.__N[0]:o.__[0],c=o.t(u,p);u!==c&&(o.__N=[c,o.__[1]],o.__c.setState({}))}],o.__c=x,!x.__f)){var i=function(p,u,c){if(!o.__c.__H)return!0;var f=o.__c.__H.__.filter(function(d){return d.__c});if(f.every(function(d){return!d.__N}))return!r||r.call(this,p,u,c);var a=o.__c.props!==p;return f.some(function(d){if(d.__N){var _=d.__[0];d.__=d.__N,d.__N=void 0,_!==d.__[0]&&(a=!0)}}),r&&r.call(this,p,u,c)||a};x.__f=!0;var r=x.shouldComponentUpdate,l=x.componentWillUpdate;x.componentWillUpdate=function(p,u,c){if(this.__e){var f=r;r=void 0,i(p,u,c),r=f}l&&l.call(this,p,u,c)},x.shouldComponentUpdate=i}return o.__N||o.__}function He(e,t){var n=ue(z++,3);!w.__s&&ze(n.__H,t)&&(n.__=e,n.u=t,x.__H.__h.push(n))}function Ue(e){return X=5,_e(function(){return{current:e}},[])}function _e(e,t){var n=ue(z++,7);return ze(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function rt(){for(var e;e=We.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(J),t.__h.some(pe),t.__h=[]}catch(n){t.__h=[],w.__e(n,e.__v)}}}w.__b=function(e){x=null,Fe&&Fe(e)},w.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Re&&Re(e,t)},w.__r=function(e){Ae&&Ae(e),z=0;var t=(x=e.__c).__H;t&&(ce===x?(t.__h=[],x.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(J),t.__h.some(pe),t.__h=[],z=0)),ce=x},w.diffed=function(e){Pe&&Pe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(We.push(t)!==1&&Te===w.requestAnimationFrame||((Te=w.requestAnimationFrame)||at)(rt)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),ce=x=null},w.__c=function(e,t){t.some(function(n){try{n.__h.some(J),n.__h=n.__h.filter(function(o){return!o.__||pe(o)})}catch(o){t.some(function(i){i.__h&&(i.__h=[])}),t=[],w.__e(o,n.__v)}}),Me&&Me(e,t)},w.unmount=function(e){De&&De(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(o){try{J(o)}catch(i){t=i}}),n.__H=void 0,t&&w.__e(t,n.__v))};var Ie=typeof requestAnimationFrame=="function";function at(e){var t,n=function(){clearTimeout(o),Ie&&cancelAnimationFrame(t),setTimeout(e)},o=setTimeout(n,35);Ie&&(t=requestAnimationFrame(n))}function J(e){var t=x,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),x=t}function pe(e){var t=x;e.__c=e.__(),x=t}function ze(e,t){return!e||e.length!==t.length||t.some(function(n,o){return n!==e[o]})}function Le(e,t){return typeof t=="function"?t(e):t}var it={RATE_2025:.1,FIXED_CHARGE_2025:3,MIN_RENT_2025:27.4,OAP_THRESHOLD_2025:289.3,RATE_2026:.125,MIN_RENT_2026:35,OAP_THRESHOLD_2026:299.3,OAP_DISCOUNT:10,CHILD_DISCOUNT:2,SUBSIDIARY_INCOME_FLAG:320,WFP_FORMULA_RATE:.6,WFP_THRESHOLDS:{1:705,2:806,3:907,4:998,5:1124}};function Oe({currentRent:e,earners:t,children:n,wfp:o,wfpAmount:i,oap:r}){let l=it,p=Number(e)||0,u=Math.max(1,Number(t)||1),c=Math.max(0,Number(n)||0),a=r&&u===1&&c===0?l.OAP_DISCOUNT:0,d=p>0&&p<=l.MIN_RENT_2025,_=d?l.MIN_RENT_2025:p,g=p>0?Math.max(0,(_+a-l.FIXED_CHARGE_2025)/l.RATE_2025):0,k=c>=1?l.WFP_THRESHOLDS[Math.min(c,5)]??l.WFP_THRESHOLDS[5]:0,y=o&&c>0?Math.max(0,(k-g)*l.WFP_FORMULA_RATE):0,h=i!==""&&!isNaN(parseFloat(i))?parseFloat(i):null,m=0,b=!1,E=!1;o&&c>0&&(h!==null?m=h:(m=y,b=!0,E=y===0));let P=g*l.RATE_2026-c*l.CHILD_DISCOUNT,H=g>0?Math.max(l.MIN_RENT_2026,P)-a:0,M=m*l.RATE_2026,D=H+M,N=p>0&&g>0?D-p:0,T=N*52,qe=u>1&&g>l.SUBSIDIARY_INCOME_FLAG,K=p>0&&g>0;return{hasResult:K,currentRent:p,proposed2026:K?D:null,proposed2026ExclWfp:K?H:null,wfpExtraRent:M,weeklyIncrease:N,annualIncrease:T,impliedIncome:g,atMin:d,oapDiscount:a,wfpUsed:m,wfpEstimated:b,wfpOverThreshold:E,subsidiaryCapFlag:qe,childCount:c,wfpThreshold:k,wfp:o&&c>0}}function C(e,{showSign:t=!1,decimals:n=2}={}){return e==null||isNaN(e)?"\u2014":`${t&&e>0?"+":e<0?"\u2212":""}\u20AC${Math.abs(e).toFixed(n)}`}function $e(e){return e==null||isNaN(e)?"\u2014":`${e>0?"+":e<0?"\u2212":""}\u20AC${Math.abs(Math.round(e)).toLocaleString("en-IE")}`}var st=0;function s(e,t,n,o,i,r){t||(t={});var l,p,u=t;if("ref"in u)for(p in u={},t)p=="ref"?l=t[p]:u[p]=t[p];var c={type:e,props:u,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--st,__i:-1,__u:0,__source:i,__self:r};if(typeof e=="function"&&(l=e.defaultProps))for(p in l)u[p]===void 0&&(u[p]=l[p]);return v.vnode&&v.vnode(c),c}var lt="https://www.peoplebeforeprofit.ie/take-action/";function W({label:e,hint:t,children:n}){return s("div",{className:"field",children:[s("label",{className:"field-label",children:e}),t&&s("p",{className:"field-hint",children:t}),s("div",{className:"field-control",children:n})]})}function je({value:e,onChange:t,placeholder:n="0.00"}){return s("div",{className:"money-input",children:[s("span",{className:"money-prefix",children:"\u20AC"}),s("input",{type:"number",inputMode:"decimal",min:"0",step:"0.01",placeholder:n,value:e,onInput:o=>t(o.target.value)})]})}function Be({value:e,setValue:t,min:n=0,max:o=99}){return s("div",{className:"stepper",children:[s("button",{type:"button",className:"stepper-btn",onClick:()=>t(Math.max(n,e-1)),disabled:e<=n,"aria-label":"Decrease",children:"\u2212"}),s("div",{className:"stepper-value",children:e}),s("button",{type:"button",className:"stepper-btn",onClick:()=>t(Math.min(o,e+1)),disabled:e>=o,"aria-label":"Increase",children:"+"})]})}function Qe({value:e,options:t,onChange:n}){return s("div",{className:"segmented",role:"radiogroup",children:t.map(o=>s("button",{type:"button",role:"radio","aria-checked":e===o.value,className:"segmented-opt"+(e===o.value?" is-active":""),onClick:()=>n(o.value),children:o.label},o.value))})}function ct({currentRent:e,setCurrentRent:t,earners:n,setEarners:o,children:i,setChildren:r,wfp:l,setWfp:p,wfpAmount:u,setWfpAmount:c,oap:f,setOap:a}){let d=i>0;return s("div",{className:"calc-form",children:[s(W,{label:"Question 1 \u2014 What is your current weekly rent?",hint:"Enter the weekly amount from your rent notice.",children:s(je,{value:e,onChange:t})}),s(W,{label:"Question 2 \u2014 How many wage earners are on the rent book?",hint:"Everyone whose income is assessed in your rent.",children:s(Be,{value:n,setValue:o,min:1,max:8})}),s(W,{label:"Question 3 \u2014 How many non-earning children under 18 are in the household?",hint:"Children with no income of their own \u2014 enter 0 if none.",children:s(Be,{value:i,setValue:r,min:0,max:10})}),d&&s(W,{label:"Question 4 \u2014 Do you receive Working Family Payment (WFP)?",hint:"WFP is a weekly social welfare payment for working families with children. Under the proposed 2026 scheme, WFP would be counted as income for the first time.",children:s(Qe,{value:l?"yes":"no",options:[{value:"no",label:"No"},{value:"yes",label:"Yes"}],onChange:g=>p(g==="yes")})}),d&&l&&s(W,{label:"Question 4b \u2014 If you know your weekly WFP amount, enter it here (optional)",hint:"Check your payment letter or MyWelfare.ie. Leave blank and we will estimate it for you using the standard DSP formula.",children:s(je,{value:u,onChange:c,placeholder:"e.g. 153.00"})}),n===1&&i===0&&s(W,{label:"Question 5 \u2014 Are you the sole occupant, aged 65 or over, on the state pension or less?",hint:"This applies only to single occupants aged 65+ on the state pension rate.",children:s(Qe,{value:f?"yes":"no",options:[{value:"no",label:"No"},{value:"yes",label:"Yes"}],onChange:g=>a(g==="yes")})})]})}function pt({result:e}){let t=e.annualIncrease,n=t>.5,o=t<-.5,i=[];return i.push({text:"This is an estimate. SDCC will calculate your actual 2026 rent using full income information they hold on file. Your actual increase may differ."}),e.wfp?e.wfpOverThreshold?i.push({highlight:!0,text:"WFP NOTE: You said you receive WFP but your implied income may be above the eligibility threshold. If you do receive it, enter the exact amount in Q4b for accuracy."}):e.wfpEstimated?i.push({highlight:!0,text:`WFP ESTIMATED using standard formula (60% of threshold minus your income). Amount used: ${C(e.wfpUsed)}/wk. Enter your actual amount in Q4b if known.`}):i.push({text:`WFP INCLUDED: ${C(e.wfpUsed)}/wk adds ${C(e.wfpExtraRent)}/wk to your 2026 rent (${$e(e.wfpExtraRent*52)} from WFP alone).`}):i.push({text:"Working Family Payment: not applicable based on your answers."}),e.subsidiaryCapFlag?i.push({highlight:!0,text:"ADDITIONAL EARNERS \u2014 YOUR RENT MAY BE LOWER: If any additional earner on your rent book earns more than approximately \u20AC420\u2013\u20AC470/week net, the 2026 scheme could be cheaper for you than shown. The cap of \u20AC40/week per additional earner can outweigh the rate increase on the principal income. This estimate assumes no cap benefit applies \u2014 contact SDCC for a precise calculation."}):i.push({text:"Additional earners: the subsidiary earner cap does not appear to produce a saving at your income level based on your answers."}),e.atMin?i.push({highlight:!0,text:"MINIMUM RENT: Your current rent is at or near the minimum of \u20AC27.40. The 2026 minimum rises to \u20AC35.00 \u2014 an increase of at least \u20AC7.60/week (\u20AC395/year) regardless of income. This is already reflected in the estimate above."}):i.push({text:"Minimum rent: the minimum rises from \u20AC27.40 to \u20AC35.00 in 2026. Already reflected in your estimate above."}),s("div",{className:"result-filled",children:[s("p",{className:"result-eyebrow",children:"Estimated annual rent change"}),s("div",{className:"result-headline"+(n?" up":o?" down":""),children:[n&&s("span",{className:"result-sign",children:"+"}),o&&s("span",{className:"result-sign",children:"\u2212"}),s("span",{className:"result-amount",children:["\u20AC",Math.abs(Math.round(t)).toLocaleString("en-IE")]}),s("span",{className:"result-per",children:"/ year"})]}),s("p",{className:"result-weekly",children:[C(e.weeklyIncrease,{showSign:!0})," per week"]}),s("div",{className:"result-rows",children:[s("div",{className:"result-row",children:[s("span",{children:"Weekly rent now (2025)"}),s("span",{className:"result-row-val",children:C(e.currentRent)})]}),s("div",{className:"result-row",children:[s("span",{children:"2026 rent (excluding WFP impact)"}),s("span",{className:"result-row-val",children:C(e.proposed2026ExclWfp)})]}),e.wfp&&s("div",{className:"result-row",children:[s("span",{children:["Additional rent from WFP (",C(e.wfpUsed)," \xD7 12.5%)"]}),s("span",{className:"result-row-val",children:C(e.wfpExtraRent)})]}),s("div",{className:"result-row",children:[s("span",{children:"Total weekly rent proposed (2026)"}),s("span",{className:"result-row-val",children:C(e.proposed2026)})]}),s("div",{className:"result-row strong",children:[s("span",{children:"Weekly change"}),s("span",{className:"result-row-val",children:C(e.weeklyIncrease,{showSign:!0})})]})]}),s("p",{className:"result-notes-label",children:"Important \u2014 please read"}),s("div",{className:"result-notes",children:i.map((r,l)=>s("div",{className:"result-note"+(r.highlight?" note-highlight":""),children:[s("strong",{children:[l+1,"."]})," ",r.text]},l))})]})}function ut({result:e,campaignUrl:t,onClose:n}){let o=Ue(null);He(()=>{let p=o.current;if(!p)return;p.open||p.showModal();let u=()=>n();return p.addEventListener("close",u),()=>{p.removeEventListener("close",u),p.open&&p.close()}},[]);let i=p=>{p.target===o.current&&o.current.close()},r=e.annualIncrease,l=r>=400;return s("dialog",{ref:o,className:"modal",onClick:i,children:s("div",{className:"modal-inner",children:[s("button",{type:"button",className:"modal-close",onClick:()=>o.current.close(),"aria-label":"Close",children:"\xD7"}),s("div",{className:"modal-result",children:s(pt,{result:e})}),s("div",{className:"modal-cta",children:[s("p",{className:"modal-cta-eyebrow",children:"What to do now"}),s("h2",{className:"modal-cta-title",children:["The vote hasn't happened yet."," ",s("em",{children:"Tell your councillor to oppose it."})]}),s("p",{className:"modal-cta-sub",children:l?`An extra \u20AC${Math.round(r).toLocaleString("en-IE")} a year is a serious hit. Councillors vote on this scheme \u2014 and they pay attention when constituents write in.`:"Even smaller increases compound over time, and many tenants face much larger hikes. Councillors vote on this scheme \u2014 and they pay attention when constituents write in."}),s("div",{className:"modal-cta-actions",children:s("a",{href:t,className:"btn btn-primary",children:["Contact your councillor ",s("span",{className:"btn-arrow",children:"\u2192"})]})}),s("p",{className:"modal-cta-meta",children:"Pre-filled message \xB7 Takes about 2 minutes"})]})]})})}var _t=[{what:"How rent is calculated",now:"10% of total household income + \u20AC3/week fixed charge",proposed:"12.5% of income \u2014 higher rate, fixed charge removed"},{what:"Additional earners",now:"All income counted in full \u2014 no cap",proposed:"Capped at \u20AC40/week per additional earner (= \u20AC320 net weekly income). Higher secondary earners may see rent fall."},{what:"Minimum weekly rent",now:"\u20AC27.40",proposed:"\u20AC35.00 (+\u20AC7.60/wk = +\u20AC395/yr minimum increase)"},{what:"Discount for non-earning children",now:"No discount",proposed:"\u20AC2/week per non-earning child under 18"},{what:"OAP discount (65+, sole occupant, on state pension)",now:"\u20AC10/week (income threshold: \u20AC289.30/wk)",proposed:"\u20AC10/week (income threshold: \u20AC299.30/wk)"},{what:"Working Family Payment (WFP)",now:"Excluded \u2014 did not affect rent",proposed:"Included \u2014 WFP \xD7 12.5% added to weekly rent"},{what:"Child income under 18",now:"Counted as income",proposed:"No longer counted"},{what:"Child maintenance received",now:"Counted as income",proposed:"No longer counted"},{what:"Disablement Benefit",now:"Counted as income",proposed:"No longer counted"}];function dt(){return s("section",{className:"section changes",children:[s("p",{className:"section-label",children:"For reference"}),s("h2",{className:"section-h",children:"What's actually changing in the proposed 2026 scheme."}),s("div",{className:"changes-table",role:"table",children:[s("div",{className:"changes-head",role:"row",children:[s("div",{role:"columnheader",children:"Item"}),s("div",{role:"columnheader",children:"2025 \u2014 now"}),s("div",{role:"columnheader",children:"2026 \u2014 proposed"})]}),_t.map((e,t)=>s("div",{className:"changes-row",role:"row",children:[s("div",{className:"changes-what",role:"cell",children:e.what}),s("div",{className:"changes-now",role:"cell",children:e.now}),s("div",{className:"changes-proposed",role:"cell",children:e.proposed})]},t))]})]})}function ft(){return s("footer",{className:"disclaimer",children:s("div",{className:"disclaimer-inner",children:[s("p",{className:"disclaimer-title",children:"Notes & sources"}),s("ol",{className:"disclaimer-list",children:[s("li",{children:"This is an estimate. SDCC will calculate your actual 2026 rent using the full income information they hold on file. Your real increase may differ."}),s("li",{children:"WFP is estimated using the standard DSP formula: 60% of (income threshold minus household income). Thresholds used are the 2025 DSP rates. Budget 2026 increased thresholds by \u20AC60/week from January 2026 \u2014 if your WFP changed, enter the actual amount in Q4b for accuracy."}),s("li",{children:"Source: SDCC Differential Rent Scheme 2025 (eff. 1 Jan 2025) and proposed 2026 scheme presented to Housing SPC, 14 May 2026. Note: SDCC's own presentation contained an arithmetic error in the 2-child WFP example \u2014 this calculator uses the correct DSP formula throughout. This calculator is for information only and is not an official SDCC document."}),s("li",{children:"Do not change what you pay until SDCC notifies you. The 2026 scheme is a proposal \u2014 it has not been adopted."})]})]})})}function Ye({campaignUrl:e=lt}){let[t,n]=A(""),[o,i]=A(1),[r,l]=A(0),[p,u]=A(!1),[c,f]=A(""),[a,d]=A(!1),[_,g]=A(!1),k=b=>{l(b),b===0&&(u(!1),f(""))},y=b=>{i(b),b>1&&d(!1)},h=_e(()=>{let b=parseFloat(t);return!b||b<=0?null:Oe({currentRent:b,earners:o,children:r,wfp:p,wfpAmount:c,oap:a})},[t,o,r,p,c,a]),m=!!h&&h.hasResult;return s("div",{className:"root",children:[s("main",{className:"main",children:[s("section",{className:"section",children:[s("p",{className:"section-label",children:"The calculator"}),s("h2",{className:"section-h",children:"Your details, your estimate."}),s("div",{className:"calc-column",children:[s(ct,{currentRent:t,setCurrentRent:n,earners:o,setEarners:y,children:r,setChildren:k,wfp:p,setWfp:u,wfpAmount:c,setWfpAmount:f,oap:a,setOap:d}),s("div",{className:"calc-submit",children:[s("button",{type:"button",className:"btn btn-primary",disabled:!m,onClick:()=>g(!0),children:["See my estimate ",s("span",{className:"btn-arrow",children:"\u2192"})]}),!m&&s("span",{className:"calc-submit-hint",children:"Enter your weekly rent to continue."})]})]})]}),s(dt,{}),s(ft,{})]}),_&&m&&s(ut,{result:h,campaignUrl:e,onClose:()=>g(!1)})]})}var Ve=`
2
2
  :host {
3
3
  display: block;
4
+
4
5
  --bg: #f2f1ef;
5
6
  --bg-2: #ece9e3;
6
7
  --paper: #ffffff;
8
+
7
9
  --ink: #161616;
8
10
  --ink-soft: #555049;
9
11
  --ink-faint: #8e8a82;
10
- --line-soft: rgba(22, 22, 22, 0.16);
11
- --line-faint: rgba(22, 22, 22, 0.08);
12
+
12
13
  --accent: #e71d4f;
13
- --accent-deep:#b81540;
14
14
  --good: #1f6e4d;
15
15
 
16
+ /* Derived \u2014 only override if you specifically want to break the link. */
17
+ --accent-deep: color-mix(in oklab, var(--accent), #000 22%);
18
+ --line-soft: color-mix(in srgb, var(--ink) 16%, transparent);
19
+ --line-faint: color-mix(in srgb, var(--ink) 8%, transparent);
20
+
16
21
  --font: Inter, ui-sans-serif, system-ui, sans-serif,
17
22
  "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
18
23
 
@@ -68,15 +73,28 @@
68
73
  max-width: 30ch;
69
74
  }
70
75
 
71
- /* \u2500\u2500 Two-column grid (form + result) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
72
- .grid {
73
- display: grid;
74
- grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
75
- gap: 64px;
76
- align-items: start;
76
+ /* \u2500\u2500 Form column (single column, capped width for readability) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
77
+ .calc-column {
78
+ max-width: 640px;
79
+ display: flex;
80
+ flex-direction: column;
81
+ gap: 32px;
82
+ }
83
+ .calc-submit {
84
+ display: flex;
85
+ align-items: center;
86
+ gap: 16px;
87
+ flex-wrap: wrap;
77
88
  }
78
- @media (max-width: 960px) {
79
- .grid { grid-template-columns: 1fr; gap: 40px; }
89
+ .calc-submit .btn-primary:disabled {
90
+ background: var(--ink-faint);
91
+ border-color: var(--ink-faint);
92
+ cursor: not-allowed;
93
+ }
94
+ .calc-submit-hint {
95
+ font-style: italic;
96
+ font-size: 14px;
97
+ color: var(--ink-faint);
80
98
  }
81
99
 
82
100
  /* \u2500\u2500 Form fields \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
@@ -194,38 +212,7 @@
194
212
  .segmented-opt:hover { background: var(--bg-2); }
195
213
  .segmented-opt.is-active { background: var(--ink); color: var(--bg); }
196
214
 
197
- /* \u2500\u2500 Result panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
198
- .result-card {
199
- position: sticky;
200
- top: 24px;
201
- }
202
- @media (max-width: 960px) { .result-card { position: static; } }
203
-
204
- .result-empty {
205
- border: 1px dashed var(--line-soft);
206
- padding: 48px 32px;
207
- }
208
- .result-empty-label {
209
- font-style: italic;
210
- font-weight: 500;
211
- font-size: 15px;
212
- color: var(--accent);
213
- margin: 0 0 10px;
214
- }
215
- .result-empty-title {
216
- font-weight: 700;
217
- font-size: 26px;
218
- letter-spacing: -0.02em;
219
- margin: 0 0 8px;
220
- line-height: 1.15;
221
- }
222
- .result-empty-sub {
223
- color: var(--ink-soft);
224
- font-size: 15.5px;
225
- line-height: 1.55;
226
- margin: 0;
227
- }
228
-
215
+ /* \u2500\u2500 Result panel (always rendered inside the modal) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
229
216
  .result-eyebrow {
230
217
  font-style: italic;
231
218
  font-weight: 500;
@@ -315,58 +302,7 @@
315
302
  font-weight: 500;
316
303
  }
317
304
 
318
- /* \u2500\u2500 Call to action \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
319
- .cta {
320
- background: var(--ink);
321
- color: var(--bg);
322
- margin: 0 calc(-1 * var(--gutter));
323
- padding: 88px var(--gutter);
324
- }
325
- .cta-inner {
326
- max-width: var(--max);
327
- margin: 0 auto;
328
- display: grid;
329
- grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
330
- gap: 64px;
331
- align-items: end;
332
- }
333
- @media (max-width: 900px) {
334
- .cta { padding: 56px var(--gutter); }
335
- .cta-inner { grid-template-columns: 1fr; gap: 36px; }
336
- }
337
-
338
- .cta-eyebrow {
339
- font-style: italic;
340
- font-weight: 500;
341
- font-size: 16px;
342
- color: var(--accent);
343
- margin: 0 0 14px;
344
- }
345
- .cta-title {
346
- font-weight: 700;
347
- font-size: clamp(32px, 4.5vw, 52px);
348
- line-height: 1.05;
349
- letter-spacing: -0.03em;
350
- margin: 0 0 24px;
351
- color: var(--bg);
352
- max-width: 22ch;
353
- }
354
- .cta-title em { font-style: normal; color: var(--accent); }
355
- .cta-sub {
356
- font-size: 17px;
357
- line-height: 1.55;
358
- color: rgba(242, 241, 239, 0.78);
359
- margin: 0 0 32px;
360
- max-width: 52ch;
361
- }
362
- .cta-actions {
363
- display: flex;
364
- gap: 20px;
365
- flex-wrap: wrap;
366
- margin-bottom: 16px;
367
- align-items: center;
368
- }
369
-
305
+ /* \u2500\u2500 Buttons \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
370
306
  .btn {
371
307
  display: inline-flex;
372
308
  align-items: center;
@@ -391,56 +327,106 @@
391
327
  }
392
328
  .btn-arrow { font-size: 18px; }
393
329
 
394
- .cta-meta {
395
- font-style: italic;
396
- font-size: 14px;
397
- color: rgba(242, 241, 239, 0.55);
398
- margin: 0;
330
+ /* \u2500\u2500 Result modal \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
331
+ .modal {
332
+ border: 0;
333
+ padding: 0;
334
+ background: transparent;
335
+ max-width: min(1100px, 96vw);
336
+ max-height: 92vh;
337
+ width: 100%;
338
+ color: var(--ink);
339
+ }
340
+ .modal::backdrop {
341
+ background: rgba(0, 0, 0, 0.55);
342
+ backdrop-filter: blur(2px);
343
+ }
344
+ .modal-inner {
345
+ position: relative;
346
+ background: var(--paper);
347
+ display: grid;
348
+ grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
349
+ max-height: 92vh;
350
+ overflow: hidden;
351
+ }
352
+ @media (max-width: 860px) {
353
+ .modal-inner { grid-template-columns: 1fr; }
399
354
  }
400
355
 
401
- .cta-side {
402
- border-left: 1px solid rgba(242, 241, 239, 0.2);
403
- padding-left: 36px;
356
+ .modal-close {
357
+ position: absolute;
358
+ top: 12px;
359
+ right: 12px;
360
+ width: 40px;
361
+ height: 40px;
362
+ border: 0;
363
+ background: transparent;
364
+ color: var(--bg);
365
+ font-size: 28px;
366
+ line-height: 1;
367
+ cursor: pointer;
368
+ z-index: 2;
369
+ border-radius: 50%;
370
+ display: flex;
371
+ align-items: center;
372
+ justify-content: center;
404
373
  }
405
- @media (max-width: 900px) {
406
- .cta-side {
407
- border-left: 0;
408
- padding-left: 0;
409
- border-top: 1px solid rgba(242, 241, 239, 0.2);
410
- padding-top: 32px;
411
- }
374
+ .modal-close:hover { background: color-mix(in srgb, var(--bg) 18%, transparent); }
375
+ @media (max-width: 860px) {
376
+ .modal-close { color: var(--ink); }
377
+ .modal-close:hover { background: var(--bg-2); }
378
+ }
379
+
380
+ .modal-result {
381
+ padding: 40px clamp(24px, 4vw, 48px);
382
+ overflow-y: auto;
412
383
  }
413
384
 
414
- .cta-side-label {
385
+ .modal-cta {
386
+ background: var(--ink);
387
+ color: var(--bg);
388
+ padding: 40px clamp(24px, 4vw, 48px);
389
+ display: flex;
390
+ flex-direction: column;
391
+ justify-content: center;
392
+ overflow-y: auto;
393
+ }
394
+ .modal-cta-eyebrow {
415
395
  font-style: italic;
416
396
  font-weight: 500;
417
397
  font-size: 16px;
418
398
  color: var(--accent);
419
- margin: 0 0 16px;
399
+ margin: 0 0 14px;
420
400
  }
421
- .cta-side-list {
422
- list-style: none;
423
- margin: 0;
424
- padding: 0;
425
- display: flex;
426
- flex-direction: column;
427
- gap: 16px;
428
- counter-reset: step;
429
- }
430
- .cta-side-list li {
431
- font-size: 15.5px;
432
- color: rgba(242, 241, 239, 0.88);
433
- line-height: 1.5;
434
- padding-left: 32px;
435
- position: relative;
436
- counter-increment: step;
437
- }
438
- .cta-side-list li::before {
439
- content: counter(step) ".";
440
- position: absolute;
441
- left: 0;
442
- font-weight: 700;
443
- color: var(--accent);
401
+ .modal-cta-title {
402
+ font-weight: 700;
403
+ font-size: clamp(26px, 3.4vw, 38px);
404
+ line-height: 1.08;
405
+ letter-spacing: -0.025em;
406
+ margin: 0 0 20px;
407
+ color: var(--bg);
408
+ max-width: 22ch;
409
+ }
410
+ .modal-cta-title em { font-style: normal; color: var(--accent); }
411
+ .modal-cta-sub {
412
+ font-size: 16px;
413
+ line-height: 1.55;
414
+ color: color-mix(in srgb, var(--bg) 78%, transparent);
415
+ margin: 0 0 28px;
416
+ max-width: 42ch;
417
+ }
418
+ .modal-cta-actions {
419
+ display: flex;
420
+ gap: 16px;
421
+ flex-wrap: wrap;
422
+ align-items: center;
423
+ margin-bottom: 14px;
424
+ }
425
+ .modal-cta-meta {
426
+ font-style: italic;
427
+ font-size: 13.5px;
428
+ color: color-mix(in srgb, var(--bg) 55%, transparent);
429
+ margin: 0;
444
430
  }
445
431
 
446
432
  /* \u2500\u2500 What's changing table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
@@ -520,4 +506,4 @@
520
506
  }
521
507
  .disclaimer-list li { margin-bottom: 10px; padding-left: 4px; }
522
508
  .disclaimer-list li::marker { color: var(--accent); }
523
- `;var z="sdcc-rent-calculator",dt="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";function ft(){if(typeof document>"u"||document.querySelector(`link[data-${z}-font]`))return;let e=document.createElement("link");e.rel="preconnect",e.href="https://fonts.googleapis.com";let t=document.createElement("link");t.rel="preconnect",t.href="https://fonts.gstatic.com",t.crossOrigin="";let n=document.createElement("link");n.rel="stylesheet",n.href=dt,n.setAttribute(`data-${z}-font`,""),document.head.append(e,t,n)}var _e=class extends HTMLElement{static get observedAttributes(){return["campaign-url"]}constructor(){super(),this._root=this.attachShadow({mode:"open"}),this._container=null,this._ready=!1}connectedCallback(){ft();let t=document.createElement("style");t.textContent=Ye,this._container=document.createElement("div"),this._root.append(t,this._container),this._render(),this._ready||(this._ready=!0,this.dispatchEvent(new CustomEvent(`${z}:ready`,{bubbles:!0,composed:!0})))}disconnectedCallback(){this._container&&se(null,this._container)}attributeChangedCallback(){this._container&&this._render()}_render(){let t=this.getAttribute("campaign-url")||void 0;se(re(je,{campaignUrl:t}),this._container)}};typeof customElements<"u"&&!customElements.get(z)&&customElements.define(z,_e);})();
509
+ `;var L="sdcc-rent-calculator",mt="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap";function ht(){if(typeof document>"u"||document.querySelector(`link[data-${L}-font]`))return;let e=document.createElement("link");e.rel="preconnect",e.href="https://fonts.googleapis.com";let t=document.createElement("link");t.rel="preconnect",t.href="https://fonts.gstatic.com",t.crossOrigin="";let n=document.createElement("link");n.rel="stylesheet",n.href=mt,n.setAttribute(`data-${L}-font`,""),document.head.append(e,t,n)}var de=class extends HTMLElement{static get observedAttributes(){return["campaign-url"]}constructor(){super(),this._root=this.attachShadow({mode:"open"}),this._container=null,this._ready=!1}connectedCallback(){ht();let t=document.createElement("style");t.textContent=Ve,this._container=document.createElement("div"),this._root.append(t,this._container),this._render(),this._ready||(this._ready=!0,this.dispatchEvent(new CustomEvent(`${L}:ready`,{bubbles:!0,composed:!0})))}disconnectedCallback(){this._container&&le(null,this._container)}attributeChangedCallback(){this._container&&this._render()}_render(){let t=this.getAttribute("campaign-url")||void 0;le(ae(Ye,{campaignUrl:t}),this._container)}};typeof customElements<"u"&&!customElements.get(L)&&customElements.define(L,de);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdcc-rent-calculator",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Embeddable web component that estimates the rent increase a South Dublin County Council tenant would face under the proposed 2026 Differential Rent Scheme.",
5
5
  "type": "module",
6
6
  "main": "dist/sdcc-rent-calculator.js",