| 1 |
(()=>{"use strict";const e=window.React,t=window.wp.element;function a({pages:t=[],selected:a=""}){const{currentProduct:s,logoUrl:l,strings:n,links:i,showReviewLink:c}=window.tiSDKAboutData,r=(e="")=>e===a?"active":"",o=`https://wordpress.org/support/${["neve","hestia","hestia_pro"].indexOf(s.slug)>-1?"theme":"plugin"}/${s.slug?.replaceAll("_pro","")?.replaceAll("_","-")}/reviews/#new-post`;return(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"head"},(0,e.createElement)("div",{className:"container"},(0,e.createElement)("img",{src:l,alt:s.name}),(0,e.createElement)("p",null,"by ",(0,e.createElement)("a",{href:"https://themeisle.com"},"Themeisle")),Boolean(c)&&(0,e.createElement)("p",{className:"review-link"},"Enjoying ",s.name,"? ",(0,e.createElement)("a",{href:o,target:"_blank"},"Give us a rating!")))),(i.length>0||t.length>0)&&(0,e.createElement)("div",{className:"container"},(0,e.createElement)("ul",{className:"nav"},(0,e.createElement)("li",{className:r()},(0,e.createElement)("a",{href:window.location},n.aboutUs)),t.map(((t,a)=>(0,e.createElement)("li",{className:r(t.hash),key:a},(0,e.createElement)("a",{href:t.hash},t.name)))),i.map(((t,a)=>(0,e.createElement)("li",{key:a},(0,e.createElement)("a",{href:t.url},t.text)))))))}const s=window.wp.components;function l(){const{strings:a,teamImage:l,homeUrl:n,pageSlug:i,services:c={}}=window.tiSDKAboutData,{heroHeader:r,heroTextFirst:o,heroTextSecond:m,teamImageCaption:d,newsHeading:u,emailPlaceholder:p,signMeUp:h,services:E}=a,[g,v]=(0,t.useState)(""),[b,N]=(0,t.useState)(!1),[w,f]=(0,t.useState)(!1),y=[{title:E.items.websiteDesign.title,subtitle:E.items.websiteDesign.subtitle,href:c.websiteDesignUrl||"https://themeisle.com/wordpress-website-design/",icon:"dashicons-admin-site"},{title:E.items.support.title,subtitle:E.items.support.subtitle,href:c.supportUrl||"https://themeisle.com/wordpress-support/",icon:"dashicons-sos"},{title:E.items.speed.title,subtitle:E.items.speed.subtitle,href:c.speedUrl||"https://themeisle.com/wordpress-speed-optimization/",icon:"dashicons-dashboard"},{title:E.items.seo.title,subtitle:E.items.seo.subtitle,href:c.seoFoundationUrl||"https://themeisle.com/wordpress-seo-foundation/",icon:"dashicons-search"},{title:E.items.maintenance.title,subtitle:E.items.maintenance.subtitle,href:c.maintenanceUrl||"https://themeisle.com/wordpress-maintenance/",icon:"dashicons-shield"},{title:E.items.hackedSite.title,subtitle:E.items.hackedSite.subtitle,href:c.hackedRepairUrl||"https://themeisle.com/wordpress-hacked-site-repair/",icon:"dashicons-lock"}];return(0,e.createElement)("div",{className:"container"},(0,e.createElement)("div",{className:"story-card"},(0,e.createElement)("div",{className:"body"},(0,e.createElement)("div",null,(0,e.createElement)("h2",null,r),(0,e.createElement)("p",null,o),(0,e.createElement)("p",null,m)),(0,e.createElement)("figure",null,(0,e.createElement)("img",{src:l,alt:d}),(0,e.createElement)("figcaption",null,d))),(0,e.createElement)("div",{className:"footer"},(0,e.createElement)("h2",null,u),(0,e.createElement)("form",{onSubmit:e=>{e.preventDefault(),N(!0),fetch("https://api.themeisle.com/tracking/subscribe",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json, */*;q=0.1","Cache-Control":"no-cache"},body:JSON.stringify({slug:"about-us",site:n,from:i,email:g})}).then((e=>e.json())).then((e=>{N(!1),"success"===e.code&&f(!0)}))?.catch((e=>{N(!1)}))}},(0,e.createElement)("input",{disabled:b||w,type:"email",value:g,onChange:e=>{v(e.target.value)},placeholder:p}),!b&&!w&&(0,e.createElement)(s.Button,{isPrimary:!0,type:"submit"},h),b&&(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),w&&(0,e.createElement)("span",{className:"dashicons dashicons-yes-alt"})))),(0,e.createElement)("section",{className:"services-card","aria-label":E.ariaLabel},(0,e.createElement)("div",{className:"services-header"},(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"trustpilot","aria-label":E.trustpilotLabel},(0,e.createElement)("span",{className:"trustpilot-rated"},E.trustpilotRated),(0,e.createElement)("span",{className:"trustpilot-score"},"4.8"),(0,e.createElement)("span",{className:"trustpilot-stars","aria-hidden":"true"},"� |
| 6 |
"),(0,e.createElement)("span",{className:"trustpilot-on"},E.trustpilotOn),(0,e.createElement)("span",{className:"trustpilot-brand"},E.trustpilotBrand)),(0,e.createElement)("h2",null,E.heading),(0,e.createElement)("p",null,E.description)),(0,e.createElement)(s.Button,{isPrimary:!0,href:c.exploreAllUrl||"https://themeisle.com/services/",target:"_blank",rel:"noopener noreferrer",className:"services-cta"},E.cta)),(0,e.createElement)("div",{className:"services-grid"},y.map((t=>(0,e.createElement)("a",{key:t.title,href:t.href,target:"_blank",rel:"noopener noreferrer",className:"service-item"},(0,e.createElement)("div",{className:"service-icon-wrap"},(0,e.createElement)("span",{className:`dashicons ${t.icon}`,"aria-hidden":"true"})),(0,e.createElement)("div",{className:"service-content"},(0,e.createElement)("h3",null,t.title),(0,e.createElement)("p",null,t.subtitle)),(0,e.createElement)("span",{className:"service-arrow","aria-hidden":"true"},"→")))))))}const n=(e,t=!1)=>new Promise((a=>{wp.updates.ajax(!0===t?"install-theme":"install-plugin",{slug:e,success:e=>{a({success:!0,data:e})},error:e=>{a({success:!1,code:e.errorCode})}})}));function i({product:a,slug:l}){const{icon:i,name:c,description:r,status:o,premiumUrl:m,activationLink:d}=a,{strings:u,canInstallPlugins:p,canActivatePlugins:h}=window.tiSDKAboutData,{installNow:E,installed:g,notInstalled:v,active:b,activate:N,learnMore:w}=u,f=!!m,[y,k]=(0,t.useState)(o),[S,_]=(0,t.useState)(!1),D=async()=>{_(!0),await n(l,"neve"===l).then((e=>{e.success&&k("installed")})),_(!1)},T=async()=>{_(!0),window.location.href=d},x=()=>"not-installed"===y&&f?(0,e.createElement)(s.Button,{isLink:!0,icon:"external",href:m,target:"_blank"},w):"not-installed"!==y||f?"installed"===y?(0,e.createElement)(s.Button,{isSecondary:!0,onClick:T,disabled:S||!h},N):null:(0,e.createElement)(s.Button,{isPrimary:!0,onClick:D,disabled:S||!p},E),A=!p&&"not-installed"===y||!h&&"installed"===y?(0,e.createElement)(s.Tooltip,{text:`Ask your admin to enable ${c} on your site`,position:"top center"},x()):x();return(0,e.createElement)("div",{className:"product-card"},(0,e.createElement)("div",{className:"header"},i&&(0,e.createElement)("img",{src:i,alt:c}),(0,e.createElement)("h2",null,c)),(0,e.createElement)("div",{className:"body"},(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:r}})),(0,e.createElement)("div",{className:"footer"},(0,e.createElement)("p",null,"Status:"," ",(0,e.createElement)("span",{className:y},"installed"===y&&g,"not-installed"===y&&v,"active"===y&&b)),"active"!==y&&!S&&A,S&&(0,e.createElement)("span",{className:"dashicons dashicons-update spin"})))}function c(){const{products:t}=window.tiSDKAboutData;return(0,e.createElement)("div",{className:"container"},(0,e.createElement)("div",{className:"product-cards"},Object.keys(t).map(((a,s)=>(0,e.createElement)(i,{key:a,slug:a,product:t[a]})))))}const r={"otter-page":function({page:a={}}){const{products:l,canInstallPlugins:i,canActivatePlugins:c}=window.tiSDKAboutData,{strings:r,plugin:o}=a,m=a&&a.product?a.product:"",d=m&&l[m]&&l[m].icon?l[m].icon:null,[u,p]=(0,t.useState)(r.testimonials.users[0]),[h,E]=(0,t.useState)(o.status),[g,v]=(0,t.useState)(!1),b="In Progress",N=async()=>{v(!0),await n(m,!1).then((e=>{e.success&&(E("installed"),w())}))},w=async()=>{v(!0),window.location.href=o.activationLink},f=(0,e.createElement)(s.Button,{variant:"primary",disabled:g||("not-installed"===h?!i:!c),className:"otter-button"+(g?" is-loading":""),onClick:"not-installed"===h?N:w},g?(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"dashicons dashicons-update spin"})," ",b):r.buttons.install_otter_free),y=(0,e.createElement)(s.Button,{variant:"primary",disabled:g||("not-installed"===h?!i:!c),className:"otter-button"+(g?" is-loading":""),onClick:"not-installed"===h?N:w},g?(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),b):r.buttons.install_now),k=!i&&"not-installed"===h||!c&&"installed"===h||!1,S=t=>k?(0,e.createElement)(s.Tooltip,{text:"Ask your admin to enable Otter on your site",position:"top center"},t):t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"hero"},d&&(0,e.createElement)("img",{className:"logo",src:d,alt:a.name||""}),(0,e.createElement)("span",{className:"label"},"Neve + Otter = New Possibilities 🤝"),(0,e.createElement)("h1",null,r.heading),(0,e.createElement)("p",null,r.text),("not-installed"===h||"installed"===h)&&S(f)),(0,e.createElement)("div",{className:"col-3-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h3",null,r.features.advancedTitle),(0,e.createElement)("p",null,r.features.advancedDesc)),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h3",null,r.features.fastTitle),(0,e.createElement)("p",null,r.features.fastDesc)),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h3",null,r.features.mobileTitle),(0,e.createElement)("p",null,r.features.mobileDesc))),(0,e.createElement)("div",{className:"col-2-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("img",{src:r.details.s1Image,alt:r.details.s1Title})),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.details.s1Title),(0,e.createElement)("p",null,r.details.s1Text))),(0,e.createElement)("div",{className:"col-2-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.details.s2Title),(0,e.createElement)("p",null,r.details.s2Text)),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("img",{src:r.details.s2Image,alt:r.details.s1Title}))),(0,e.createElement)("div",{className:"col-2-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("img",{src:r.details.s3Image,alt:r.details.s1Title})),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.details.s3Title),(0,e.createElement)("p",null,r.details.s3Text))),(0,e.createElement)("div",{className:"col-2-highlights",style:{backgroundColor:"#F7F7F7",borderBottom:"none",borderBottomRightRadius:"8px",borderBottomLeftRadius:"8px"}},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.testimonials.heading),(0,e.createElement)("div",{className:"button-row"},("not-installed"===h||"installed"===h)&&S(y),(0,e.createElement)("a",{className:"components-button otter-button is-secondary",href:r.buttons.learn_more_link,target:"_blank",rel:"external noreferrer noopener"},r.buttons.learn_more))),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("div",{className:"testimonials"},(0,e.createElement)("ul",{id:"testimonial-container",className:"testimonial-container"},r.testimonials.users.map(((t,a)=>(0,e.createElement)("li",{className:"testimonial",id:"ts_"+a,key:"ts_"+a},(0,e.createElement)("p",null,'"',t.text,'"'),(0,e.createElement)("img",{src:t.avatar,alt:t.name}),(0,e.createElement)("h3",null,t.name))))),(0,e.createElement)("div",{className:"testimonial-nav"},r.testimonials.users.map(((t,a)=>(0,e.createElement)(s.Button,{className:"testimonial-button"+(t.name===u.name?" active":""),key:"button_"+a,onClick:()=>(e=>{const t=r.testimonials.users[e];document.getElementById("ts_"+e).scrollIntoView({behavior:"smooth"}),p(t)})(a)}))))))))}};function o(t){const a=r[t.id];return(0,e.createElement)(a,{page:t.page})}function m({page:t={}}){return(0,e.createElement)("div",{className:"product-page"+(t&&t.product?" "+t.product:"")},(0,e.createElement)(o,{id:t.id,page:t}))}const d=()=>{let e=window.location.hash;return"string"!=typeof window.location.hash?null:e};function u(){const{productPages:s}=window.tiSDKAboutData,n=s?Object.keys(s).map((e=>{const t=s[e];return t.id=e,t})):[],[i,r]=(0,t.useState)(d()),o=()=>{const e=d();null!==e&&r(e)};(0,t.useEffect)((()=>(o(),window.addEventListener("hashchange",o),window.tsdk_reposition_notice&&window.tsdk_reposition_notice(),()=>{window.removeEventListener("hashchange",o)})),[]);const u=n.filter((e=>e.hash===i));return u.length>0?(0,e.createElement)("div",{className:"ti-about"},(0,e.createElement)(a,{pages:n,selected:i}),(0,e.createElement)(m,{page:u[0]})):(0,e.createElement)("div",{className:"ti-about"},(0,e.createElement)(a,{pages:n}),(0,e.createElement)("div",{id:"tsdk_banner"}),(0,e.createElement)(l,null),(0,e.createElement)(c,null))}document.addEventListener("DOMContentLoaded",(()=>{const a=document.querySelector("#ti-sdk-about");a&&(0,t.render)((0,e.createElement)(u,null),a)}))})(); |