(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b7020810"],{"0f4d":function(t,a,e){},1276:function(t,a,e){"use strict";var i=e("c65b"),n=e("e330"),r=e("d784"),s=e("825a"),o=e("861d"),c=e("1d80"),u=e("4840"),l=e("8aa5"),d=e("50c4"),p=e("577e"),h=e("dc4a"),f=e("14c3"),m=e("9f7f"),v=e("d039"),g=m.UNSUPPORTED_Y,b=4294967295,_=Math.min,y=n([].push),w=n("".slice),k=!v((function(){var t=/(?:)/,a=t.exec;t.exec=function(){return a.apply(this,arguments)};var e="ab".split(t);return 2!==e.length||"a"!==e[0]||"b"!==e[1]})),C="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;r("split",(function(t,a,e){var n="0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:i(a,this,t,e)}:a;return[function(a,e){var r=c(this),s=o(a)?h(a,t):void 0;return s?i(s,a,r,e):i(n,p(r),a,e)},function(t,i){var r=s(this),o=p(t);if(!C){var c=e(n,r,o,i,n!==a);if(c.done)return c.value}var h=u(r,RegExp),m=r.unicode,v=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(g?"g":"y"),k=new h(g?"^(?:"+r.source+")":r,v),I=void 0===i?b:i>>>0;if(0===I)return[];if(0===o.length)return null===f(k,o)?[o]:[];var j=0,x=0,T=[];while(x79&&s<83,u=c||!r("reduce");i({target:"Array",proto:!0,forced:u},{reduce:function(t){var a=arguments.length;return n(this,t,a,a>1?arguments[1]:void 0)}})},1644:function(t,a,e){"use strict";e("0f4d")},"18c5":function(t,a,e){"use strict";e.r(a);e("b0c0");var i=function(){var t=this,a=t._self._c;return a("main",{staticClass:"donation-preview",class:{"preview-mobile":t.mobileViewport}},[a("header",{staticClass:"preview-toolbar"},[a("div",[a("span",{staticClass:"preview-badge"},[t._v("Pratinjau — belum disimpan")]),a("span",{staticClass:"preview-expiry"},[t._v("Draft sementara, berlaku "+t._s(t.expiryLabel))])]),a("div",{staticClass:"preview-toolbar-actions"},[a("b-button",{attrs:{size:"sm",variant:"outline-light"},on:{click:function(a){t.mobileViewport=!t.mobileViewport}}},[t._v(" "+t._s(t.mobileViewport?"Lihat desktop":"Lihat mobile")+" ")]),a("b-button",{attrs:{size:"sm",variant:"light"},on:{click:t.closePreview}},[t._v("Tutup")])],1)]),"loading"===t.state?a("section",{staticClass:"preview-state",attrs:{role:"status"}},[t._v("Memuat preview...")]):"forbidden"===t.state?a("section",{staticClass:"preview-state preview-error"},[a("h1",[t._v("Preview tidak tersedia")]),a("p",[t._v("Preview ini hanya dapat dibuka oleh pengguna yang membuatnya pada website yang sama.")]),a("b-button",{attrs:{variant:"primary"},on:{click:t.closePreview}},[t._v("Kembali")])],1):"expired"===t.state?a("section",{staticClass:"preview-state preview-error"},[a("h1",[t._v("Preview sudah kedaluwarsa")]),a("p",[t._v("Buat preview baru dari halaman editor untuk melanjutkan.")]),a("b-button",{attrs:{variant:"primary"},on:{click:t.closePreview}},[t._v("Kembali ke editor")])],1):a("section",{staticClass:"preview-frame"},[a("div",{staticClass:"preview-warning",attrs:{role:"note"}},[a("strong",[t._v("Preview admin · Tidak dipublikasikan · Checkout dinonaktifkan")]),a("span",[t._v("Website: "+t._s(t.siteLabel)+". Navigasi situs (logo dan Login) tidak ditampilkan. Semua tombol dan isian di bawah tidak berfungsi."),t.isMobile?[t._v(" Di halaman nyata, bar total di dasar menempel di dasar layar.")]:t._e()],2)]),a("div",{staticClass:"preview-stage"},[a("div",{staticClass:"donation-page-shell"},[a("div",{staticClass:"donation-page-main"},[a("section",{staticClass:"donation-hero"},[t.hero.image?a("img",{staticClass:"hero-image",attrs:{src:t.hero.image,alt:t.hero.title||"Halaman donasi"}}):t._e(),a("div",{staticClass:"hero-overlay",attrs:{"aria-hidden":"true"}}),a("div",{staticClass:"hero-inner"},[a("div",{staticClass:"hero-copy"},[t.project.program_label?a("p",{staticClass:"program-badge"},[a("span",{attrs:{"aria-hidden":"true"}}),t._v(t._s(t.project.program_label)+" ")]):t._e(),a("h1",[t._v(t._s(t.hero.title||t.project.title||"Halaman donasi"))]),a("p",{staticClass:"hero-subtext"},[t._v(t._s(t.hero.subtitle||t.project.short_description))]),a("div",{staticClass:"hero-progress",attrs:{"aria-label":"Ringkasan projek"}},[a("div",{staticClass:"hero-progress-summary"},[a("strong",{staticClass:"progress-amount"},[t._v(t._s(t.formatRupiah(t.project.collected_amount)))]),a("span",{staticClass:"progress-target"},[a("span",{staticClass:"progress-lead"},[t._v("terkumpul ")]),t._v("dari "+t._s(t.formatRupiah(t.project.target)))])]),a("div",{staticClass:"hero-progress-bar",attrs:{role:"progressbar","aria-valuenow":t.progress,"aria-valuemin":"0","aria-valuemax":"100"}},[a("span",{style:{width:t.progress+"%"}})]),a("div",{staticClass:"hero-stats"},[a("span",[a("strong",[t._v(t._s(t.project.donor_count||0))]),t._v(" wakif")]),a("span",{staticClass:"remaining-stat"},[a("strong",[t._v(t._s(t.formatRupiah(t.project.remaining_amount)))]),t._v(" lagi menuju target")])])])]),a("section",{staticClass:"donation-form-card",attrs:{"aria-labelledby":"donation-form-title"}},[a("h2",{staticClass:"form-title",attrs:{id:"donation-form-title"}},[t._v(t._s(t.ctaTitle))]),a("p",{staticClass:"cta-subtext"},[a("span",{staticClass:"cta-dot",attrs:{"aria-hidden":"true"}}),a("span",[t._v(t._s(t.ctaSubtext))])]),t.isPackageMode?a("div",{staticClass:"mode-panel"},[a("div",{staticClass:"package-head"},[a("span",{staticClass:"package-label"},[t._v("Pilih jumlah paket")]),a("span",{staticClass:"package-price"},[t._v(t._s(t.formatRupiah(t.packagePrice))+" per paket")])]),t.presetQuantities.length?a("div",{staticClass:"preset-grid quantity-grid"},t._l(t.presetQuantities,(function(e){return a("button",{key:e,staticClass:"preset-button",class:{active:e===t.selectedQuantity},attrs:{type:"button","aria-label":"".concat(e," paket"),disabled:""}},[t._v(" "+t._s(e)+" ")])})),0):t._e(),a("div",{staticClass:"quantity-control",attrs:{role:"group","aria-label":"Jumlah paket"}},[a("button",{attrs:{type:"button","aria-label":"Kurangi paket",tabindex:"-1","aria-disabled":"true",disabled:t.selectedQuantity<=1}},[t._v("−")]),a("div",{staticClass:"quantity-value"},[a("strong",[t._v(t._s(t.selectedQuantity))]),a("span",[t._v("paket")])]),a("button",{attrs:{type:"button","aria-label":"Tambah paket",tabindex:"-1","aria-disabled":"true"}},[t._v("+")])])]):a("div",{staticClass:"mode-panel"},[t.presetAmounts.length?a("div",{staticClass:"preset-grid"},t._l(t.presetAmounts,(function(e){return a("button",{key:e,staticClass:"preset-button",class:{active:e===t.selectedAmount},attrs:{type:"button",disabled:""}},[t._v(" "+t._s(t.formatRupiah(e))+" ")])})),0):t._e(),a("label",{staticClass:"amount-field"},[a("span",{staticClass:"amount-label"},[t._v("Nominal lain")]),a("span",{staticClass:"amount-box"},[a("span",{staticClass:"amount-prefix",attrs:{"aria-hidden":"true"}},[t._v("Rp")]),a("input",{attrs:{readonly:"",tabindex:"-1",autocomplete:"off",placeholder:t.minimumAmount?"Minimal ".concat(t.formatRupiah(t.minimumAmount)):"Masukkan nominal"}})])]),t.minimumAmount?a("p",{staticClass:"minimum-note"},[t._v("Minimum donasi "+t._s(t.formatRupiah(t.minimumAmount)))]):t._e()]),t.presetAmounts.length||t.presetQuantities.length?t._e():a("p",{staticClass:"preview-note"},[t._v(" Pilihan jumlah cepat berasal dari pengaturan preset per segmen donor dan tidak dimuat di pratinjau. ")]),a("div",{staticClass:"total-row"},[a("span",{staticClass:"total-label"},[t._v(t._s(t.totalLabel))]),a("strong",{staticClass:"total-value"},[t._v(t._s(t.displayTotal))])]),a("button",{staticClass:"primary-action disabled",attrs:{type:"button",disabled:"","aria-disabled":"true"}},[a("span",[t._v(t._s(t.ctaLabel)+" · "+t._s(t.displayTotal))])]),a("p",{staticClass:"next-step-note"},[a("svg",{attrs:{"aria-hidden":"true",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"#6B6A62","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}},[a("rect",{attrs:{x:"4",y:"11",width:"16",height:"10",rx:"2"}}),a("path",{attrs:{d:"M8 11V7a4 4 0 018 0v4"}})]),a("span",[t._v("Isi data dan pilih metode pembayaran di langkah berikutnya.")])])])])]),t.storyText||t.hasQuote?a("section",{staticClass:"band band-white story-section",attrs:{"aria-label":"Kenapa projek ini penting"}},[a("div",{staticClass:"band-inner story-inner"},[a("div",{staticClass:"story-lead"},[a("div",{staticClass:"section-label"},[t._v("Kenapa projek ini penting")]),t.storyText?a("h2",[t._v(t._s(t.storyText))]):t._e()]),t.hasQuote?a("figure",{staticClass:"story-quote"},[a("blockquote",[t._v("“"+t._s(t.config.quote_text)+"”")]),t.config.quote_name?a("figcaption",[a("strong",[t._v(t._s(t.config.quote_name))]),t._v(t._s(t.quoteMeta))]):t._e()]):t._e()])]):t._e(),t.config.show_prayers?a("section",{staticClass:"band band-cream prayer-section",attrs:{"aria-labelledby":"prayer-section-title"}},[a("div",{staticClass:"band-inner"},[a("h2",{attrs:{id:"prayer-section-title"}},[t._v("Doa para wakif")]),null!==t.project.donor_count&&void 0!==t.project.donor_count?a("p",{staticClass:"section-subtext"},[t._v(" "+t._s(t.project.donor_count)+" wakif telah bergabung di projek ini ")]):t._e(),t.prayers.length?a("div",{staticClass:"prayer-list"},t._l(t.prayers,(function(e,i){return a("article",{key:i,staticClass:"prayer-card"},[a("p",[t._v(t._s(e.message))]),a("div",{staticClass:"prayer-attribution"},[a("span",{staticClass:"prayer-avatar",attrs:{"aria-hidden":"true"}},[t._v(t._s(t.initials(e.name)))]),e.name?a("strong",[t._v(t._s(e.name))]):t._e()])])})),0):a("p",{staticClass:"preview-note"},[t._v("Doa wakif yang nyata tampil di sini pada halaman donor. Pratinjau tidak memuat doa; bagian ini disembunyikan donor bila belum ada doa.")])])]):t._e(),t.config.show_faq?a("section",{staticClass:"band band-white faq-section",attrs:{"aria-labelledby":"faq-section-title"}},[t._m(0)]):t._e(),a("section",{staticClass:"band band-gold closing-section",attrs:{"aria-label":"Ajakan"}},[a("div",{staticClass:"band-inner closing-inner"},[t._m(1),a("button",{staticClass:"closing-action",attrs:{type:"button",disabled:""}},[t._v(t._s(t.ctaLabel)+" →")])])])]),a("footer",{staticClass:"donation-page-footer"},[a("div",{staticClass:"footer-inner"},[a("span",{staticClass:"footer-name"},[a("span",{attrs:{"aria-hidden":"true"}},[t._v("© ")]),t._v(t._s(t.footer.name))]),t.footer.hasContact?a("span",{staticClass:"footer-contact"},[t.footer.phoneHref?a("span",[t._v(t._s(t.footer.phone))]):t._e(),t.footer.showSeparator?a("span",{staticClass:"footer-separator",attrs:{"aria-hidden":"true"}},[t._v("·")]):t._e(),t.footer.email?a("span",[t._v(t._s(t.footer.email))]):t._e()]):t._e()])]),a("div",{staticClass:"page-end",attrs:{"aria-hidden":"true"}}),t.isMobile?a("div",{staticClass:"sticky-action"},[a("div",{staticClass:"sticky-total"},[a("span",[t._v("Total wakaf")]),a("strong",[t._v(t._s(t.displayTotal))])]),a("button",{attrs:{type:"button",disabled:""}},[t._v(t._s(t.ctaLabel))])]):t._e()])])])])},n=[function(){var t=this,a=t._self._c;return a("div",{staticClass:"band-inner faq-inner"},[a("h2",{attrs:{id:"faq-section-title"}},[t._v("Pertanyaan umum")]),a("details",[a("summary",[t._v("Bagaimana donasi saya digunakan dan dilaporkan?")]),a("p",[t._v("Donasi disalurkan sesuai program dan informasi projek yang tercantum pada halaman ini. Perkembangan projek dan laporan yang tersedia akan diperbarui melalui kanal resmi lembaga.")])]),a("details",[a("summary",[t._v("Apakah aman berdonasi di sini?")]),a("p",[t._v("Data yang diperlukan untuk donasi diproses melalui kanal resmi dan digunakan sesuai kebijakan privasi yang berlaku.")])]),a("details",[a("summary",[t._v("Bisakah pahalanya saya hadiahkan untuk orang tua?")]),a("p",[t._v("Pilihan hadiah pahala tersedia pada langkah checkout berikutnya bila didukung projek.")])])])},function(){var t=this,a=t._self._c;return a("div",{staticClass:"closing-copy"},[a("h2",[t._v("Kebaikan Anda hari ini, manfaat yang terus mengalir")]),a("p",[t._v("Hanya butuh satu menit untuk ikut menghadirkannya.")])])}],r=e("5530"),s=(e("4de4"),e("a15b"),e("d81d"),e("14d9"),e("fb6a"),e("e9f5"),e("910d"),e("ab43"),e("a9e3"),e("f00c"),e("d3b7"),e("ac1f"),e("3ca3"),e("1276"),e("498a"),e("ddb0"),e("2b3d"),e("bf19"),e("9861"),e("88a7"),e("271a"),e("5494"),e("2d6b")),o=e("53ca"),c=(e("99af"),e("d866"),e("a732"),e("8ba4"),e("583b"),e("aff5"),e("00b4"),e("6062"),e("1e70"),e("79a4"),e("c1a1"),e("8b00"),e("a4e7"),e("1e5a"),e("72c3"),e("843c"),e("4d90"),e("5319"),/^\d+(?:\.\d{1,2})?$/),u="function"===typeof BigInt?BigInt(Number.MAX_SAFE_INTEGER):null;function l(t){if("string"!==typeof t&&"number"!==typeof t)return null;var a=String(t).trim();if(!c.test(a))return null;var e=a.split("."),i=e[0].replace(/^0+(?=\d)/,"")||"0",n=(e[1]||"").padEnd(2,"0");return"0"===i&&"00"===n||null===u||BigInt("".concat(i).concat(n))>u?null:"".concat(i,".").concat(n)}function d(t){var a=l(t);if(!a)return null;var e=a.split(".");return Number(BigInt("".concat(e[0]).concat(e[1])))}function p(t){var a=l(t);if(!a)return"Rp0";var e=a.split("."),i=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,".");return"00"===e[1]?"Rp".concat(i):"Rp".concat(i,",").concat(e[1])}function h(t,a){var e=d(t),i="number"===typeof a?a:Number(a);if(!Number.isSafeInteger(e)||!Number.isSafeInteger(i)||i<1)return null;var n=BigInt(e)*BigInt(i);if(n>u)return null;var r=BigInt(100);return"".concat(n/r,".").concat(String(n%r).padStart(2,"0"))}function f(t,a){return"paket"===a?null:l(t&&t.effective_min_amount)}function m(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Array.isArray(t)||4!==t.length)return[];var e=a?d(a):null,i=t.map(l);return i.some((function(t){return!t}))||4!==new Set(i).size?[]:null===e?i:i.filter((function(t){return d(t)>=e}))}function v(t){return Array.isArray(t)&&4===t.length&&t.every((function(t){return Number.isInteger(t)&&t>0&&t<=50}))&&4===new Set(t).size?t:[]}function g(t,a){return t[1]||t[0]||a||null}function b(t){return t[1]||t[0]||1}function _(t,a,e,i){return p(t?h(a,e):i)}function y(t){var a=String(t||"").replace(/[^\d+]/g,"");return a?"tel:".concat(a):""}function w(t){var a=t||{},e=y(a.institution_phone),i=a.institution_email||"";return{name:a.institution_name||"BWA",phoneHref:e,phone:a.institution_phone||"",email:i,hasContact:Boolean(e||i),showSeparator:Boolean(e&&i)}}function k(t,a,e){var i=t&&t.cta&&"object"===Object(o["a"])(t.cta)?t.cta:{};return{amounts:"paket"===a?[]:m(i.preset_amounts,e),quantities:"paket"===a?v(i.preset_package_qty):[]}}var C="Mari hadirkan manfaat melalui Donasi",I="Berdonasi Sekarang",j=760,x={name:"DonationPagePreview",data:function(){return{state:"loading",snapshot:null,mobileViewport:!1,expiryTimer:null,pendingTimer:null,previewDraftId:"",previewMessageSource:null,openedByEditor:!1,narrowWindow:!1}},computed:{account:function(){return this.$store.getters.accountData||{}},payload:function(){return this.snapshot&&this.snapshot.payload?this.snapshot.payload:{}},config:function(){return this.payload.config||{}},hero:function(){var t=this.payload.hero||{};return this.snapshot&&this.snapshot.localImageUrl?Object(r["a"])(Object(r["a"])({},t),{},{image:this.snapshot.localImageUrl}):t},project:function(){return this.payload.project||{}},projectType:function(){return this.project.project_type||this.config.project_type||null},isPackageMode:function(){return"paket"===this.projectType},isMobile:function(){return this.mobileViewport||this.narrowWindow},minimumAmount:function(){return f(this.config,this.projectType)},packagePrice:function(){return l(this.project.package_price)||"0.00"},presets:function(){return k(this.payload,this.projectType,this.minimumAmount)},presetAmounts:function(){return this.presets.amounts},presetQuantities:function(){return this.presets.quantities},selectedAmount:function(){return g(this.presetAmounts,this.minimumAmount)},selectedQuantity:function(){return b(this.presetQuantities)},displayTotal:function(){return _(this.isPackageMode,this.packagePrice,this.selectedQuantity,this.selectedAmount)},totalLabel:function(){return this.isPackageMode?"Total wakaf (".concat(this.selectedQuantity," paket)"):"Total wakaf"},ctaSubtext:function(){return"Sisa target projek ini ".concat(p(this.project.remaining_amount),".")},ctaTitle:function(){return this.payload.cta&&this.payload.cta.title?this.payload.cta.title:C},ctaLabel:function(){return this.payload.cta&&this.payload.cta.label?this.payload.cta.label:I},prayers:function(){return Array.isArray(this.payload.prayers)?this.payload.prayers:[]},storyText:function(){return this.config.show_story&&(this.config.problem_statement||this.project.short_description)||""},hasQuote:function(){return Boolean(this.config.show_story&&this.config.quote_text)},quoteMeta:function(){var t=this.config.quote_role?" · ".concat(this.config.quote_role):"";return this.config.quote_location&&(t+=" · ".concat(this.config.quote_location)),t},progress:function(){var t=Number(this.project.progress)||0;return Math.max(0,Math.min(100,t))},footer:function(){return w(this.config)},siteLabel:function(){return this.snapshot&&this.snapshot.sourceName||this.project.checkout_domain||"Website terpilih"},expiryLabel:function(){if(!this.snapshot)return"sebentar";var t=Math.max(1,Math.ceil((this.snapshot.expiresAt-Date.now())/6e4));return"".concat(t," menit")}},watch:{"$store.state.account.accessToken":"validateSnapshotAccess","$store.state.account.accountData":"validateSnapshotAccess"},mounted:function(){this.previewMessageSource=window.opener||null,this.openedByEditor=Boolean(this.previewMessageSource),window.addEventListener("message",this.handlePreviewMessage),window.addEventListener("resize",this.updateNarrowWindow),this.updateNarrowWindow(),this.loadSnapshot()},beforeDestroy:function(){window.removeEventListener("message",this.handlePreviewMessage),window.removeEventListener("resize",this.updateNarrowWindow),this.clearSnapshot()},methods:{formatRupiah:p,updateNarrowWindow:function(){this.narrowWindow=window.innerWidth<=j},initials:function(t){var a=String(t||"").trim().split(/\s+/).filter(Boolean);return a.length?a.slice(0,2).map((function(t){return t.charAt(0).toUpperCase()})).join(""):"?"},loadSnapshot:function(){var t=this.$route.query&&this.$route.query.draft;this.previewDraftId=t||"";var a=Object(s["l"])(t||null);if(!a)return this.previewMessageSource?(this.state="loading",void this.waitForPreviewSnapshot()):void(this.state="expired");this.acceptSnapshot(a)},waitForPreviewSnapshot:function(){var t=this;this.pendingTimer&&clearInterval(this.pendingTimer);var a=Date.now()+3e4;this.pendingTimer=setInterval((function(){var e=Object(s["l"])(t.previewDraftId||null);e?(clearInterval(t.pendingTimer),t.pendingTimer=null,t.acceptSnapshot(e)):Date.now()>=a&&(clearInterval(t.pendingTimer),t.pendingTimer=null,t.state="expired")}),200)},handlePreviewMessage:function(t){if(t.origin===window.location.origin&&t.source===this.previewMessageSource&&t.data&&t.data.draftId===this.previewDraftId)return"donation-page-preview-error"===t.data.type?(this.pendingTimer&&clearInterval(this.pendingTimer),this.pendingTimer=null,void(this.state="expired")):void("donation-page-preview-ready"===t.data.type&&t.data.snapshot&&(this.pendingTimer&&clearInterval(this.pendingTimer),this.pendingTimer=null,this.acceptSnapshot(t.data.snapshot)))},acceptSnapshot:function(t){var a=this,e=Number(t&&t.expiresAt);if(!t||t.draftId!==this.previewDraftId||!Number.isFinite(e)||e<=Date.now())return this.expiryTimer&&clearTimeout(this.expiryTimer),this.expiryTimer=null,t&&t.localImageUrl&&URL.revokeObjectURL(t.localImageUrl),void(this.state="expired");if("ready"!==this.state||!this.snapshot||this.snapshot.draftId!==t.draftId){this.expiryTimer&&clearTimeout(this.expiryTimer),this.expiryTimer=null;var i=this.account.id||this.account.user_id,n="AA"===this.account.role||"CC"===this.account.role,r="AA"===this.account.role||this.account.source_id===t.sourceId,o=t.payload&&t.payload.config&&t.payload.config.source_id;if(!this.$store.getters.isLoggedIn||!n||!r||t.userId!==i||o!==t.sourceId)return t.localImageUrl&&URL.revokeObjectURL(t.localImageUrl),Object(s["b"])(t.draftId),void(this.state="forbidden");this.snapshot=t,this.state="ready";try{window.opener=null}catch(c){}this.expiryTimer=setTimeout((function(){a.clearSnapshot(),a.state="expired"}),Math.max(0,e-Date.now()))}},validateSnapshotAccess:function(){if("ready"===this.state&&this.snapshot){var t=this.account.id||this.account.user_id,a="AA"===this.account.role||"CC"===this.account.role,e="AA"===this.account.role||this.account.source_id===this.snapshot.sourceId,i=this.payload.config&&this.payload.config.source_id;this.$store.getters.isLoggedIn&&a&&e&&this.snapshot.userId===t&&i===this.snapshot.sourceId||(this.clearSnapshot(),this.state="forbidden")}},clearSnapshot:function(){this.expiryTimer&&clearTimeout(this.expiryTimer),this.pendingTimer&&clearInterval(this.pendingTimer),this.pendingTimer=null,this.snapshot&&this.snapshot.localImageUrl&&URL.revokeObjectURL(this.snapshot.localImageUrl),this.snapshot&&Object(s["b"])(this.snapshot.draftId),this.snapshot=null},closePreview:function(){this.clearSnapshot(),this.openedByEditor?window.close():this.$router.push("/app/donation-page")}}},T=x,S=(e("1644"),e("2877")),A=Object(S["a"])(T,i,n,!1,null,"b9cfb356",null);a["default"]=A.exports},"2d6b":function(t,a,e){"use strict";e.d(a,"a",(function(){return n})),e.d(a,"c",(function(){return o})),e.d(a,"d",(function(){return c})),e.d(a,"f",(function(){return u})),e.d(a,"g",(function(){return l})),e.d(a,"j",(function(){return p})),e.d(a,"k",(function(){return h})),e.d(a,"e",(function(){return f})),e.d(a,"h",(function(){return m})),e.d(a,"i",(function(){return b})),e.d(a,"m",(function(){return y})),e.d(a,"l",(function(){return w})),e.d(a,"b",(function(){return k}));var i=e("53ca"),n=(e("99af"),e("13d5"),e("e9f5"),e("7d54"),e("9485"),e("e9c4"),e("a9e3"),e("9129"),e("b64b"),e("d3b7"),e("ac1f"),e("00b4"),e("5319"),e("498a"),e("159b"),6e5),r="donation-page-preview-active",s="donation-page-preview:";function o(){return"".concat(String("https://orchestrator.bwa.id/api/v1/").replace(/\/+$/,""),"/donation-page")}function c(t){return{headers:{Authorization:"Bearer ".concat(t)}}}function u(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Terjadi kesalahan. Coba lagi.",e=t&&t.response,i=e&&e.data;return i&&"string"===typeof i.message?i.message:"string"===typeof t?t:a}function l(t){var a=t&&t.response&&t.response.data&&t.response.data.errors;return a&&"object"===Object(i["a"])(a)?Object.keys(a).reduce((function(t,e){var i=a[e];return t[e]=Array.isArray(i)?i[0]:String(i),t}),{}):{}}function d(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return void 0===t||null===t?a:!0===t||1===t||"1"===t||"true"===t||"on"===t}function p(t){if(null===t||void 0===t||""===t)return"-";var a=Number(t);return Number.isNaN(a)?String(t):new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR",maximumFractionDigits:a%1?2:0}).format(a)}function h(t){var a=Number(t);return Number.isNaN(a)?"0%":"".concat(a.toLocaleString("id-ID",{maximumFractionDigits:2}),"%")}function f(){return{project_id:"",hero_title:"",hero_subtitle:"",project_type:"nominal",package_price:"",min_amount:"",problem_statement:"",quote_text:"",quote_name:"",quote_role:"",quote_location:"",institution_name:"",institution_phone:"",institution_email:"",show_story:!0,show_prayers:!0,show_faq:!0,is_active:!1}}function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=f();return Object.keys(a).forEach((function(e){void 0!==t[e]&&null!==t[e]&&(a[e]=t[e])})),a.show_story=d(t.show_story,!0),a.show_prayers=d(t.show_prayers,!0),a.show_faq=d(t.show_faq,!0),a.is_active=d(t.is_active,!1),a}var v=/^[0-9+().\-\s]{6,40}$/,g=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function b(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=function(a){return"string"===typeof t[a]?t[a].trim():""},e={},i=a("institution_name"),n=a("institution_phone"),r=a("institution_email");return i.length>160&&(e.institution_name="Maksimal 160 karakter."),n&&n.length>40?e.institution_phone="Maksimal 40 karakter.":n&&!v.test(n)&&(e.institution_phone="Telepon hanya boleh berisi angka, spasi, dan + ( ) . -, minimal 6 karakter."),r&&r.length>254?e.institution_email="Maksimal 254 karakter.":r&&!g.test(r)&&(e.institution_email="Format email tidak valid."),e}function _(t){return"".concat(s).concat(t)}function y(t){var a=_(t.draftId);return sessionStorage.setItem(a,JSON.stringify(t)),sessionStorage.setItem(r,t.draftId),a}function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=t||sessionStorage.getItem(r);if(!a)return null;var e=sessionStorage.getItem(_(a));if(!e)return null;try{var i=JSON.parse(e);return!i.draftId||t&&i.draftId!==t||!i.expiresAt||i.expiresAt<=Date.now()?(k(i.draftId),null):i}catch(n){return k(a),null}}function k(t){t&&sessionStorage.removeItem(_(t)),t&&sessionStorage.getItem(r)!==t||sessionStorage.removeItem(r)}},"4d90":function(t,a,e){"use strict";var i=e("23e7"),n=e("0ccb").start,r=e("9a0c");i({target:"String",proto:!0,forced:r},{padStart:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},"583b":function(t,a,e){"use strict";var i=e("23e7"),n=e("eac5"),r=Math.abs;i({target:"Number",stat:!0},{isSafeInteger:function(t){return n(t)&&r(t)<=9007199254740991}})},"8ba4":function(t,a,e){"use strict";var i=e("23e7"),n=e("eac5");i({target:"Number",stat:!0},{isInteger:n})},9129:function(t,a,e){"use strict";var i=e("23e7");i({target:"Number",stat:!0},{isNaN:function(t){return t!==t}})},9485:function(t,a,e){"use strict";var i=e("23e7"),n=e("2266"),r=e("59ed"),s=e("825a"),o=e("46c4"),c=e("2a62"),u=e("f99f"),l=e("2ba4"),d=e("d039"),p=TypeError,h=d((function(){[].keys().reduce((function(){}),void 0)})),f=!h&&u("reduce",p);i({target:"Iterator",proto:!0,real:!0,forced:h||f},{reduce:function(t){s(this);try{r(t)}catch(d){c(this,"throw",d)}var a=arguments.length<2,e=a?void 0:arguments[1];if(f)return l(f,this,a?[t]:[t,e]);var i=o(this),u=0;if(n(i,(function(i){a?(a=!1,e=i):e=t(e,i,u),u++}),{IS_RECORD:!0}),a)throw new p("Reduce of empty iterator with no initial value");return e}})},aff5:function(t,a,e){"use strict";var i=e("23e7");i({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})},d58f:function(t,a,e){"use strict";var i=e("59ed"),n=e("7b0b"),r=e("44ad"),s=e("07fa"),o=TypeError,c="Reduce of empty array with no initial value",u=function(t){return function(a,e,u,l){var d=n(a),p=r(d),h=s(d);if(i(e),0===h&&u<2)throw new o(c);var f=t?h-1:0,m=t?-1:1;if(u<2)while(1){if(f in p){l=p[f],f+=m;break}if(f+=m,t?f<0:h<=f)throw new o(c)}for(;t?f>=0:h>f;f+=m)f in p&&(l=e(l,p[f],f,d));return l}};t.exports={left:u(!1),right:u(!0)}},e285:function(t,a,e){"use strict";var i=e("cfe9"),n=i.isFinite;t.exports=Number.isFinite||function(t){return"number"==typeof t&&n(t)}},eac5:function(t,a,e){"use strict";var i=e("861d"),n=Math.floor;t.exports=Number.isInteger||function(t){return!i(t)&&isFinite(t)&&n(t)===t}},f00c:function(t,a,e){"use strict";var i=e("23e7"),n=e("e285");i({target:"Number",stat:!0},{isFinite:n})}}]);