PageSourceSearch

https://bali-home-immo.com/build/assets/Detail-DrqcH0PH.js

js bali-home-immo.com collected 2026-09-25 08:53:40 UTC 66,011 bytes, 48 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeMap-CQwPcoQ9.js","assets/app-DCuWXaXT.js","assets/app-DcGAhCFR.css","assets/PropertyCard-Du3BAVsC.js","assets/popover-DcRx-AGP.js","assets/urls-CF0xdxB2.js","assets/button-DOBDoBsG.js","assets/x-Dkq04ed_.js","assets/skeleton-5ybbkiQG.js","assets/ZohoFormModal-BLtFKlLB.js","assets/ContactAgentForm-sV6JDsbC.js","assets/useZohoFormSubmit-8hdy1Cob.js","assets/RoiEstimationForm-Bhr-q6Zq.js","assets/circle-check-BlUL7RGt.js","assets/SellRentPropertyForm-DgShsSTx.js","assets/carousel-DaHo7zru.js","assets/arrow-right-BbFve0rN.js","assets/map-pin-BMUvkw-q.js","assets/play-DnH2SKh6.js","assets/file-text-B3-iAZRM.js","assets/map-BxrK9PqY.js"])))=>i.map(i=>d[i]);
2import{j as e,c as jt,g as Xt,u as yt,r as w,a as Jt,_ as Nt}from"./app-DCuWXaXT.js";import{u as Zt}from"./index-BIndOrcd.js";import{S as ea,G as ta}from"./GuestLayout-DbLFvpRm.js";import{S as aa}from"./SeoHead-Bj2ZEkoE.js";import{C as ce,a as de,b as he,P as me,c as ue,d as fe,I as sa,T as ia}from"./carousel-DaHo7zru.js";import Ze from"./ZohoFormModal-BLtFKlLB.js";import ra from"./ContactAgentForm-sV6JDsbC.js";import{R as na}from"./RoiEstimationForm-Bhr-q6Zq.js";import"./SellRentPropertyForm-DgShsSTx.js";import"./useZohoFormSubmit-8hdy1Cob.js";import{u as la,H as et,D as xe,b as ge,c as pe}from"./button-DOBDoBsG.js";import{c as q,M as Q,H as oa}from"./urls-CF0xdxB2.js";import{M as tt}from"./map-pin-BMUvkw-q.js";import{X as ca}from"./x-Dkq04ed_.js";import{S as at}from"./share-2-Cxri8iZ5.js";import{T as da}from"./tag-D-u19GwO.js";import{S as ha}from"./sparkles-BY3VOs4Y.js";import{B as ma}from"./BreadcrumbSchema-BF95ByzK.js";import{J as be}from"./JsonLd-ClCMaFe7.js";import"./Container-0UrEf30s.js";import"./popover-DcRx-AGP.js";import"./sliders-horizontal-BhyFrd7r.js";import"./arrow-right-BbFve0rN.js";import"./circle-check-BlUL7RGt.js";const ua=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],fa=q("chart-pie",ua);const xa=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ga=q("copy",xa);const pa=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],ba=q("link",pa);const va=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],st=q("printer",va);const wa=[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}
2]],it=q("receipt-text",wa);const ja=[["path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4",key:"foxbe7"}],["path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3",key:"18arnh"}],["path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35",key:"ywahnh"}],["path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14",key:"ft0feo"}]],ya=q("tree-palm",ja),Ee=(t="")=>t.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),Be=(t,l)=>t.length>l?`${t.slice(0,l-1).trimEnd()}…`:t,Na=({property:t,baseUrl:l,appName:s,locale:o})=>{const d=`${l||"https://bali-home-immo.com"}/assets-v2/images/top-featured-banner.jpg`,r=t.images?.length?t.images:[d],h=t.seo?.description?Ee(t.seo.description):"",n=`View details of this ${t.category||"property"} ${t.property_id} in ${t.area||"Bali"}`,i=Be(h||n,200),a=Number(t.price)||null,m=!t.is_price_on_request&&a,c=t.seo?.canonical||l,u=`${c}#product`,g={shippingDetails:{"@type":"OfferShippingDetails",shippingRate:{"@type":"MonetaryAmount",value:0,currency:"IDR"},shippingLabel:"Service at location. Not shipped.",shippingDestination:{"@type":"DefinedRegion",addressCountry:"ID"},deliveryTime:{"@type":"ShippingDeliveryTime",handlingTime:{"@type":"QuantitativeValue",minValue:0,maxValue:0,unitCode:"DAY"},transitTime:{"@type":"QuantitativeValue",minValue:0,maxValue:0,unitCode:"DAY"}}},hasMerchantReturnPolicy:{"@type":"MerchantReturnPolicy",applicableCountry:"ID",returnPolicyCategory:"https://schema.org/MerchantReturnNotPermitted"}},x={"@type":"Offer",url:c,priceCurrency:"IDR",...m?{price:String(a)}:{},priceValidUntil:`${new Date().getFullYear()+1}-12-31`,availability:t.is_archived?"https://schema.org/Discontinued":"https://schema.org/InStock",...g};return{"@context":"https://schema.org","@type":"Product","@id":u,name:t.name||"Property",description:i,image:r,url:c,sku:t.property_id||"0",mpn:t.property_id||"0",brand:{"@type":"Brand",name:s},offers:x}},_a=({property:t,baseUrl:l,locale:s})=>{const o=t.seo?.description?Ee(t.seo.description):"",d=`View more details of this ${t.category||"property"} ${t.property_id} in ${t.area||"Bali"}.`,r=Be(o||d,200),h=t.seo?.canonical||l,n=Number(t.price)||null,i=!t.is_price_on_request&&n,a=`${h}#real-estate-listing`,m=`${h}#product`,c=`${h}#residence`,u=`${l||"https://bali-home-immo.com"}/assets-v2/images/top-featured-banner.jpg`,g=t.images?.length?t.images:[u],x=new Date().getFullYear()+1;return{"@context":"https://schema.org","@type":"RealEstateListing","@id":a,name:t.name||"Property",description:r,image:g,url:h,about:{"@id":m},offers:{"@type":"Offer",availability:"https://schema.org/InStock",priceCurrency:"IDR",priceValidUntil:`${x}-12-31`,...i?{price:n}:{}},mainEntity:{"@type":"Residence","@id":c,address:{"@type":"PostalAddress",addressLocality:t.area||"Bali",addressRegion:"Bali",addressCountry:"ID"}},inLanguage:["en","id","fr"]}},ka=({property:t,baseUrl:l,appName:s})=>{if(!t.video_id)return null;const o=t.name||"Property",d=Ee(t.description||""),r=t.seo?.canonical||l;return{"@context":"https://schema.org","@type":"VideoObject","@id":`${r}#video`,name:`${o} - Virtual Tour & Property Video`,description:Be(`Virtual video tour of ${o} in ${t.area||"Bali"}. ${d}`,280),thumbnailUrl:[`https://img.youtube.com/vi/${t.video_id}/maxresdefault.jpg`,`https://img.youtube.com/vi/${t.video_id}/hqdefault.jpg`],contentUrl:`https://www.youtube.com/watch?v=${t.video_id}`,embedUrl:`https://www.youtube.com/embed/${t.video_id}`,uploadDate:t.video_upload_date||t.created_at_iso||t.created_at||new Date().toISOString(),publisher:{"@type":"Organization",name:s,logo:{"@type":"ImageObject",url:`${l}/systems/images/logo.png`}},about:{"@id":`${r}#product`}}};function Ca({property:t,appName:l,baseUrl:s,locale:o}){if(!t)return null;const d=Na({property:t,baseUrl:s,appName:l,locale:o}),r=_a({property:t,baseUrl:s,locale:o}),h=ka({property:t,baseUrl:s,appName:l});return e.jsxs(e.Fragment,{children:[e.jsx(be,{data:d,headKey:"schema-property-detail-product"}),e.jsx(be,{data:r,headKey:"schema-property-detail-listing"}
2),h&&e.jsx(be,{data:h,headKey:"schema-property-detail-video"})]})}function Ta({property:t,breadcrumbs:l}){const s=[t.name,t.property_id].filter(Boolean).join(" - ");return e.jsxs("section",{className:"relative w-full min-h-[300px] h-auto flex flex-col items-center justify-center bg-black/60 overflow-hidden pt-30 pb-10",children:[e.jsx("div",{className:"absolute inset-0 z-0 bg-cover bg-center",style:{backgroundImage:"url('/assets-v2/images/top-featured-banner.jpg')"},children:e.jsx("div",{className:"absolute inset-0 bg-black/50 mix-blend-multiply"})}),e.jsxs("div",{className:"relative z-10 w-full max-w-7xl px-4 sm:px-6 lg:px-8 text-center text-white flex flex-col items-center justify-center h-full pb-6 mt-10",children:[e.jsx("h1",{className:"font-heading text-2xl uppercase tracking-wider drop-shadow-md leading-tight mt-12 mb-2",children:s}),t?.is_archived&&e.jsx("div",{className:"mb-3 inline-flex items-center px-3 py-1 rounded-[2px] bg-red-600/90 text-white text-xs font-bold uppercase tracking-wider shadow-sm",children:"Not Available"}),l?.length>0&&e.jsx("nav",{className:"flex justify-center","aria-label":"Breadcrumb",children:e.jsx("ol",{className:"inline-flex flex-wrap items-center justify-center gap-y-2 rounded-md border border-white/20 bg-black/10 px-3 py-1 text-xs text-white/80 backdrop-blur-sm",children:l.map((o,d)=>{const r=d===l.length-1;return e.jsxs("li",{className:"inline-flex items-center",children:[d>0&&e.jsx("span",{className:"mx-1.5 text-white/40",children:"/"}),o.active||r||!o.url?e.jsx("span",{className:"font-heading text-white","aria-current":"page",children:o.label}):e.jsx("a",{href:o.url,className:"font-heading text-white/80 transition-colors duration-200 hover:text-white",children:o.label})]},d)})})})]})]})}const Pa=t=>!t||isNaN(t)?t:new Intl.NumberFormat("id-ID",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0}).format(t);var W={},ve={exports:{}},we,rt;function Sa(){if(rt)return we;rt=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return we=t,we}var je,nt;function Ra(){if(nt)return je;nt=1;var t=Sa();function l(){}function s(){}return s.resetWarningCache=l,je=function(){function o(h,n,i,a,m,c){if(c!==t){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}o.isRequired=o;function d(){return o}var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:d,element:o,elementType:o,instanceOf:d,node:o,objectOf:d,oneOf:d,oneOfType:d,shape:d,exact:d,checkPropTypes:s,resetWarningCache:l};return r.PropTypes=r,r},je}var lt;function _t(){return lt||(lt=1,ve.exports=Ra()()),ve.exports}var ye,ot;function kt(){return ot||(ot=1,ye={L:1,M:0,Q:3,H:2}),ye}var Ne,ct;function Ct(){return ct||(ct=1,Ne={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),Ne}var _e,dt;function La(){if(dt)return _e;dt=1;var t=Ct();function l(s){this.mode=t.MODE_8BIT_BYTE,this.data=s}return l.prototype={getLength:function(s){return this.data.length},write:function(s){for(var o=0;o<this.data.length;o++)s.put(this.data.charCodeAt(o),8)}},_e=l,_e}var ke,ht;function Ea(){if(ht)return ke;ht=1;var t=kt();function l(s,o){this.totalCount=s,this.dataCount=o}return l.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],l.getRSBlocks=function(s,o){var d=l.getRsBlockTable(s,o);if(d==null)throw new Error("bad rs block @ typeNumber:"+s+"/errorCorrectLevel:"+o);for(var r=d.length/3,h=new Array,n=0;n<r;n++)for(var i=d[n*3+0],a=d[n*3+1],m=d[n*3+2],c=0;c<i;c++)h.push(new l(a,m));return h},l.getRsBlockTable=function(s,o){switch(o){case t.L:return l.RS_BLOCK_TABLE[(s-1)*4+0];case t.M:return l.RS_BLOCK_TABLE[(s-1)*4+1];case t.Q:return l.RS_BLOCK_TABLE[(s-1)*4+2];case t.H:return l.RS_BLOCK_TABLE[(s-1)*4+3];default:return}},ke=l,ke}var Ce,mt;function Ba(){if(mt)return Ce;mt=1;function t(){this.buffer=new Array,this.length=0}return t.prototype={get:function(l){var s=Math.floor(l/8);return(this.buffer[s]>>>7-l%8&1)==1},put:function(l,s){for(var o=0;o<s;o++)this.putBit((l>>>s-o-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(l){var s=Math.floor(this.length/8);this.buffer.length<=s&&this.buffer.push(0),l&&(this.buffer[s]|=128>>>this.length%8),this.length++}},Ce=t,Ce}var Te,ut;
2function Tt(){if(ut)return Te;ut=1;for(var t={glog:function(s){if(s<1)throw new Error("glog("+s+")");return t.LOG_TABLE[s]},gexp:function(s){for(;s<0;)s+=255;for(;s>=256;)s-=255;return t.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},l=0;l<8;l++)t.EXP_TABLE[l]=1<<l;for(var l=8;l<256;l++)t.EXP_TABLE[l]=t.EXP_TABLE[l-4]^t.EXP_TABLE[l-5]^t.EXP_TABLE[l-6]^t.EXP_TABLE[l-8];for(var l=0;l<255;l++)t.LOG_TABLE[t.EXP_TABLE[l]]=l;return Te=t,Te}var Pe,ft;function Pt(){if(ft)return Pe;ft=1;var t=Tt();function l(s,o){if(s.length==null)throw new Error(s.length+"/"+o);for(var d=0;d<s.length&&s[d]==0;)d++;this.num=new Array(s.length-d+o);for(var r=0;r<s.length-d;r++)this.num[r]=s[r+d]}return l.prototype={get:function(s){return this.num[s]},getLength:function(){return this.num.length},multiply:function(s){for(var o=new Array(this.getLength()+s.getLength()-1),d=0;d<this.getLength();d++)for(var r=0;r<s.getLength();r++)o[d+r]^=t.gexp(t.glog(this.get(d))+t.glog(s.get(r)));return new l(o,0)},mod:function(s){if(this.getLength()-s.getLength()<0)return this;for(var o=t.glog(this.get(0))-t.glog(s.get(0)),d=new Array(this.getLength()),r
2=0;r<this.getLength();r++)d[r]=this.get(r);for(var r=0;r<s.getLength();r++)d[r]^=t.gexp(t.glog(s.get(r))+o);return new l(d,0).mod(s)}},Pe=l,Pe}var Se,xt;function Da(){if(xt)return Se;xt=1;var t=Ct(),l=Pt(),s=Tt(),o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},d={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(r){for(var h=r<<10;d.getBCHDigit(h)-d.getBCHDigit(d.G15)>=0;)h^=d.G15<<d.getBCHDigit(h)-d.getBCHDigit(d.G15);return(r<<10|h)^d.G15_MASK},getBCHTypeNumber:function(r){for(var h=r<<12;d.getBCHDigit(h)-d.getBCHDigit(d.G18)>=0;)h^=d.G18<<d.getBCHDigit(h)-d.getBCHDigit(d.G18);return r<<12|h},getBCHDigit:function(r){for(var h=0;r!=0;)h++,r>>>=1;return h},getPatternPosition:function(r){return d.PATTERN_POSITION_TABLE[r-1]},getMask:function(r,h,n){switch(r){case o.PATTERN000:return(h+n)%2==0;case o.PATTERN001:return h%2==0;case o.PATTERN010:return n%3==0;case o.PATTERN011:return(h+n)%3==0;case o.PATTERN100:return(Math.floor(h/2)+Math.floor(n/3))%2==0;case o.PATTERN101:return h*n%2+h*n%3==0;case o.PATTERN110:return(h*n%2+h*n%3)%2==0;case o.PATTERN111:return(h*n%3+(h+n)%2)%2==0;default:throw new Error("bad maskPattern:"+r)}},getErrorCorrectPolynomial:function(r){for(var h=new l([1],0),n=0;n<r;n++)h=h.multiply(new l([1,s.gexp(n)],0));return h},getLengthInBits:function(r,h){if(1<=h&&h<10)switch(r){case t.MODE_NUMBER:return 10;case t.MODE_ALPHA_NUM:return 9;case t.MODE_8BIT_BYTE:return 8;case t.MODE_KANJI:return 8;default:throw new Error("mode:"+r)}else if(h<27)switch(r){case t.MODE_NUMBER:return 12;case t.MODE_ALPHA_NUM:return 11;case t.MODE_8BIT_BYTE:return 16;case t.MODE_KANJI:return 10;default:throw new Error("mode:"+r)}else if(h<41)switch(r){case t.MODE_NUMBER:return 14;case t.MODE_ALPHA_NUM:return 13;case t.MODE_8BIT_BYTE:return 16;case t.MODE_KANJI:return 12;default:throw new Error("mode:"+r)}else throw new Error("type:"+h)},getLostPoint:function(r){for(var h=r.getModuleCount(),n=0,i=0;i<h;i++)for(var a=0;a<h;a++){for(var m=0,c=r.isDark(i,a),u=-1;u<=1;u++)if(!(i+u<0||h<=i+u))for(var g=-1;g<=1;g++)a+g<0||h<=a+g||u==0&&g==0||c==r.isDark(i+u,a+g)&&m++;m>5&&(n+=3+m-5)}for(var i=0;i<h-1;i++)for(var a=0;a<h-1;a++){var x=0;r.isDark(i,a)&&x++,r.isDark(i+1,a)&&x++,r.isDark(i,a+1)&&x++,r.isDark(i+1,a+1)&&x++,(x==0||x==4)&&(n+=3)}for(var i=0;i<h;i++)for(var a=0;a<h-6;a++)r.isDark(i,a)&&!r.isDark(i,a+1)&&r.isDark(i,a+2)&&r.isDark(i,a+3)&&r.isDark(i,a+4)&&!r.isDark(i,a+5)&&r.isDark(i,a+6)&&(n+=40);for(var a=0;a<h;a++)for(var i=0;i<h-6;i++)r.isDark(i,a)&&!r.isDark(i+1,a)&&r.isDark(i+2,a)&&r.isDark(i+3,a)&&r.isDark(i+4,a)&&!r.isDark(i+5,a)&&r.isDark(i+6,a)&&(n+=40);for(var v=0,a=0;a<h;a++)for(var i=0;i<h;i++)r.isDark(i,a)&&v++;var N=Math.abs(100*v/h/h-50)/5;return n+=N*10,n}};return Se=d,Se}var Re,gt;function Ma(){if(gt)return Re;gt=1;var t=La(),l=Ea(),s=Ba(),o=Da(),d=Pt();function r(n,i){this.typeNumber=n,this.errorCorrectLevel=i,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var h=r.prototype;return h.addData=function(n){var i=new t(n);this.dataList.push(i),this.dataCache=null},h.isDark=function(n,i){if(n<0||this.moduleCount<=n||i<0||this.moduleCount<=i)throw new Error(n+","+i);return this.modules[n][i]},h.getModuleCount=function(){return this.moduleCount},h.make=function(){if(this.typeNumber<1){var n=1;for(n=1;n<40;n++){for(var i=l.getRSBlocks(n,this.errorCorrectLevel),a=new s,m=0,c=0;c<i.length;c++)m+=i[c].dataCount;for(var c=0;c<this.dataList.length;c++){var u=this.dataList[c];a.put(u.mode,4),a.put(u.getLength(),o.getLengthInBits(u.mode,n)),u.write(a)}if(a.getLengthInBits()<=m*8)break}
2this.typeNumber=n}this.makeImpl(!1,this.getBestMaskPattern())},h.makeImpl=function(n,i){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var a=0;a<this.moduleCount;a++){this.modules[a]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[a][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(n,i),this.typeNumber>=7&&this.setupTypeNumber(n),this.dataCache==null&&(this.dataCache=r.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,i)},h.setupPositionProbePattern=function(n,i){for(var a=-1;a<=7;a++)if(!(n+a<=-1||this.moduleCount<=n+a))for(var m=-1;m<=7;m++)i+m<=-1||this.moduleCount<=i+m||(0<=a&&a<=6&&(m==0||m==6)||0<=m&&m<=6&&(a==0||a==6)||2<=a&&a<=4&&2<=m&&m<=4?this.modules[n+a][i+m]=!0:this.modules[n+a][i+m]=!1)},h.getBestMaskPattern=function(){for(var n=0,i=0,a=0;a<8;a++){this.makeImpl(!0,a);var m=o.getLostPoint(this);(a==0||n>m)&&(n=m,i=a)}return i},h.createMovieClip=function(n,i,a){var m=n.createEmptyMovieClip(i,a),c=1;this.make();for(var u=0;u<this.modules.length;u++)for(var g=u*c,x=0;x<this.modules[u].length;x++){var v=x*c,N=this.modules[u][x];N&&(m.beginFill(0,100),m.moveTo(v,g),m.lineTo(v+c,g),m.lineTo(v+c,g+c),m.lineTo(v,g+c),m.endFill())}return m},h.setupTimingPattern=function(){for(var n=8;n<this.moduleCount-8;n++)this.modules[n][6]==null&&(this.modules[n][6]=n%2==0);for(var i=8;i<this.moduleCount-8;i++)this.modules[6][i]==null&&(this.modules[6][i]=i%2==0)},h.setupPositionAdjustPattern=function(){for(var n=o.getPatternPosition(this.typeNumber),i=0;i<n.length;i++)for(var a=0;a<n.length;a++){var m=n[i],c=n[a];if(this.modules[m][c]==null)for(var u=-2;u<=2;u++)for(var g=-2;g<=2;g++)u==-2||u==2||g==-2||g==2||u==0&&g==0?this.modules[m+u][c+g]=!0:this.modules[m+u][c+g]=!1}},h.setupTypeNumber=function(n){for(var i=o.getBCHTypeNumber(this.typeNumber),a=0;a<18;a++){var m=!n&&(i>>a&1)==1;this.modules[Math.floor(a/3)][a%3+this.moduleCount-8-3]=m}for(var a=0;a<18;a++){var m=!n&&(i>>a&1)==1;this.modules[a%3+this.moduleCount-8-3][Math.floor(a/3)]=m}},h.setupTypeInfo=function(n,i){for(var a=this.errorCorrectLevel<<3|i,m=o.getBCHTypeInfo(a),c=0;c<15;c++){var u=!n&&(m>>c&1)==1;c<6?this.modules[c][8]=u:c<8?this.modules[c+1][8]=u:this.modules[this.moduleCount-15+c][8]=u}for(var c=0;c<15;c++){var u=!n&&(m>>c&1)==1;c<8?this.modules[8][this.moduleCount-c-1]=u:c<9?this.modules[8][15-c-1+1]=u:this.modules[8][15-c-1]=u}this.modules[this.moduleCount-8][8]=!n},h.mapData=function(n,i){for(var a=-1,m=this.moduleCount-1,c=7,u=0,g=this.moduleCount-1;g>0;g-=2)for(g==6&&g--;;){for(var x=0;x<2;x++)if(this.modules[m][g-x]==null){var v=!1;u<n.length&&(v=(n[u]>>>c&1)==1);var N=o.getMask(i,m,g-x);N&&(v=!v),this.modules[m][g-x]=v,c--,c==-1&&(u++,c=7)}if(m+=a,m<0||this.moduleCount<=m){m-=a,a=-a;break}}},r.PAD0=236,r.PAD1=17,r.createData=function(n,i,a){for(var m=l.getRSBlocks(n,i),c=new s,u=0;u<a.length;u++){var g=a[u];c.put(g.mode,4),c.put(g.getLength(),o.getLengthInBits(g.mode,n)),g.write(c)}for(var x=0,u=0;u<m.length;u++)x+=m[u].dataCount;if(c.getLengthInBits()>x*8)throw new Error("code length overflow. ("+c.getLengthInBits()+">"+x*8+")");for(c.getLengthInBits()+4<=x*8&&c.put(0,4);c.getLengthInBits()%8!=0;)c.putBit(!1);for(;!(c.getLengthInBits()>=x*8||(c.put(r.PAD0,8),c.getLengthInBits()>=x*8));)c.put(r.PAD1,8);return r.createBytes(c,m)},r.createBytes=function(n,i){for(var a=0,m=0,c=0,u=new Array(i.length),g=new Array(i.length),x=0;x<i.length;x++){var v=i[x].dataCount,N=i[x].totalCount-v;m=Math.max(m,v),c=Math.max(c,N),u[x]=new Array(v);for(var p=0;p<u[x].length;p++)u[x][p]=255&n.buffer[p+a];a+=v;var _=o.getErrorCorrectPolynomial(N),y=new d(u[x],_.getLength()-1),j=y.mod(_);g[x]=new Array(_.getLength()-1);for(var p=0;p<g[x].length;p++){var R=p+j.getLength()-g[x].length;g[x][p]=R>=0?j.get(R):0}}for(var k=0,p=0;p<i.length;p++)k+=i[p].totalCount;for(var E=new Array(k),B=0,p=0;p<m;p++)for(var x=0;x<i.length;
2x++)p<u[x].length&&(E[B++]=u[x][p]);for(var p=0;p<c;p++)for(var x=0;x<i.length;x++)p<g[x].length&&(E[B++]=g[x][p]);return E},Re=r,Re}var te={},pt;function Aa(){if(pt)return te;pt=1,Object.defineProperty(te,"__esModule",{value:!0});var t=Object.assign||function(a){for(var m=1;m<arguments.length;m++){var c=arguments[m];for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(a[u]=c[u])}return a},l=_t(),s=r(l),o=jt(),d=r(o);function r(a){return a&&a.__esModule?a:{default:a}}function h(a,m){var c={};for(var u in a)m.indexOf(u)>=0||Object.prototype.hasOwnProperty.call(a,u)&&(c[u]=a[u]);return c}var n={bgColor:s.default.oneOfType([s.default.object,s.default.string]).isRequired,bgD:s.default.string.isRequired,fgColor:s.default.oneOfType([s.default.object,s.default.string]).isRequired,fgD:s.default.string.isRequired,size:s.default.number.isRequired,title:s.default.string,viewBoxSize:s.default.number.isRequired,xmlns:s.default.string},i=(0,o.forwardRef)(function(a,m){var c=a.bgColor,u=a.bgD,g=a.fgD,x=a.fgColor,v=a.size,N=a.title,p=a.viewBoxSize,_=a.xmlns,y=_===void 0?"http://www.w3.org/2000/svg":_,j=h(a,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return d.default.createElement("svg",t({},j,{height:v,ref:m,viewBox:"0 0 "+p+" "+p,width:v,xmlns:y}),N?d.default.createElement("title",null,N):null,d.default.createElement("path",{d:u,fill:c}),d.default.createElement("path",{d:g,fill:x}))});return i.displayName="QRCodeSvg",i.propTypes=n,te.default=i,te}var bt;function Ia(){if(bt)return W;bt=1,Object.defineProperty(W,"__esModule",{value:!0}),W.QRCode=void 0;var t=Object.assign||function(p){for(var _=1;_<arguments.length;_++){var y=arguments[_];for(var j in y)Object.prototype.hasOwnProperty.call(y,j)&&(p[j]=y[j])}return p},l=_t(),s=c(l),o=kt(),d=c(o),r=Ma(),h=c(r),n=jt(),i=c(n),a=Aa(),m=c(a);function c(p){return p&&p.__esModule?p:{default:p}}function u(p,_){var y={};for(var j in p)_.indexOf(j)>=0||Object.prototype.hasOwnProperty.call(p,j)&&(y[j]=p[j]);return y}function g(p){return p.map(function(_){return String.fromCharCode(_&255)}).join("")}function x(p){return Array.from(new TextEncoder().encode(p))}var v={bgColor:s.default.oneOfType([s.default.object,s.default.string]),fgColor:s.default.oneOfType([s.default.object,s.default.string]),level:s.default.string,size:s.default.number,value:s.default.string.isRequired},N=(0,n.forwardRef)(function(p,_){var y=p.bgColor,j=y===void 0?"#FFFFFF":y,R=p.fgColor,k=R===void 0?"#000000":R,E=p.level,B=E===void 0?"L":E,K=p.size,M=K===void 0?256:K,se=p.value,U=u(p,["bgColor","fgColor","level","size","value"]),D=new h.default(-1,d.default[B]),Y=x(se),X=g(Y);D.addData(X,"Byte"),D.make();var O=D.modules;return i.default.createElement(m.default,t({},U,{bgColor:j,bgD:O.map(function(A,V){return A.map(function($,z){return $?"":"M "+z+" "+V+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:k,fgD:O.map(function(A,V){return A.map(function($,z){return $?"M "+z+" "+V+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:_,size:M,viewBoxSize:O.length}))});return W.QRCode=N,N.displayName="QRCode",N.propTypes=v,W.default=N,W}var Oa=Ia();const $a=Xt(Oa),za=({size:t=24,strokeWidth:l=1,className:s=""})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:l,strokeLinecap:"round",strokeLinejoin:"round",className:`icon icon-tabler icons-tabler-outline icon-tabler-brand-facebook ${s}`,children:[e.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.jsx("path",{d:"M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3"})]}),vt=({size:t=24,strokeWidth:l=1,className:s=""})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:l,strokeLinecap:"round",strokeLinejoin:"round",className:`icon icon-tabler icons-tabler-outline icon-tabler-brand-whatsapp ${s}`,children:[e.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.jsx("path",{d:"M3 21l1.65 -3.8a9 9 0 1 1 3.4 2.9l-5.05 .9"}),e.jsx("path",{d:"M9 10a.5 .5 0 0 0 1 0v-1a.5 .5 0 0 0 -1 0v1a5 5 0 0 0 5 5h1a.5 .5 0 0 0 0 -1h-1a.5 .5 0 0 0 0 1"})]}),Fa=({size:t=24,className:l=""})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"
2currentColor",className:`icon icon-tabler icons-tabler-filled icon-tabler-brand-messenger ${l}`,children:[e.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.jsx("path",{d:"M18.894 5.446c3.667 3.127 4.168 8.238 1.152 11.897c-2.842 3.447 -7.965 4.583 -12.231 2.805l-.233 -.101l-4.374 .931l-.033 .005l-.042 .008l-.031 .002l-.01 .003h-.018l-.052 .004l-.024 -.001l-.02 .001l-.033 -.003h-.035l-.022 -.004l-.022 -.002l-.035 -.007l-.034 -.005l-.016 -.004l-.024 -.005l-.049 -.016l-.024 -.005l-.011 -.005l-.022 -.007l-.045 -.02l-.03 -.012l-.011 -.006l-.014 -.006l-.031 -.018l-.045 -.024l-.016 -.011l-.037 -.026l-.04 -.027l-.015 -.013l-.043 -.04l-.025 -.02l-.062 -.07l-.013 -.013l-.011 -.014l-.027 -.04l-.026 -.035a1 1 0 0 1 -.054 -.095l-.006 -.013l-.019 -.045l-.02 -.042l-.004 -.016l-.004 -.01l-.011 -.04l-.013 -.04l-.002 -.014l-.005 -.019l-.005 -.033l-.008 -.042l-.002 -.031l-.003 -.026l-.004 -.054l.001 -.036l.001 -.023l.002 -.053l.004 -.025v-.019l.008 -.036l.005 -.033l.004 -.017l.005 -.023l.018 -.06l.003 -.013l1.15 -3.45l-.022 -.037c-2.21 -3.747 -1.209 -8.392 2.411 -11.118l.23 -.168c3.898 -2.766 9.469 -2.54 13.073 .535m-2.062 5a1 1 0 0 0 -1.387 -.278l-2.318 1.544l-1.42 -1.42a1 1 0 0 0 -1.262 -.124l-3 2a1 1 0 0 0 -.277 1.387l.07 .093a1 1 0 0 0 1.317 .184l2.317 -1.545l1.42 1.42a1 1 0 0 0 1.263 .125l3 -2a1 1 0 0 0 .277 -1.387"})]}),Ha=({size:t=24,strokeWidth:l=1,className:s=""})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:l,strokeLinecap:"round",strokeLinejoin:"round",className:`icon icon-tabler icons-tabler-outline icon-tabler-brand-linkedin ${s}`,children:[e.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.jsx("path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z"}),e.jsx("path",{d:"M8 11l0 5"}),e.jsx("path",{d:"M8 8l0 .01"}),e.jsx("path",{d:"M12 16l0 -5"}),e.jsx("path",{d:"M16 16v-3a2 2 0 0 0 -4 0"})]}),Wa=({size:t=24,strokeWidth:l=1,className:s=""})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:l,strokeLinecap:"round",strokeLinejoin:"round",className:`icon icon-tabler icons-tabler-outline icon-tabler-brand-pinterest ${s}`,children:[e.jsx("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),e.jsx("path",{d:"M8 20c.463 .5 1.308 .18 1.308 -.75c0 -1.03 0 -2.475 0 -4.31a3 3 0 1 1 5.92 -1.1c0 1.25 -.6 3.16 -1.728 3.16c-1.128 0 -1.5 -1.06 -1.5 -1.06a3 3 0 1 0 -2.805 2.1c0 1.432 0 2.865 0 4.298c0 .93 .845 1.25 1.308 .75l.135 -.147a11.95 11.95 0 1 0 -2.643 -3.088l-.135 .147z"})]}),qa="+62 853 3774 3862",Ua=new Set(["uluwatu","pandawa","ungasan","jimbaran","nusa-dua"]),Va=t=>String(t||"").trim().toLowerCase().replace(/[\s_]+/g,"-");function Ga({property:t,saleOrRent:l,propertyPriceCategory:s,selectedCategory:o,onCategoryChange:d}){const{appData:r,currentCurrency:h,currencies:n}=yt().props,i=la(),a=n?.length?n:[{code:"IDR"}],m=w.useMemo(()=>a.map(f=>({value:f.code,name:f.code})),[a]),c=f=>{const b=typeof window<"u"?window.location.href:"";Jt.get(b,{currency:f},{preserveScroll:!0,replace:!0})},u=w.useRef(null),g=w.useMemo(()=>t.images&&t.images.length>0?t.images:["/assets-v2/images/image-placeholder.svg"],[t.images]),x=w.useMemo(()=>t.available_categories||[],[t.available_categories]),v=r?.labels||{},[N,p]=w.useState(!1),[_,y]=w.useState(!1),[j,R]=w.useState(!1),[k,E]=w.useState(null),[B,K]=w.useState(null),[M,se]=w.useState(0),[U,D]=w.useState(0),[Y,X]=w.useState(!1),[O,A]=w.useState(!1),[V,$]=w.useState(!1),[z,De]=w.useState(!1),Me=w.useMemo(()=>x.length>0?x.find(f=>f.label===s)||x[0]:null,[x,s]),[St,Rt]=w.useState(Me),I=o||St||Me,Lt=f=>{if(d){d(f);return}Rt(f)},P=I?.label||s,ie=I?I.price:t.price,Ae=!!t?.is_archived,re=!ie||t.is_price_on_request||Number(ie)===0,G=Ae?v.price_withheld||"Price Withheld":re?v.price_on_request||"Price On Request":Pa(ie),Ie=G.replace(/^[A-Z]{3}\s*/i,""),Oe=h||G.match(/^[A-Z]{3}/i)?.[0]||"IDR",$e=I?I.priceLabel:s==="monthly"||s==="yearly"?s:null,ne=String(t?.category_en||t?.category||"").toLowerCase(),ze=ne==="land"&&P?.toLowerCase()==="leasehold",Et=ne==="land"&&P?.toLowerCase()==="freehold",Fe=ze?t.price_per_are_per_year:Et?t.price_per_are:null,S=typeof window<"u"?window.location.href:"",He=w.useMemo(()=>
2{if(!S||!s||!P||P===s)return S;const f=new RegExp(`(/for-(?:sale|rent)/[^/]+/)${s}(/)`,"i");return S.replace(f,`$1${P}$2`)},[S,s,P]),F=t?.property_id||t?.id||"",J=`${t?.name||"Property"} - ${F}`,Bt=g[0]||"",Dt=ne.includes("villa")&&["leasehold","freehold"].includes(P),Mt=r?.config?.wa_phone_number||"6282194359401",At=Ua.has(Va(t?.area))?qa:Mt,It=encodeURIComponent(`Hi Bali Home Immo Team, I am interested in ${F} - ${t?.name||"this property"}. ${S}`),Ot=`https://wa.me/${At.replace(/\D/g,"")}?text=${It}`,Z=i.has(t?.property_id),$t=w.useMemo(()=>({loop:g.length>1}),[g.length]),zt=w.useMemo(()=>({align:"start",loop:!1,startIndex:M}),[M]),Ft=w.useMemo(()=>({align:"start",containScroll:"trimSnaps",dragFree:!0}),[]),We=()=>{i.toggle(t?.property_id)};w.useEffect(()=>{if(!k)return;const f=()=>{const b=k.selectedScrollSnap();D(C=>C===b?C:b),B&&B.scrollTo(b)};return f(),k.on("select",f),k.on("reInit",f),()=>{k.off("select",f),k.off("reInit",f)}},[k,B]),w.useEffect(()=>{!j||!k||(k.scrollTo(M,!0),D(M))},[k,M,j]);const Ht=w.useCallback(f=>{se(f),D(f),R(!0)},[]),Wt=w.useCallback(f=>{D(f),k?.scrollTo(f)},[k]),qe=()=>{typeof window>"u"||(R(!1),A(!0))},qt=async()=>{typeof window>"u"||!S||(navigator.clipboard&&await navigator.clipboard.writeText(S),$(!0),window.setTimeout(()=>$(!1),1800))},ee=f=>{typeof window>"u"||!f||window.open(f,"_blank","noopener,noreferrer,width=760,height=640")},Ue=encodeURIComponent(J),le=encodeURIComponent(S),Ve=encodeURIComponent(`${J} ${S}`),Ut=encodeURIComponent(Bt),Vt=[{label:V?"Copied":"Copy Link",icon:ga,onClick:qt},{label:"Email",icon:Q,href:`mailto:?subject=${Ue}&body=${Ve}`},{label:"Facebook",brandIcon:za,onClick:()=>ee(`https://www.facebook.com/sharer/sharer.php?u=${le}`)},{label:"Linkedin",brandIcon:Ha,onClick:()=>ee(`https://www.linkedin.com/sharing/share-offsite/?url=${le}`)},{label:"Pinterest",brandIcon:Wa,onClick:()=>ee(`https://pinterest.com/pin/create/button/?url=${le}&media=${Ut}&description=${Ue}`)},{label:"WhatsApp",brandIcon:vt,onClick:()=>ee(`https://wa.me/?text=${Ve}`)}],Gt=()=>{typeof window>"u"||(R(!1),X(!0))},Qt=()=>{if(typeof window>"u")return;const f=u.current;if(!f){window.print();return}const b=document.createElement("iframe");b.setAttribute("aria-hidden","true"),b.style.position="fixed",b.style.right="0",b.style.bottom="0",b.style.width="0",b.style.height="0",b.style.border="0",document.body.appendChild(b);const C=b.contentWindow,L=C?.document;if(!C||!L){b.remove();return}const T=Array.from(document.querySelectorAll('link[rel="stylesheet"], style')).map(H=>H.outerHTML).join("");L.open(),L.write(`
3            <!doctype html>
4            <html>
5                <head>
6                    <meta charset="utf-8" />
7                    <title>${t?.name||"Property"} - ${F}</title>
8                    ${T}
9                    <style>
10                        @page {
11                            size: A4 portrait;
12                            margin: 0cm;
13                        }
14
15                        html,
16                        body {
17                            margin: 0 !important;
18                            width: 210mm;
19                            height: 297mm;
20                            overflow: hidden;
21                            background: #ffffff !important;
22                            color: #0f172a !important;
23                        }
24
25                        .bhi-property-print-sheet {
26                            width: 210mm !important;
27                            min-width: 210mm !important;
28                            max-width: 210mm !important;
29                            height: 297mm !important;
30                            min-height: 297mm !important;
31                            max-height: 297mm !important;
32                            margin: 0 !important;
33                            overflow: hidden !important;
34                            box-shadow: none !important;
35                            print-color-adjust: exact;
36                            -webkit-print-color-adjust: exact;
37                        }
38
39                        .bhi-property-print-sheet img,
40                        .bhi-property-print-sheet header {
41                            print-color-adjust: exact;
42                            -webkit-print-color-adjust: exact;
43                        }
44                    </style>
45                </head>
46                <body>${f.outerHTML}</body>
47            </html>
48        `),L.close();const Ye=()=>{C.focus(),C.print(),window.setTimeout(()=>b.remove(),500)},oe=Array.from(L.images).filter(H=>!H.complete);if(oe.length===0){window.setTimeout(Ye,100);return}let Xe=0;const Je=()=>{Xe+=1,Xe>=oe.length&&window.setTimeout(Ye,100)};oe.forEach(H=>{H.addEventListener("load",Je,{once:!0}),H.addEventListener("error",Je,{once:!0})})},Kt=()=>{R(!1),p(!0)},Ge=w.useMemo(()=>{const f=(t.category_en||"").toLowerCase(),b=P?.toLowerCase(),C=f==="villa"||f==="villa-house"||f==="villahouse",L=f==="land",T=[];return C?(t.bedroom&&T.push({value:t.bedroom,label:"Bedroom"}),b==="leasehold"?t.building_size?T.push({value:t.building_size,label:"Building"}):t.furniture&&T.push({value:t.furniture,label:"Furnished"}):t.furniture&&T.push({value:t.furniture,label:"Furnished"}),b==="monthly"||b==="yearly"?t.availability&&T.push({value:t.availability,label:"Available"}):b==="leasehold"?t.leaseholdPeriod&&T.push({value:`${t.leaseholdPeriod} years`,label:"Leasehold"}):b==="freehold"&&t.land_size&&T.push({value:t.land_size,label:"Land"})):L?(t.land_size&&T.push({value:t.land_size,label:"Land"}),t.splittable&&T.push({value:t.splittable,label:"Splittable"}),t.zoning&&T.push({value:t.zoning,label:"Zoning"})):(t.land_size&&T.push({value:t.land_size,label:"Land"}),t.building_size&&T.push({value:t.building_size,label:"Building"})),T},[t.availability,t.bedroom,t.building_size,t.category_en,t.furniture,t.land_size,t.leaseholdPeriod,t.splittable,t.zoning,P]),Qe=w.useMemo(()=>g.slice(0,3),[g]),Ke=w.useMemo(()=>
48[t.area,t.subArea].filter(Boolean).join(", "),[t.area,t.subArea]),Yt=w.useMemo(()=>{const f=t.grouped_attributes_by_category?.[P]||t.grouped_attributes||{};return[{title:"General Information",items:f.generalInfo||[]},{title:"Indoor",items:f.indoor||[]},{title:"Outdoor",items:f.outdoor||[]},{title:"Facilities",items:f.facilities||[]}].filter(b=>b.items.length>0)},[t.grouped_attributes,t.grouped_attributes_by_category,P]);return e.jsxs("section",{className:"bhi-property-main-print w-full max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 md:py-12",children:[e.jsxs("div",{className:"flex flex-col lg:flex-row gap-6 lg:gap-8",children:[e.jsx("div",{className:"w-full lg:w-[65%] min-w-0",children:e.jsxs("div",{className:"relative aspect-[4/3] md:aspect-[16/10] bg-slate-100 w-full h-full",onClickCapture:()=>{t?.is_archived&&!z&&De(!0)},children:[e.jsxs(ce,{opts:$t,className:"w-full h-full",children:[e.jsx(de,{className:"h-full ml-0",children:g.map((f,b)=>e.jsx(he,{className:"pl-0 h-full relative cursor-pointer",children:e.jsx("button",{type:"button",onClick:()=>Ht(b),className:"block h-full w-full","aria-label":`Open ${t.name} image ${b+1}`,children:e.jsx(me,{src:f,alt:`${t.name} view ${b+1}`,className:"w-full h-full object-cover",containerClassName:"h-full w-full",decoding:"async",fetchPriority:b===0?"high":"auto",loading:b===0?"eager":"lazy"})})},b))}),g.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(ue,{variant:"ghost",className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 bg-black/40 hover:bg-black/60 text-white w-8 h-12 flex items-center justify-center transition-colors rounded-none border-none hover:text-white [&_svg]:size-6"}),e.jsx(fe,{variant:"ghost",className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 bg-black/40 hover:bg-black/60 text-white w-8 h-12 flex items-center justify-center transition-colors rounded-none border-none hover:text-white [&_svg]:size-6"})]})]}),t?.is_archived&&!z&&e.jsxs("div",{onClick:()=>De(!0),className:"absolute inset-0 z-20 flex flex-col items-center justify-center bg-black/60 text-white p-4 text-center cursor-pointer select-none transition-opacity duration-300",children:[e.jsx("span",{className:"text-xl sm:text-2xl font-bold uppercase tracking-widest text-white drop-shadow-md",children:v.not_available||"Not Available"}),e.jsx("p",{className:"text-xs sm:text-sm mt-1.5 opacity-90 max-w-xs text-white",children:v.contact_admin_for_details||"Contact our Administrator for more details"})]}),t?.label&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 z-10 bg-black/50 px-3 py-1",children:e.jsx("span",{className:"text-[11px] tracking-widest text-white",children:t.label})})]})}),e.jsx("div",{className:"w-full lg:w-[35%]",children:e.jsxs("div",{className:"bg-white p-5 md:p-6 border border-slate-200 h-full flex flex-col rounded-sm",children:[e.jsxs("div",{className:"bhi-print-hidden flex items-stretch mb-6 overflow-hidden border-[1.5px] border-primary rounded-sm shadow-sm bg-white",children:[e.jsxs("button",{"data-testid":"open-property-contact-agent-form",onClick:()=>p(!0),className:"flex-1 flex items-center justify-center gap-2 py-3.5 px-4 bg-primary text-white hover:bg-primary/80 transition-colors font-bold text-sm tracking-wide uppercase",children:[e.jsx(Q,{size:16})," Contact Us"]}),e.jsx("a",{href:Ot,target:"_blank",rel:"noopener noreferrer","aria-label":"WhatsApp",className:"w-[55px] flex-shrink-0 flex items-center justify-center border-l-[1.5px] border-primary text-primary hover:bg-[#25D366] hover:text-white transition-colors",children:e.jsx(vt,{size:22,strokeWidth:1.5})}),e.jsx("a",{href:"http://m.me/BaliHomeImmo",target:"_blank",rel:"noopener noreferrer","aria-label":"Messenger",className:"w-[55px] flex-shrink-0 flex items-center justify-center border-l-[1.5px] border-primary text-primary hover:bg-[#0084FF] hover:text-white transition-colors",children:e.jsx(Fa,{size:22})})]}),Dt&&e.jsxs("button",{type:"button","data-testid":"open-roi-estimation-form",onClick:()=>y(!0),className:"bhi-print-hidden mb-6 flex w-full items-center justify-center gap-2 rounded-sm border-[1.5px] border-primary bg-white px-4 py-3.5 text-sm font-bold uppercase tracking-wide text-primary transition-colors hover:bg-primary hover:text-white",children:[e.jsx(fa,{size:16}),"ROI Estimation"]}),e.jsxs("div",{className:"mb-6 bg-slate-50 border border-slate-200/80 rounded-sm p-1 flex flex-col items-center",children:[e.jsx("div",{className:"w-full text-center mb-5",children:Ae?e.jsx("span",{className:"text-[35px] tracking-[0px] uppercase font-normal text-slate-900 leading-none",children:G}):re?e.jsx("span",{className:"text-4xl md:text-[42px] font-normal text-slate-900 tracking-tighter leading-none",children:G}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex justify-center items-baseline gap-0 break-all",children:[e.jsx(ea,{value:Oe,onValueChange:c,data:m,variant:"custom",className:"w-auto font-bold uppercase leading-none text-slate-900 hover:text-primary transition-all py-0 min-h-0 h-auto text-xl md:text-[25px] items-baseline truncate inline-flex gap-1 justify-start border-b border-dashed border-slate-300 hover:border-primary mr-2.5 cursor-pointer pb-0.5 [&>svg]:size-3.5 md:[&>svg]:size-4 [&>svg]:text-slate-400 hover:[&>svg]:text-primary [&>svg]:opacity-100 [&>svg]:ml-0 [&>svg]:transition-transform hover:[&>svg]:translate-y-[1px]",popoverClassName:"w-auto min-w-[110px]"}),e.jsx("span",{className:"text-2xl md:text-[32px] font-semibold text-slate-900 tracking-tighter leading-none",children:Ie})]}),Fe&&e.jsx("div",{className:"mt-2 text-center text-[12px] font-semibold uppercase tracking-wide text-slate-500",children:Fe}),ze&&t.leaseholdPeriod&&e.jsxs("div",{className:"mt-1 text-center text-[12px] font-semibold uppercase tracking-wide text-slate-500",children:["Leasehold: ",t.leaseholdPeriod," years"]})]})}),x&&x.length>0&&e.jsx("div",{className:"w-full",children:e.jsx("div",{className:"flex w-full bg-slate-200/50 p-1 rounded-sm",children:x.map(f=>{const b=I&&f.label===I.label;return e.jsx("button",{onClick:()=>Lt(f),className:`flex-1 py-1.5 text-[10px] font-bold uppercase tracking-[0.15em] rounded-[4px] transition-all duration-200 flex items-center justify-center gap-1.5 ${b?"bg-white text-slate-800 shadow-[0_1px_2px_rgba(0,0,0,0.08)]":"text-slate-500 hover:text-slate-700"}`,children:f.label},f.label)})})})]}),e.jsx("div",{className:"flex items-center mb-2 p-3 bg-white border border-slate-200/80 rounded-sm",children:e.jsxs("div",{className:"flex items-center gap-3.5",children:[e.jsx("div",{className:"w-10 h-10 rounded bg-slate-50 border border-slate-100 flex items-center justify-center flex-shrink-0",children:e.jsx(tt,{size:18,className:"text-primary",strokeWidth:2.5})}),e.jsxs("div",{className:"flex flex-col leading-tight",children:[e.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest mb-1",children:"Location"}),e.jsxs("div",{className:"text-[14px] uppercase",children:[e.jsx("span",{className:"font-bold text-slate-800",children:t.area}),t.subArea&&e.jsxs("span",{className:"text-slate-500 ml-1 font-medium text-[13px]",children:[", ",t.subArea]})]})]})]})}),Ge.length>0&&e.jsx("div",{className:"mb-6 flex flex-nowrap gap-2.5 overflow-x-auto pb-1",children:Ge.map((f,b)=>e.jsxs("div",{className:"flex min-w-[92px] flex-1 flex-col items-center justify-center rounded-sm border border-slate-200/80 px-2 py-3 text-center",children:[e.jsx("span",{className:"text-[14px] font-bold text-slate-800 mb-0.5 whitespace-pre-wrap leading-tight max-w-full overflow-hidden text-ellipsis",children:f.value}),f.label!=="Furnished"&&e.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-widest mt-1",children:f.label})]},`${f.label}-${b}`))}),e.jsx("div",{className:" flex-1"}),e.jsxs("div",{className:"bhi-print-hidden flex items-stretch overflow-hidden border-[1.5px] border-slate-300 rounded-sm bg-white transition-colors hover:border-slate-400",children:[e.jsxs("button",{type:"button",onClick:We,disabled:!t?.property_id,className:`flex-1 flex items-center justify-center gap-2 py-3.5 px-4 transition-colors font-bold text-sm tracking-wide uppercase disabled:cursor-not-allowed disabled:opacity-60 ${Z?"bg-white text-slate-800 hover:bg-slate-50":"text-slate-800 hover:bg-slate-50"}`,children:[e.jsx(et,{size:16,className:Z?"fill-red-500 text-red-500":"text-primary"}),e.jsx("span",{children:v.favorite||"Favorite"}),Z&&e.jsx("span",{className:"ml-2 flex h-5 w-5 items-center justify-center rounded-sm bg-slate-100 text-slate-500",children:e.jsx(ca,{size:13,strokeWidth:3})})]}),e.jsx("button",{type:"button",onClick:Gt,"aria-label":v.print||"Print",title:v.print||"Print",className:"w-[55px] flex-shrink-0 flex items-center justify-center border-l-[1.5px] border-slate-300 hover:bg-slate-50 text-slate-800 transition-colors",children:e.jsx(st,{size:18,strokeWidth:2.5})}),e.jsx("button",{type:"button",onClick:qe,"aria-label":v.share||"Share",title:v.share||"Share",className:"w-[55px] flex-shrink-0 flex items-center justify-center border-l-[1.5px] border-slate-300 hover:bg-slate-50 text-slate-800 transition-colors",children:e.jsx(at,{size:18,strokeWidth:2.5})})]})]})})]}),e.jsx(Ze,{open:N,onClose:()=>p(!1),title:v.contact_agent||"Contact Agent",icon:e.jsx(Q,{size:24}),children:e.jsx(ra,{labels:v,originCode:F,originUrl:S,submitLabel:v.send||"Send"})}),e.jsx(Ze,{open:_,onClose:()=>y(!1),title:"ROI Estimation",icon:e.jsx(Q,{size:24}),children:e.jsx(na,{labels:v,originCode:F,originUrl:S,submitLabel:v.send||"Send"})}),e.jsx(xe,{open:j,onOpenChange:R,children:j&&e.jsxs(ge,{overlayClassName:"bg-black/95 z-[9999]",className:"z-[9999] h-dvh max-h-dvh w-screen max-w-none gap-0 overflow-hidden rounded-none border-none bg-black p-0 text-white shadow-none sm:rounded-none",children:[e.jsxs(pe,{className:"sr-only",children:[t.name," image gallery"]}),e.jsxs("div",{className:"flex h-full w-full min-w-0 flex-col",children:[e.jsxs("div",{className:"hidden min-h-14 shrink-0 flex-col gap-3 border-b border-white/10 px-4 py-3 pr-14 md:flex md:h-16 md:flex-row md:items-center md:justify-between md:px-6 [@media(max-height:500px)]:hidden",children:[e.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden",children:[e.jsx("p",{className:"truncate font-heading text-sm font-bold uppercase tracking-wide text-white",children:t.name}),e.jsxs("p",{className:"mt-0.5 text-xs font-medium text-white/55",children:[U+1," / ",g.length]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-2 mr-4",children:[e.jsx("button",{type:"button",onClick:qe,className:"flex h-9 w-9 items-center justify-center rounded-sm border border-white/15 bg-white/10 text-white transition hover:bg-white/20","aria-label":v.share||"Share",title:v.share||"Share",children:e.jsx(at,{size:16,strokeWidth:2.5})}),e.jsx("button",{type:"button",onClick:We,disabled:!t?.property_id,className:"flex h-9 w-9 items-center justify-center rounded-sm border border-white/15 bg-white/10 text-white transition hover:bg-white/20 disabled:cursor-not-allowed disabled:opacity-50","aria-label":v.favorite||"Favorite",title:v.favorite||"Favorite",children:e.jsx(et,{size:16,strokeWidth:2.5,className:Z?"fill-red-500 text-red-500":""})}),e.jsxs("button",{type:"button",onClick:Kt,className:"flex h-9 items-center justify-center gap-2 rounded-sm bg-white px-3 text-xs font-bold uppercase tracking-wide text-primary transition hover:bg-white/90 md:px-4",children:[e.jsx(Q,{size:15,strokeWidth:2.5}),e.jsx("span",{className:"hidden sm:inline",children:v.send_an_enquiry||"Send an enquiry"}),e.jsx("span",{className:"sm:hidden",children:v.enquiry||"Enquiry"})]})]})]}),e.jsx("div",{className:"h-dvh w-full min-w-0 min-h-0 px-0 py-0 md:h-[calc(100dvh-12.5rem)] md:px-16 md:py-5 [@media(max-height:500px)]:h-dvh [@media(max-height:500px)]:px-0 [@media(max-height:500px)]:py-0",children:e.jsxs(ce,{setApi:E,opts:zt,className:"h-full min-h-0 [&>div]:h-full [&>
48div]:min-h-0",children:[e.jsx(de,{className:"h-full -ml-0 items-stretch",children:g.map((f,b)=>{const C=Math.abs(b-U)<=1;return e.jsx(he,{className:"h-full min-h-0 pl-0",children:e.jsx("div",{className:"flex h-full max-h-full items-center justify-center px-0",children:C&&e.jsx(me,{src:f,alt:`${t.name} gallery image ${b+1}`,className:"h-auto max-h-full max-w-full object-contain",containerClassName:"flex items-center justify-center h-full w-full",decoding:"async",loading:"eager"})})},`gallery-${b}`)})}),g.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"left-2 top-1/2 h-11 w-11 -translate-y-1/2 border-white/20 bg-white/10 text-white hover:bg-white/20 hover:text-white disabled:hidden md:left-0"}),e.jsx(fe,{className:"right-2 top-1/2 h-11 w-11 -translate-y-1/2 border-white/20 bg-white/10 text-white hover:bg-white/20 hover:text-white disabled:hidden md:right-0"})]})]})}),g.length>1&&e.jsx("div",{className:"hidden w-full min-w-0 shrink-0 border-t border-white/10 bg-black px-3 py-3 md:block md:px-6 [@media(max-height:500px)]:hidden",children:e.jsxs(ce,{setApi:K,opts:Ft,className:"w-full px-10",children:[e.jsx(de,{className:"-ml-2",children:g.map((f,b)=>e.jsx(he,{className:"pl-2 basis-auto",children:e.jsx("button",{type:"button",onClick:()=>Wt(b),className:`h-16 w-24 shrink-0 overflow-hidden rounded-sm border transition md:h-20 md:w-32 ${U===b?"border-white opacity-100":"border-white/15 opacity-55 hover:opacity-85"}`,"aria-label":`Show image ${b+1}`,children:e.jsx(me,{src:f,alt:`${t.name} thumbnail ${b+1}`,className:"h-full w-full object-cover",containerClassName:"h-full w-full",decoding:"async",loading:"lazy"})})},`gallery-thumb-${b}`))}),e.jsx(ue,{className:"left-0 bg-black/60 border-white/20 hover:bg-white/10 text-white hover:text-white h-9 w-9 rounded-sm disabled:hidden"}),e.jsx(fe,{className:"right-0 bg-black/60 border-white/20 hover:bg-white/10 text-white hover:text-white h-9 w-9 rounded-sm disabled:hidden"})]})})]})]})}),e.jsx(xe,{open:O,onOpenChange:A,children:O&&e.jsxs(ge,{className:"w-[calc(100vw-2rem)] max-w-sm overflow-hidden rounded-sm border-slate-200 bg-white p-0 shadow-2xl",children:[e.jsxs(pe,{className:"sr-only",children:["Share ",J]}),e.jsx("div",{className:"border-b border-slate-200 px-5 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-sm bg-primary text-white",children:e.jsx(ba,{size:18,strokeWidth:2.5})}),e.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden",children:[e.jsx("p",{className:"text-sm font-bold uppercase tracking-wide text-slate-900",children:"Share Property"}),e.jsx("p",{className:"mt-0.5 block max-w-full overflow-hidden text-ellipsis whitespace-nowrap text-xs text-slate-500 w-[300px]",children:J})]})]})}),e.jsx("div",{className:"grid gap-1 p-2",children:Vt.map(f=>{const b=f.icon,C=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-sm bg-slate-100 text-primary",children:b?e.jsx(b,{size:17,strokeWidth:2.4}):e.jsx(f.brandIcon,{className:"w-4 h-4",size:16,strokeWidth:1.5})}),e.jsx("span",{className:"min-w-0 truncate text-sm font-semibold text-slate-800",children:f.label})]}),L="box-border flex w-full max-w-full items-center gap-3 overflow-hidden rounded-sm px-3 py-2.5 text-left transition hover:bg-slate-50";return f.href?e.jsx("a",{href:f.href,className:L,onClick:()=>A(!1),children:C},f.label):e.jsx("button",{type:"button",onClick:f.onClick,className:L,children:C},f.label)})})]})}),e.jsx(xe,{open:Y,onOpenChange:X,children:Y&&e.jsxs(ge,{className:"max-h-[92vh] w-[calc(100vw-2rem)] max-w-4xl overflow-y-auto rounded-sm border-slate-200 bg-slate-100 p-0 shadow-2xl",children:[e.jsxs(pe,{className:"sr-only",children:["Print preview for ",t.name]}),e.jsxs("div",{className:"bhi-print-dialog-actions sticky top-0 z-10 flex items-center justify-between border-b border-slate-200 bg-white px-4 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold uppercase tracking-wide text-slate-900",children:"Print Preview"}),e.jsx("p",{className:"text-xs text-slate-500",children:"One-page property sheet"})]}),e.jsxs("button",{type:"button",onClick:Qt,className:"inline-flex h-10 items-center justify-center gap-2 rounded-sm bg-primary px-4 text-xs font-bold uppercase tracking-wide text-white transition hover:bg-primary/90",children:[e.jsx(st,{size:16,strokeWidth:2.5}),"Print"]})]}),e.jsx("div",{className:"bg-slate-100 p-4 md:p-8",children:e.jsxs("article",{ref:u,className:"bhi-property-print-sheet mx-auto flex min-h-[297mm] w-[210mm] max-w-full flex-col bg-white text-slate-900 shadow-xl",children:[e.jsxs("header",{className:"flex items-center justify-between bg-primary px-8 py-5 text-white",children:[e.jsx("img",{src:"/assets-v2/images/bali-home-immo-logo-transparent.png",alt:"Bali Home Immo",className:"h-14 w-auto object-contain"}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.28em] text-white/70",children:"Property Sheet"}),e.jsx("p",{className:"mt-1 text-base font-bold uppercase tracking-wide text-white",children:F})]})]}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 overflow-hidden px-8 py-6",children:[e.jsxs("section",{children:[e.jsxs("p",{className:"text-[11px] font-bold uppercase tracking-[0.22em] text-primary",children:[t.category," / ",P]}),e.jsx("h2",{className:"mt-2 text-2xl font-bold uppercase leading-tight text-slate-950",children:t.name}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-6 gap-y-2 text-sm text-slate-700",children:[Ke&&e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(tt,{size:15,className:"text-primary",strokeWidth:2.4}),e.jsx("span",{children:Ke})]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e.jsx(da,{size:15,className:"text-primary",strokeWidth:2.4}),e.jsx("span",{className:"font-bold text-primary",children:re?G:`${Oe} ${Ie}`})]}),$e&&e.jsxs("span",{className:"text-xs font-medium capitalize text-slate-500",children:["Period: ",$e]})]})]}),e.jsxs("section",{className:"grid h-[58mm] max-h-[58mm] shrink-0 grid-cols-[1.55fr_1fr] gap-3 overflow-hidden",children:[e.jsx("div",{className:"h-[58mm] max-h-[58mm] overflow-hidden bg-slate-100",children:e.jsx("img",{src:Qe[0]||"/assets-v2/images/image-placeholder.svg",alt:`${t.name} main view`,className:"h-full w-full object-cover"})}),e.jsx("div",{className:"grid h-[58mm] max-h-[58mm] grid-rows-2 gap-3 overflow-hidden",children:[1,2].map(f=>e.jsx("div",{className:"min-h-0 overflow-hidden bg-slate-100",children:e.jsx("img",{src:Qe[f]||"/assets-v2/images/image-placeholder.svg",alt:`${t.name} view ${f+1}`,className:"h-full w-full object-cover"})},f))})]}),e.jsx("div",{className:"min-h-0 grid grid-cols-2 gap-x-8 gap-y-8 overflow-hidden mt-8",children:Yt.map(f=>e.jsxs("section",{children:[e.jsx("h3",{className:"border-b border-primary pb-1.5 text-xs font-bold uppercase tracking-[0.16em] text-primary",children:f.title}),e.jsx("dl",{className:"mt-2 space-y-1.5",children:f.items.map((b,C)=>e.jsxs("div",{className:"grid grid-cols-[42%_1fr] gap-2 text-[12px] leading-snug",children:[e.jsx("dt",{className:"font-bold text-slate-700",children:b.label||b.name}),e.jsxs("dd",{className:"m-0 text-slate-700",children:[":"," ",e.jsx("span",{className:"font-medium text-slate-950",children:b.value})]})]},`${f.title}-${C}`))})]},f.title))}),e.jsxs("footer",{className:"mt-auto flex items-center justify-between gap-4 border-t border-slate-200 pt-3 text-[11px] text-slate-500",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[He&&e.jsx($a,{value:He,size:44,level:"L",bgColor:"#ffffff",fgColor:"#0f172a"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-bold uppercase tracking-[0.18em] text-primary",children:"Bali Home Immo"}),e.jsx("p",{className:"mt-1",children:"bali-home-immo.com"})]})]}),e.jsx("p",{className:"max-w-sm text-right",children:"All prices and details are subject to confirmation by Bali Home Immo."})]})]})]})})]})})]})}function wt({title:t,items:l,remark:s,icon:o}){return!l||l.length===0?null:e.jsxs("div",{className:"mb-10",children:[e.jsxs("h3",{className:"text-[13px] font-bold uppercase tracking-widest text-slate-800 mb-4 pb-2 border-b border-slate-200/60 flex items-center gap-2",children:[o&&e.jsx(o,{size:16,className:"text-primary/70"}),t]}),e.jsx("dl",{className:"border border-slate-200 rounded-sm overflow-hidden divide-y divide-slate-100 m-0",children:l.map((d,r)=>e.jsxs("div",{className:"flex items-center text-[13px] hover:bg-slate-50/50 transition-colors",children:[e.jsx("dt",{className:"flex-1 py-2.5 px-4 text-slate-600 border-r border-slate-100 font-normal",children:d.label||d.name}),e.jsx("div",{className:"w-6 text-center text-slate-400 flex-shrink-0 border-r border-slate-100","aria-hidden":"true",children:":"}),e.jsx("dd",{className:"w-[40%] py-2.5 px-4 text-right font-medium text-slate-800 m-0",children:d.value})]},r))}),s&&e.jsxs("p",{className:"text-[11px] text-slate-400 italic mt-2 px-1",children:["* ",s]})]})}function ae({title:t,items:l,icon:s}){return!l||l.length===0?null:e.jsxs("section",{children:[e.jsxs("h3",{className:"text-[12px] font-bold uppercase tracking-widest text-slate-800 mb-3 pb-2 border-b-2 border-primary/20 flex items-center gap-2",children:[s&&e.jsx(s,{size:14,className:"text-primary/70"}),t]}),e.jsx("dl",{className:"space-y-0 m-0",children:l.map((o,d)=>e.jsxs("div",{className:"flex items-start text-[13px] py-1.5",children:[e.jsx("dt",{className:"w-[55%] font-bold text-slate-700 flex-shrink-0",children:o.label||o.name}),e.jsx("div",{className:"w-3 text-slate-400 flex-shrink-0","aria-hidden":"true",children:":"}),e.jsx("dd",{className:"flex-1 text-slate-600 ml-1 m-0",children:o.value})]},d))})]})}function Qa({property:t,saleOrRent:l,propertyPriceCategory:s,monthlyCosts:o,yearlyCosts:d,generalInfo:r,indoor:h,outdoor:n,facilities:i}){const a=o?.items?.length>0||d?.items?.length>0,m=r?.length>0||h?.length>0||n?.length>0||i?.length>0;return e.jsx("section",{className:"py-4 md:py-8 bg-slate-50",children:e.jsx("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"bg-white p-6 md:p-8 border border-slate-200 rounded-sm",children:[e.jsxs("h2",{className:"text-xl md:text-2xl font-heading font-bold text-slate-800 mb-2 uppercase tracking-wide leading-tight",children:[t.name," - ",t.property_id]}),t.description?e.jsx("div",{className:"text-normal prose prose-sm prose-slate max-w-none text-slate-600 leading-relaxed [&_p]:mb-4 [&_p]:mt-[15px] prose-headings:font-heading prose-headings:text-slate-800 prose-strong:text-slate-800 prose-a:text-primary hover:prose-a:underline mb-8",dangerouslySetInnerHTML:{__html:t.description}}):e.jsx("p",{className:"text-slate-500 italic mb-8",children:"No description available."}),e.jsx("p",{className:"text-[11px] text-slate-400 italic mb-8",children:"* All transactions are in IDR only. Other 
48currencies will fluctuate according to the exchange rate of the day and to be used for reference only."}),a&&e.jsxs("div",{children:[s==="yearly"&&d?.items?.length>0&&e.jsx(wt,{title:"Monthly Cost For Yearly Rental",items:d.items,remark:d.remark,icon:it}),s==="monthly"&&o?.items?.length>0&&e.jsx(wt,{title:"Monthly Cost",items:o.items,remark:o.remark,icon:it})]}),m&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 md:gap-8",children:[e.jsx(ae,{title:"General Information",items:r,icon:sa}),e.jsx(ae,{title:"Indoor",items:h,icon:oa}),e.jsx(ae,{title:"Outdoor",items:n,icon:ya}),e.jsx(ae,{title:"Facilities",items:i,icon:ha})]})]})})})}const Ka=w.lazy(()=>Nt(()=>import("./HomeMap-CQwPcoQ9.js"),__vite__mapDeps([0,1,2]))),Ya=w.lazy(()=>Nt(()=>import("./PropertyCard-Du3BAVsC.js"),__vite__mapDeps([3,1,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])));function Le({children:t,className:l="",rootMargin:s="300px",minHeight:o="0px"}){const{ref:d,inView:r}=Zt({rootMargin:s,triggerOnce:!0});return e.jsx("div",{ref:d,className:l,style:{minHeight:o},children:r?t:null})}function ys({property:t,saleOrRent:l,propertyPriceCategory:s,breadcrumbs:o,similarProperties:d=[]}){const{app:r}=yt().props,{monthlyCosts:h,yearlyCosts:n}=t,i=t.available_categories||[],a=w.useMemo(()=>i.find(y=>y.label===s)||i[0]||null,[i,s]),[m,c]=w.useState(a),u=m?.label||s,g=t.grouped_attributes_by_category?.[u]||t.grouped_attributes||{},{generalInfo:x,indoor:v,outdoor:N,facilities:p}=g;w.useEffect(()=>{c(a)},[a,t.property_id]);const _=t.images&&t.images.length>0?t.images[0]:"";return e.jsxs(ta,{className:"bg-slate-50",children:[e.jsx(aa,{seo:t.seo,type:"article",image:_}),e.jsx(Ca,{property:t,appName:r?.name,baseUrl:r?.url,locale:r?.locale}),e.jsx(ma,{items:o}),e.jsx(Ta,{property:t,breadcrumbs:o}),e.jsx(Ga,{property:t,saleOrRent:l,propertyPriceCategory:s,selectedCategory:m,onCategoryChange:c}),e.jsx(Qa,{property:t,saleOrRent:l,propertyPriceCategory:u,monthlyCosts:h,yearlyCosts:n,generalInfo:x,indoor:v,outdoor:N,facilities:p}),t.video_id&&e.jsx(Le,{minHeight:"420px",children:e.jsx("section",{className:"py-8 md:py-12 bg-white border-t border-slate-200",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[e.jsx("h2",{className:"text-xl md:text-2xl font-heading font-bold text-slate-800 mb-8 uppercase tracking-wide leading-tight text-center md:text-left",children:"Property Video Tour"}),e.jsx("div",{className:"max-w-4xl mx-auto md:mx-0",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx("div",{className:"aspect-video bg-slate-100 rounded-sm overflow-hidden border border-slate-200 shadow-sm",children:e.jsx("iframe",{src:`https://www.youtube.com/embed/${t.video_id}`,title:"Property Video Tour",className:"w-full h-full",loading:"lazy",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})}),e.jsx("a",{href:`https://www.youtube.com/watch?v=${t.video_id}`,target:"_blank",rel:"nofollow noopener noreferrer",className:"text-xs text-primary hover:underline font-medium",children:"Watch on YouTube"})]})})]})})}),e.jsx(Le,{minHeight:"500px",children:e.jsx("section",{className:"py-4 md:py-8 bg-slate-50 border-t border-slate-200",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[e.jsx("h2",{className:"text-xl md:text-2xl font-heading font-bold text-slate-800 mb-6 uppercase tracking-wide leading-tight",children:"Property Location"}),e.jsx("div",{className:"border border-slate-200 rounded-sm overflow-hidden bg-white shadow-sm",children:e.jsx(w.Suspense,{fallback:e.jsx("div",{className:"h-[350px] md:h-[450px] bg-white"}),children:e.jsx(Ka,{activeProperty:t,className:"h-[350px] md:h-[450px]"})})})]})})}),d.length>0&&e.jsx(Le,{minHeight:"600px",children:e.jsx("section",{className:"py-8 md:py-12 bg-white border-t border-slate-200",children:e.jsxs("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:[e.jsx("h2",{className:"text-xl md:text-2xl font-heading font-bold text-slate-800 mb-8 uppercase tracking-wide leading-tight text-center",children:"Similar Properties"}
48),e.jsx(ia,{delayDuration:0,children:e.jsx(w.Suspense,{fallback:null,children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:d.map((y,j)=>e.jsx(Ya,{property:y,index:j+1},y.id))})})})]})})})]})}export{ys 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.