Changeset 3494876
- Timestamp:
- 03/30/2026 06:56:02 PM (6 days ago)
- Location:
- kind-site-framework
- Files:
-
- 16 added
- 2 deleted
- 32 edited
- 47 copied
-
tags/1.3 (copied) (copied from kind-site-framework/trunk)
-
tags/1.3/build/blocks-manifest.php (modified) (1 diff)
-
tags/1.3/build/blocks/cta-buttons/render.php (copied) (copied from kind-site-framework/trunk/build/blocks/cta-buttons/render.php)
-
tags/1.3/build/blocks/insurers/block.json (modified) (1 diff)
-
tags/1.3/build/blocks/insurers/index.asset.php (modified) (1 diff)
-
tags/1.3/build/blocks/insurers/index.js (modified) (1 diff)
-
tags/1.3/build/blocks/insurers/render.php (modified) (4 diffs)
-
tags/1.3/build/scripts/content.asset.php (copied) (copied from kind-site-framework/trunk/build/scripts/content.asset.php)
-
tags/1.3/build/scripts/content.js (copied) (copied from kind-site-framework/trunk/build/scripts/content.js)
-
tags/1.3/build/scripts/editor-sidebar.asset.php (copied) (copied from kind-site-framework/trunk/build/scripts/editor-sidebar.asset.php) (1 diff)
-
tags/1.3/build/scripts/editor-sidebar.js (copied) (copied from kind-site-framework/trunk/build/scripts/editor-sidebar.js) (1 diff)
-
tags/1.3/build/styles/editor-sidebar-rtl.css (copied) (copied from kind-site-framework/trunk/build/styles/editor-sidebar-rtl.css)
-
tags/1.3/build/styles/editor-sidebar.asset.php (copied) (copied from kind-site-framework/trunk/build/styles/editor-sidebar.asset.php)
-
tags/1.3/build/styles/editor-sidebar.css (copied) (copied from kind-site-framework/trunk/build/styles/editor-sidebar.css)
-
tags/1.3/build/styles/editor-sidebar.js (copied) (copied from kind-site-framework/trunk/build/styles/editor-sidebar.js)
-
tags/1.3/includes/class-assets.php (copied) (copied from kind-site-framework/trunk/includes/class-assets.php) (7 diffs)
-
tags/1.3/includes/class-autoloader.php (copied) (copied from kind-site-framework/trunk/includes/class-autoloader.php)
-
tags/1.3/includes/class-blocks.php (copied) (copied from kind-site-framework/trunk/includes/class-blocks.php) (1 diff)
-
tags/1.3/includes/class-container.php (copied) (copied from kind-site-framework/trunk/includes/class-container.php)
-
tags/1.3/includes/class-data.php (added)
-
tags/1.3/includes/class-file-monitor.php (copied) (copied from kind-site-framework/trunk/includes/class-file-monitor.php)
-
tags/1.3/includes/class-helpers.php (copied) (copied from kind-site-framework/trunk/includes/class-helpers.php) (2 diffs)
-
tags/1.3/includes/class-insurers.php (copied) (copied from kind-site-framework/trunk/includes/class-insurers.php) (5 diffs)
-
tags/1.3/includes/class-patterns.php (copied) (copied from kind-site-framework/trunk/includes/class-patterns.php)
-
tags/1.3/includes/class-plugin.php (copied) (copied from kind-site-framework/trunk/includes/class-plugin.php) (2 diffs)
-
tags/1.3/includes/class-post-meta.php (copied) (copied from kind-site-framework/trunk/includes/class-post-meta.php) (11 diffs)
-
tags/1.3/includes/class-presets.php (copied) (copied from kind-site-framework/trunk/includes/class-presets.php)
-
tags/1.3/includes/class-schema.php (deleted)
-
tags/1.3/includes/class-settings.php (copied) (copied from kind-site-framework/trunk/includes/class-settings.php) (17 diffs)
-
tags/1.3/includes/class-structured-data.php (copied) (copied from kind-site-framework/trunk/includes/class-structured-data.php) (10 diffs)
-
tags/1.3/includes/class-templates.php (copied) (copied from kind-site-framework/trunk/includes/class-templates.php) (1 diff)
-
tags/1.3/includes/interface-assets.php (copied) (copied from kind-site-framework/trunk/includes/interface-assets.php)
-
tags/1.3/includes/interface-blocks.php (copied) (copied from kind-site-framework/trunk/includes/interface-blocks.php)
-
tags/1.3/includes/interface-container.php (copied) (copied from kind-site-framework/trunk/includes/interface-container.php)
-
tags/1.3/includes/interface-data.php (added)
-
tags/1.3/includes/interface-file-monitor.php (copied) (copied from kind-site-framework/trunk/includes/interface-file-monitor.php)
-
tags/1.3/includes/interface-helpers.php (copied) (copied from kind-site-framework/trunk/includes/interface-helpers.php) (2 diffs)
-
tags/1.3/includes/interface-insurers.php (copied) (copied from kind-site-framework/trunk/includes/interface-insurers.php) (2 diffs)
-
tags/1.3/includes/interface-patterns.php (copied) (copied from kind-site-framework/trunk/includes/interface-patterns.php)
-
tags/1.3/includes/interface-plugin.php (copied) (copied from kind-site-framework/trunk/includes/interface-plugin.php) (2 diffs)
-
tags/1.3/includes/interface-post-meta.php (copied) (copied from kind-site-framework/trunk/includes/interface-post-meta.php) (7 diffs)
-
tags/1.3/includes/interface-presets.php (copied) (copied from kind-site-framework/trunk/includes/interface-presets.php)
-
tags/1.3/includes/interface-schema.php (deleted)
-
tags/1.3/includes/interface-service.php (copied) (copied from kind-site-framework/trunk/includes/interface-service.php)
-
tags/1.3/includes/interface-settings.php (copied) (copied from kind-site-framework/trunk/includes/interface-settings.php) (2 diffs)
-
tags/1.3/includes/interface-structured-data.php (copied) (copied from kind-site-framework/trunk/includes/interface-structured-data.php)
-
tags/1.3/includes/interface-templates.php (copied) (copied from kind-site-framework/trunk/includes/interface-templates.php)
-
tags/1.3/kind-site-framework.php (copied) (copied from kind-site-framework/trunk/kind-site-framework.php) (2 diffs)
-
tags/1.3/media/accreditations (added)
-
tags/1.3/media/accreditations/DHCS.webp (added)
-
tags/1.3/media/accreditations/LegitScript.webp (added)
-
tags/1.3/media/accreditations/National-Quality-Approval.webp (added)
-
tags/1.3/media/insurance/colored/healthnet.png (copied) (copied from kind-site-framework/trunk/media/insurance/colored/healthnet.png)
-
tags/1.3/media/insurance/colored/highmark.svg (copied) (copied from kind-site-framework/trunk/media/insurance/colored/highmark.svg)
-
tags/1.3/media/insurance/colored/independence.svg (copied) (copied from kind-site-framework/trunk/media/insurance/colored/independence.svg)
-
tags/1.3/media/insurance/colored/molinahealthcare.svg (copied) (copied from kind-site-framework/trunk/media/insurance/colored/molinahealthcare.svg)
-
tags/1.3/media/insurance/colored/wellcare.svg (copied) (copied from kind-site-framework/trunk/media/insurance/colored/wellcare.svg)
-
tags/1.3/patterns/cta-3.php (added)
-
tags/1.3/patterns/hero-large.php (modified) (1 diff)
-
tags/1.3/patterns/insurance-accepted.php (copied) (copied from kind-site-framework/trunk/patterns/insurance-accepted.php)
-
tags/1.3/patterns/service-starter.php (added)
-
tags/1.3/readme.txt (copied) (copied from kind-site-framework/trunk/readme.txt) (3 diffs)
-
tags/1.3/templates/page-with-hero.php (modified) (3 diffs)
-
tags/1.3/uninstall.php (copied) (copied from kind-site-framework/trunk/uninstall.php)
-
trunk/build/blocks-manifest.php (modified) (1 diff)
-
trunk/build/blocks/insurers/block.json (modified) (1 diff)
-
trunk/build/blocks/insurers/index.asset.php (modified) (1 diff)
-
trunk/build/blocks/insurers/index.js (modified) (1 diff)
-
trunk/build/blocks/insurers/render.php (modified) (4 diffs)
-
trunk/build/scripts/editor-sidebar.asset.php (modified) (1 diff)
-
trunk/build/scripts/editor-sidebar.js (modified) (1 diff)
-
trunk/includes/class-assets.php (modified) (7 diffs)
-
trunk/includes/class-blocks.php (modified) (1 diff)
-
trunk/includes/class-data.php (added)
-
trunk/includes/class-helpers.php (modified) (2 diffs)
-
trunk/includes/class-insurers.php (modified) (5 diffs)
-
trunk/includes/class-plugin.php (modified) (2 diffs)
-
trunk/includes/class-post-meta.php (modified) (11 diffs)
-
trunk/includes/class-settings.php (modified) (17 diffs)
-
trunk/includes/class-structured-data.php (modified) (10 diffs)
-
trunk/includes/class-templates.php (modified) (1 diff)
-
trunk/includes/interface-data.php (added)
-
trunk/includes/interface-helpers.php (modified) (2 diffs)
-
trunk/includes/interface-insurers.php (modified) (2 diffs)
-
trunk/includes/interface-plugin.php (modified) (2 diffs)
-
trunk/includes/interface-post-meta.php (modified) (7 diffs)
-
trunk/includes/interface-settings.php (modified) (2 diffs)
-
trunk/kind-site-framework.php (modified) (2 diffs)
-
trunk/media/accreditations (added)
-
trunk/media/accreditations/DHCS.webp (added)
-
trunk/media/accreditations/LegitScript.webp (added)
-
trunk/media/accreditations/National-Quality-Approval.webp (added)
-
trunk/patterns/cta-3.php (added)
-
trunk/patterns/hero-large.php (modified) (1 diff)
-
trunk/patterns/service-starter.php (added)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/templates/page-with-hero.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kind-site-framework/tags/1.3/build/blocks-manifest.php
r3473938 r3494876 59 59 'insurers' => array( 60 60 'type' => 'array' 61 ), 62 'extraInsurers' => array( 63 'type' => 'string' 61 64 ) 62 65 ), -
kind-site-framework/tags/1.3/build/blocks/insurers/block.json
r3473938 r3494876 20 20 "insurers": { 21 21 "type": "array" 22 }, 23 "extraInsurers": { 24 "type": "string" 22 25 } 23 26 }, -
kind-site-framework/tags/1.3/build/blocks/insurers/index.asset.php
r3473938 r3494876 1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => ' ae936c452309b70f2f24');1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '2419a2a604fd331e2e9f'); -
kind-site-framework/tags/1.3/build/blocks/insurers/index.js
r3473938 r3494876 1 (()=>{"use strict";var t,n={608(t,n,e){const i=window.wp.blocks,r=window.React;var o=e.n(r);function s(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var a="(prefers-reduced-motion: reduce)";function u(t){t.length=0}function c(t,n,e){return Array.prototype.slice.call(t,n,e)}function l(t){return t.bind.apply(t,[null].concat(c(arguments,1)))}var d=setTimeout,f=function(){};function p(t){return requestAnimationFrame(t)}function h(t,n){return typeof n===t}function v(t){return!w(t)&&h("object",t)}var g=Array.isArray,m=l(h,"function"),y=l(h,"string"),b=l(h,"undefined");function w(t){return null===t}function k(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch(t){return!1}}function x(t){return g(t)?t:[t]}function E(t,n){x(t).forEach(n)}function S(t,n){return t.indexOf(n)>-1}function _(t,n){return t.push.apply(t,x(n)),t}function C(t,n,e){t&&E(n,function(n){n&&t.classList[e?"add":"remove"](n)})}function P(t,n){C(t,y(n)?n.split(" "):n,!0)}function A(t,n){E(n,t.appendChild.bind(t))}function L(t,n){E(t,function(t){var e=(n||t).parentNode;e&&e.insertBefore(t,n)})}function j(t,n){return k(t)&&(t.msMatchesSelector||t.matches).call(t,n)}function M(t,n){var e=t?c(t.children):[];return n?e.filter(function(t){return j(t,n)}):e}function O(t,n){return n?M(t,n)[0]:t.firstElementChild}var D=Object.keys;function N(t,n,e){return t&&(e?D(t).reverse():D(t)).forEach(function(e){"__proto__"!==e&&n(t[e],e)}),t}function z(t){return c(arguments,1).forEach(function(n){N(n,function(e,i){t[i]=n[i]})}),t}function T(t){return c(arguments,1).forEach(function(n){N(n,function(n,e){g(n)?t[e]=n.slice():v(n)?t[e]=T({},v(t[e])?t[e]:{},n):t[e]=n})}),t}function I(t,n){E(n||D(t),function(n){delete t[n]})}function R(t,n){E(t,function(t){E(n,function(n){t&&t.removeAttribute(n)})})}function F(t,n,e){v(n)?N(n,function(n,e){F(t,e,n)}):E(t,function(t){w(e)||""===e?R(t,n):t.setAttribute(n,String(e))})}function B(t,n,e){var i=document.createElement(t);return n&&(y(n)?P(i,n):F(i,n)),e&&A(e,i),i}function U(t,n,e){if(b(e))return getComputedStyle(t)[n];w(e)||(t.style[n]=""+e)}function W(t,n){U(t,"display",n)}function X(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function G(t,n){return t.getAttribute(n)}function H(t,n){return t&&t.classList.contains(n)}function Y(t){return t.getBoundingClientRect()}function q(t){E(t,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function J(t){return O((new DOMParser).parseFromString(t,"text/html").body)}function K(t,n){t.preventDefault(),n&&(t.stopPropagation(),t.stopImmediatePropagation())}function V(t,n){return t&&t.querySelector(n)}function Q(t,n){return n?c(t.querySelectorAll(n)):[]}function Z(t,n){C(t,n,!1)}function $(t){return t.timeStamp}function tt(t){return y(t)?t:t?t+"px":""}var nt="splide",et="data-"+nt;function it(t,n){if(!t)throw new Error("["+nt+"] "+(n||""))}var rt=Math.min,ot=Math.max,st=Math.floor,at=Math.ceil,ut=Math.abs;function ct(t,n,e){return ut(t-n)<e}function lt(t,n,e,i){var r=rt(n,e),o=ot(n,e);return i?r<t&&t<o:r<=t&&t<=o}function dt(t,n,e){var i=rt(n,e),r=ot(n,e);return rt(ot(i,t),r)}function ft(t){return+(t>0)-+(t<0)}function pt(t,n){return E(n,function(n){t=t.replace("%s",""+n)}),t}function ht(t){return t<10?"0"+t:""+t}var vt={};function gt(){var t=[];function n(t,n,e){E(t,function(t){t&&E(n,function(n){n.split(" ").forEach(function(n){var i=n.split(".");e(t,i[0],i[1])})})})}return{bind:function(e,i,r,o){n(e,i,function(n,e,i){var s="addEventListener"in n,a=s?n.removeEventListener.bind(n,e,r,o):n.removeListener.bind(n,r);s?n.addEventListener(e,r,o):n.addListener(r),t.push([n,e,i,r,a])})},unbind:function(e,i,r){n(e,i,function(n,e,i){t=t.filter(function(t){return!!(t[0]!==n||t[1]!==e||t[2]!==i||r&&t[3]!==r)||(t[4](),!1)})})},dispatch:function(t,n,e){var i,r=!0;return"function"==typeof CustomEvent?i=new CustomEvent(n,{bubbles:r,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(n,r,!1,e),t.dispatchEvent(i),i},destroy:function(){t.forEach(function(t){t[4]()}),u(t)}}}var mt="mounted",yt="ready",bt="move",wt="moved",kt="click",xt="active",Et="inactive",St="visible",_t="hidden",Ct="refresh",Pt="updated",At="resize",Lt="resized",jt="drag",Mt="dragging",Ot="dragged",Dt="scroll",Nt="scrolled",zt="destroy",Tt="arrows:mounted",It="arrows:updated",Rt="pagination:mounted",Ft="pagination:updated",Bt="navigation:mounted",Ut="autoplay:play",Wt="autoplay:playing",Xt="autoplay:pause",Gt="lazyload:loaded",Ht="ei";function Yt(t){var n=t?t.event.bus:document.createDocumentFragment(),e=gt();return t&&t.event.on(zt,e.destroy),z(e,{bus:n,on:function(t,i){e.bind(n,x(t).join(" "),function(t){i.apply(i,g(t.detail)?t.detail:[])})},off:l(e.unbind,n),emit:function(t){e.dispatch(n,t,c(arguments,1))}})}function qt(t,n,e,i){var r,o,s=Date.now,a=0,u=!0,c=0;function l(){if(!u){if(a=t?rt((s()-r)/t,1):1,e&&e(a),a>=1&&(n(),r=s(),i&&++c>=i))return d();o=p(l)}}function d(){u=!0}function f(){o&&cancelAnimationFrame(o),a=0,o=0,u=!0}return{start:function(n){n||f(),r=s()-(n?a*t:0),u=!1,o=p(l)},rewind:function(){r=s(),a=0,e&&e(a)},pause:d,cancel:f,set:function(n){t=n},isPaused:function(){return u}}}var Jt="Arrow",Kt=Jt+"Left",Vt=Jt+"Right",Qt=Jt+"Up",Zt=Jt+"Down",$t="ttb",tn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Qt,Vt],ArrowRight:[Zt,Kt]},nn="role",en="tabindex",rn="aria-",on=rn+"controls",sn=rn+"current",an=rn+"selected",un=rn+"label",cn=rn+"labelledby",ln=rn+"hidden",dn=rn+"orientation",fn=rn+"roledescription",pn=rn+"live",hn=rn+"busy",vn=rn+"atomic",gn=[nn,en,"disabled",on,sn,un,cn,ln,dn,fn],mn=nt+"__",yn="is-",bn=nt,wn=mn+"track",kn=mn+"list",xn=mn+"slide",En=xn+"--clone",Sn=xn+"__container",Cn=mn+"arrows",Pn=mn+"arrow",An=Pn+"--prev",Ln=Pn+"--next",jn=mn+"pagination",Mn=jn+"__page",On=mn+"progress__bar",Dn=mn+"toggle",Nn=mn+"sr",zn=yn+"initialized",Tn=yn+"active",In=yn+"prev",Rn=yn+"next",Fn=yn+"visible",Bn=yn+"loading",Un=yn+"focus-in",Wn=yn+"overflow",Xn=[Tn,Fn,In,Rn,Bn,Un,Wn],Gn={slide:xn,clone:En,arrows:Cn,arrow:Pn,prev:An,next:Ln,pagination:jn,page:Mn,spinner:mn+"spinner"},Hn="touchstart mousedown",Yn="touchmove mousemove",qn="touchend touchcancel mouseup click",Jn="slide",Kn="loop",Vn="fade";var Qn=et+"-interval",Zn={passive:!1,capture:!0},$n={Spacebar:" ",Right:Vt,Left:Kt,Up:Qt,Down:Zt};function te(t){return t=y(t)?t:t.key,$n[t]||t}var ne="keydown",ee=et+"-lazy",ie=ee+"-srcset",re="["+ee+"], ["+ie+"]",oe=[" ","Enter"],se=Object.freeze({__proto__:null,Media:function(t,n,e){var i=t.state,r=e.breakpoints||{},o=e.reducedMotion||{},s=gt(),u=[];function c(t){t&&s.destroy()}function l(t,n){var e=matchMedia(n);s.bind(e,"change",d),u.push([t,e])}function d(){var n=i.is(7),r=e.direction,o=u.reduce(function(t,n){return T(t,n[1].matches?n[0]:{})},{});I(e),f(o),e.destroy?t.destroy("completely"===e.destroy):n?(c(!0),t.mount()):r!==e.direction&&t.refresh()}function f(n,r,o){T(e,n),r&&T(Object.getPrototypeOf(e),n),!o&&i.is(1)||t.emit(Pt,e)}return{setup:function(){var t="min"===e.mediaQuery;D(r).sort(function(n,e){return t?+n-+e:+e-+n}).forEach(function(n){l(r[n],"("+(t?"min":"max")+"-width:"+n+"px)")}),l(o,a),d()},destroy:c,reduce:function(t){matchMedia(a).matches&&(t?T(e,o):I(e,D(o)))},set:f}},Direction:function(t,n,e){return{resolve:function(t,n,i){var r="rtl"!==(i=i||e.direction)||n?i===$t?0:-1:1;return tn[t]&&tn[t][r]||t.replace(/width|left|right/i,function(t,n){var e=tn[t.toLowerCase()][r]||t;return n>0?e.charAt(0).toUpperCase()+e.slice(1):e})},orient:function(t){return t*("rtl"===e.direction?1:-1)}}},Elements:function(t,n,e){var i,r,o,s=Yt(t),a=s.on,c=s.bind,l=t.root,d=e.i18n,f={},p=[],h=[],v=[];function g(){var t,n,o;i=w("."+wn),r=O(i,"."+kn),it(i&&r,"A track/list element is missing."),_(p,M(r,"."+xn+":not(."+En+")")),N({arrows:Cn,pagination:jn,prev:An,next:Ln,bar:On,toggle:Dn},function(t,n){f[n]=w("."+t)}),z(f,{root:l,track:i,list:r,slides:p}),n=l.id||""+(t=nt)+ht(vt[t]=(vt[t]||0)+1),o=e.role,l.id=n,i.id=i.id||n+"-track",r.id=r.id||n+"-list",!G(l,nn)&&"SECTION"!==l.tagName&&o&&F(l,nn,o),F(l,fn,d.carousel),F(r,nn,"presentation"),b()}function y(t){var n=gn.concat("style");u(p),Z(l,h),Z(i,v),R([i,r],n),R(l,t?n:["style",fn])}function b(){Z(l,h),Z(i,v),h=k(bn),v=k(wn),P(l,h),P(i,v),F(l,un,e.label),F(l,cn,e.labelledby)}function w(t){var n=V(l,t);return n&&function(t,n){if(m(t.closest))return t.closest(n);for(var e=t;e&&1===e.nodeType&&!j(e,n);)e=e.parentElement;return e}(n,"."+bn)===l?n:void 0}function k(t){return[t+"--"+e.type,t+"--"+e.direction,e.drag&&t+"--draggable",e.isNavigation&&t+"--nav",t===bn&&Tn]}return z(f,{setup:g,mount:function(){a(Ct,y),a(Ct,g),a(Pt,b),c(document,Hn+" keydown",function(t){o="keydown"===t.type},{capture:!0}),c(l,"focusin",function(){C(l,Un,!!o)})},destroy:y})},Slides:function(t,n,e){var i=Yt(t),r=i.on,o=i.emit,s=i.bind,a=n.Elements,c=a.slides,d=a.list,f=[];function p(){c.forEach(function(t,n){v(t,n,-1)})}function h(){b(function(t){t.destroy()}),u(f)}function v(n,e,i){var r=function(t,n,e,i){var r,o=Yt(t),s=o.on,a=o.emit,u=o.bind,c=t.Components,d=t.root,f=t.options,p=f.isNavigation,h=f.updateOnMove,v=f.i18n,g=f.pagination,m=f.slideFocus,y=c.Direction.resolve,b=G(i,"style"),w=G(i,un),k=e>-1,x=O(i,"."+Sn);function E(){var r=t.splides.map(function(t){var e=t.splide.Components.Slides.getAt(n);return e?e.slide.id:""}).join(" ");F(i,un,pt(v.slideX,(k?e:n)+1)),F(i,on,r),F(i,nn,m?"button":""),m&&R(i,fn)}function S(){r||_()}function _(){if(!r){var e=t.index;(o=P())!==H(i,Tn)&&(C(i,Tn,o),F(i,sn,p&&o||""),a(o?xt:Et,A)),function(){var n=function(){if(t.is(Vn))return P();var n=Y(c.Elements.track),e=Y(i),r=y("left",!0),o=y("right",!0);return st(n[r])<=at(e[r])&&st(e[o])<=at(n[o])}(),e=!n&&(!P()||k);if(t.state.is([4,5])||F(i,ln,e||""),F(Q(i,f.focusableNodes||""),en,e?-1:""),m&&F(i,en,e?-1:0),n!==H(i,Fn)&&(C(i,Fn,n),a(n?St:_t,A)),!n&&document.activeElement===i){var r=c.Slides.getAt(t.index);r&&X(r.slide)}}(),C(i,In,n===e-1),C(i,Rn,n===e+1)}var o}function P(){var i=t.index;return i===n||f.cloneStatus&&i===e}var A={index:n,slideIndex:e,slide:i,container:x,isClone:k,mount:function(){k||(i.id=d.id+"-slide"+ht(n+1),F(i,nn,g?"tabpanel":"group"),F(i,fn,v.slide),F(i,un,w||pt(v.slideLabel,[n+1,t.length]))),u(i,"click",l(a,kt,A)),u(i,"keydown",l(a,"sk",A)),s([wt,"sh",Nt],_),s(Bt,E),h&&s(bt,S)},destroy:function(){r=!0,o.destroy(),Z(i,Xn),R(i,gn),F(i,"style",b),F(i,un,w||"")},update:_,style:function(t,n,e){U(e&&x||i,t,n)},isWithin:function(e,i){var r=ut(e-n);return k||!f.rewind&&!t.is(Kn)||(r=rt(r,t.length-r)),r<=i}};return A}(t,e,i,n);r.mount(),f.push(r),f.sort(function(t,n){return t.index-n.index})}function g(t){return t?w(function(t){return!t.isClone}):f}function b(t,n){g(n).forEach(t)}function w(t){return f.filter(m(t)?t:function(n){return y(t)?j(n.slide,t):S(x(t),n.index)})}return{mount:function(){p(),r(Ct,h),r(Ct,p)},destroy:h,update:function(){b(function(t){t.update()})},register:v,get:g,getIn:function(t){var i=n.Controller,r=i.toIndex(t),o=i.hasFocus()?1:e.perPage;return w(function(t){return lt(t.index,r,r+o-1)})},getAt:function(t){return w(t)[0]},add:function(t,n){E(t,function(t){if(y(t)&&(t=J(t)),k(t)){var i=c[n];i?L(t,i):A(d,t),P(t,e.classes.slide),r=t,a=l(o,At),u=Q(r,"img"),(f=u.length)?u.forEach(function(t){s(t,"load error",function(){--f||a()})}):a()}var r,a,u,f}),o(Ct)},remove:function(t){q(w(t).map(function(t){return t.slide})),o(Ct)},forEach:b,filter:w,style:function(t,n,e){b(function(i){i.style(t,n,e)})},getLength:function(t){return t?c.length:f.length},isEnough:function(){return f.length>e.perPage}}},Layout:function(t,n,e){var i,r,o,s=Yt(t),a=s.on,u=s.bind,c=s.emit,d=n.Slides,f=n.Direction.resolve,p=n.Elements,h=p.root,g=p.track,m=p.list,y=d.getAt,b=d.style;function w(){i=e.direction===$t,U(h,"maxWidth",tt(e.width)),U(g,f("paddingLeft"),x(!1)),U(g,f("paddingRight"),x(!0)),k(!0)}function k(t){var n,s=Y(h);(t||r.width!==s.width||r.height!==s.height)&&(U(g,"height",(n="",i&&(it(n=E(),"height or heightRatio is missing."),n="calc("+n+" - "+x(!1)+" - "+x(!0)+")"),n)),b(f("marginRight"),tt(e.gap)),b("width",e.autoWidth?null:tt(e.fixedWidth)||(i?"":S())),b("height",tt(e.fixedHeight)||(i?e.autoHeight?null:S():E()),!0),r=s,c(Lt),o!==(o=M())&&(C(h,Wn,o),c("overflow",o)))}function x(t){var n=e.padding,i=f(t?"right":"left");return n&&tt(n[i]||(v(n)?0:n))||"0px"}function E(){return tt(e.height||Y(m).width*e.heightRatio)}function S(){var t=tt(e.gap);return"calc((100%"+(t&&" + "+t)+")/"+(e.perPage||1)+(t&&" - "+t)+")"}function _(){return Y(m)[f("width")]}function P(t,n){var e=y(t||0);return e?Y(e.slide)[f("width")]+(n?0:j()):0}function A(t,n){var e=y(t);if(e){var i=Y(e.slide)[f("right")],r=Y(m)[f("left")];return ut(i-r)+(n?0:j())}return 0}function L(n){return A(t.length-1)-A(0)+P(0,n)}function j(){var t=y(0);return t&&parseFloat(U(t.slide,f("marginRight")))||0}function M(){return t.is(Vn)||L(!0)>_()}return{mount:function(){var t,n;w(),u(window,"resize load",(t=l(c,At),n=qt(0,t,null,1),function(){n.isPaused()&&n.start()})),a([Pt,Ct],w),a(At,k)},resize:k,listSize:_,slideSize:P,sliderSize:L,totalSize:A,getPadding:function(t){return parseFloat(U(g,f("padding"+(t?"Right":"Left"))))||0},isOverflow:M}},Clones:function(t,n,e){var i,r=Yt(t),o=r.on,s=n.Elements,a=n.Slides,c=n.Direction.resolve,l=[];function d(){o(Ct,f),o([Pt,At],h),(i=v())&&(function(n){var i=a.get().slice(),r=i.length;if(r){for(;i.length<n;)_(i,i);_(i.slice(-n),i.slice(0,n)).forEach(function(o,u){var c=u<n,d=function(n,i){var r=n.cloneNode(!0);return P(r,e.classes.clone),r.id=t.root.id+"-clone"+ht(i+1),r}(o.slide,u);c?L(d,i[0].slide):A(s.list,d),_(l,d),a.register(d,u-n+(c?0:r),o.index)})}}(i),n.Layout.resize(!0))}function f(){p(),d()}function p(){q(l),u(l),r.destroy()}function h(){var t=v();i!==t&&(i<t||!t)&&r.emit(Ct)}function v(){var i=e.clones;if(t.is(Kn)){if(b(i)){var r=e[c("fixedWidth")]&&n.Layout.slideSize(0);i=r&&at(Y(s.track)[c("width")]/r)||e[c("autoWidth")]&&t.length||2*e.perPage}}else i=0;return i}return{mount:d,destroy:p}},Move:function(t,n,e){var i,r=Yt(t),o=r.on,s=r.emit,a=t.state.set,u=n.Layout,c=u.slideSize,l=u.getPadding,d=u.totalSize,f=u.listSize,p=u.sliderSize,h=n.Direction,v=h.resolve,g=h.orient,m=n.Elements,y=m.list,w=m.track;function k(){n.Controller.isBusy()||(n.Scroll.cancel(),x(t.index),n.Slides.update())}function x(t){E(P(t,!0))}function E(e,i){if(!t.is(Vn)){var r=i?e:function(e){if(t.is(Kn)){var i=C(e),r=i>n.Controller.getEnd();(i<0||r)&&(e=S(e,r))}return e}(e);U(y,"transform","translate"+v("X")+"("+r+"px)"),e!==r&&s("sh")}}function S(t,n){var e=t-L(n),i=p();return t-g(i*(at(ut(e)/i)||1))*(n?1:-1)}function _(){E(A(),!0),i.cancel()}function C(t){for(var e=n.Slides.get(),i=0,r=1/0,o=0;o<e.length;o++){var s=e[o].index,a=ut(P(s,!0)-t);if(!(a<=r))break;r=a,i=s}return i}function P(n,i){var r=g(d(n-1)-function(t){var n=e.focus;return"center"===n?(f()-c(t,!0))/2:+n*c(t)||0}(n));return i?function(n){return e.trimSpace&&t.is(Jn)&&(n=dt(n,0,g(p(!0)-f()))),n}(r):r}function A(){var t=v("left");return Y(y)[t]-Y(w)[t]+g(l(!1))}function L(t){return P(t?n.Controller.getEnd():0,!!e.trimSpace)}return{mount:function(){i=n.Transition,o([mt,Lt,Pt,Ct],k)},move:function(t,n,e,r){var o,u;t!==n&&(o=t>e,u=g(S(A(),o)),o?u>=0:u<=y[v("scrollWidth")]-Y(w)[v("width")])&&(_(),E(S(A(),t>e),!0)),a(4),s(bt,n,e,t),i.start(n,function(){a(3),s(wt,n,e,t),r&&r()})},jump:x,translate:E,shift:S,cancel:_,toIndex:C,toPosition:P,getPosition:A,getLimit:L,exceededLimit:function(t,n){n=b(n)?A():n;var e=!0!==t&&g(n)<g(L(!1)),i=!1!==t&&g(n)>g(L(!0));return e||i},reposition:k}},Controller:function(t,n,e){var i,r,o,s,a=Yt(t),u=a.on,c=a.emit,d=n.Move,f=d.getPosition,p=d.getLimit,h=d.toPosition,v=n.Slides,g=v.isEnough,m=v.getLength,w=e.omitEnd,k=t.is(Kn),x=t.is(Jn),E=l(L,!1),S=l(L,!0),_=e.start||0,C=_;function P(){r=m(!0),o=e.perMove,s=e.perPage,i=O();var t=dt(_,0,w?i:r-1);t!==_&&(_=t,d.reposition())}function A(){i!==O()&&c(Ht)}function L(t,n){var e=o||(T()?1:s),r=j(_+e*(t?-1:1),_,!(o||T()));return-1===r&&x&&!ct(f(),p(!t),1)?t?0:i:n?r:M(r)}function j(n,a,u){if(g()||T()){var c=function(n){if(x&&"move"===e.trimSpace&&n!==_)for(var i=f();i===h(n,!0)&<(n,0,t.length-1,!e.rewind);)n<_?--n:++n;return n}(n);c!==n&&(a=n,n=c,u=!1),n<0||n>i?n=o||!lt(0,n,a,!0)&&!lt(i,a,n,!0)?k?u?n<0?-(r%s||s):r:n:e.rewind?n<0?i:0:-1:D(N(n)):u&&n!==a&&(n=D(N(a)+(n<a?-1:1)))}else n=-1;return n}function M(t){return k?(t+r)%r||0:t}function O(){for(var t=r-(T()||k&&o?1:s);w&&t-- >0;)if(h(r-1,!0)!==h(t,!0)){t++;break}return dt(t,0,r-1)}function D(t){return dt(T()?t:s*t,0,i)}function N(t){return T()?rt(t,i):st((t>=i?r-1:t)/s)}function z(t){t!==_&&(C=_,_=t)}function T(){return!b(e.focus)||e.isNavigation}function I(){return t.state.is([4,5])&&!!e.waitForTransition}return{mount:function(){P(),u([Pt,Ct,Ht],P),u(Lt,A)},go:function(t,n,e){if(!I()){var r=function(t){var n=_;if(y(t)){var e=t.match(/([+\-<>])(\d+)?/)||[],r=e[1],o=e[2];"+"===r||"-"===r?n=j(_+ +(""+r+(+o||1)),_):">"===r?n=o?D(+o):E(!0):"<"===r&&(n=S(!0))}else n=k?t:dt(t,0,i);return n}(t),o=M(r);o>-1&&(n||o!==_)&&(z(o),d.move(r,o,C,e))}},scroll:function(t,e,r,o){n.Scroll.scroll(t,e,r,function(){var t=M(d.toIndex(f()));z(w?rt(t,i):t),o&&o()})},getNext:E,getPrev:S,getAdjacent:L,getEnd:O,setIndex:z,getIndex:function(t){return t?C:_},toIndex:D,toPage:N,toDest:function(t){var n=d.toIndex(t);return x?dt(n,0,i):n},hasFocus:T,isBusy:I}},Arrows:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.emit,c=e.classes,d=e.i18n,f=n.Elements,p=n.Controller,h=f.arrows,v=f.track,g=h,m=f.prev,y=f.next,b={};function w(){var t;!(t=e.arrows)||m&&y||(g=h||B("div",c.arrows),m=S(!0),y=S(!1),i=!0,A(g,[m,y]),!h&&L(g,v)),m&&y&&(z(b,{prev:m,next:y}),W(g,t?"":"none"),P(g,r=Cn+"--"+e.direction),t&&(s([mt,wt,Ct,Nt,Ht],_),a(y,"click",l(E,">")),a(m,"click",l(E,"<")),_(),F([m,y],on,v.id),u(Tt,m,y))),s(Pt,k)}function k(){x(),w()}function x(){o.destroy(),Z(g,r),i?(q(h?[m,y]:g),m=y=null):R([m,y],gn)}function E(t){p.go(t,!0)}function S(t){return J('<button class="'+c.arrow+" "+(t?c.prev:c.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40" focusable="false"><path d="'+(e.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z")+'" />')}function _(){if(m&&y){var n=t.index,e=p.getPrev(),i=p.getNext(),r=e>-1&&n<e?d.last:d.prev,o=i>-1&&n>i?d.first:d.next;m.disabled=e<0,y.disabled=i<0,F(m,un,r),F(y,un,o),u(It,m,y,e,i)}}return{arrows:b,mount:w,destroy:x,update:_}},Autoplay:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.emit,c=qt(e.interval,t.go.bind(t,">"),function(t){var n=d.bar;n&&U(n,"width",100*t+"%"),u(Wt,t)}),l=c.isPaused,d=n.Elements,f=n.Elements,p=f.root,h=f.toggle,v=e.autoplay,g="pause"===v;function m(){l()&&n.Slides.isEnough()&&(c.start(!e.resetProgress),r=i=g=!1,w(),u(Ut))}function y(t){void 0===t&&(t=!0),g=!!t,w(),l()||(c.pause(),u(Xt))}function b(){g||(i||r?y(!1):m())}function w(){h&&(C(h,Tn,!g),F(h,un,e.i18n[g?"play":"pause"]))}function k(t){var i=n.Slides.getAt(t);c.set(i&&+G(i.slide,Qn)||e.interval)}return{mount:function(){v&&(e.pauseOnHover&&a(p,"mouseenter mouseleave",function(t){i="mouseenter"===t.type,b()}),e.pauseOnFocus&&a(p,"focusin focusout",function(t){r="focusin"===t.type,b()}),h&&a(h,"click",function(){g?m():y(!0)}),s([bt,Dt,Ct],c.rewind),s(bt,k),h&&F(h,on,d.track.id),g||m(),w())},destroy:c.cancel,play:m,pause:y,isPaused:l}},Cover:function(t,n,e){var i=Yt(t).on;function r(t){n.Slides.forEach(function(n){var e=O(n.container||n.slide,"img");e&&e.src&&o(t,e,n)})}function o(t,n,e){e.style("background",t?'center/cover no-repeat url("'+n.src+'")':"",!0),W(n,t?"none":"")}return{mount:function(){e.cover&&(i(Gt,l(o,!0)),i([mt,Pt,Ct],l(r,!0)))},destroy:l(r,!1)}},Scroll:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.emit,u=t.state.set,c=n.Move,d=c.getPosition,f=c.getLimit,p=c.exceededLimit,h=c.translate,v=t.is(Jn),g=1;function m(t,e,o,s,f){var h=d();if(w(),o&&(!v||!p())){var m=n.Layout.sliderSize(),k=ft(t)*m*st(ut(t)/m)||0;t=c.toPosition(n.Controller.toDest(t%m))+k}var x=ct(h,t,1);g=1,e=x?0:e||ot(ut(t-h)/1.5,800),r=s,i=qt(e,y,l(b,h,t,f),1),u(5),a(Dt),i.start()}function y(){u(3),r&&r(),a(Nt)}function b(t,n,i,o){var s,a,u=d(),c=(t+(n-t)*(s=o,(a=e.easingFunc)?a(s):1-Math.pow(1-s,4))-u)*g;h(u+c),v&&!i&&p()&&(g*=.6,ut(c)<10&&m(f(p(!0)),600,!1,r,!0))}function w(){i&&i.cancel()}function k(){i&&!i.isPaused()&&(w(),y())}return{mount:function(){s(bt,w),s([Pt,Ct],k)},destroy:w,scroll:m,cancel:k}},Drag:function(t,n,e){var i,r,o,s,a,u,c,l,d=Yt(t),p=d.on,h=d.emit,g=d.bind,m=d.unbind,y=t.state,b=n.Move,w=n.Scroll,k=n.Controller,x=n.Elements.track,E=n.Media.reduce,S=n.Direction,_=S.resolve,C=S.orient,P=b.getPosition,A=b.exceededLimit,L=!1;function M(){var t=e.drag;W(!t),s="free"===t}function O(t){if(u=!1,!c){var n=U(t);i=t.target,r=e.noDrag,j(i,"."+Mn+", ."+Pn)||r&&j(i,r)||!n&&t.button||(k.isBusy()?K(t,!0):(l=n?x:window,a=y.is([4,5]),o=null,g(l,Yn,D,Zn),g(l,qn,N,Zn),b.cancel(),w.cancel(),T(t)))}var i,r}function D(n){if(y.is(6)||(y.set(6),h(jt)),n.cancelable)if(a){b.translate(i+I(n)/(L&&t.is(Jn)?5:1));var r=R(n)>200,o=L!==(L=A());(r||o)&&T(n),u=!0,h(Mt),K(n)}else(function(t){return ut(I(t))>ut(I(t,!0))})(n)&&(a=function(t){var n=e.dragMinThreshold,i=v(n),r=i&&n.mouse||0,o=(i?n.touch:+n)||10;return ut(I(t))>(U(t)?o:r)}(n),K(n))}function N(i){y.is(6)&&(y.set(3),h(Ot)),a&&(function(i){var r=function(n){if(t.is(Kn)||!L){var e=R(n);if(e&&e<200)return I(n)/e}return 0}(i),o=function(t){return P()+ft(t)*rt(ut(t)*(e.flickPower||600),s?1/0:n.Layout.listSize()*(e.flickMaxPages||1))}(r),a=e.rewind&&e.rewindByDrag;E(!1),s?k.scroll(o,0,e.snap):t.is(Vn)?k.go(C(ft(r))<0?a?"<":"-":a?">":"+"):t.is(Jn)&&L&&a?k.go(A(!0)?">":"<"):k.go(k.toDest(o),!0),E(!0)}(i),K(i)),m(l,Yn,D),m(l,qn,N),a=!1}function z(t){!c&&u&&K(t,!0)}function T(t){o=r,r=t,i=P()}function I(t,n){return B(t,n)-B(F(t),n)}function R(t){return $(t)-$(F(t))}function F(t){return r===t&&o||r}function B(t,n){return(U(t)?t.changedTouches[0]:t)["page"+_(n?"Y":"X")]}function U(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}function W(t){c=t}return{mount:function(){g(x,Yn,f,Zn),g(x,qn,f,Zn),g(x,Hn,O,Zn),g(x,"click",z,{capture:!0}),g(x,"dragstart",K),p([mt,Pt],M)},disable:W,isDragging:function(){return a}}},Keyboard:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.unbind,c=t.root,l=n.Direction.resolve;function f(){var t=e.keyboard;t&&(i="global"===t?window:c,a(i,ne,v))}function p(){u(i,ne)}function h(){var t=r;r=!0,d(function(){r=t})}function v(n){if(!r){var e=te(n);e===l(Kt)?t.go("<"):e===l(Vt)&&t.go(">")}}return{mount:function(){f(),s(Pt,p),s(Pt,f),s(bt,h)},destroy:p,disable:function(t){r=t}}},LazyLoad:function(t,n,e){var i=Yt(t),r=i.on,o=i.off,s=i.bind,a=i.emit,c="sequential"===e.lazyLoad,d=[wt,Nt],f=[];function p(){u(f),n.Slides.forEach(function(t){Q(t.slide,re).forEach(function(n){var i=G(n,ee),r=G(n,ie);if(i!==n.src||r!==n.srcset){var o=e.classes.spinner,s=n.parentElement,a=O(s,"."+o)||B("span",o,s);f.push([n,t,a]),n.src||W(n,"none")}})}),c?m():(o(d),r(d,h),h())}function h(){(f=f.filter(function(n){var i=e.perPage*((e.preloadPages||1)+1)-1;return!n[1].isWithin(t.index,i)||v(n)})).length||o(d)}function v(t){var n=t[0];P(t[1].slide,Bn),s(n,"load error",l(g,t)),F(n,"src",G(n,ee)),F(n,"srcset",G(n,ie)),R(n,ee),R(n,ie)}function g(t,n){var e=t[0],i=t[1];Z(i.slide,Bn),"error"!==n.type&&(q(t[2]),W(e,""),a(Gt,e,i),a(At)),c&&m()}function m(){f.length&&v(f.shift())}return{mount:function(){e.lazyLoad&&(p(),r(Ct,p))},destroy:l(u,f),check:h}},Pagination:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.emit,d=o.bind,f=n.Slides,p=n.Elements,h=n.Controller,v=h.hasFocus,g=h.getIndex,m=h.go,y=n.Direction.resolve,b=p.pagination,w=[];function k(){i&&(q(b?c(i.children):i),Z(i,r),u(w),i=null),o.destroy()}function x(t){m(">"+t,!0)}function E(t,n){var e=w.length,i=te(n),r=S(),o=-1;i===y(Vt,!1,r)?o=++t%e:i===y(Kt,!1,r)?o=(--t+e)%e:"Home"===i?o=0:"End"===i&&(o=e-1);var s=w[o];s&&(X(s.button),m(">"+o),K(n,!0))}function S(){return e.paginationDirection||e.direction}function _(t){return w[h.toPage(t)]}function C(){var t=_(g(!0)),n=_(g());if(t){var e=t.button;Z(e,Tn),R(e,an),F(e,en,-1)}if(n){var r=n.button;P(r,Tn),F(r,an,!0),F(r,en,"")}a(Ft,{list:i,items:w},t,n)}return{items:w,mount:function n(){k(),s([Pt,Ct,Ht],n);var o=e.pagination;b&&W(b,o?"":"none"),o&&(s([bt,Dt,Nt],C),function(){var n=t.length,o=e.classes,s=e.i18n,a=e.perPage,u=v()?h.getEnd()+1:at(n/a);P(i=b||B("ul",o.pagination,p.track.parentElement),r=jn+"--"+S()),F(i,nn,"tablist"),F(i,un,s.select),F(i,dn,S()===$t?"vertical":"");for(var c=0;c<u;c++){var g=B("li",null,i),m=B("button",{class:o.page,type:"button"},g),y=f.getIn(c).map(function(t){return t.slide.id}),k=!v()&&a>1?s.pageX:s.slideX;d(m,"click",l(x,c)),e.paginationKeyboard&&d(m,"keydown",l(E,c)),F(g,nn,"presentation"),F(m,nn,"tab"),F(m,on,y.join(" ")),F(m,un,pt(k,c+1)),F(m,en,-1),w.push({li:g,button:m,page:c})}}(),C(),a(Rt,{list:i,items:w},_(t.index)))},destroy:k,getAt:_,update:C}},Sync:function(t,n,e){var i=e.isNavigation,r=e.slideFocus,o=[];function s(){var n,e;t.splides.forEach(function(n){n.isParent||(c(t,n.splide),c(n.splide,t))}),i&&((e=(n=Yt(t)).on)(kt,f),e("sk",p),e([mt,Pt],d),o.push(n),n.emit(Bt,t.splides))}function a(){o.forEach(function(t){t.destroy()}),u(o)}function c(t,n){var e=Yt(t);e.on(bt,function(t,e,i){n.go(n.is(Kn)?i:t)}),o.push(e)}function d(){F(n.Elements.list,dn,e.direction===$t?"vertical":"")}function f(n){t.go(n.index)}function p(t,n){S(oe,te(n))&&(f(t),K(n))}return{setup:l(n.Media.set,{slideFocus:b(r)?i:r},!0),mount:s,destroy:a,remount:function(){a(),s()}}},Wheel:function(t,n,e){var i=Yt(t).bind,r=0;function o(i){if(i.cancelable){var o=i.deltaY,s=o<0,a=$(i),u=e.wheelMinThreshold||0,c=e.wheelSleep||0;ut(o)>u&&a-r>c&&(t.go(s?"<":">"),r=a),function(i){return!e.releaseWheel||t.state.is(4)||-1!==n.Controller.getAdjacent(i)}(s)&&K(i)}}return{mount:function(){e.wheel&&i(n.Elements.track,"wheel",o,Zn)}}},Live:function(t,n,e){var i=Yt(t).on,r=n.Elements.track,o=e.live&&!e.isNavigation,s=B("span",Nn),a=qt(90,l(u,!1));function u(t){F(r,hn,t),t?(A(r,s),a.start()):(q(s),a.cancel())}function c(t){o&&F(r,pn,t?"off":"polite")}return{mount:function(){o&&(c(!n.Autoplay.isPaused()),F(r,vn,!0),s.textContent="…",i(Ut,l(c,!0)),i(Xt,l(c,!1)),i([wt,Nt],l(u,!0)))},disable:c,destroy:function(){R(r,[pn,vn,hn]),q(s)}}}}),ae={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Gn,i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ue(t,n,e){var i=n.Slides;function r(){i.forEach(function(t){t.style("transform","translateX(-"+100*t.index+"%)")})}return{mount:function(){Yt(t).on([mt,Ct],r)},start:function(t,n){i.style("transition","opacity "+e.speed+"ms "+e.easing),d(n)},cancel:f}}function ce(t,n,e){var i,r=n.Move,o=n.Controller,s=n.Scroll,a=n.Elements.list,u=l(U,a,"transition");function c(){u(""),s.cancel()}return{mount:function(){Yt(t).bind(a,"transitionend",function(t){t.target===a&&i&&(c(),i())})},start:function(n,a){var c=r.toPosition(n,!0),l=r.getPosition(),d=function(n){var i=e.rewindSpeed;if(t.is(Jn)&&i){var r=o.getIndex(!0),s=o.getEnd();if(0===r&&n>=s||r>=s&&0===n)return i}return e.speed}(n);ut(c-l)>=1&&d>=1?e.useScroll?s.scroll(c,d,!1,a):(u("transform "+d+"ms "+e.easing),r.translate(c,!0),i=a):(r.jump(n),a())},cancel:c}}var le=function(){function t(n,e){var i;this.event=Yt(),this.Components={},this.state=(i=1,{set:function(t){i=t},is:function(t){return S(x(t),i)}}),this.splides=[],this._o={},this._E={};var r=y(n)?V(document,n):n;it(r,r+" is invalid."),this.root=r,e=T({label:G(r,un)||"",labelledby:G(r,cn)||""},ae,t.defaults,e||{});try{T(e,JSON.parse(G(r,et)))}catch(t){it(!1,"Invalid JSON")}this._o=Object.create(T({},e))}var n,e,i=t.prototype;return i.mount=function(t,n){var e=this,i=this.state,r=this.Components;return it(i.is([1,7]),"Already mounted!"),i.set(1),this._C=r,this._T=n||this._T||(this.is(Vn)?ue:ce),this._E=t||this._E,N(z({},se,this._E,{Transition:this._T}),function(t,n){var i=t(e,r,e._o);r[n]=i,i.setup&&i.setup()}),N(r,function(t){t.mount&&t.mount()}),this.emit(mt),P(this.root,zn),i.set(3),this.emit(yt),this},i.sync=function(t){return this.splides.push({splide:t}),t.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._C.Sync.remount(),t.Components.Sync.remount()),this},i.go=function(t){return this._C.Controller.go(t),this},i.on=function(t,n){return this.event.on(t,n),this},i.off=function(t){return this.event.off(t),this},i.emit=function(t){var n;return(n=this.event).emit.apply(n,[t].concat(c(arguments,1))),this},i.add=function(t,n){return this._C.Slides.add(t,n),this},i.remove=function(t){return this._C.Slides.remove(t),this},i.is=function(t){return this._o.type===t},i.refresh=function(){return this.emit(Ct),this},i.destroy=function(t){void 0===t&&(t=!0);var n=this.event,e=this.state;return e.is(1)?Yt(this).on(yt,this.destroy.bind(this,t)):(N(this._C,function(n){n.destroy&&n.destroy(t)},!0),n.emit(zt),n.destroy(),t&&u(this.splides),e.set(7)),this},n=t,e=[{key:"options",get:function(){return this._o},set:function(t){this._C.Media.set(t,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}],e&&s(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),t}(),de=le;de.defaults={},de.STATES={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,SCROLLING:5,DRAGGING:6,DESTROYED:7};var fe=[[mt,"onMounted"],[yt,"onReady"],[bt,"onMove"],[wt,"onMoved"],[kt,"onClick"],[xt,"onActive"],[Et,"onInactive"],[St,"onVisible"],[_t,"onHidden"],[Ct,"onRefresh"],[Pt,"onUpdated"],[At,"onResize"],[Lt,"onResized"],[jt,"onDrag"],[Mt,"onDragging"],[Ot,"onDragged"],[Dt,"onScroll"],[Nt,"onScrolled"],[zt,"onDestroy"],[Tt,"onArrowsMounted"],[It,"onArrowsUpdated"],[Rt,"onPaginationMounted"],[Ft,"onPaginationUpdated"],[Bt,"onNavigationMounted"],[Ut,"onAutoplayPlay"],[Wt,"onAutoplayPlaying"],[Xt,"onAutoplayPause"],[Gt,"onLazyLoadLoaded"]];function pe(...t){return t.filter(Boolean).join(" ")}function he(t){return null!==t&&"object"==typeof t}function ve(t,n){if(Array.isArray(t)&&Array.isArray(n))return t.length===n.length&&!t.some((t,e)=>!ve(t,n[e]));if(he(t)&&he(n)){const e=Object.keys(t),i=Object.keys(n);return e.length===i.length&&!e.some(e=>!Object.prototype.hasOwnProperty.call(n,e)||!ve(t[e],n[e]))}return t===n}function ge(t,n){const e=t;return function(t,n){if(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const r=e[i];if("__proto__"!==r&&!1===n(t[r],r))break}}}(n,(t,n)=>{Array.isArray(t)?e[n]=t.slice():he(t)?e[n]=ge(he(e[n])?e[n]:{},t):e[n]=t}),e}var me=({children:t,className:n,...e})=>o().createElement("div",{className:pe("splide__track",n),...e},o().createElement("ul",{className:"splide__list"},t)),ye=class extends o().Component{constructor(){super(...arguments),this.splideRef=o().createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:n,transition:e}=this.props,{current:i}=this.splideRef;i&&(this.splide=new de(i,t),this.bind(this.splide),this.splide.mount(n,e),this.options=ge({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!ve(this.options,t)&&(this.splide.options=t,this.options=ge({},t));const n=this.getSlides();var e,i;e=this.slides,i=n,(e.length!==i.length||e.some((t,n)=>t!==i[n]))&&(this.splide.refresh(),this.slides=n)}sync(t){var n;null==(n=this.splide)||n.sync(t)}go(t){var n;null==(n=this.splide)||n.go(t)}getSlides(){var t;if(this.splide){const n=null==(t=this.splide.Components.Elements)?void 0:t.list.children;return n&&Array.prototype.slice.call(n)||[]}return[]}bind(t){fe.forEach(([n,e])=>{const i=this.props[e];"function"==typeof i&&t.on(n,(...n)=>{i(t,...n)})})}omit(t,n){return n.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:n="div",hasTrack:e=!0,children:i,...r}=this.props;return o().createElement(n,{className:pe("splide",t),ref:this.splideRef,...this.omit(r,["options",...fe.map(t=>t[1])])},e?o().createElement(me,null,i):i)}},be=({children:t,className:n,...e})=>o().createElement("li",{className:pe("splide__slide",n),...e},t);const we=window.wp.i18n,ke=window.wp.blockEditor,xe=window.wp.components,Ee={type:"loop",perMove:1,perPage:5,gap:"2rem",autoplay:!0,interval:4e3,breakpoints:{992:{perPage:3,gap:"1rem"},768:{perPage:2,gap:".7rem"},576:{perPage:1,gap:".7rem"}}},Se=window.ReactJSXRuntime,_e=[{label:(0,we.__)("Logos Grid","kind-site-framework"),value:"grid"},{label:(0,we.__)("Text List","kind-site-framework"),value:"list"},{label:(0,we.__)("Logos Slider","kind-site-framework"),value:"slider"}],Ce=[{label:(0,we.__)("Colored","kind-site-framework"),value:"colored"}];function Pe({layout:t,style:n,insurers:e}){switch(t){case"grid":return e.map(t=>(0,Se.jsx)("div",{children:(0,Se.jsx)("img",{src:t.urls[n],alt:t.alt})},t.key));case"list":return e.map(t=>(0,Se.jsx)("li",{children:t.label},t.key));case"slider":return(0,Se.jsx)(ye,{"aria-label":(0,we.__)("Insurance Accepted","kind-site-framework"),options:Ee,children:e.map(t=>(0,Se.jsx)(be,{children:(0,Se.jsx)("img",{src:t.urls[n],alt:t.alt})},t.key))})}return null}const Ae=JSON.parse('{"UU":"kind-site-framework/insurers"}'),Le=(0,Se.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:(0,Se.jsx)("path",{d:"M933 167.4l-384-160c-10.902-4.648-23.586-7.35-36.9-7.35s-25.998 2.702-37.531 7.588l0.631-0.238-384 160c-35.8 14.8-59.2 49.8-59.2 88.6 0 397 229 671.4 443 760.6 23.6 9.8 50.2 9.8 73.8 0 171.4-71.4 443.2-318 443.2-760.6 0-38.8-23.4-73.8-59-88.6zM838.6 395.8l-368 368c-12.4 12.4-32.8 12.4-45.2 0l-208-208c-12.4-12.4-12.4-32.8 0-45.2l45.2-45.2c12.4-12.4 32.8-12.4 45.2 0l140.2 140.2 300.2-300.2c12.4-12.4 32.8-12.4 45.2 0l45.2 45.2c12.6 12.6 12.6 32.8 0 45.2z"})});(0,i.registerBlockType)(Ae.UU,{icon:Le,edit:function({attributes:t,setAttributes:n}){const e=t.layout||"slider",i=t.style||"colored",r=!!t.overwriteSettings,o="list"===e?"ul":"div",s=(0,ke.useBlockProps)({className:"ksf-layout-"+e}),a=globalThis.ksfAllInsurers||[];let u,c=[];return r?(c=t.insurers||[],u=a.filter(t=>c.includes(t.key))):u=[...globalThis.ksfEnabledInsurers||[]],(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(ke.InspectorControls,{children:(0,Se.jsxs)(xe.PanelBody,{title:(0,we.__)("Settings","kind-site-framework"),children:[(0,Se.jsx)(xe.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Layout",value:e,options:_e,onChange:t=>n({layout:t})}),(0,Se.jsx)(xe.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Style",value:i,options:Ce,onChange:t=>n({style:t})}),(0,Se.jsx)(xe.ToggleControl,{checked:r,label:(0,we.__)("Overwrite global settings","kind-site-framework"),onChange:()=>n({overwriteSettings:!r})}),r&&(0,Se.jsx)(xe.BaseControl,{label:(0,we.__)("Select insurers to show","kind-site-framework"),children:a.map(t=>(0,Se.jsx)(xe.CheckboxControl,{label:t.label,checked:c.includes(t.key),onChange:e=>n({insurers:[...e?[t.key]:[],...c.filter(n=>t.key!==n)]})},t.key))})]})}),(0,Se.jsx)(o,{...s,children:(0,Se.jsx)(Pe,{layout:e,style:i,insurers:u})})]})}})}},e={};function i(t){var r=e[t];if(void 0!==r)return r.exports;var o=e[t]={exports:{}};return n[t](o,o.exports,i),o.exports}i.m=n,t=[],i.O=(n,e,r,o)=>{if(!e){var s=1/0;for(l=0;l<t.length;l++){for(var[e,r,o]=t[l],a=!0,u=0;u<e.length;u++)(!1&o||s>=o)&&Object.keys(i.O).every(t=>i.O[t](e[u]))?e.splice(u--,1):(a=!1,o<s&&(s=o));if(a){t.splice(l--,1);var c=r();void 0!==c&&(n=c)}}return n}o=o||0;for(var l=t.length;l>0&&t[l-1][2]>o;l--)t[l]=t[l-1];t[l]=[e,r,o]},i.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return i.d(n,{a:n}),n},i.d=(t,n)=>{for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),(()=>{var t={294:0,18:0};i.O.j=n=>0===t[n];var n=(n,e)=>{var r,o,[s,a,u]=e,c=0;if(s.some(n=>0!==t[n])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(u)var l=u(i)}for(n&&n(e);c<s.length;c++)o=s[c],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return i.O(l)},e=globalThis.webpackChunkkind_site_framework=globalThis.webpackChunkkind_site_framework||[];e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))})();var r=i.O(void 0,[18],()=>i(608));r=i.O(r)})();1 (()=>{"use strict";var t,n={608(t,n,e){const i=window.wp.blocks,r=window.React;var o=e.n(r);function s(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var a="(prefers-reduced-motion: reduce)";function u(t){t.length=0}function c(t,n,e){return Array.prototype.slice.call(t,n,e)}function l(t){return t.bind.apply(t,[null].concat(c(arguments,1)))}var f=setTimeout,d=function(){};function p(t){return requestAnimationFrame(t)}function h(t,n){return typeof n===t}function v(t){return!w(t)&&h("object",t)}var g=Array.isArray,m=l(h,"function"),y=l(h,"string"),b=l(h,"undefined");function w(t){return null===t}function x(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch(t){return!1}}function k(t){return g(t)?t:[t]}function E(t,n){k(t).forEach(n)}function _(t,n){return t.indexOf(n)>-1}function S(t,n){return t.push.apply(t,k(n)),t}function C(t,n,e){t&&E(n,function(n){n&&t.classList[e?"add":"remove"](n)})}function P(t,n){C(t,y(n)?n.split(" "):n,!0)}function A(t,n){E(n,t.appendChild.bind(t))}function L(t,n){E(t,function(t){var e=(n||t).parentNode;e&&e.insertBefore(t,n)})}function j(t,n){return x(t)&&(t.msMatchesSelector||t.matches).call(t,n)}function M(t,n){var e=t?c(t.children):[];return n?e.filter(function(t){return j(t,n)}):e}function O(t,n){return n?M(t,n)[0]:t.firstElementChild}var D=Object.keys;function N(t,n,e){return t&&(e?D(t).reverse():D(t)).forEach(function(e){"__proto__"!==e&&n(t[e],e)}),t}function z(t){return c(arguments,1).forEach(function(n){N(n,function(e,i){t[i]=n[i]})}),t}function T(t){return c(arguments,1).forEach(function(n){N(n,function(n,e){g(n)?t[e]=n.slice():v(n)?t[e]=T({},v(t[e])?t[e]:{},n):t[e]=n})}),t}function I(t,n){E(n||D(t),function(n){delete t[n]})}function R(t,n){E(t,function(t){E(n,function(n){t&&t.removeAttribute(n)})})}function F(t,n,e){v(n)?N(n,function(n,e){F(t,e,n)}):E(t,function(t){w(e)||""===e?R(t,n):t.setAttribute(n,String(e))})}function B(t,n,e){var i=document.createElement(t);return n&&(y(n)?P(i,n):F(i,n)),e&&A(e,i),i}function U(t,n,e){if(b(e))return getComputedStyle(t)[n];w(e)||(t.style[n]=""+e)}function W(t,n){U(t,"display",n)}function X(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function G(t,n){return t.getAttribute(n)}function H(t,n){return t&&t.classList.contains(n)}function Y(t){return t.getBoundingClientRect()}function q(t){E(t,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function J(t){return O((new DOMParser).parseFromString(t,"text/html").body)}function K(t,n){t.preventDefault(),n&&(t.stopPropagation(),t.stopImmediatePropagation())}function V(t,n){return t&&t.querySelector(n)}function Q(t,n){return n?c(t.querySelectorAll(n)):[]}function Z(t,n){C(t,n,!1)}function $(t){return t.timeStamp}function tt(t){return y(t)?t:t?t+"px":""}var nt="splide",et="data-"+nt;function it(t,n){if(!t)throw new Error("["+nt+"] "+(n||""))}var rt=Math.min,ot=Math.max,st=Math.floor,at=Math.ceil,ut=Math.abs;function ct(t,n,e){return ut(t-n)<e}function lt(t,n,e,i){var r=rt(n,e),o=ot(n,e);return i?r<t&&t<o:r<=t&&t<=o}function ft(t,n,e){var i=rt(n,e),r=ot(n,e);return rt(ot(i,t),r)}function dt(t){return+(t>0)-+(t<0)}function pt(t,n){return E(n,function(n){t=t.replace("%s",""+n)}),t}function ht(t){return t<10?"0"+t:""+t}var vt={};function gt(){var t=[];function n(t,n,e){E(t,function(t){t&&E(n,function(n){n.split(" ").forEach(function(n){var i=n.split(".");e(t,i[0],i[1])})})})}return{bind:function(e,i,r,o){n(e,i,function(n,e,i){var s="addEventListener"in n,a=s?n.removeEventListener.bind(n,e,r,o):n.removeListener.bind(n,r);s?n.addEventListener(e,r,o):n.addListener(r),t.push([n,e,i,r,a])})},unbind:function(e,i,r){n(e,i,function(n,e,i){t=t.filter(function(t){return!!(t[0]!==n||t[1]!==e||t[2]!==i||r&&t[3]!==r)||(t[4](),!1)})})},dispatch:function(t,n,e){var i,r=!0;return"function"==typeof CustomEvent?i=new CustomEvent(n,{bubbles:r,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(n,r,!1,e),t.dispatchEvent(i),i},destroy:function(){t.forEach(function(t){t[4]()}),u(t)}}}var mt="mounted",yt="ready",bt="move",wt="moved",xt="click",kt="active",Et="inactive",_t="visible",St="hidden",Ct="refresh",Pt="updated",At="resize",Lt="resized",jt="drag",Mt="dragging",Ot="dragged",Dt="scroll",Nt="scrolled",zt="destroy",Tt="arrows:mounted",It="arrows:updated",Rt="pagination:mounted",Ft="pagination:updated",Bt="navigation:mounted",Ut="autoplay:play",Wt="autoplay:playing",Xt="autoplay:pause",Gt="lazyload:loaded",Ht="ei";function Yt(t){var n=t?t.event.bus:document.createDocumentFragment(),e=gt();return t&&t.event.on(zt,e.destroy),z(e,{bus:n,on:function(t,i){e.bind(n,k(t).join(" "),function(t){i.apply(i,g(t.detail)?t.detail:[])})},off:l(e.unbind,n),emit:function(t){e.dispatch(n,t,c(arguments,1))}})}function qt(t,n,e,i){var r,o,s=Date.now,a=0,u=!0,c=0;function l(){if(!u){if(a=t?rt((s()-r)/t,1):1,e&&e(a),a>=1&&(n(),r=s(),i&&++c>=i))return f();o=p(l)}}function f(){u=!0}function d(){o&&cancelAnimationFrame(o),a=0,o=0,u=!0}return{start:function(n){n||d(),r=s()-(n?a*t:0),u=!1,o=p(l)},rewind:function(){r=s(),a=0,e&&e(a)},pause:f,cancel:d,set:function(n){t=n},isPaused:function(){return u}}}var Jt="Arrow",Kt=Jt+"Left",Vt=Jt+"Right",Qt=Jt+"Up",Zt=Jt+"Down",$t="ttb",tn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Qt,Vt],ArrowRight:[Zt,Kt]},nn="role",en="tabindex",rn="aria-",on=rn+"controls",sn=rn+"current",an=rn+"selected",un=rn+"label",cn=rn+"labelledby",ln=rn+"hidden",fn=rn+"orientation",dn=rn+"roledescription",pn=rn+"live",hn=rn+"busy",vn=rn+"atomic",gn=[nn,en,"disabled",on,sn,un,cn,ln,fn,dn],mn=nt+"__",yn="is-",bn=nt,wn=mn+"track",xn=mn+"list",kn=mn+"slide",En=kn+"--clone",Sn=kn+"__container",Cn=mn+"arrows",Pn=mn+"arrow",An=Pn+"--prev",Ln=Pn+"--next",jn=mn+"pagination",Mn=jn+"__page",On=mn+"progress__bar",Dn=mn+"toggle",Nn=mn+"sr",zn=yn+"initialized",Tn=yn+"active",In=yn+"prev",Rn=yn+"next",Fn=yn+"visible",Bn=yn+"loading",Un=yn+"focus-in",Wn=yn+"overflow",Xn=[Tn,Fn,In,Rn,Bn,Un,Wn],Gn={slide:kn,clone:En,arrows:Cn,arrow:Pn,prev:An,next:Ln,pagination:jn,page:Mn,spinner:mn+"spinner"},Hn="touchstart mousedown",Yn="touchmove mousemove",qn="touchend touchcancel mouseup click",Jn="slide",Kn="loop",Vn="fade";var Qn=et+"-interval",Zn={passive:!1,capture:!0},$n={Spacebar:" ",Right:Vt,Left:Kt,Up:Qt,Down:Zt};function te(t){return t=y(t)?t:t.key,$n[t]||t}var ne="keydown",ee=et+"-lazy",ie=ee+"-srcset",re="["+ee+"], ["+ie+"]",oe=[" ","Enter"],se=Object.freeze({__proto__:null,Media:function(t,n,e){var i=t.state,r=e.breakpoints||{},o=e.reducedMotion||{},s=gt(),u=[];function c(t){t&&s.destroy()}function l(t,n){var e=matchMedia(n);s.bind(e,"change",f),u.push([t,e])}function f(){var n=i.is(7),r=e.direction,o=u.reduce(function(t,n){return T(t,n[1].matches?n[0]:{})},{});I(e),d(o),e.destroy?t.destroy("completely"===e.destroy):n?(c(!0),t.mount()):r!==e.direction&&t.refresh()}function d(n,r,o){T(e,n),r&&T(Object.getPrototypeOf(e),n),!o&&i.is(1)||t.emit(Pt,e)}return{setup:function(){var t="min"===e.mediaQuery;D(r).sort(function(n,e){return t?+n-+e:+e-+n}).forEach(function(n){l(r[n],"("+(t?"min":"max")+"-width:"+n+"px)")}),l(o,a),f()},destroy:c,reduce:function(t){matchMedia(a).matches&&(t?T(e,o):I(e,D(o)))},set:d}},Direction:function(t,n,e){return{resolve:function(t,n,i){var r="rtl"!==(i=i||e.direction)||n?i===$t?0:-1:1;return tn[t]&&tn[t][r]||t.replace(/width|left|right/i,function(t,n){var e=tn[t.toLowerCase()][r]||t;return n>0?e.charAt(0).toUpperCase()+e.slice(1):e})},orient:function(t){return t*("rtl"===e.direction?1:-1)}}},Elements:function(t,n,e){var i,r,o,s=Yt(t),a=s.on,c=s.bind,l=t.root,f=e.i18n,d={},p=[],h=[],v=[];function g(){var t,n,o;i=w("."+wn),r=O(i,"."+xn),it(i&&r,"A track/list element is missing."),S(p,M(r,"."+kn+":not(."+En+")")),N({arrows:Cn,pagination:jn,prev:An,next:Ln,bar:On,toggle:Dn},function(t,n){d[n]=w("."+t)}),z(d,{root:l,track:i,list:r,slides:p}),n=l.id||""+(t=nt)+ht(vt[t]=(vt[t]||0)+1),o=e.role,l.id=n,i.id=i.id||n+"-track",r.id=r.id||n+"-list",!G(l,nn)&&"SECTION"!==l.tagName&&o&&F(l,nn,o),F(l,dn,f.carousel),F(r,nn,"presentation"),b()}function y(t){var n=gn.concat("style");u(p),Z(l,h),Z(i,v),R([i,r],n),R(l,t?n:["style",dn])}function b(){Z(l,h),Z(i,v),h=x(bn),v=x(wn),P(l,h),P(i,v),F(l,un,e.label),F(l,cn,e.labelledby)}function w(t){var n=V(l,t);return n&&function(t,n){if(m(t.closest))return t.closest(n);for(var e=t;e&&1===e.nodeType&&!j(e,n);)e=e.parentElement;return e}(n,"."+bn)===l?n:void 0}function x(t){return[t+"--"+e.type,t+"--"+e.direction,e.drag&&t+"--draggable",e.isNavigation&&t+"--nav",t===bn&&Tn]}return z(d,{setup:g,mount:function(){a(Ct,y),a(Ct,g),a(Pt,b),c(document,Hn+" keydown",function(t){o="keydown"===t.type},{capture:!0}),c(l,"focusin",function(){C(l,Un,!!o)})},destroy:y})},Slides:function(t,n,e){var i=Yt(t),r=i.on,o=i.emit,s=i.bind,a=n.Elements,c=a.slides,f=a.list,d=[];function p(){c.forEach(function(t,n){v(t,n,-1)})}function h(){b(function(t){t.destroy()}),u(d)}function v(n,e,i){var r=function(t,n,e,i){var r,o=Yt(t),s=o.on,a=o.emit,u=o.bind,c=t.Components,f=t.root,d=t.options,p=d.isNavigation,h=d.updateOnMove,v=d.i18n,g=d.pagination,m=d.slideFocus,y=c.Direction.resolve,b=G(i,"style"),w=G(i,un),x=e>-1,k=O(i,"."+Sn);function E(){var r=t.splides.map(function(t){var e=t.splide.Components.Slides.getAt(n);return e?e.slide.id:""}).join(" ");F(i,un,pt(v.slideX,(x?e:n)+1)),F(i,on,r),F(i,nn,m?"button":""),m&&R(i,dn)}function _(){r||S()}function S(){if(!r){var e=t.index;(o=P())!==H(i,Tn)&&(C(i,Tn,o),F(i,sn,p&&o||""),a(o?kt:Et,A)),function(){var n=function(){if(t.is(Vn))return P();var n=Y(c.Elements.track),e=Y(i),r=y("left",!0),o=y("right",!0);return st(n[r])<=at(e[r])&&st(e[o])<=at(n[o])}(),e=!n&&(!P()||x);if(t.state.is([4,5])||F(i,ln,e||""),F(Q(i,d.focusableNodes||""),en,e?-1:""),m&&F(i,en,e?-1:0),n!==H(i,Fn)&&(C(i,Fn,n),a(n?_t:St,A)),!n&&document.activeElement===i){var r=c.Slides.getAt(t.index);r&&X(r.slide)}}(),C(i,In,n===e-1),C(i,Rn,n===e+1)}var o}function P(){var i=t.index;return i===n||d.cloneStatus&&i===e}var A={index:n,slideIndex:e,slide:i,container:k,isClone:x,mount:function(){x||(i.id=f.id+"-slide"+ht(n+1),F(i,nn,g?"tabpanel":"group"),F(i,dn,v.slide),F(i,un,w||pt(v.slideLabel,[n+1,t.length]))),u(i,"click",l(a,xt,A)),u(i,"keydown",l(a,"sk",A)),s([wt,"sh",Nt],S),s(Bt,E),h&&s(bt,_)},destroy:function(){r=!0,o.destroy(),Z(i,Xn),R(i,gn),F(i,"style",b),F(i,un,w||"")},update:S,style:function(t,n,e){U(e&&k||i,t,n)},isWithin:function(e,i){var r=ut(e-n);return x||!d.rewind&&!t.is(Kn)||(r=rt(r,t.length-r)),r<=i}};return A}(t,e,i,n);r.mount(),d.push(r),d.sort(function(t,n){return t.index-n.index})}function g(t){return t?w(function(t){return!t.isClone}):d}function b(t,n){g(n).forEach(t)}function w(t){return d.filter(m(t)?t:function(n){return y(t)?j(n.slide,t):_(k(t),n.index)})}return{mount:function(){p(),r(Ct,h),r(Ct,p)},destroy:h,update:function(){b(function(t){t.update()})},register:v,get:g,getIn:function(t){var i=n.Controller,r=i.toIndex(t),o=i.hasFocus()?1:e.perPage;return w(function(t){return lt(t.index,r,r+o-1)})},getAt:function(t){return w(t)[0]},add:function(t,n){E(t,function(t){if(y(t)&&(t=J(t)),x(t)){var i=c[n];i?L(t,i):A(f,t),P(t,e.classes.slide),r=t,a=l(o,At),u=Q(r,"img"),(d=u.length)?u.forEach(function(t){s(t,"load error",function(){--d||a()})}):a()}var r,a,u,d}),o(Ct)},remove:function(t){q(w(t).map(function(t){return t.slide})),o(Ct)},forEach:b,filter:w,style:function(t,n,e){b(function(i){i.style(t,n,e)})},getLength:function(t){return t?c.length:d.length},isEnough:function(){return d.length>e.perPage}}},Layout:function(t,n,e){var i,r,o,s=Yt(t),a=s.on,u=s.bind,c=s.emit,f=n.Slides,d=n.Direction.resolve,p=n.Elements,h=p.root,g=p.track,m=p.list,y=f.getAt,b=f.style;function w(){i=e.direction===$t,U(h,"maxWidth",tt(e.width)),U(g,d("paddingLeft"),k(!1)),U(g,d("paddingRight"),k(!0)),x(!0)}function x(t){var n,s=Y(h);(t||r.width!==s.width||r.height!==s.height)&&(U(g,"height",(n="",i&&(it(n=E(),"height or heightRatio is missing."),n="calc("+n+" - "+k(!1)+" - "+k(!0)+")"),n)),b(d("marginRight"),tt(e.gap)),b("width",e.autoWidth?null:tt(e.fixedWidth)||(i?"":_())),b("height",tt(e.fixedHeight)||(i?e.autoHeight?null:_():E()),!0),r=s,c(Lt),o!==(o=M())&&(C(h,Wn,o),c("overflow",o)))}function k(t){var n=e.padding,i=d(t?"right":"left");return n&&tt(n[i]||(v(n)?0:n))||"0px"}function E(){return tt(e.height||Y(m).width*e.heightRatio)}function _(){var t=tt(e.gap);return"calc((100%"+(t&&" + "+t)+")/"+(e.perPage||1)+(t&&" - "+t)+")"}function S(){return Y(m)[d("width")]}function P(t,n){var e=y(t||0);return e?Y(e.slide)[d("width")]+(n?0:j()):0}function A(t,n){var e=y(t);if(e){var i=Y(e.slide)[d("right")],r=Y(m)[d("left")];return ut(i-r)+(n?0:j())}return 0}function L(n){return A(t.length-1)-A(0)+P(0,n)}function j(){var t=y(0);return t&&parseFloat(U(t.slide,d("marginRight")))||0}function M(){return t.is(Vn)||L(!0)>S()}return{mount:function(){var t,n;w(),u(window,"resize load",(t=l(c,At),n=qt(0,t,null,1),function(){n.isPaused()&&n.start()})),a([Pt,Ct],w),a(At,x)},resize:x,listSize:S,slideSize:P,sliderSize:L,totalSize:A,getPadding:function(t){return parseFloat(U(g,d("padding"+(t?"Right":"Left"))))||0},isOverflow:M}},Clones:function(t,n,e){var i,r=Yt(t),o=r.on,s=n.Elements,a=n.Slides,c=n.Direction.resolve,l=[];function f(){o(Ct,d),o([Pt,At],h),(i=v())&&(function(n){var i=a.get().slice(),r=i.length;if(r){for(;i.length<n;)S(i,i);S(i.slice(-n),i.slice(0,n)).forEach(function(o,u){var c=u<n,f=function(n,i){var r=n.cloneNode(!0);return P(r,e.classes.clone),r.id=t.root.id+"-clone"+ht(i+1),r}(o.slide,u);c?L(f,i[0].slide):A(s.list,f),S(l,f),a.register(f,u-n+(c?0:r),o.index)})}}(i),n.Layout.resize(!0))}function d(){p(),f()}function p(){q(l),u(l),r.destroy()}function h(){var t=v();i!==t&&(i<t||!t)&&r.emit(Ct)}function v(){var i=e.clones;if(t.is(Kn)){if(b(i)){var r=e[c("fixedWidth")]&&n.Layout.slideSize(0);i=r&&at(Y(s.track)[c("width")]/r)||e[c("autoWidth")]&&t.length||2*e.perPage}}else i=0;return i}return{mount:f,destroy:p}},Move:function(t,n,e){var i,r=Yt(t),o=r.on,s=r.emit,a=t.state.set,u=n.Layout,c=u.slideSize,l=u.getPadding,f=u.totalSize,d=u.listSize,p=u.sliderSize,h=n.Direction,v=h.resolve,g=h.orient,m=n.Elements,y=m.list,w=m.track;function x(){n.Controller.isBusy()||(n.Scroll.cancel(),k(t.index),n.Slides.update())}function k(t){E(P(t,!0))}function E(e,i){if(!t.is(Vn)){var r=i?e:function(e){if(t.is(Kn)){var i=C(e),r=i>n.Controller.getEnd();(i<0||r)&&(e=_(e,r))}return e}(e);U(y,"transform","translate"+v("X")+"("+r+"px)"),e!==r&&s("sh")}}function _(t,n){var e=t-L(n),i=p();return t-g(i*(at(ut(e)/i)||1))*(n?1:-1)}function S(){E(A(),!0),i.cancel()}function C(t){for(var e=n.Slides.get(),i=0,r=1/0,o=0;o<e.length;o++){var s=e[o].index,a=ut(P(s,!0)-t);if(!(a<=r))break;r=a,i=s}return i}function P(n,i){var r=g(f(n-1)-function(t){var n=e.focus;return"center"===n?(d()-c(t,!0))/2:+n*c(t)||0}(n));return i?function(n){return e.trimSpace&&t.is(Jn)&&(n=ft(n,0,g(p(!0)-d()))),n}(r):r}function A(){var t=v("left");return Y(y)[t]-Y(w)[t]+g(l(!1))}function L(t){return P(t?n.Controller.getEnd():0,!!e.trimSpace)}return{mount:function(){i=n.Transition,o([mt,Lt,Pt,Ct],x)},move:function(t,n,e,r){var o,u;t!==n&&(o=t>e,u=g(_(A(),o)),o?u>=0:u<=y[v("scrollWidth")]-Y(w)[v("width")])&&(S(),E(_(A(),t>e),!0)),a(4),s(bt,n,e,t),i.start(n,function(){a(3),s(wt,n,e,t),r&&r()})},jump:k,translate:E,shift:_,cancel:S,toIndex:C,toPosition:P,getPosition:A,getLimit:L,exceededLimit:function(t,n){n=b(n)?A():n;var e=!0!==t&&g(n)<g(L(!1)),i=!1!==t&&g(n)>g(L(!0));return e||i},reposition:x}},Controller:function(t,n,e){var i,r,o,s,a=Yt(t),u=a.on,c=a.emit,f=n.Move,d=f.getPosition,p=f.getLimit,h=f.toPosition,v=n.Slides,g=v.isEnough,m=v.getLength,w=e.omitEnd,x=t.is(Kn),k=t.is(Jn),E=l(L,!1),_=l(L,!0),S=e.start||0,C=S;function P(){r=m(!0),o=e.perMove,s=e.perPage,i=O();var t=ft(S,0,w?i:r-1);t!==S&&(S=t,f.reposition())}function A(){i!==O()&&c(Ht)}function L(t,n){var e=o||(T()?1:s),r=j(S+e*(t?-1:1),S,!(o||T()));return-1===r&&k&&!ct(d(),p(!t),1)?t?0:i:n?r:M(r)}function j(n,a,u){if(g()||T()){var c=function(n){if(k&&"move"===e.trimSpace&&n!==S)for(var i=d();i===h(n,!0)&<(n,0,t.length-1,!e.rewind);)n<S?--n:++n;return n}(n);c!==n&&(a=n,n=c,u=!1),n<0||n>i?n=o||!lt(0,n,a,!0)&&!lt(i,a,n,!0)?x?u?n<0?-(r%s||s):r:n:e.rewind?n<0?i:0:-1:D(N(n)):u&&n!==a&&(n=D(N(a)+(n<a?-1:1)))}else n=-1;return n}function M(t){return x?(t+r)%r||0:t}function O(){for(var t=r-(T()||x&&o?1:s);w&&t-- >0;)if(h(r-1,!0)!==h(t,!0)){t++;break}return ft(t,0,r-1)}function D(t){return ft(T()?t:s*t,0,i)}function N(t){return T()?rt(t,i):st((t>=i?r-1:t)/s)}function z(t){t!==S&&(C=S,S=t)}function T(){return!b(e.focus)||e.isNavigation}function I(){return t.state.is([4,5])&&!!e.waitForTransition}return{mount:function(){P(),u([Pt,Ct,Ht],P),u(Lt,A)},go:function(t,n,e){if(!I()){var r=function(t){var n=S;if(y(t)){var e=t.match(/([+\-<>])(\d+)?/)||[],r=e[1],o=e[2];"+"===r||"-"===r?n=j(S+ +(""+r+(+o||1)),S):">"===r?n=o?D(+o):E(!0):"<"===r&&(n=_(!0))}else n=x?t:ft(t,0,i);return n}(t),o=M(r);o>-1&&(n||o!==S)&&(z(o),f.move(r,o,C,e))}},scroll:function(t,e,r,o){n.Scroll.scroll(t,e,r,function(){var t=M(f.toIndex(d()));z(w?rt(t,i):t),o&&o()})},getNext:E,getPrev:_,getAdjacent:L,getEnd:O,setIndex:z,getIndex:function(t){return t?C:S},toIndex:D,toPage:N,toDest:function(t){var n=f.toIndex(t);return k?ft(n,0,i):n},hasFocus:T,isBusy:I}},Arrows:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.emit,c=e.classes,f=e.i18n,d=n.Elements,p=n.Controller,h=d.arrows,v=d.track,g=h,m=d.prev,y=d.next,b={};function w(){var t;!(t=e.arrows)||m&&y||(g=h||B("div",c.arrows),m=_(!0),y=_(!1),i=!0,A(g,[m,y]),!h&&L(g,v)),m&&y&&(z(b,{prev:m,next:y}),W(g,t?"":"none"),P(g,r=Cn+"--"+e.direction),t&&(s([mt,wt,Ct,Nt,Ht],S),a(y,"click",l(E,">")),a(m,"click",l(E,"<")),S(),F([m,y],on,v.id),u(Tt,m,y))),s(Pt,x)}function x(){k(),w()}function k(){o.destroy(),Z(g,r),i?(q(h?[m,y]:g),m=y=null):R([m,y],gn)}function E(t){p.go(t,!0)}function _(t){return J('<button class="'+c.arrow+" "+(t?c.prev:c.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40" focusable="false"><path d="'+(e.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z")+'" />')}function S(){if(m&&y){var n=t.index,e=p.getPrev(),i=p.getNext(),r=e>-1&&n<e?f.last:f.prev,o=i>-1&&n>i?f.first:f.next;m.disabled=e<0,y.disabled=i<0,F(m,un,r),F(y,un,o),u(It,m,y,e,i)}}return{arrows:b,mount:w,destroy:k,update:S}},Autoplay:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.emit,c=qt(e.interval,t.go.bind(t,">"),function(t){var n=f.bar;n&&U(n,"width",100*t+"%"),u(Wt,t)}),l=c.isPaused,f=n.Elements,d=n.Elements,p=d.root,h=d.toggle,v=e.autoplay,g="pause"===v;function m(){l()&&n.Slides.isEnough()&&(c.start(!e.resetProgress),r=i=g=!1,w(),u(Ut))}function y(t){void 0===t&&(t=!0),g=!!t,w(),l()||(c.pause(),u(Xt))}function b(){g||(i||r?y(!1):m())}function w(){h&&(C(h,Tn,!g),F(h,un,e.i18n[g?"play":"pause"]))}function x(t){var i=n.Slides.getAt(t);c.set(i&&+G(i.slide,Qn)||e.interval)}return{mount:function(){v&&(e.pauseOnHover&&a(p,"mouseenter mouseleave",function(t){i="mouseenter"===t.type,b()}),e.pauseOnFocus&&a(p,"focusin focusout",function(t){r="focusin"===t.type,b()}),h&&a(h,"click",function(){g?m():y(!0)}),s([bt,Dt,Ct],c.rewind),s(bt,x),h&&F(h,on,f.track.id),g||m(),w())},destroy:c.cancel,play:m,pause:y,isPaused:l}},Cover:function(t,n,e){var i=Yt(t).on;function r(t){n.Slides.forEach(function(n){var e=O(n.container||n.slide,"img");e&&e.src&&o(t,e,n)})}function o(t,n,e){e.style("background",t?'center/cover no-repeat url("'+n.src+'")':"",!0),W(n,t?"none":"")}return{mount:function(){e.cover&&(i(Gt,l(o,!0)),i([mt,Pt,Ct],l(r,!0)))},destroy:l(r,!1)}},Scroll:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.emit,u=t.state.set,c=n.Move,f=c.getPosition,d=c.getLimit,p=c.exceededLimit,h=c.translate,v=t.is(Jn),g=1;function m(t,e,o,s,d){var h=f();if(w(),o&&(!v||!p())){var m=n.Layout.sliderSize(),x=dt(t)*m*st(ut(t)/m)||0;t=c.toPosition(n.Controller.toDest(t%m))+x}var k=ct(h,t,1);g=1,e=k?0:e||ot(ut(t-h)/1.5,800),r=s,i=qt(e,y,l(b,h,t,d),1),u(5),a(Dt),i.start()}function y(){u(3),r&&r(),a(Nt)}function b(t,n,i,o){var s,a,u=f(),c=(t+(n-t)*(s=o,(a=e.easingFunc)?a(s):1-Math.pow(1-s,4))-u)*g;h(u+c),v&&!i&&p()&&(g*=.6,ut(c)<10&&m(d(p(!0)),600,!1,r,!0))}function w(){i&&i.cancel()}function x(){i&&!i.isPaused()&&(w(),y())}return{mount:function(){s(bt,w),s([Pt,Ct],x)},destroy:w,scroll:m,cancel:x}},Drag:function(t,n,e){var i,r,o,s,a,u,c,l,f=Yt(t),p=f.on,h=f.emit,g=f.bind,m=f.unbind,y=t.state,b=n.Move,w=n.Scroll,x=n.Controller,k=n.Elements.track,E=n.Media.reduce,_=n.Direction,S=_.resolve,C=_.orient,P=b.getPosition,A=b.exceededLimit,L=!1;function M(){var t=e.drag;W(!t),s="free"===t}function O(t){if(u=!1,!c){var n=U(t);i=t.target,r=e.noDrag,j(i,"."+Mn+", ."+Pn)||r&&j(i,r)||!n&&t.button||(x.isBusy()?K(t,!0):(l=n?k:window,a=y.is([4,5]),o=null,g(l,Yn,D,Zn),g(l,qn,N,Zn),b.cancel(),w.cancel(),T(t)))}var i,r}function D(n){if(y.is(6)||(y.set(6),h(jt)),n.cancelable)if(a){b.translate(i+I(n)/(L&&t.is(Jn)?5:1));var r=R(n)>200,o=L!==(L=A());(r||o)&&T(n),u=!0,h(Mt),K(n)}else(function(t){return ut(I(t))>ut(I(t,!0))})(n)&&(a=function(t){var n=e.dragMinThreshold,i=v(n),r=i&&n.mouse||0,o=(i?n.touch:+n)||10;return ut(I(t))>(U(t)?o:r)}(n),K(n))}function N(i){y.is(6)&&(y.set(3),h(Ot)),a&&(function(i){var r=function(n){if(t.is(Kn)||!L){var e=R(n);if(e&&e<200)return I(n)/e}return 0}(i),o=function(t){return P()+dt(t)*rt(ut(t)*(e.flickPower||600),s?1/0:n.Layout.listSize()*(e.flickMaxPages||1))}(r),a=e.rewind&&e.rewindByDrag;E(!1),s?x.scroll(o,0,e.snap):t.is(Vn)?x.go(C(dt(r))<0?a?"<":"-":a?">":"+"):t.is(Jn)&&L&&a?x.go(A(!0)?">":"<"):x.go(x.toDest(o),!0),E(!0)}(i),K(i)),m(l,Yn,D),m(l,qn,N),a=!1}function z(t){!c&&u&&K(t,!0)}function T(t){o=r,r=t,i=P()}function I(t,n){return B(t,n)-B(F(t),n)}function R(t){return $(t)-$(F(t))}function F(t){return r===t&&o||r}function B(t,n){return(U(t)?t.changedTouches[0]:t)["page"+S(n?"Y":"X")]}function U(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}function W(t){c=t}return{mount:function(){g(k,Yn,d,Zn),g(k,qn,d,Zn),g(k,Hn,O,Zn),g(k,"click",z,{capture:!0}),g(k,"dragstart",K),p([mt,Pt],M)},disable:W,isDragging:function(){return a}}},Keyboard:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.unbind,c=t.root,l=n.Direction.resolve;function d(){var t=e.keyboard;t&&(i="global"===t?window:c,a(i,ne,v))}function p(){u(i,ne)}function h(){var t=r;r=!0,f(function(){r=t})}function v(n){if(!r){var e=te(n);e===l(Kt)?t.go("<"):e===l(Vt)&&t.go(">")}}return{mount:function(){d(),s(Pt,p),s(Pt,d),s(bt,h)},destroy:p,disable:function(t){r=t}}},LazyLoad:function(t,n,e){var i=Yt(t),r=i.on,o=i.off,s=i.bind,a=i.emit,c="sequential"===e.lazyLoad,f=[wt,Nt],d=[];function p(){u(d),n.Slides.forEach(function(t){Q(t.slide,re).forEach(function(n){var i=G(n,ee),r=G(n,ie);if(i!==n.src||r!==n.srcset){var o=e.classes.spinner,s=n.parentElement,a=O(s,"."+o)||B("span",o,s);d.push([n,t,a]),n.src||W(n,"none")}})}),c?m():(o(f),r(f,h),h())}function h(){(d=d.filter(function(n){var i=e.perPage*((e.preloadPages||1)+1)-1;return!n[1].isWithin(t.index,i)||v(n)})).length||o(f)}function v(t){var n=t[0];P(t[1].slide,Bn),s(n,"load error",l(g,t)),F(n,"src",G(n,ee)),F(n,"srcset",G(n,ie)),R(n,ee),R(n,ie)}function g(t,n){var e=t[0],i=t[1];Z(i.slide,Bn),"error"!==n.type&&(q(t[2]),W(e,""),a(Gt,e,i),a(At)),c&&m()}function m(){d.length&&v(d.shift())}return{mount:function(){e.lazyLoad&&(p(),r(Ct,p))},destroy:l(u,d),check:h}},Pagination:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.emit,f=o.bind,d=n.Slides,p=n.Elements,h=n.Controller,v=h.hasFocus,g=h.getIndex,m=h.go,y=n.Direction.resolve,b=p.pagination,w=[];function x(){i&&(q(b?c(i.children):i),Z(i,r),u(w),i=null),o.destroy()}function k(t){m(">"+t,!0)}function E(t,n){var e=w.length,i=te(n),r=_(),o=-1;i===y(Vt,!1,r)?o=++t%e:i===y(Kt,!1,r)?o=(--t+e)%e:"Home"===i?o=0:"End"===i&&(o=e-1);var s=w[o];s&&(X(s.button),m(">"+o),K(n,!0))}function _(){return e.paginationDirection||e.direction}function S(t){return w[h.toPage(t)]}function C(){var t=S(g(!0)),n=S(g());if(t){var e=t.button;Z(e,Tn),R(e,an),F(e,en,-1)}if(n){var r=n.button;P(r,Tn),F(r,an,!0),F(r,en,"")}a(Ft,{list:i,items:w},t,n)}return{items:w,mount:function n(){x(),s([Pt,Ct,Ht],n);var o=e.pagination;b&&W(b,o?"":"none"),o&&(s([bt,Dt,Nt],C),function(){var n=t.length,o=e.classes,s=e.i18n,a=e.perPage,u=v()?h.getEnd()+1:at(n/a);P(i=b||B("ul",o.pagination,p.track.parentElement),r=jn+"--"+_()),F(i,nn,"tablist"),F(i,un,s.select),F(i,fn,_()===$t?"vertical":"");for(var c=0;c<u;c++){var g=B("li",null,i),m=B("button",{class:o.page,type:"button"},g),y=d.getIn(c).map(function(t){return t.slide.id}),x=!v()&&a>1?s.pageX:s.slideX;f(m,"click",l(k,c)),e.paginationKeyboard&&f(m,"keydown",l(E,c)),F(g,nn,"presentation"),F(m,nn,"tab"),F(m,on,y.join(" ")),F(m,un,pt(x,c+1)),F(m,en,-1),w.push({li:g,button:m,page:c})}}(),C(),a(Rt,{list:i,items:w},S(t.index)))},destroy:x,getAt:S,update:C}},Sync:function(t,n,e){var i=e.isNavigation,r=e.slideFocus,o=[];function s(){var n,e;t.splides.forEach(function(n){n.isParent||(c(t,n.splide),c(n.splide,t))}),i&&((e=(n=Yt(t)).on)(xt,d),e("sk",p),e([mt,Pt],f),o.push(n),n.emit(Bt,t.splides))}function a(){o.forEach(function(t){t.destroy()}),u(o)}function c(t,n){var e=Yt(t);e.on(bt,function(t,e,i){n.go(n.is(Kn)?i:t)}),o.push(e)}function f(){F(n.Elements.list,fn,e.direction===$t?"vertical":"")}function d(n){t.go(n.index)}function p(t,n){_(oe,te(n))&&(d(t),K(n))}return{setup:l(n.Media.set,{slideFocus:b(r)?i:r},!0),mount:s,destroy:a,remount:function(){a(),s()}}},Wheel:function(t,n,e){var i=Yt(t).bind,r=0;function o(i){if(i.cancelable){var o=i.deltaY,s=o<0,a=$(i),u=e.wheelMinThreshold||0,c=e.wheelSleep||0;ut(o)>u&&a-r>c&&(t.go(s?"<":">"),r=a),function(i){return!e.releaseWheel||t.state.is(4)||-1!==n.Controller.getAdjacent(i)}(s)&&K(i)}}return{mount:function(){e.wheel&&i(n.Elements.track,"wheel",o,Zn)}}},Live:function(t,n,e){var i=Yt(t).on,r=n.Elements.track,o=e.live&&!e.isNavigation,s=B("span",Nn),a=qt(90,l(u,!1));function u(t){F(r,hn,t),t?(A(r,s),a.start()):(q(s),a.cancel())}function c(t){o&&F(r,pn,t?"off":"polite")}return{mount:function(){o&&(c(!n.Autoplay.isPaused()),F(r,vn,!0),s.textContent="…",i(Ut,l(c,!0)),i(Xt,l(c,!1)),i([wt,Nt],l(u,!0)))},disable:c,destroy:function(){R(r,[pn,vn,hn]),q(s)}}}}),ae={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Gn,i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ue(t,n,e){var i=n.Slides;function r(){i.forEach(function(t){t.style("transform","translateX(-"+100*t.index+"%)")})}return{mount:function(){Yt(t).on([mt,Ct],r)},start:function(t,n){i.style("transition","opacity "+e.speed+"ms "+e.easing),f(n)},cancel:d}}function ce(t,n,e){var i,r=n.Move,o=n.Controller,s=n.Scroll,a=n.Elements.list,u=l(U,a,"transition");function c(){u(""),s.cancel()}return{mount:function(){Yt(t).bind(a,"transitionend",function(t){t.target===a&&i&&(c(),i())})},start:function(n,a){var c=r.toPosition(n,!0),l=r.getPosition(),f=function(n){var i=e.rewindSpeed;if(t.is(Jn)&&i){var r=o.getIndex(!0),s=o.getEnd();if(0===r&&n>=s||r>=s&&0===n)return i}return e.speed}(n);ut(c-l)>=1&&f>=1?e.useScroll?s.scroll(c,f,!1,a):(u("transform "+f+"ms "+e.easing),r.translate(c,!0),i=a):(r.jump(n),a())},cancel:c}}var le=function(){function t(n,e){var i;this.event=Yt(),this.Components={},this.state=(i=1,{set:function(t){i=t},is:function(t){return _(k(t),i)}}),this.splides=[],this._o={},this._E={};var r=y(n)?V(document,n):n;it(r,r+" is invalid."),this.root=r,e=T({label:G(r,un)||"",labelledby:G(r,cn)||""},ae,t.defaults,e||{});try{T(e,JSON.parse(G(r,et)))}catch(t){it(!1,"Invalid JSON")}this._o=Object.create(T({},e))}var n,e,i=t.prototype;return i.mount=function(t,n){var e=this,i=this.state,r=this.Components;return it(i.is([1,7]),"Already mounted!"),i.set(1),this._C=r,this._T=n||this._T||(this.is(Vn)?ue:ce),this._E=t||this._E,N(z({},se,this._E,{Transition:this._T}),function(t,n){var i=t(e,r,e._o);r[n]=i,i.setup&&i.setup()}),N(r,function(t){t.mount&&t.mount()}),this.emit(mt),P(this.root,zn),i.set(3),this.emit(yt),this},i.sync=function(t){return this.splides.push({splide:t}),t.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._C.Sync.remount(),t.Components.Sync.remount()),this},i.go=function(t){return this._C.Controller.go(t),this},i.on=function(t,n){return this.event.on(t,n),this},i.off=function(t){return this.event.off(t),this},i.emit=function(t){var n;return(n=this.event).emit.apply(n,[t].concat(c(arguments,1))),this},i.add=function(t,n){return this._C.Slides.add(t,n),this},i.remove=function(t){return this._C.Slides.remove(t),this},i.is=function(t){return this._o.type===t},i.refresh=function(){return this.emit(Ct),this},i.destroy=function(t){void 0===t&&(t=!0);var n=this.event,e=this.state;return e.is(1)?Yt(this).on(yt,this.destroy.bind(this,t)):(N(this._C,function(n){n.destroy&&n.destroy(t)},!0),n.emit(zt),n.destroy(),t&&u(this.splides),e.set(7)),this},n=t,e=[{key:"options",get:function(){return this._o},set:function(t){this._C.Media.set(t,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}],e&&s(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),t}(),fe=le;fe.defaults={},fe.STATES={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,SCROLLING:5,DRAGGING:6,DESTROYED:7};var de=[[mt,"onMounted"],[yt,"onReady"],[bt,"onMove"],[wt,"onMoved"],[xt,"onClick"],[kt,"onActive"],[Et,"onInactive"],[_t,"onVisible"],[St,"onHidden"],[Ct,"onRefresh"],[Pt,"onUpdated"],[At,"onResize"],[Lt,"onResized"],[jt,"onDrag"],[Mt,"onDragging"],[Ot,"onDragged"],[Dt,"onScroll"],[Nt,"onScrolled"],[zt,"onDestroy"],[Tt,"onArrowsMounted"],[It,"onArrowsUpdated"],[Rt,"onPaginationMounted"],[Ft,"onPaginationUpdated"],[Bt,"onNavigationMounted"],[Ut,"onAutoplayPlay"],[Wt,"onAutoplayPlaying"],[Xt,"onAutoplayPause"],[Gt,"onLazyLoadLoaded"]];function pe(...t){return t.filter(Boolean).join(" ")}function he(t){return null!==t&&"object"==typeof t}function ve(t,n){if(Array.isArray(t)&&Array.isArray(n))return t.length===n.length&&!t.some((t,e)=>!ve(t,n[e]));if(he(t)&&he(n)){const e=Object.keys(t),i=Object.keys(n);return e.length===i.length&&!e.some(e=>!Object.prototype.hasOwnProperty.call(n,e)||!ve(t[e],n[e]))}return t===n}function ge(t,n){const e=t;return function(t,n){if(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const r=e[i];if("__proto__"!==r&&!1===n(t[r],r))break}}}(n,(t,n)=>{Array.isArray(t)?e[n]=t.slice():he(t)?e[n]=ge(he(e[n])?e[n]:{},t):e[n]=t}),e}var me=({children:t,className:n,...e})=>o().createElement("div",{className:pe("splide__track",n),...e},o().createElement("ul",{className:"splide__list"},t)),ye=class extends o().Component{constructor(){super(...arguments),this.splideRef=o().createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:n,transition:e}=this.props,{current:i}=this.splideRef;i&&(this.splide=new fe(i,t),this.bind(this.splide),this.splide.mount(n,e),this.options=ge({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!ve(this.options,t)&&(this.splide.options=t,this.options=ge({},t));const n=this.getSlides();var e,i;e=this.slides,i=n,(e.length!==i.length||e.some((t,n)=>t!==i[n]))&&(this.splide.refresh(),this.slides=n)}sync(t){var n;null==(n=this.splide)||n.sync(t)}go(t){var n;null==(n=this.splide)||n.go(t)}getSlides(){var t;if(this.splide){const n=null==(t=this.splide.Components.Elements)?void 0:t.list.children;return n&&Array.prototype.slice.call(n)||[]}return[]}bind(t){de.forEach(([n,e])=>{const i=this.props[e];"function"==typeof i&&t.on(n,(...n)=>{i(t,...n)})})}omit(t,n){return n.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:n="div",hasTrack:e=!0,children:i,...r}=this.props;return o().createElement(n,{className:pe("splide",t),ref:this.splideRef,...this.omit(r,["options",...de.map(t=>t[1])])},e?o().createElement(me,null,i):i)}},be=({children:t,className:n,...e})=>o().createElement("li",{className:pe("splide__slide",n),...e},t);const we=window.wp.i18n,xe=window.wp.blockEditor,ke=window.wp.components,Ee={type:"loop",perMove:1,perPage:5,gap:"2rem",autoplay:!0,interval:4e3,breakpoints:{992:{perPage:3,gap:"1rem"},768:{perPage:2,gap:".7rem"},576:{perPage:1,gap:".7rem"}}},_e=window.ReactJSXRuntime,Se=[{label:(0,we.__)("Logos Grid","kind-site-framework"),value:"grid"},{label:(0,we.__)("Text List","kind-site-framework"),value:"list"},{label:(0,we.__)("Logos Slider","kind-site-framework"),value:"slider"}],Ce=[{label:(0,we.__)("Colored","kind-site-framework"),value:"colored"}];function Pe({layout:t,style:n,insurers:e}){switch(t){case"grid":return e.map(t=>(0,_e.jsx)("div",{children:(0,_e.jsx)("img",{src:t.urls[n],alt:t.alt})},t.key));case"list":return e.map(t=>(0,_e.jsx)("li",{children:t.label},t.key));case"slider":return(0,_e.jsx)(ye,{"aria-label":(0,we.__)("Insurance Accepted","kind-site-framework"),options:Ee,children:e.map(t=>(0,_e.jsx)(be,{children:(0,_e.jsx)("img",{src:t.urls[n],alt:t.alt})},t.key))})}return null}const Ae=JSON.parse('{"UU":"kind-site-framework/insurers"}'),Le=(0,_e.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:(0,_e.jsx)("path",{d:"M933 167.4l-384-160c-10.902-4.648-23.586-7.35-36.9-7.35s-25.998 2.702-37.531 7.588l0.631-0.238-384 160c-35.8 14.8-59.2 49.8-59.2 88.6 0 397 229 671.4 443 760.6 23.6 9.8 50.2 9.8 73.8 0 171.4-71.4 443.2-318 443.2-760.6 0-38.8-23.4-73.8-59-88.6zM838.6 395.8l-368 368c-12.4 12.4-32.8 12.4-45.2 0l-208-208c-12.4-12.4-12.4-32.8 0-45.2l45.2-45.2c12.4-12.4 32.8-12.4 45.2 0l140.2 140.2 300.2-300.2c12.4-12.4 32.8-12.4 45.2 0l45.2 45.2c12.6 12.6 12.6 32.8 0 45.2z"})});(0,i.registerBlockType)(Ae.UU,{icon:Le,edit:function({attributes:t,setAttributes:n}){const e=t.layout||"slider",i=t.style||"colored",r=!!t.overwriteSettings,o=t.extraInsurers||"",s="list"===e?"ul":"div",a=(0,xe.useBlockProps)({className:"ksf-layout-"+e}),u=globalThis.ksfAllInsurers||[];let c,l=[];return r?(l=t.insurers||[],c=u.filter(t=>l.includes(t.key)).concat(function(t){const n=[];return t.split(/\r?\n|\r|\n/g).forEach(t=>{if(t){const e=t.split("|");2===e.length&&e[0]&&n.push({key:e[0],label:e[1],alt:e[1],urls:{colored:e[0]}})}}),n}(o))):c=[...globalThis.ksfEnabledInsurers||[],...globalThis.ksfExtraInsurers||[]],(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(xe.InspectorControls,{children:(0,_e.jsxs)(ke.PanelBody,{title:(0,we.__)("Settings","kind-site-framework"),children:[(0,_e.jsx)(ke.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Layout",value:e,options:Se,onChange:t=>n({layout:t})}),(0,_e.jsx)(ke.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Style",value:i,options:Ce,onChange:t=>n({style:t})}),(0,_e.jsx)(ke.ToggleControl,{checked:r,label:(0,we.__)("Overwrite global settings","kind-site-framework"),onChange:()=>n({overwriteSettings:!r})}),r&&(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(ke.BaseControl,{label:(0,we.__)("Select insurers to show","kind-site-framework"),children:u.map(t=>(0,_e.jsx)(ke.CheckboxControl,{label:t.label,checked:l.includes(t.key),onChange:e=>n({insurers:[...e?[t.key]:[],...l.filter(n=>t.key!==n)]})},t.key))}),(0,_e.jsx)(ke.TextareaControl,{value:o,label:(0,we.__)("Extra Insurers","kind-site-framework"),help:(0,we.__)("A list of extra insurers in format `https://logo.url|Name`. One insurer per line.","kind-site-framework"),onChange:t=>n({extraInsurers:t}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})]})}),(0,_e.jsx)(s,{...a,children:(0,_e.jsx)(Pe,{layout:e,style:i,insurers:c})})]})}})}},e={};function i(t){var r=e[t];if(void 0!==r)return r.exports;var o=e[t]={exports:{}};return n[t](o,o.exports,i),o.exports}i.m=n,t=[],i.O=(n,e,r,o)=>{if(!e){var s=1/0;for(l=0;l<t.length;l++){for(var[e,r,o]=t[l],a=!0,u=0;u<e.length;u++)(!1&o||s>=o)&&Object.keys(i.O).every(t=>i.O[t](e[u]))?e.splice(u--,1):(a=!1,o<s&&(s=o));if(a){t.splice(l--,1);var c=r();void 0!==c&&(n=c)}}return n}o=o||0;for(var l=t.length;l>0&&t[l-1][2]>o;l--)t[l]=t[l-1];t[l]=[e,r,o]},i.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return i.d(n,{a:n}),n},i.d=(t,n)=>{for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),(()=>{var t={294:0,18:0};i.O.j=n=>0===t[n];var n=(n,e)=>{var r,o,[s,a,u]=e,c=0;if(s.some(n=>0!==t[n])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(u)var l=u(i)}for(n&&n(e);c<s.length;c++)o=s[c],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return i.O(l)},e=globalThis.webpackChunkkind_site_framework=globalThis.webpackChunkkind_site_framework||[];e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))})();var r=i.O(void 0,[18],()=>i(608));r=i.O(r)})(); -
kind-site-framework/tags/1.3/build/blocks/insurers/render.php
r3473938 r3494876 25 25 26 26 if ( ! empty( $attributes['overwriteSettings'] ) ) { 27 $insurers = $insurers->filter( (array) ( $attributes['insurers'] ?? [] ) ); 27 $insurer_list = $insurers->filter( (array) ( $attributes['insurers'] ?? array() ) ) + 28 $insurers->get_extra( $attributes['extraInsurers'] ?? '' ); 28 29 } else { 29 $insurer s = $insurers->get_enabled();30 $insurer_list = $insurers->get_enabled() + $insurers->get_extra(); 30 31 } 31 32 … … 38 39 <div <?php echo wp_kses_data( $wrapper_attributes ) ?>> 39 40 <?php 40 foreach ( $insurer sas $insurer ) {41 foreach ( $insurer_list as $insurer ) { 41 42 ?> 42 43 <div> … … 56 57 <ul <?php echo wp_kses_data( $wrapper_attributes ) ?>> 57 58 <?php 58 foreach ( $insurer sas $insurer ) {59 foreach ( $insurer_list as $insurer ) { 59 60 ?> 60 61 <li><?php echo esc_html( $insurer['label'] ); ?></li> … … 75 76 <div class="splide__list"> 76 77 <?php 77 foreach ( $insurer sas $insurer ) {78 foreach ( $insurer_list as $insurer ) { 78 79 ?> 79 80 <div class="splide__slide"> -
kind-site-framework/tags/1.3/build/scripts/editor-sidebar.asset.php
r3488298 r3494876 1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => ' 31028c04fd8809755d45');1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'c4223ad9e834696c25d2'); -
kind-site-framework/tags/1.3/build/scripts/editor-sidebar.js
r3488298 r3494876 1 (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.components,o=window.wp.coreData,i=window.wp.data,a=window.wp.editor,l=window.wp.i18n,r=window.wp.plugins,s=window.wp.element,_=window.wp.apiFetch;var c=e.n(_);const x=window.ReactJSXRuntime, m=({value:e,onChange:o,label:i,placeholder:a})=>{const[r,_]=(0,s.useState)({});(0,t.useEffect)(()=>{e&&e.length&&c()({path:`/wp/v2/search?context=embed&include=${e.join(",")}`}).then(e=>{const t={};e.forEach(e=>{t[e.id]={value:e.id,label:e.title,link:e.link}}),_(t)})},[]);const[m,d]=(0,s.useState)(""),[u,p]=(0,s.useState)("");(0,t.useEffect)(()=>{const e=globalThis.setTimeout(()=>p(m),400);return()=>clearTimeout(e)},[m]);const[g,f]=(0,s.useState)([]),[k,h]=(0,s.useState)(!1);(0,t.useEffect)(()=>{u?(h(!0),c()({path:`/wp/v2/search?context=embed&search=${u}`}).then(e=>{const t=e.map(e=>({value:e.id,label:e.title,link:e.url}));f(t),h(!1)}).catch(()=>{f([]),h(!1)})):f([])},[u]);const w=(0,t.useCallback)(t=>{e.includes(t)||(o([...e,t]),_(e=>{const n={...e};for(let e=0;e<g.length;e++){const o=g[e];if(o.value===t){n[t]=o;break}}return n}))},[e,g]),C=(0,t.useCallback)(t=>{e.includes(t)&&(o(e.filter(e=>e!==t)),_(e=>{const{[t]:n,...o}=e;return o}))},[e]);return(0,x.jsxs)("div",{className:"ksf-select-posts-control components-base-control ",children:[(0,x.jsx)(n.ComboboxControl,{label:i||(0,l.__)("Search Posts","kind-site-framework"),options:g,value:null,onFilterValueChange:d,onChange:w,isLoading:k,expandOnFocus:!1,placeholder:a||(0,l.__)("Search posts by title","kind-site-framework"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,x.jsx)("div",{class:"ksf-selected-posts",children:e.map(e=>{const t=r[e];return t?(0,x.jsxs)("div",{class:"ksf-selected-post",children:[(0,x.jsx)("button",{type:"button",className:"components-button is-compact has-icon","aria-label":(0,l.__)("Remove","kind-site-framework"),onClick:()=>(C(e),!1),children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,x.jsx)("path",{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})}),(0,x.jsx)("a",{href:t.link,target:"_blank",children:t.label})]},e):null})})]})},d={homepage:(0,l.__)("Homepage","kind-site-framework"),blog:(0,l.__)("Blog Post","kind-site-framework"),clinic:(0,l.__)("Clinic / Location","kind-site-framework"),service:(0,l.__)("Service / Program","kind-site-framework"),team_member:(0,l.__)("Team Member","kind-site-framework"),team_directory:(0,l.__)("Team Directory","kind-site-framework")},u=Object.entries(d).map(([e,t])=>({value:e,label:t}));u.unshift({value:"",label:(0,l.__)("-Select-","kind-site-framework")}),(0,r.registerPlugin)("kind-site-framework",{render:()=>(0,x.jsx)(a.PluginSidebar,{name:"kind-site-framework",title:(0,l.__)("Kind Site Framework","kind-site-framework"),className:"kind-site-framework-sidebar",children:(0,x.jsx)(p,{})}),icon:(0,x.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M4.42992 1.48591C2.52336 3.46767 2.52336 6.70952 4.42992 8.69073L7.13333 11.5L4.42992 14.3093C2.52336 16.291 2.52336 19.5329 4.42992 21.5141C6.33701 23.4953 9.45669 23.4953 11.3633 21.5141L21 11.5L14.0667 4.29518L11.3633 1.48591C9.45669 -0.495304 6.33701 -0.495304 4.42992 1.48591Z",fill:"#AD1E4D"})})});const p=()=>{const e=(0,i.useSelect)(e=>e("core/editor").getCurrentPostType(),[]),[a,r]=(0,o.useEntityProp)("postType",e,"meta"),s=a&&a.kind_site_framework_structured_data||{},_=!!s.enable,c=s.type||"",d=s.name||"",p=s.url||"",g=s.description||"",f=s.image||"",k=s.clinic_phone||"",h=s.clinic_street||"",w=s.clinic_city||"",C=s.clinic_region||"",b=s.clinic_postal||"",j=s.clinic_country||"",v=void 0===s.clinic_lat?null:s.clinic_lat,y=void 0===s.clinic_lng?null:s.clinic_lng,S=s.clinic_mon_opens||"",D=s.clinic_mon_closes||"",T=s.clinic_tue_opens||"",M=s.clinic_tue_closes||"",B=s.clinic_wed_opens||"",N=s.clinic_wed_closes||"",z=s.clinic_thu_opens||"",H=s.clinic_thu_closes||"",P=s.clinic_fri_opens||"",L=s.clinic_fri_closes||"",R=s.clinic_sat_opens||"",F=s.clinic_sat_closes||"",O=s.clinic_sun_opens||"",A=s.clinic_sun_closes||"",E=s.service_area_served||"",U=s.team_member_job||"",q=s.team_directory_members||[],I=!!s.faq_enable,J=(0,t.useCallback)(e=>t=>{const n={...s};""===t?void 0!==n[e]&&delete n[e]:n[e]=t,r({...a,kind_site_framework_structured_data:{...n}})},[a,r,s]);return(0,x.jsxs)(n.PanelBody,{title:"Structured Data",initialOpen:!0,children:[(0,x.jsx)(n.ToggleControl,{checked:_,label:(0,l.__)("Enable structured data","kind-site-framework"),onChange:()=>J("enable")(!_),__nextHasNoMarginBottom:!0}),_&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.SelectControl,{label:(0,l.__)("Page Type","kind-site-framework"),value:c,options:u,onChange:J("type"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),!!c&&(0,x.jsxs)(x.Fragment,{children:["homepage"!==c&&"blog"!==c&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{value:d,label:(0,l.__)("Name","kind-site-framework"),help:(0,l.__)("Defaults to post title.","kind-site-framework"),onChange:J("name"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"url",value:p,label:(0,l.__)("URL","kind-site-framework"),help:(0,l.__)("Defaults to post URL.","kind-site-framework"),onChange:J("url"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextareaControl,{value:g,label:(0,l.__)("Description","kind-site-framework"),help:(0,l.__)("Defaults to post excerpt.","kind-site-framework"),onChange:J("description"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:f,label:(0,l.__)("Image URL","kind-site-framework"),help:(0,l.__)("Defaults to post featured image.","kind-site-framework"),onChange:J("image"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),"clinic"===c&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{type:"tel",value:k,label:(0,l.__)("Clinic Phone","kind-site-framework"),placeholder:(0,l.__)("e.g. +13057682053","kind-site-framework"),help:(0,l.__)("Phone number in the international format. Defaults to Organization phone.","kind-site-framework"),onChange:J("clinic_phone"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:h,label:(0,l.__)("Clinic Street Address","kind-site-framework"),onChange:J("clinic_street"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:w,label:(0,l.__)("Clinic City","kind-site-framework"),onChange:J("clinic_city"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:C,label:(0,l.__)("Clinic Region","kind-site-framework"),help:(0,l.__)("Defaults to Organization region.","kind-site-framework"),onChange:J("clinic_region"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:b,label:(0,l.__)("Clinic Postal Code","kind-site-framework"),onChange:J("clinic_postal"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:j,label:(0,l.__)("Clinic Country Code","kind-site-framework"),placeholder:(0,l.__)("e.g. “US” or “CA”","kind-site-framework"),help:(0,l.__)("Two-character country code. Defaults to Organization country.","kind-site-framework"),onChange:J("clinic_country"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"number",value:v,label:(0,l.__)("Clinic Latitude","kind-site-framework"),step:1e-5,min:-90,max:90,onChange:J("clinic_lat"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"number",value:y,label:(0,l.__)("Clinic Longitude","kind-site-framework"),step:1e-5,min:-180,max:180,onChange:J("clinic_lng"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)("div",{className:"editor-post-content-information",style:{marginBottom:"16px"},children:(0,l.__)("In the next fields, set clinic opening hours for each day of the week.","kind-site-framework")}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:S,label:(0,l.__)("Monday","kind-site-framework"),onChange:J("clinic_mon_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:D,label:" ",onChange:J("clinic_mon_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:T,label:(0,l.__)("Tuesday","kind-site-framework"),onChange:J("clinic_tue_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:M,label:" ",onChange:J("clinic_tue_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:B,label:(0,l.__)("Wednesday","kind-site-framework"),onChange:J("clinic_wed_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:N,label:" ",onChange:J("clinic_wed_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:z,label:(0,l.__)("Thursday","kind-site-framework"),onChange:J("clinic_thu_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:H,label:" ",onChange:J("clinic_thu_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:P,label:(0,l.__)("Friday","kind-site-framework"),onChange:J("clinic_fri_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:L,label:" ",onChange:J("clinic_fri_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:R,label:(0,l.__)("Saturday","kind-site-framework"),onChange:J("clinic_sat_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:F,label:" ",onChange:J("clinic_sat_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:O,label:(0,l.__)("Sunday","kind-site-framework"),onChange:J("clinic_sun_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:A,label:" ",onChange:J("clinic_sun_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})]}),"service"===c&&(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(n.TextControl,{value:E,label:(0,l.__)("Area Served","kind-site-framework"),placeholder:(0,l.__)("e.g. “California” or “Orange County, CA”","kind-site-framework"),onChange:J("service_area_served"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),"team_member"===c&&(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(n.TextControl,{value:U,label:(0,l.__)("Job Title","kind-site-framework"),onChange:J("team_member_job"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),"team_directory"===c&&(0,x.jsx)(m,{value:q,onChange:J("team_directory_members"),label:(0,l.__)("Team Members","kind-site-framework")})]})]}),(0,x.jsx)(n.ToggleControl,{checked:I,label:(0,l.__)("Enable FAQ schema","kind-site-framework"),help:(0,l.__)("Also check Kind Site Framework Settings: Structured Data > FAQ.","kind-site-framework"),onChange:()=>J("faq_enable")(!I),__nextHasNoMarginBottom:!0})]})}})();1 (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.components,o=window.wp.coreData,i=window.wp.data,a=window.wp.editor,l=window.wp.i18n,r=window.wp.plugins,s=window.wp.element,_=window.wp.apiFetch;var c=e.n(_);const x=window.ReactJSXRuntime,d=({value:e,onChange:o,label:i,placeholder:a})=>{const[r,_]=(0,s.useState)({});(0,t.useEffect)(()=>{e&&e.length&&c()({path:`/wp/v2/search?context=embed&include=${e.join(",")}`}).then(e=>{const t={};e.forEach(e=>{t[e.id]={value:e.id,label:e.title,link:e.link}}),_(t)})},[]);const[d,m]=(0,s.useState)(""),[u,p]=(0,s.useState)("");(0,t.useEffect)(()=>{const e=globalThis.setTimeout(()=>p(d),400);return()=>clearTimeout(e)},[d]);const[k,g]=(0,s.useState)([]),[f,h]=(0,s.useState)(!1);(0,t.useEffect)(()=>{u?(h(!0),c()({path:`/wp/v2/search?context=embed&search=${u}`}).then(e=>{const t=e.map(e=>({value:e.id,label:e.title,link:e.url}));g(t),h(!1)}).catch(()=>{g([]),h(!1)})):g([])},[u]);const w=(0,t.useCallback)(t=>{e.includes(t)||(o([...e,t]),_(e=>{const n={...e};for(let e=0;e<k.length;e++){const o=k[e];if(o.value===t){n[t]=o;break}}return n}))},[e,k]),C=(0,t.useCallback)(t=>{e.includes(t)&&(o(e.filter(e=>e!==t)),_(e=>{const{[t]:n,...o}=e;return o}))},[e]);return(0,x.jsxs)("div",{className:"ksf-select-posts-control components-base-control ",children:[(0,x.jsx)(n.ComboboxControl,{label:i||(0,l.__)("Search Posts","kind-site-framework"),options:k,value:null,onFilterValueChange:m,onChange:w,isLoading:f,expandOnFocus:!1,placeholder:a||(0,l.__)("Search posts by title","kind-site-framework"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,x.jsx)("div",{class:"ksf-selected-posts",children:e.map(e=>{const t=r[e];return t?(0,x.jsxs)("div",{class:"ksf-selected-post",children:[(0,x.jsx)("button",{type:"button",className:"components-button is-compact has-icon","aria-label":(0,l.__)("Remove","kind-site-framework"),onClick:()=>(C(e),!1),children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,x.jsx)("path",{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})}),(0,x.jsx)("a",{href:t.link,target:"_blank",children:t.label})]},e):null})})]})},m={homepage:(0,l.__)("Homepage","kind-site-framework"),blog:(0,l.__)("Blog Post","kind-site-framework"),clinic:(0,l.__)("Clinic / Location","kind-site-framework"),service:(0,l.__)("Service / Program","kind-site-framework"),team_member:(0,l.__)("Team Member","kind-site-framework"),team_directory:(0,l.__)("Team Directory","kind-site-framework")},u=Object.entries(m).map(([e,t])=>({value:e,label:t}));u.unshift({value:"",label:(0,l.__)("-Select-","kind-site-framework")}),(0,r.registerPlugin)("kind-site-framework",{render:()=>(0,x.jsxs)(a.PluginSidebar,{name:"kind-site-framework",title:(0,l.__)("Kind Site Framework","kind-site-framework"),className:"kind-site-framework-sidebar",children:[(0,x.jsx)(p,{}),(0,x.jsx)(k,{})]}),icon:(0,x.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M4.42992 1.48591C2.52336 3.46767 2.52336 6.70952 4.42992 8.69073L7.13333 11.5L4.42992 14.3093C2.52336 16.291 2.52336 19.5329 4.42992 21.5141C6.33701 23.4953 9.45669 23.4953 11.3633 21.5141L21 11.5L14.0667 4.29518L11.3633 1.48591C9.45669 -0.495304 6.33701 -0.495304 4.42992 1.48591Z",fill:"#AD1E4D"})})});const p=()=>{const e=(0,i.useSelect)(e=>{const{getCurrentPostType:t}=e("core/editor");return t()},[]),[a,r]=(0,o.useEntityProp)("postType",e,"meta"),s=(0,i.useSelect)(e=>{const{getEntityRecord:t}=e("core");return t("root","site")?.kind_site_framework_structured_data||{}},[]),_=a&&a.kind_site_framework_structured_data||{},c=!!_.enable,m=_.type||"",p=_.name||"",k=_.url||"",g=_.description||"",f=_.image||"",h=_.clinic_phone||"",w=_.clinic_street||"",C=_.clinic_city||"",b=_.clinic_region||"",v=_.clinic_postal||"",j=_.clinic_country||"",y=void 0===_.clinic_lat?null:_.clinic_lat,S=void 0===_.clinic_lng?null:_.clinic_lng,D=_.clinic_mon_opens||"",T=_.clinic_mon_closes||"",B=_.clinic_tue_opens||"",M=_.clinic_tue_closes||"",z=_.clinic_wed_opens||"",N=_.clinic_wed_closes||"",H=_.clinic_thu_opens||"",P=_.clinic_thu_closes||"",L=_.clinic_fri_opens||"",O=_.clinic_fri_closes||"",R=_.clinic_sat_opens||"",F=_.clinic_sat_closes||"",E=_.clinic_sun_opens||"",A=_.clinic_sun_closes||"",U=_.service_area_served||"",I=_.service_services||[],K=_.service_treatments||[],q=_.team_member_job||"",J=_.team_directory_members||[],Q=!!_.org_enable,$=!!_.faq_enable,V=(0,t.useCallback)(e=>t=>{const n={..._};""===t?void 0!==n[e]&&delete n[e]:n[e]=t,r({...a,kind_site_framework_structured_data:{...n}})},[a,r,_]);return(0,x.jsxs)(n.PanelBody,{title:"Structured Data",initialOpen:!0,children:[(0,x.jsx)(n.ToggleControl,{checked:c,label:(0,l.__)("Enable structured data","kind-site-framework"),onChange:()=>V("enable")(!c),__nextHasNoMarginBottom:!0}),!c&&"post"===e&&s.auto_blog&&(0,x.jsx)(n.__experimentalSpacer,{marginBottom:4,children:(0,x.jsx)(n.Card,{size:"small",children:(0,x.jsx)(n.CardBody,{children:(0,x.jsx)(n.__experimentalText,{children:"BlogPosting schema will be automatically added to this post due to the global settings."})})})}),c&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.SelectControl,{label:(0,l.__)("Page Type","kind-site-framework"),value:m,options:u,onChange:V("type"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),!!m&&(0,x.jsxs)(x.Fragment,{children:["homepage"!==m&&"blog"!==m&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{value:p,label:(0,l.__)("Name","kind-site-framework"),help:(0,l.__)("Defaults to post title.","kind-site-framework"),onChange:V("name"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"url",value:k,label:(0,l.__)("URL","kind-site-framework"),help:(0,l.__)("Defaults to post URL.","kind-site-framework"),onChange:V("url"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextareaControl,{value:g,label:(0,l.__)("Description","kind-site-framework"),help:(0,l.__)("Defaults to post excerpt.","kind-site-framework"),onChange:V("description"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:f,label:(0,l.__)("Image URL","kind-site-framework"),help:(0,l.__)("Defaults to post featured image.","kind-site-framework"),onChange:V("image"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),"clinic"===m&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{type:"tel",value:h,label:(0,l.__)("Clinic Phone","kind-site-framework"),placeholder:(0,l.__)("e.g. +13057682053","kind-site-framework"),help:(0,l.__)("Phone number in the international format. Defaults to Organization phone.","kind-site-framework"),onChange:V("clinic_phone"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:w,label:(0,l.__)("Clinic Street Address","kind-site-framework"),onChange:V("clinic_street"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:C,label:(0,l.__)("Clinic City","kind-site-framework"),onChange:V("clinic_city"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:b,label:(0,l.__)("Clinic Region","kind-site-framework"),help:(0,l.__)("Defaults to Organization region.","kind-site-framework"),onChange:V("clinic_region"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:v,label:(0,l.__)("Clinic Postal Code","kind-site-framework"),onChange:V("clinic_postal"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:j,label:(0,l.__)("Clinic Country Code","kind-site-framework"),placeholder:(0,l.__)("e.g. “US” or “CA”","kind-site-framework"),help:(0,l.__)("Two-character country code. Defaults to Organization country.","kind-site-framework"),onChange:V("clinic_country"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"number",value:y,label:(0,l.__)("Clinic Latitude","kind-site-framework"),step:1e-5,min:-90,max:90,onChange:V("clinic_lat"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"number",value:S,label:(0,l.__)("Clinic Longitude","kind-site-framework"),step:1e-5,min:-180,max:180,onChange:V("clinic_lng"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)("div",{className:"editor-post-content-information",style:{marginBottom:"16px"},children:(0,l.__)("In the next fields, set clinic opening hours for each day of the week.","kind-site-framework")}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:D,label:(0,l.__)("Monday","kind-site-framework"),onChange:V("clinic_mon_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:T,label:" ",onChange:V("clinic_mon_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:B,label:(0,l.__)("Tuesday","kind-site-framework"),onChange:V("clinic_tue_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:M,label:" ",onChange:V("clinic_tue_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:z,label:(0,l.__)("Wednesday","kind-site-framework"),onChange:V("clinic_wed_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:N,label:" ",onChange:V("clinic_wed_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:H,label:(0,l.__)("Thursday","kind-site-framework"),onChange:V("clinic_thu_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:P,label:" ",onChange:V("clinic_thu_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:L,label:(0,l.__)("Friday","kind-site-framework"),onChange:V("clinic_fri_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:O,label:" ",onChange:V("clinic_fri_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:R,label:(0,l.__)("Saturday","kind-site-framework"),onChange:V("clinic_sat_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:F,label:" ",onChange:V("clinic_sat_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:E,label:(0,l.__)("Sunday","kind-site-framework"),onChange:V("clinic_sun_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:A,label:" ",onChange:V("clinic_sun_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})]}),"service"===m&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{value:U,label:(0,l.__)("Area Served","kind-site-framework"),placeholder:(0,l.__)("e.g. “California” or “Orange County, CA”","kind-site-framework"),help:(0,l.__)("Defaults to Organization region.","kind-site-framework"),onChange:V("service_area_served"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(d,{value:I,onChange:V("service_services"),label:(0,l.__)("Supporting Services","kind-site-framework")}),(0,x.jsx)(d,{value:K,onChange:V("service_treatments"),label:(0,l.__)("Treatment Modalities","kind-site-framework")})]}),"team_member"===m&&(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(n.TextControl,{value:q,label:(0,l.__)("Job Title","kind-site-framework"),onChange:V("team_member_job"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),"team_directory"===m&&(0,x.jsx)(d,{value:J,onChange:V("team_directory_members"),label:(0,l.__)("Team Members","kind-site-framework")})]})]}),(0,x.jsx)(n.ToggleControl,{checked:Q,label:(0,l.__)("Enable Organization schema","kind-site-framework"),help:(0,l.__)("Also check Kind Site Framework Settings: Structured Data > Organization.","kind-site-framework"),onChange:()=>V("org_enable")(!Q),__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.ToggleControl,{checked:$,label:(0,l.__)("Enable FAQ schema","kind-site-framework"),help:(0,l.__)("Also check Kind Site Framework Settings: Structured Data > FAQ.","kind-site-framework"),onChange:()=>V("faq_enable")(!$),__nextHasNoMarginBottom:!0})]})},k=()=>{const e=(0,i.useSelect)(e=>{const{getCurrentPostType:t}=e("core/editor");return t()},[]),[a,r]=(0,o.useEntityProp)("postType",e,"meta"),s=a&&a.kind_site_framework_seo||{},_=s.scripts_defer||"",c=s.scripts_postpone||"",d=(0,t.useCallback)(e=>t=>{const n={...s};""===t?void 0!==n[e]&&delete n[e]:n[e]=t,r({...a,kind_site_framework_seo:{...n}})},[a,r,s]);return(0,x.jsxs)(n.PanelBody,{title:"SEO",initialOpen:!0,children:[(0,x.jsx)(n.TextareaControl,{value:_,label:(0,l.__)("Scripts to Defer","kind-site-framework"),help:(0,l.__)("List of keys (IDs or sources) of scripts to defer on this page. Use symbol * as a wildcard prefix and/or suffix. One key per line.","kind-site-framework"),onChange:d("scripts_defer"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextareaControl,{value:c,label:(0,l.__)("Scripts to Postpone","kind-site-framework"),help:(0,l.__)("List keys (IDs or sources) of scripts to postpone on this page. Use symbol * as a wildcard prefix and/or suffix. One key per line.","kind-site-framework"),onChange:d("scripts_postpone"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})}})(); -
kind-site-framework/tags/1.3/includes/class-assets.php
r3488298 r3494876 30 30 31 31 /** 32 * KSF data service. 33 * 34 * @since 1.3.0 35 * 36 * @var \Kind_Site_Framework\Data_Interface 37 */ 38 protected Data_Interface $data; 39 40 /** 32 41 * KSF helpers service. 33 42 * … … 64 73 * Constructs a new container instance. 65 74 * 75 * @param \Kind_Site_Framework\Data_Interface $data KSF data service. 66 76 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers service. 67 77 * @param \Kind_Site_Framework\Insurers_Interface $insurers KSF insurers service. … … 72 82 */ 73 83 public function __construct( 84 Data_Interface $data, 74 85 Helpers_Interface $helpers, 75 86 Insurers_Interface $insurers, … … 77 88 Settings_Interface $settings 78 89 ) { 90 $this->data = $data; 79 91 $this->helpers = $helpers; 80 92 $this->insurers = $insurers; … … 89 101 /** @noinspection PhpParamsInspection */ 90 102 return new static( 103 $container->get( 'data' ), 91 104 $container->get( 'helpers' ), 92 105 $container->get( 'insurers' ), … … 129 142 130 143 // Add insurers to the "Insurers" block. 131 $all_insurers = wp_json_encode( array_values( $this-> insurers->get_all() ) );144 $all_insurers = wp_json_encode( array_values( $this->data->get_insurers() ) ); 132 145 $enabled_insurers = wp_json_encode( array_values( $this->insurers->get_enabled() ) ); 146 $extra_insurers = wp_json_encode( array_values( $this->insurers->get_extra() ) ); 133 147 wp_add_inline_script( 134 148 $this->get_asset_handle( 'insurers-editor' ), 135 149 "var ksfAllInsurers = $all_insurers;\n" . 136 "var ksfEnabledInsurers = $enabled_insurers;", 150 "var ksfEnabledInsurers = $enabled_insurers;" . 151 "var ksfExtraInsurers = $extra_insurers;", 137 152 'before' 138 153 ); … … 236 251 */ 237 252 public function optimize_html_scripts( string $html ): string { 238 // Defer scripts. 239 $scripts_to_defer = $this->settings->get_setting( 253 // Page-wide scripts to defer and postpone. 254 $page_scripts_defer = $page_scripts_postpone = ''; 255 if ( $post_id = get_the_ID() ) { 256 $seo_options = $this->post_meta->get_seo_options( $post_id ); 257 if ( ! empty( $seo_options ) ) { 258 $page_scripts_defer = $seo_options[ Post_Meta_Interface::SEO_SCRIPTS_DEFER ] ?? ''; 259 $page_scripts_postpone = $seo_options[ Post_Meta_Interface::SEO_SCRIPTS_POSTPONE ] ?? ''; 260 } 261 } 262 263 // Sitewide scripts to defer and postpone. 264 $global_scripts_defer = $this->settings->get_setting( 240 265 Settings_Interface::CONTENT, 241 266 Settings_Interface::CONTENT_SCRIPTS_DEFER, 242 267 ); 243 if ( $scripts_to_defer ) { 268 $global_scripts_postpone = $this->settings->get_setting( 269 Settings_Interface::CONTENT, 270 Settings_Interface::CONTENT_SCRIPTS_POSTPONE 271 ); 272 273 // Do defer scripts. 274 if ( $page_scripts_defer || $global_scripts_defer ) { 244 275 $html = $this->defer_html_scripts( 245 276 $html, 246 $this->helpers->split_string_into_rows( $scripts_to_defer ) 277 array_merge( 278 $this->helpers->split_string_into_rows( $global_scripts_defer ), 279 $this->helpers->split_string_into_rows( $page_scripts_defer ) 280 ) 247 281 ); 248 282 } 249 283 250 // Postpone scripts. 251 $scripts_to_postpone = $this->settings->get_setting( 252 Settings_Interface::CONTENT, 253 Settings_Interface::CONTENT_SCRIPTS_POSTPONE 254 ); 255 if ( $scripts_to_postpone ) { 284 // Do postpone scripts. 285 if ( $page_scripts_postpone || $global_scripts_postpone ) { 256 286 $html = $this->postpone_html_scripts( 257 287 $html, 258 $this->helpers->split_string_into_rows( $scripts_to_postpone ), 288 array_merge( 289 $this->helpers->split_string_into_rows( $global_scripts_postpone ), 290 $this->helpers->split_string_into_rows( $page_scripts_postpone ) 291 ) 259 292 ); 260 293 } -
kind-site-framework/tags/1.3/includes/class-blocks.php
r3488298 r3494876 47 47 } 48 48 } 49 50 49 } 51 50 -
kind-site-framework/tags/1.3/includes/class-helpers.php
r3488298 r3494876 71 71 * @inheritDoc 72 72 */ 73 public function get_file_content( string $name, string $type = 'template' ): string { 74 $path = KIND_SITE_FRAMEWORK_PATH . "{$type}s/$name.php"; 73 public function get_file_content( string $path ): string { 75 74 if ( file_exists( $path ) ) { 76 75 ob_start(); … … 187 186 } 188 187 188 /** 189 * @inheritDoc 190 */ 191 public function parse_key_value_list( 192 string $list, 193 string $delimiter = '|', 194 callable $key_sanitizer = NULL, 195 callable $value_sanitizer = NULL 196 ): array { 197 if ( ! isset( $key_sanitizer ) ) { 198 $key_sanitizer = 'sanitize_text_field'; 199 } 200 if ( ! isset( $value_sanitizer ) ) { 201 $value_sanitizer = 'sanitize_text_field'; 202 } 203 204 $items = array(); 205 foreach ( $this->split_string_into_rows( $list ) as $row ) { 206 $parts = explode( $delimiter, $row ); 207 if ( count( $parts ) !== 2 ) { 208 continue; 209 } 210 if ( $key = $key_sanitizer( $parts[0] ) ) { 211 $items[ $key ] = $value_sanitizer( $parts[1] ); 212 } 213 } 214 215 return $items; 216 } 217 189 218 } -
kind-site-framework/tags/1.3/includes/class-insurers.php
r3488298 r3494876 16 16 17 17 /** 18 * @inheritDoc 18 * KSF data service. 19 * 20 * @since 1.3.0 21 * 22 * @var \Kind_Site_Framework\Data_Interface 19 23 */ 20 public static function create( Container_Interface $container ): self { 21 return new static(); 24 protected Data_Interface $data; 25 26 /** 27 * KSF helpers service. 28 * 29 * @sinc 1.3.0 30 * 31 * @var \Kind_Site_Framework\Helpers_Interface 32 */ 33 protected Helpers_Interface $helpers; 34 35 /** 36 * KSF settings service. 37 * 38 * @since 1.3.0 39 * 40 * @var \Kind_Site_Framework\Settings_Interface 41 */ 42 protected Settings_Interface $settings; 43 44 /** 45 * Constructs a new service instance. 46 * 47 * @param \Kind_Site_Framework\Data_Interface $data KSF data service. 48 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers service. 49 * @param \Kind_Site_Framework\Settings_Interface $settings KSF settings service. 50 */ 51 public function __construct( 52 Data_Interface $data, 53 Helpers_Interface $helpers, 54 Settings_Interface $settings 55 ) { 56 $this->data = $data; 57 $this->helpers = $helpers; 58 $this->settings = $settings; 22 59 } 23 60 … … 25 62 * @inheritDoc 26 63 */ 27 public function get_all(): array { 28 return array( 29 'aetna' => array( 30 'key' => 'aetna', 31 'label' => __( 'Aetna', 'kind-site-framework' ), 32 'alt' => __( 'Aetna', 'kind-site-framework' ), 33 'urls' => array( 34 'colored' => $this->get_url( 'aetna.webp' ), 35 ), 36 ), 37 'anthem' => array( 38 'key' => 'anthem', 39 'label' => __( 'Anthem', 'kind-site-framework' ), 40 'alt' => __( 'Anthem', 'kind-site-framework' ), 41 'urls' => array( 42 'colored' => $this->get_url( 'anthem.webp' ), 43 ), 44 ), 45 'bcbs' => array( 46 'key' => 'bcbs', 47 'label' => __( 'Blue Cross Blue Shield', 'kind-site-framework' ), 48 'alt' => __( 'Blue Cross Blue Shield', 'kind-site-framework' ), 49 'urls' => array( 50 'colored' => $this->get_url( 'bcbs.webp' ), 51 ), 52 ), 53 'carefirst' => array( 54 'key' => 'carefirst', 55 'label' => __( 'CareFirst', 'kind-site-framework' ), 56 'alt' => __( 'CareFirst', 'kind-site-framework' ), 57 'urls' => array( 58 'colored' => $this->get_url( 'carefirst.png' ), 59 ), 60 ), 61 'carelon' => array( 62 'key' => 'carelon', 63 'label' => __( 'Carelon', 'kind-site-framework' ), 64 'alt' => __( 'Carelon', 'kind-site-framework' ), 65 'urls' => array( 66 'colored' => $this->get_url( 'carelon.webp' ), 67 ), 68 ), 69 'cigna' => array( 70 'key' => 'cigna', 71 'label' => __( 'Cigna', 'kind-site-framework' ), 72 'alt' => __( 'Cigna', 'kind-site-framework' ), 73 'urls' => array( 74 'colored' => $this->get_url( 'cigna.png' ), 75 ), 76 ), 77 'compsych' => array( 78 'key' => 'compsych', 79 'label' => __( 'ComPsych', 'kind-site-framework' ), 80 'alt' => __( 'ComPsych', 'kind-site-framework' ), 81 'urls' => array( 82 'colored' => $this->get_url( 'compsych.png' ), 83 ), 84 ), 85 'geha' => array( 86 'key' => 'geha', 87 'label' => __( 'GEHA', 'kind-site-framework' ), 88 'alt' => __( 'GEHA', 'kind-site-framework' ), 89 'urls' => array( 90 'colored' => $this->get_url( 'geha.png' ), 91 ), 92 ), 93 'humana' => array( 94 'key' => 'humana', 95 'label' => __( 'Humana', 'kind-site-framework' ), 96 'alt' => __( 'Humana', 'kind-site-framework' ), 97 'urls' => array( 98 'colored' => $this->get_url( 'humana.png' ), 99 ), 100 ), 101 'kaiser' => array( 102 'key' => 'kaiser', 103 'label' => __( 'Kaiser Permanente', 'kind-site-framework' ), 104 'alt' => __( 'Kaiser Permanente', 'kind-site-framework' ), 105 'urls' => array( 106 'colored' => $this->get_url( 'kaiser.png' ), 107 ), 108 ), 109 'magellan' => array( 110 'key' => 'magellan', 111 'label' => __( 'Magellan Health', 'kind-site-framework' ), 112 'alt' => __( 'Magellan Health', 'kind-site-framework' ), 113 'urls' => array( 114 'colored' => $this->get_url( 'magellan.png' ), 115 ), 116 ), 117 'multiplan' => array( 118 'key' => 'multiplan', 119 'label' => __( 'MultiPlan', 'kind-site-framework' ), 120 'alt' => __( 'MultiPlan', 'kind-site-framework' ), 121 'urls' => array( 122 'colored' => $this->get_url( 'multiplan.png' ), 123 ), 124 ), 125 'optum' => array( 126 'key' => 'optum', 127 'label' => __( 'Optum', 'kind-site-framework' ), 128 'alt' => __( 'Optum', 'kind-site-framework' ), 129 'urls' => array( 130 'colored' => $this->get_url( 'optum.webp' ), 131 ), 132 ), 133 'tricare' => array( 134 'key' => 'tricare', 135 'label' => __( 'TRICARE', 'kind-site-framework' ), 136 'alt' => __( 'TRICARE', 'kind-site-framework' ), 137 'urls' => array( 138 'colored' => $this->get_url( 'tricare.png' ), 139 ), 140 ), 141 'unitedhealthcare' => array( 142 'key' => 'unitedhealthcare', 143 'label' => __( 'United Healthcare', 'kind-site-framework' ), 144 'alt' => __( 'United Healthcare', 'kind-site-framework' ), 145 'urls' => array( 146 'colored' => $this->get_url( 'unitedhealthcare.png' ), 147 ), 148 ), 149 'molinahealthcare' => array( 150 'key' => 'molinahealthcare', 151 'label' => __( 'Molina Healthcare', 'kind-site-framework' ), 152 'alt' => __( 'Molina Healthcare', 'kind-site-framework' ), 153 'urls' => array( 154 'colored' => $this->get_url( 'molinahealthcare.svg' ), 155 ), 156 ), 157 'wellcare' => array( 158 'key' => 'wellcare', 159 'label' => __( 'Wellcare', 'kind-site-framework' ), 160 'alt' => __( 'Wellcare', 'kind-site-framework' ), 161 'urls' => array( 162 'colored' => $this->get_url( 'wellcare.svg' ), 163 ), 164 ), 165 'healthnet' => array( 166 'key' => 'healthnet', 167 'label' => __( 'Health Net', 'kind-site-framework' ), 168 'alt' => __( 'Health Net', 'kind-site-framework' ), 169 'urls' => array( 170 'colored' => $this->get_url( 'healthnet.png' ), 171 ), 172 ), 173 'highmark' => array( 174 'key' => 'healthnet', 175 'label' => __( 'Highmark', 'kind-site-framework' ), 176 'alt' => __( 'Highmark', 'kind-site-framework' ), 177 'urls' => array( 178 'colored' => $this->get_url( 'highmark.svg' ), 179 ), 180 ), 181 'independence' => array( 182 'key' => 'healthnet', 183 'label' => __( 'Independence Blue Cross', 'kind-site-framework' ), 184 'alt' => __( 'Independence Blue Cross', 'kind-site-framework' ), 185 'urls' => array( 186 'colored' => $this->get_url( 'independence.svg' ), 187 ), 188 ), 64 public static function create( Container_Interface $container ): self { 65 /** @noinspection PhpParamsInspection */ 66 return new static( 67 $container->get( 'data' ), 68 $container->get( 'helpers' ), 69 $container->get( 'settings' ) 189 70 ); 190 71 } … … 194 75 */ 195 76 public function get_enabled(): array { 196 $enabled = array(); 197 if ( $options = get_option( Settings_Interface::CONTENT ) ) { 198 $enabled = $options[ Settings_Interface::CONTENT_INSURANCE_INSURERS ] ?? array(); 199 } 77 $enabled = $this->settings->get_setting( Settings_Interface::CONTENT, Settings_Interface::CONTENT_INSURANCE_INSURERS, array() ); 200 78 return array_intersect_key( 201 $this-> get_all(),79 $this->data->get_insurers(), 202 80 $enabled, 203 81 ); … … 209 87 public function filter( array $keys ): array { 210 88 return array_filter( 211 $this-> get_all(),89 $this->data->get_insurers(), 212 90 fn( $key ) => in_array( $key, $keys ), 213 91 ARRAY_FILTER_USE_KEY … … 216 94 217 95 /** 218 * Returns insurer image URL. 219 * 220 * @param string $filename Image filename. 221 * @param string $style Optional. Image style. Defaults to "colored". 222 * @return string Insurer image URL. 223 * @since 1.1.0 96 * @inheritDoc 224 97 */ 225 protected function get_url( string $filename, string $style = 'colored' ): string { 226 return KIND_SITE_FRAMEWORK_URL . "media/insurance/$style/$filename"; 98 public function get_extra( ?string $list = NULL ): array { 99 $result = array(); 100 if ( ! isset( $list ) ) { 101 $list = $this->settings->get_setting( 102 Settings_Interface::CONTENT, 103 Settings_Interface::CONTENT_INSURANCE_EXTRA, 104 array() 105 ); 106 } 107 if ( ! empty( $list ) ) { 108 $items = $this->helpers->parse_key_value_list( $list, '|', 'esc_url', 'esc_attr' ); 109 foreach ( $items as $key => $value ) { 110 $result[ $key ] = array( 111 'key' => $key, 112 'label' => $value, 113 'alt' => $value, 114 'urls' => array( 115 'colored' => $key, 116 ), 117 ); 118 } 119 } 120 return $result; 227 121 } 228 122 -
kind-site-framework/tags/1.3/includes/class-plugin.php
r3488298 r3494876 4 4 5 5 use WP_Block_Editor_Context; 6 use WP_Post; 6 7 7 8 if ( ! defined( 'ABSPATH' ) ) { … … 215 216 * @inheritDoc 216 217 */ 218 public function add_meta_boxes(): void { 219 $this->post_meta->add_meta_box(); 220 } 221 222 /** 223 * @inheritDoc 224 */ 225 public function save_post( int $post_id, WP_Post $post): void { 226 // Hook save_post to handle meta box submission. 227 $this->post_meta->save_meta_box( $post_id, $post ); 228 } 229 230 /** 231 * @inheritDoc 232 */ 217 233 public function wp_head(): void { 218 234 if ( is_singular() ) { -
kind-site-framework/tags/1.3/includes/class-post-meta.php
r3488298 r3494876 2 2 3 3 namespace Kind_Site_Framework; 4 5 use WP_Post; 4 6 5 7 if ( ! defined( 'ABSPATH' ) ) { … … 26 28 * Structured data cache. 27 29 * 30 * @since 1.2.0 31 * 28 32 * @var array 29 33 */ 30 34 private array $structured_data; 35 36 /** 37 * SEO options cache. 38 * 39 * @since 1.3.0 40 * 41 * @var array 42 */ 43 private array $seo_options; 31 44 32 45 /** … … 39 52 40 53 $this->structured_data = array(); 54 $this->seo_options = array(); 41 55 } 42 56 … … 151 165 'type' => 'string', 152 166 ), 167 self::STRUCTURED_DATA_SERVICE_SERVICES => array( 168 'type' => 'array', 169 'items' => array( 170 'type' => 'number', 171 ), 172 ), 173 self::STRUCTURED_DATA_SERVICE_TREATMENTS => array( 174 'type' => 'array', 175 'items' => array( 176 'type' => 'number', 177 ), 178 ), 153 179 self::STRUCTURED_DATA_TEAM_MEMBER_JOB => array( 154 180 'type' => 'string', … … 159 185 'type' => 'number', 160 186 ), 187 ), 188 self::STRUCTURED_DATA_ORG_ENABLE => array( 189 'type' => 'boolean', 161 190 ), 162 191 self::STRUCTURED_DATA_FAQ_ENABLE => array( … … 175 204 ) 176 205 ); 206 207 // SEO meta field is an associative array. 208 register_post_meta( 209 '', 210 self::SEO, 211 array( 212 'show_in_rest' => array( 213 'schema' => array( 214 'type' => 'object', 215 'properties' => array( 216 self::SEO_SCRIPTS_DEFER => array( 217 'type' => 'string', 218 ), 219 self::SEO_SCRIPTS_POSTPONE => array( 220 'type' => 'string', 221 ), 222 ), 223 ), 224 ), 225 'type' => 'object', 226 'single' => TRUE, 227 'sanitize_callback' => array( $this, 'sanitize_seo_field' ), 228 'label' => __( "SEO", 'kind-site-framework' ), 229 'auth_callback' => function() { 230 return current_user_can( 'edit_posts' ); 231 } 232 ) 233 ); 177 234 } 178 235 … … 188 245 switch ( $key ) { 189 246 case self::STRUCTURED_DATA_ENABLE: 247 case self::STRUCTURED_DATA_ORG_ENABLE: 190 248 case self::STRUCTURED_DATA_FAQ_ENABLE: 191 249 $data[ $key ] = (bool) $value; … … 201 259 break; 202 260 261 case self::STRUCTURED_DATA_SERVICE_SERVICES: 262 case self::STRUCTURED_DATA_SERVICE_TREATMENTS: 203 263 case self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS: 204 264 $data[ $key ] = (array) $value; … … 213 273 // Sanitized values. 214 274 $result = array( 275 // Org setting doesn't depend on any other. 276 self::STRUCTURED_DATA_ORG_ENABLE => ! empty( $data[ self::STRUCTURED_DATA_ORG_ENABLE ] ), 215 277 // FAQ setting doesn't depend on any other. 216 278 self::STRUCTURED_DATA_FAQ_ENABLE => ! empty( $data[ self::STRUCTURED_DATA_FAQ_ENABLE ] ), … … 291 353 } 292 354 293 // Ensure only real post IDs are in the Directory Members field. 294 if ( ! empty( $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ] ) ) { 295 $ids = get_posts( array( 296 'post_type' => 'any', 297 'include' => $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ], 298 'fields' => 'ids', 299 ) ); 300 $result[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ] = array_values( 301 array_intersect( 302 $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ], 303 $ids 304 ) 355 // Ensure only real post IDs are in post reference fields. 356 $ref_fields = array( 357 self::STRUCTURED_DATA_SERVICE_SERVICES, 358 self::STRUCTURED_DATA_SERVICE_TREATMENTS, 359 self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS, 360 ); 361 foreach ( $ref_fields as $field ) { 362 if ( ! empty( $data[ $field ] ) ) { 363 $ids = get_posts( array( 364 'post_type' => 'any', 365 'include' => $data[ $field ], 366 'fields' => 'ids', 367 ) ); 368 $result[ $field ] = array_values( 369 array_intersect( $data[ $field ], $ids ) 370 ); 371 } 372 } 373 374 return $result; 375 } 376 377 /** 378 * Sanitizes KSF SEO post meta field. 379 * 380 * @param array $data Data to sanitize. 381 * @return array Sanitized data. 382 */ 383 public function sanitize_seo_field( array $data ): array { 384 $result = array(); 385 386 // Sanitize post meta fields. 387 foreach ( $data as $key => $value ) { 388 switch ( $key ) { 389 case self::SEO_SCRIPTS_DEFER: 390 case self::SEO_SCRIPTS_POSTPONE: 391 $result[ $key ] = sanitize_textarea_field( $value ); 392 break; 393 } 394 } 395 396 // Sanitize multiline values. 397 $multiline_fields = array( 398 self::SEO_SCRIPTS_DEFER, 399 self::SEO_SCRIPTS_POSTPONE, 400 ); 401 foreach ( $multiline_fields as $field ) { 402 if ( ! empty( $result[ $field ] ) ) { 403 $values = array(); 404 $rows = $this->helpers->split_string_into_rows( $result[ $field ] ); 405 foreach ( $rows as $raw_value ) { 406 if ( ! $raw_value ) { 407 continue; 408 } 409 $values[] = sanitize_text_field( $raw_value ); 410 } 411 $result[ $field ] = implode( PHP_EOL, $values ); 412 } 413 } 414 415 return $result; 416 } 417 418 /** 419 * @inheritDoc 420 */ 421 public function add_meta_box(): void { 422 add_meta_box( 423 Plugin_Interface::SLUG, 424 __( "Kind Site Framework", 'kind-site-framework' ), 425 array( $this, 'render_meta_box' ), 426 NULL, 427 'side', 428 'default', 429 array( 430 '__back_compat_meta_box' => TRUE, 431 ) 432 ); 433 } 434 435 /** 436 * Renders a KSF meta box. 437 * 438 * @param \WP_Post $post Post object. 439 * 440 * @return void 441 * @since 1.3.0 442 */ 443 public function render_meta_box( WP_Post $post ): void { 444 $data = $this->get_structured_data( $post->ID ); 445 $seo = $this->get_seo_options( $post->ID ); 446 447 $enable = ! empty( $data[ self::STRUCTURED_DATA_ENABLE ] ); 448 $type = $data[ self::STRUCTURED_DATA_TYPE ] ?? ''; 449 $name = $data[ self::STRUCTURED_DATA_NAME ] ?? ''; 450 $url = $data[ self::STRUCTURED_DATA_URL ] ?? ''; 451 $description = $data[ self::STRUCTURED_DATA_DESCRIPTION ] ?? ''; 452 $image = $data[ self::STRUCTURED_DATA_IMAGE ] ?? ''; 453 454 $clinic_phone = $data[ self::STRUCTURED_DATA_CLINIC_PHONE ] ?? ''; 455 $clinic_street = $data[ self::STRUCTURED_DATA_CLINIC_STREET ] ?? ''; 456 $clinic_city = $data[ self::STRUCTURED_DATA_CLINIC_CITY ] ?? ''; 457 $clinic_region = $data[ self::STRUCTURED_DATA_CLINIC_REGION ] ?? ''; 458 $clinic_postal = $data[ self::STRUCTURED_DATA_CLINIC_POSTAL ] ?? ''; 459 $clinic_country = $data[ self::STRUCTURED_DATA_CLINIC_COUNTRY ] ?? ''; 460 $clinic_lat = $data[ self::STRUCTURED_DATA_CLINIC_LAT ] ?? ''; 461 $clinic_lng = $data[ self::STRUCTURED_DATA_CLINIC_LNG ] ?? ''; 462 463 $clinic_times = array( 464 'mon' => __( "Monday", 'kind-site-framework' ), 465 'tue' => __( "Tuesday", 'kind-site-framework' ), 466 'wed' => __( "Wednesday", 'kind-site-framework' ), 467 'thu' => __( "Thursday", 'kind-site-framework' ), 468 'fri' => __( "Friday", 'kind-site-framework' ), 469 'sat' => __( "Saturday", 'kind-site-framework' ), 470 'sun' => __( "Sunday", 'kind-site-framework' ), 471 ); 472 473 $service_area_served = $data[ self::STRUCTURED_DATA_SERVICE_AREA_SERVED ] ?? ''; 474 $service_services = ! empty( $data[ self::STRUCTURED_DATA_SERVICE_SERVICES ] ) ? implode( ',', $data[ self::STRUCTURED_DATA_SERVICE_SERVICES ] ) : ''; 475 $service_treatments = ! empty( $data[ self::STRUCTURED_DATA_SERVICE_TREATMENTS ] ) ? implode( ',', $data[ self::STRUCTURED_DATA_SERVICE_TREATMENTS ] ) : ''; 476 477 $team_member_job = $data[ self::STRUCTURED_DATA_TEAM_MEMBER_JOB ] ?? ''; 478 $team_directory_members = ! empty( $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ] ) ? implode( ',', $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ] ) : ''; 479 480 $org_enable = ! empty( $data[ self::STRUCTURED_DATA_ORG_ENABLE ] ); 481 $faq_enable = ! empty( $data[ self::STRUCTURED_DATA_FAQ_ENABLE ] ); 482 483 $scripts_defer = $seo[ self::SEO_SCRIPTS_DEFER ] ?? ''; 484 $scripts_postpone = $seo[ self::SEO_SCRIPTS_POSTPONE ] ?? ''; 485 486 wp_nonce_field( 'ksf_meta_box', 'ksf_meta_box_nonce' ); 487 ?> 488 <div class="kind-site-framework-meta-box"> 489 <div class="ksf-section"> 490 <div class="ksf-section-title"><?php _e( "Structured Data", 'kind-site-framework' ); ?></div> 491 <div class="ksf-field"> 492 <label> 493 <input type="checkbox" name="ksf_sd[enable]" value="1" <?php checked( $enable ); ?> id="ksf-sd-enable"> 494 <?php _e( "Enable structured data", 'kind-site-framework' ); ?> 495 </label> 496 </div> 497 498 <div id="ksf-sd-fields" <?php if ( ! $enable ) echo 'style="display:none;"'; ?>> 499 <div class="ksf-field"> 500 <label for="ksf-sd-type"><?php _e( "Page Type", 'kind-site-framework' ); ?></label> 501 <select name="ksf_sd[type]" id="ksf-sd-type"> 502 <option value=""><?php _e( "-Select-", 'kind-site-framework' ); ?></option> 503 <option value="homepage" <?php selected( $type, 'homepage' ); ?>><?php _e( "Homepage", 'kind-site-framework' ); ?></option> 504 <option value="blog" <?php selected( $type, 'blog' ); ?>><?php _e( "Blog Post", 'kind-site-framework' ); ?></option> 505 <option value="clinic" <?php selected( $type, 'clinic' ); ?>><?php _e( "Clinic / Location", 'kind-site-framework' ); ?></option> 506 <option value="service" <?php selected( $type, 'service' ); ?>><?php _e( "Service / Program", 'kind-site-framework' ); ?></option> 507 <option value="team_member" <?php selected( $type, 'team_member' ); ?>><?php _e( "Team Member", 'kind-site-framework' ); ?></option> 508 <option value="team_directory" <?php selected( $type, 'team_directory' ); ?>><?php _e( "Team Directory", 'kind-site-framework' ); ?></option> 509 </select> 510 </div> 511 512 <div id="ksf-sd-common-fields" <?php if ( ! in_array( $type, array( 'clinic', 'service', 'team_member', 'team_directory' ) ) ) echo 'style="display:none;"'; ?>> 513 <div class="ksf-field"> 514 <label for="ksf-sd-name"><?php _e( "Name", 'kind-site-framework' ); ?></label> 515 <input type="text" name="ksf_sd[name]" id="ksf-sd-name" value="<?php echo esc_attr( $name ); ?>"> 516 <div class="description"><?php _e( "Defaults to post title.", 'kind-site-framework' ); ?></div> 517 </div> 518 <div class="ksf-field"> 519 <label for="ksf-sd-url"><?php _e( "URL", 'kind-site-framework' ); ?></label> 520 <input type="url" name="ksf_sd[url]" id="ksf-sd-url" value="<?php echo esc_url( $url ); ?>"> 521 <div class="description"><?php _e( "Defaults to post URL.", 'kind-site-framework' ); ?></div> 522 </div> 523 <div class="ksf-field"> 524 <label for="ksf-sd-description"><?php _e( "Description", 'kind-site-framework' ); ?></label> 525 <textarea name="ksf_sd[description]" id="ksf-sd-description" rows="3"><?php echo esc_textarea( $description ); ?></textarea> 526 <div class="description"><?php _e( "Defaults to post excerpt.", 'kind-site-framework' ); ?></div> 527 </div> 528 <div class="ksf-field"> 529 <label for="ksf-sd-image"><?php _e( "Image URL", 'kind-site-framework' ); ?></label> 530 <input type="url" name="ksf_sd[image]" id="ksf-sd-image" value="<?php echo esc_url( $image ); ?>"> 531 <div class="description"><?php _e( "Defaults to post featured image.", 'kind-site-framework' ); ?></div> 532 </div> 533 </div> 534 535 <div id="ksf-sd-clinic-fields" <?php if ( $type !== 'clinic' ) echo 'style="display:none;"'; ?>> 536 <div class="ksf-field"> 537 <label for="ksf-sd-clinic-phone"><?php _e( "Clinic Phone", 'kind-site-framework' ); ?></label> 538 <input type="tel" name="ksf_sd[clinic_phone]" id="ksf-sd-clinic-phone" value="<?php echo esc_attr( $clinic_phone ); ?>" placeholder="+13057682053"> 539 <div class="description"><?php _e( "Phone number in the international format. Defaults to Organization phone.", 'kind-site-framework' ); ?></div> 540 </div> 541 <div class="ksf-field"> 542 <label for="ksf-sd-clinic-street"><?php _e( "Clinic Street Address", 'kind-site-framework' ); ?></label> 543 <input type="text" name="ksf_sd[clinic_street]" id="ksf-sd-clinic-street" value="<?php echo esc_attr( $clinic_street ); ?>"> 544 <div class="description"><?php _e( "Defaults to Organization street address.", 'kind-site-framework' ); ?></div> 545 </div> 546 <div class="ksf-field"> 547 <label for="ksf-sd-clinic-city"><?php _e( "Clinic Locality / City", 'kind-site-framework' ); ?></label> 548 <input type="text" name="ksf_sd[clinic_city]" id="ksf-sd-clinic-city" value="<?php echo esc_attr( $clinic_city ); ?>"> 549 <div class="description"><?php _e( "Defaults to Organization city.", 'kind-site-framework' ); ?></div> 550 </div> 551 <div class="ksf-field"> 552 <label for="ksf-sd-clinic-region"><?php _e( "Clinic Region / State", 'kind-site-framework' ); ?></label> 553 <input type="text" name="ksf_sd[clinic_region]" id="ksf-sd-clinic-region" value="<?php echo esc_attr( $clinic_region ); ?>"> 554 <div class="description"><?php _e( "Defaults to Organization region.", 'kind-site-framework' ); ?></div> 555 </div> 556 <div class="ksf-field"> 557 <label for="ksf-sd-clinic-postal"><?php _e( "Clinic Postal Code", 'kind-site-framework' ); ?></label> 558 <input type="text" name="ksf_sd[clinic_postal]" id="ksf-sd-clinic-postal" value="<?php echo esc_attr( $clinic_postal ); ?>"> 559 <div class="description"><?php _e( "Defaults to Organization postal code.", 'kind-site-framework' ); ?></div> 560 </div> 561 <div class="ksf-field"> 562 <label for="ksf-sd-clinic-country"><?php _e( "Clinic Country Code", 'kind-site-framework' ); ?></label> 563 <input type="text" name="ksf_sd[clinic_country]" id="ksf-sd-clinic-country" value="<?php echo esc_attr( $clinic_country ); ?>"> 564 <div class="description"><?php _e( "Two-character ISO 3166-1 alpha-2 country code. Defaults to Organization country.", 'kind-site-framework' ); ?></div> 565 </div> 566 <div class="ksf-field"> 567 <label><?php _e( "Clinic Coordinates", 'kind-site-framework' ); ?></label> 568 <div class="ksf-row"> 569 <input type="number" step="any" name="ksf_sd[clinic_lat]" value="<?php echo esc_attr( $clinic_lat ); ?>" placeholder="Latitude"> 570 <input type="number" step="any" name="ksf_sd[clinic_lng]" value="<?php echo esc_attr( $clinic_lng ); ?>" placeholder="Longitude"> 571 </div> 572 <div class="description"><?php _e( "Latitude and longitude of the clinic.", 'kind-site-framework' ); ?></div> 573 </div> 574 <div class="ksf-field"> 575 <label><?php _e( "Opening Hours", 'kind-site-framework' ); ?></label> 576 <?php foreach ( $clinic_times as $day => $label ) : ?> 577 <div class="ksf-row"> 578 <label><?php echo esc_html( $label ); ?></label> 579 <input type="time" name="ksf_sd[clinic_<?php echo $day; ?>_opens]" value="<?php echo esc_attr( $data["clinic_{$day}_opens"] ?? '' ); ?>"> 580 <input type="time" name="ksf_sd[clinic_<?php echo $day; ?>_closes]" value="<?php echo esc_attr( $data["clinic_{$day}_closes"] ?? '' ); ?>"> 581 </div> 582 <?php endforeach; ?> 583 </div> 584 </div> 585 586 <div id="ksf-sd-service-fields" <?php if ( $type !== 'service' ) echo 'style="display:none;"'; ?>> 587 <div class="ksf-field"> 588 <label for="ksf-sd-service-area"><?php _e( "Area Served", 'kind-site-framework' ); ?></label> 589 <input type="text" name="ksf_sd[service_area_served]" id="ksf-sd-service-area" value="<?php echo esc_attr( $service_area_served ); ?>" placeholder="e.g. “California” or “Orange County, CA”"> 590 <div class="description"><?php _e( "Defaults to Organization region.", 'kind-site-framework' ); ?></div> 591 </div> 592 <div class="ksf-field"> 593 <label for="ksf-sd-service-services"><?php _e( "Supporting Services", 'kind-site-framework' ); ?></label> 594 <input type="text" name="ksf_sd[service_services]" id="ksf-sd-service-services" value="<?php echo esc_attr( $service_services ); ?>"> 595 <div class="description"><?php _e( "Comma-separated list of post IDs.", 'kind-site-framework' ); ?></div> 596 </div> 597 <div class="ksf-field"> 598 <label for="ksf-sd-service-treatments"><?php _e( "Treatment Modalities", 'kind-site-framework' ); ?></label> 599 <input type="text" name="ksf_sd[service_treatments]" id="ksf-sd-service-treatments" value="<?php echo esc_attr( $service_treatments ); ?>"> 600 <div class="description"><?php _e( "Comma-separated list of post IDs.", 'kind-site-framework' ); ?></div> 601 </div> 602 </div> 603 604 <div id="ksf-sd-team_member-fields" <?php if ( $type !== 'team_member' ) echo 'style="display:none;"'; ?>> 605 <div class="ksf-field"> 606 <label for="ksf-sd-team-member-job"><?php _e( "Job Title", 'kind-site-framework' ); ?></label> 607 <input type="text" name="ksf_sd[team_member_job]" id="ksf-sd-team-member-job" value="<?php echo esc_attr( $team_member_job ); ?>"> 608 </div> 609 </div> 610 611 <div id="ksf-sd-team_directory-fields" <?php if ( $type !== 'team_directory' ) echo 'style="display:none;"'; ?>> 612 <div class="ksf-field"> 613 <label for="ksf-sd-team-directory-members"><?php _e( "Team Members", 'kind-site-framework' ); ?></label> 614 <input type="text" name="ksf_sd[team_directory_members]" id="ksf-sd-team-directory-members" value="<?php echo esc_attr( $team_directory_members ); ?>"> 615 <div class="description"><?php _e( "Comma-separated list of post IDs.", 'kind-site-framework' ); ?></div> 616 </div> 617 </div> 618 </div> 619 620 <div class="ksf-field"> 621 <label> 622 <input type="checkbox" name="ksf_sd[org_enable]" value="1" <?php checked( $org_enable ); ?>> 623 <?php _e( "Enable Organization schema", 'kind-site-framework' ); ?> 624 </label> 625 <div class="description"><?php _e( "Also check Kind Site Framework Settings: Structured Data > Organization.", 'kind-site-framework' ); ?></div> 626 </div> 627 <div class="ksf-field"> 628 <label> 629 <input type="checkbox" name="ksf_sd[faq_enable]" value="1" <?php checked( $faq_enable ); ?>> 630 <?php _e( "Enable FAQ schema", 'kind-site-framework' ); ?> 631 </label> 632 <div class="description"><?php _e( "Also check Kind Site Framework Settings: Structured Data > FAQ.", 'kind-site-framework' ); ?></div> 633 </div> 634 </div> 635 636 <div class="ksf-section"> 637 <div class="ksf-section-title"><?php _e( "SEO", 'kind-site-framework' ); ?></div> 638 <div class="ksf-field"> 639 <label for="ksf-seo-defer"><?php _e( "Scripts to Defer", 'kind-site-framework' ); ?></label> 640 <textarea name="ksf_seo[scripts_defer]" id="ksf-seo-defer" rows="3"><?php echo esc_textarea( $scripts_defer ); ?></textarea> 641 <div class="description"><?php _e( "List of keys (IDs or sources) of scripts to defer on this page. Use symbol * as a wildcard prefix and/or suffix. One key per line.", 'kind-site-framework' ); ?></div> 642 </div> 643 <div class="ksf-field"> 644 <label for="ksf-seo-postpone"><?php _e( "Scripts to Postpone", 'kind-site-framework' ); ?></label> 645 <textarea name="ksf_seo[scripts_postpone]" id="ksf-seo-postpone" rows="3"><?php echo esc_textarea( $scripts_postpone ); ?></textarea> 646 <div class="description"><?php _e( "List keys (IDs or sources) of scripts to postpone on this page. Use symbol * as a wildcard prefix and/or suffix. One key per line.", 'kind-site-framework' ); ?></div> 647 </div> 648 </div> 649 </div> 650 651 <script> 652 (function() { 653 var enableCheckbox = document.getElementById('ksf-sd-enable'); 654 var typeSelect = document.getElementById('ksf-sd-type'); 655 var fieldsContainer = document.getElementById('ksf-sd-fields'); 656 657 function updateVisibility() { 658 fieldsContainer.style.display = enableCheckbox.checked ? 'block' : 'none'; 659 660 var type = typeSelect.value; 661 var commonFields = document.getElementById('ksf-sd-common-fields'); 662 var clinicFields = document.getElementById('ksf-sd-clinic-fields'); 663 var serviceFields = document.getElementById('ksf-sd-service-fields'); 664 var teamMemberFields = document.getElementById('ksf-sd-team_member-fields'); 665 var teamDirectoryFields = document.getElementById('ksf-sd-team_directory-fields'); 666 667 commonFields.style.display = (['clinic', 'service', 'team_member', 'team_directory'].indexOf(type) !== -1) ? 'block' : 'none'; 668 clinicFields.style.display = (type === 'clinic') ? 'block' : 'none'; 669 serviceFields.style.display = (type === 'service') ? 'block' : 'none'; 670 teamMemberFields.style.display = (type === 'team_member') ? 'block' : 'none'; 671 teamDirectoryFields.style.display = (type === 'team_directory') ? 'block' : 'none'; 672 } 673 674 enableCheckbox.addEventListener('change', updateVisibility); 675 typeSelect.addEventListener('change', updateVisibility); 676 updateVisibility(); 677 })(); 678 </script> 679 <?php 680 } 681 682 /** 683 * @inheritDoc 684 */ 685 public function save_meta_box( int $post_id, WP_Post $post ): void { 686 // Check nonce. 687 if ( ! isset( $_POST['ksf_meta_box_nonce'] ) || ! wp_verify_nonce( $_POST['ksf_meta_box_nonce'], 'ksf_meta_box' ) ) { 688 return; 689 } 690 691 // Check permissions. 692 if ( ! current_user_can( 'edit_post', $post_id ) ) { 693 return; 694 } 695 696 // Skip autosave. 697 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { 698 return; 699 } 700 701 // Save Structured Data. 702 if ( isset( $_POST['ksf_sd'] ) && is_array( $_POST['ksf_sd'] ) ) { 703 $sd_data = $_POST['ksf_sd']; 704 705 // Handle multi-value fields (convert comma-separated string to array). 706 $array_fields = array( 707 self::STRUCTURED_DATA_SERVICE_SERVICES, 708 self::STRUCTURED_DATA_SERVICE_TREATMENTS, 709 self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS, 305 710 ); 306 } 307 308 return $result; 711 foreach ( $array_fields as $field ) { 712 if ( isset( $sd_data[ $field ] ) && is_string( $sd_data[ $field ] ) ) { 713 $sd_data[ $field ] = array_filter( array_map( 'trim', explode( ',', $sd_data[ $field ] ) ) ); 714 } 715 } 716 717 $sanitized_sd = $this->sanitize_structured_data_field( $sd_data ); 718 update_post_meta( $post_id, self::STRUCTURED_DATA, $sanitized_sd ); 719 } 720 721 // Save SEO. 722 if ( isset( $_POST['ksf_seo'] ) && is_array( $_POST['ksf_seo'] ) ) { 723 $sanitized_seo = $this->sanitize_seo_field( $_POST['ksf_seo'] ); 724 update_post_meta( $post_id, self::SEO, $sanitized_seo ); 725 } 309 726 } 310 727 … … 320 737 } 321 738 739 /** 740 * @inheritDoc 741 */ 742 public function get_seo_options( int $post_id ): array { 743 if ( ! isset( $this->seo_options[ $post_id ] ) ) { 744 $data = get_post_meta( $post_id, self::SEO, TRUE ); 745 $this->seo_options[ $post_id ] = empty( $data ) ? array() : $data; 746 } 747 return $this->seo_options[ $post_id ]; 748 } 749 322 750 } -
kind-site-framework/tags/1.3/includes/class-settings.php
r3489394 r3494876 16 16 17 17 /** 18 * KSF data service. 19 * 20 * @since 1.3.0 21 * 22 * @var \Kind_Site_Framework\Data_Interface 23 */ 24 protected Data_Interface $data; 25 26 /** 18 27 * KSF helpers service. 19 28 * … … 24 33 25 34 /** 26 * KSF insurers service.27 *28 * @var \Kind_Site_Framework\Insurers_Interface29 * @since 1.1.030 */31 protected Insurers_Interface $insurers;32 33 /**34 35 * Constructs a new container instance. 35 36 * 37 * @param \Kind_Site_Framework\Data_Interface $data KSF data service. 36 38 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers service. 37 * @param \Kind_Site_Framework\Insurers_Interface $insurers KSF insurers service.38 */39 public function __construct( Helpers_Interface $helpers, Insurers_Interface $insurers ) {39 */ 40 public function __construct( Data_Interface $data, Helpers_Interface $helpers ) { 41 $this->data = $data; 40 42 $this->helpers = $helpers; 41 $this->insurers = $insurers;42 43 } 43 44 … … 48 49 /** @noinspection PhpParamsInspection */ 49 50 return new static( 50 $container->get( ' helpers' ),51 $container->get( ' insurers' )51 $container->get( 'data' ), 52 $container->get( 'helpers' ) 52 53 ); 53 54 } … … 158 159 159 160 // SEO: Google Tag Manager container ID. 161 /* 160 162 $field_id = self::CONTENT . '_' . self::CONTENT_GTM_CONTAINER_ID; 161 163 add_settings_field( … … 173 175 ) 174 176 ); 177 */ 175 178 176 179 // Selectors for sections with video backgrounds that should be disabled on … … 334 337 // Insurance Accepted: Available Insurers. 335 338 $field_id = self::CONTENT . '_' . self::CONTENT_INSURANCE_INSURERS; 336 $insurers = array_map( fn( $data ) => $data['label'], $this-> insurers->get_all() );339 $insurers = array_map( fn( $data ) => $data['label'], $this->data->get_insurers() ); 337 340 add_settings_field( 338 341 $field_id, … … 373 376 ) 374 377 ); 378 379 // Insurance Accepted: Extra Insurers. 380 $field_id = self::CONTENT . '_' . self::CONTENT_INSURANCE_EXTRA; 381 add_settings_field( 382 $field_id, 383 __( "Extra Insurers", 'kind-site-framework' ), 384 array( $this, 'render_settings_textarea' ), 385 self::CONTENT, 386 $section_id, 387 array( 388 'setting_name' => self::CONTENT, 389 'label_for' => $field_id, 390 'field_name' => self::CONTENT_INSURANCE_EXTRA, 391 'field_description' => __( 392 "A list of extra insurers in format <code>https://logo.url|Name</code>. One insurer per line.", 393 'kind-site-framework' 394 ), 395 ) 396 ); 375 397 } 376 398 … … 505 527 self::STRUCTURED_DATA, 506 528 array( 507 'type' => 'array', 529 'type' => 'object', 530 'show_in_rest' => array( 531 'schema' => array( 532 'type' => 'object', 533 'additionalProperties' => true, 534 ), 535 ), 508 536 'sanitize_callback' => array( $this, 509 537 'sanitize_structured_data_setting' … … 512 540 ); 513 541 542 $section_id = 'structured_data_blog'; 543 544 // Structured Data: Blog section. 545 add_settings_section( 546 $section_id, 547 __( "Blog", 'kind-site-framework' ), 548 array( $this, 'render_settings_section' ), 549 self::STRUCTURED_DATA, 550 array( 551 'description' => __( 552 "Manage BlogPosting schema.", 553 'kind-site-framework' 554 ), 555 ), 556 ); 557 558 // Whether to enable auto BlogPosting schema. 559 $field_id = self::STRUCTURED_DATA . '_' . self::STRUCTURED_DATA_AUTO_BLOG; 560 add_settings_field( 561 $field_id, 562 __( "Auto BlogPosting", 'kind-site-framework' ), 563 array( $this, 'render_settings_checkbox' ), 564 self::STRUCTURED_DATA, 565 $section_id, 566 array( 567 'setting_name' => self::STRUCTURED_DATA, 568 'label_for' => $field_id, 569 'field_name' => self::STRUCTURED_DATA_AUTO_BLOG, 570 'field_label' => __("Enable auto BlogPosting schema", 'kind-site-framework'), 571 'field_description' => __( 572 "If checked off, the BlogPosting schema will be automatically added to every post without explicit structured data type.", 573 'kind-site-framework' 574 ) 575 ) 576 ); 577 514 578 $section_id = 'structured_data_organization'; 515 579 … … 526 590 ), 527 591 ), 528 );529 530 // Whether to enable Organization Schema.531 $field_id = self::STRUCTURED_DATA . '_' . self::STRUCTURED_DATA_ORGANIZATION_SCHEMA;532 add_settings_field(533 $field_id,534 __( "Enable Schema", 'kind-site-framework' ),535 array( $this, 'render_settings_checkbox' ),536 self::STRUCTURED_DATA,537 $section_id,538 array(539 'setting_name' => self::STRUCTURED_DATA,540 'label_for' => $field_id,541 'field_name' => self::STRUCTURED_DATA_ORGANIZATION_SCHEMA,542 'field_label' => __("Enable Organization schema", 'kind-site-framework'),543 'field_description' => __(544 "If checked off, the Organization schema will be present on every page where structured data output is enabled.",545 'kind-site-framework'546 )547 )548 592 ); 549 593 … … 1348 1392 self::CONTENT_GTM_CONTAINER_ID, 1349 1393 self::CONTENT_VIDEO_BANNERS, 1394 self::CONTENT_SCRIPTS_DEFER, 1395 self::CONTENT_SCRIPTS_POSTPONE, 1350 1396 self::CONTENT_CTA_PHONE_NUMBER, 1351 1397 self::CONTENT_CTA_PHONE_LABEL, … … 1354 1400 self::CONTENT_INSURANCE_INSURERS, 1355 1401 self::CONTENT_INSURANCE_HEADLINE, 1356 self::CONTENT_SCRIPTS_DEFER, 1357 self::CONTENT_SCRIPTS_POSTPONE, 1402 self::CONTENT_INSURANCE_EXTRA, 1358 1403 ); 1359 1404 … … 1362 1407 self::CONTENT_SCRIPTS_DEFER, 1363 1408 self::CONTENT_SCRIPTS_POSTPONE, 1409 self::CONTENT_INSURANCE_EXTRA, 1364 1410 ); 1365 1411 … … 1376 1422 } 1377 1423 1378 // Sanitize "Video Banners", "Scripts to Defer" and "Scripts to Postpone" values. 1379 $multiline_fields = array( 1380 self::CONTENT_VIDEO_BANNERS, 1381 self::CONTENT_SCRIPTS_DEFER, 1382 self::CONTENT_SCRIPTS_POSTPONE, 1383 ); 1424 // Sanitize multiline values. 1425 $multiline_fields = $textarea_fields; 1384 1426 foreach ( $multiline_fields as $field ) { 1385 1427 if ( ! empty( $input[ $field ] ) ) { 1386 1428 $values = array(); 1387 $rows = $this->helpers->split_string_into_rows( $input[ $field ] ); 1388 foreach ( $rows as $raw_value ) { 1389 if ( ! $raw_value ) { 1390 continue; 1429 if ( $field === self::CONTENT_INSURANCE_EXTRA ) { 1430 $rows = $this->helpers->parse_key_value_list( 1431 $input[ $field ], 1432 '|', 1433 'sanitize_url' 1434 ); 1435 foreach ( $rows as $key => $value ) { 1436 $values[] = "$key|$value"; 1391 1437 } 1392 $values[] = esc_attr( $raw_value ); 1438 } else { 1439 $rows = $this->helpers->split_string_into_rows( $input[ $field ] ); 1440 foreach ( $rows as $raw_value ) { 1441 if ( ! $raw_value ) { 1442 continue; 1443 } 1444 $values[] = sanitize_text_field( $raw_value ); 1445 } 1393 1446 } 1394 1447 $input[ $field ] = implode( PHP_EOL, $values ); … … 1472 1525 1473 1526 $all_fields = array( 1474 self::STRUCTURED_DATA_ ORGANIZATION_SCHEMA,1527 self::STRUCTURED_DATA_AUTO_BLOG, 1475 1528 self::STRUCTURED_DATA_NAME, 1476 1529 self::STRUCTURED_DATA_DESCRIPTION, … … 1493 1546 1494 1547 $bool_fields = array( 1495 self::STRUCTURED_DATA_ ORGANIZATION_SCHEMA,1548 self::STRUCTURED_DATA_AUTO_BLOG, 1496 1549 ); 1497 1550 … … 1535 1588 if ( isset( $input[ self::STRUCTURED_DATA_TYPE ] ) && ! in_array( $input[ self::STRUCTURED_DATA_TYPE ], $allowed_types, true ) ) { 1536 1589 unset( $input[ self::STRUCTURED_DATA_TYPE ] ); 1537 }1538 1539 // Check if all fields required for the Organization structured data are set.1540 if ( ! empty( $input[ self::STRUCTURED_DATA_ORGANIZATION_SCHEMA ] ) ) {1541 $organization_schema = TRUE;1542 1543 $required_fields = array(1544 self::STRUCTURED_DATA_NAME => __(1545 "Name is required for the Organization schema.",1546 'kind-site-framework'1547 ),1548 self::STRUCTURED_DATA_PRIMARY_PHONE => __(1549 "Primary Phone is required for the Organization schema.",1550 'kind-site-framework'1551 ),1552 self::STRUCTURED_DATA_LOGO_URL => __(1553 "Logo URL is required for the Organization schema.",1554 'kind-site-framework'1555 ),1556 self::STRUCTURED_DATA_TYPE => __(1557 "Type is required for the Organization schema.",1558 'kind-site-framework'1559 ),1560 );1561 1562 foreach ( $required_fields as $field => $message ) {1563 if ( empty( $input[ $field ] ) ) {1564 add_settings_error( self::STRUCTURED_DATA, $field, $message );1565 $organization_schema = FALSE;1566 }1567 }1568 1569 if ( ! $organization_schema ) {1570 add_settings_error(1571 self::STRUCTURED_DATA,1572 self::STRUCTURED_DATA_ORGANIZATION_SCHEMA,1573 __(1574 "To enable Organization schema all required fields must be set.",1575 'kind-site-framework'1576 )1577 );1578 $input[ self::STRUCTURED_DATA_ORGANIZATION_SCHEMA ] = FALSE;1579 }1580 1590 } 1581 1591 -
kind-site-framework/tags/1.3/includes/class-structured-data.php
r3488298 r3494876 3 3 namespace Kind_Site_Framework; 4 4 5 use Exception; 5 6 use simple_html_dom; 6 7 … … 34 35 35 36 /** 36 * Constructs a new container instance. 37 * 38 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers 39 * service. 40 * @param \Kind_Site_Framework\Post_Meta_Interface $post_meta KSF post meta 41 * service. 37 * Constructs a new service instance. 38 * 39 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers service. 40 * @param \Kind_Site_Framework\Post_Meta_Interface $post_meta KSF post meta service. 42 41 */ 43 42 public function __construct( … … 64 63 */ 65 64 public function add_to_post( int $post_id ): void { 66 $data = $this->post_meta->get_structured_data( $post_id ); 65 $meta = $this->post_meta->get_structured_data( $post_id ); 66 $data = get_option( Settings_Interface::STRUCTURED_DATA ); 67 67 68 68 $schemas = array(); 69 69 70 // If structured data is disabled for this post, but Auto BlogPosting 71 // feature is enabled globally, simulate BlogPosting type. 72 if ( empty( $meta['enable'] ) && 73 ! empty( $data[ Settings_Interface::STRUCTURED_DATA_AUTO_BLOG ] ) && 74 get_post_type( $post_id ) === 'post' 75 ) { 76 $meta['enable'] = TRUE; 77 $meta['type'] = Post_Meta_Interface::STRUCTURED_DATA_TYPE__BLOG; 78 } 79 70 80 // All other schema types require per-page options. 71 if ( ! empty( $ data ) && ! empty( $data['enable'] ) ) {72 // Organization schema is used on all pages.81 if ( ! empty( $meta ) && ! empty( $meta['enable'] ) ) { 82 // Organization schema is used as reference in other schemas. 73 83 $org_schema = $this->get_organization_schema(); 74 $schemas[] = $org_schema; 75 76 switch ( $data['type'] ?? NULL ) { 84 85 switch ( $meta['type'] ?? NULL ) { 77 86 case Post_Meta_Interface::STRUCTURED_DATA_TYPE__HOMEPAGE: 78 87 $schemas[] = $this->get_website_schema(); … … 114 123 115 124 case Post_Meta_Interface::STRUCTURED_DATA_TYPE__SERVICE: 125 # Main service schema. 116 126 $service_schema = $this->get_service_post_schema( $post_id ); 117 127 if ( $org_schema ) { 118 128 $service_schema['provider'] = array( 119 '@type' => 'Organization',120 129 '@id' => $org_schema['@id'], 121 130 ); 131 132 // Default "Area Served" to the Organization Region. 133 // @see https://app.clickup.com/t/86agdegta 134 if ( empty( $service_schema['areaServed'] ) && ! empty( $org_schema['address']['addressRegion'] ) ) { 135 $service_schema['areaServed'] = $org_schema['address']['addressRegion']; 136 } 122 137 } 138 139 # Additional supporting services. 140 if ( ! empty( $meta[ Post_Meta_Interface::STRUCTURED_DATA_SERVICE_SERVICES ] ) ) { 141 foreach ( $meta[ Post_Meta_Interface::STRUCTURED_DATA_SERVICE_SERVICES ] as $id ) { 142 $supporting_service_schema = $this->get_service_post_schema( $id ); 143 if ( $org_schema ) { 144 $supporting_service_schema['provider'] = array( 145 '@id' => $org_schema['@id'], 146 ); 147 } 148 $service_schema['isRelatedTo'][] = array( 149 '@id' => $supporting_service_schema['@id'], 150 ); 151 $schemas[] = $supporting_service_schema; 152 } 153 } 154 155 # Additional treatment modalities. 156 if ( ! empty( $meta[ Post_Meta_Interface::STRUCTURED_DATA_SERVICE_TREATMENTS ] ) ) { 157 foreach ( $meta[ Post_Meta_Interface::STRUCTURED_DATA_SERVICE_TREATMENTS ] as $id ) { 158 $treatment_schema = $this->get_treatment_modality_post_schema( $id ); 159 $service_schema['isRelatedTo'][] = array( 160 '@id' => $treatment_schema['@id'], 161 ); 162 $schemas[] = $treatment_schema; 163 } 164 } 165 123 166 $schemas[] = $service_schema; 124 167 break; … … 147 190 } 148 191 192 // Org schema may appear on any page. 193 if ( ! empty( $meta[ Post_Meta_Interface::STRUCTURED_DATA_ORG_ENABLE ] ) ) { 194 $schemas[] = $this->get_organization_schema(); 195 } 196 149 197 // FAQ schema may appear on any page. 150 198 $schemas[] = $this->get_post_faq_schema( $post_id ); … … 186 234 187 235 /** 236 * Returns Organization schema ID. 237 * 238 * @return string Organization ID. 239 */ 240 protected function get_organization_id(): string { 241 $data = get_option( Settings_Interface::STRUCTURED_DATA ); 242 return trailingslashit( home_url() ) . '#' . strtolower( $data[ Settings_Interface::STRUCTURED_DATA_TYPE ] ); 243 } 244 245 /** 188 246 * Returns Organization schema. 189 247 * … … 195 253 196 254 $schema = array(); 197 198 if ( empty( $data[ Settings_Interface::STRUCTURED_DATA_ORGANIZATION_SCHEMA ] ) ) {199 return $schema;200 }201 255 202 256 // Check required fields. … … 214 268 215 269 $url = trailingslashit( home_url() ); 216 $schema['@id'] = $ url . '#' . strtolower( $data[ Settings_Interface::STRUCTURED_DATA_TYPE ]);270 $schema['@id'] = $this->get_organization_id(); 217 271 $schema['url'] = $url; 218 272 … … 426 480 Post_Meta_Interface::STRUCTURED_DATA_SERVICE_AREA_SERVED => 'areaServed', 427 481 ) 482 ); 483 } 484 485 /** 486 * Return MedicalTherapy schema for a treatment modality post. 487 * 488 * @param int $post_id Post ID. 489 * @return array MedicalTherapy schema array. 490 * @since 1.2.0 491 */ 492 protected function get_treatment_modality_post_schema( int $post_id ): array { 493 return $this->get_base_post_schema( 494 $post_id, 495 'MedicalTherapy', 428 496 ); 429 497 } … … 740 808 } 741 809 } 742 } catch ( \Exception $e) {810 } catch ( Exception $e ) { 743 811 var_dump( $e ); 744 812 } -
kind-site-framework/tags/1.3/includes/class-templates.php
r3488298 r3494876 58 58 'title' => _x( $template_data['title'], 'Template title', 'kind-site-framework' ), 59 59 'content' => $this->helpers->get_file_content( $file ), 60 'slug' => Plugin_Interface::SLUG, 60 61 ); 61 62 if ( ! empty( $template_data['description'] ) ) { -
kind-site-framework/tags/1.3/includes/interface-helpers.php
r3488298 r3494876 38 38 * Returns file content. 39 39 * 40 * @param string $ name File name.41 * @param string $type File type. Defaults to 'template'.40 * @param string $path Path to file. 41 * 42 42 * @return string File content. 43 43 * @since 1.0.0 44 44 */ 45 public function get_file_content( string $ name, string $type = 'template'): string;45 public function get_file_content( string $path ): string; 46 46 47 47 /** … … 128 128 public function get_tag_attributes( string $tag, string $tag_name, array $extra = array() ): array; 129 129 130 /** 131 * Parses a multiline string containing key-values pairs. 132 * 133 * @since 1.3.0 134 * 135 * @param string $list Multiline string of rows. 136 * @param string $delimiter (optional) Delimiter. Defaults to "|". 137 * @param callable|NULL $key_sanitizer (optional) Key sanitizer. Defaults to `sanitize_text_field`. 138 * @param callable|NULL $value_sanitizer (optional) Value sanitizer. Defaults to `sanitize_text_field`. 139 * @return array Associative array of values keyed by their keys. 140 */ 141 public function parse_key_value_list( 142 string $list, 143 string $delimiter = '|', 144 callable $key_sanitizer = NULL, 145 callable $value_sanitizer = NULL 146 ): array; 147 130 148 } -
kind-site-framework/tags/1.3/includes/interface-insurers.php
r3488298 r3494876 16 16 17 17 /** 18 * Returns all available insurers.19 *20 * @return array21 * @since 1.1.022 */23 public function get_all(): array;24 25 /**26 18 * Returns insurers enabled in the settings. 27 19 * 28 * @return array29 20 * @since 1.1.0 21 * 22 * @return array Array of insurers. 30 23 */ 31 24 public function get_enabled(): array; … … 34 27 * Filters insurers by keys. 35 28 * 29 * @since 1.1.0 30 * 36 31 * @param array $keys Array of insurer keys to filter by. 37 32 * @return array Array of filtered insurers. 38 * @since 1.1.039 33 */ 40 34 public function filter( array $keys ): array; 41 35 36 /** 37 * Returns list of extra insurers. 38 * 39 * @since 1.3.0 40 * 41 * @param string|null $list (optional) Multiline string of extra insurers' data. If empty, taken from the global settings. 42 * @return string[] Array of extra insurers. 43 */ 44 public function get_extra( ?string $list = NULL ): array; 45 42 46 } -
kind-site-framework/tags/1.3/includes/interface-plugin.php
r3488298 r3494876 4 4 5 5 use WP_Block_Editor_Context; 6 use WP_Post; 6 7 7 8 if ( ! defined( 'ABSPATH' ) ) { … … 67 68 68 69 /** 70 * Implements "add_meta_boxes" action hook. 71 * 72 * @return void 73 * @since 1.3.0 74 */ 75 public function add_meta_boxes(): void; 76 77 /** 78 * Implements "save_post" action hook. 79 * 80 * @param int $post_id Post ID. 81 * @param \WP_Post $post Post object. 82 * @return void 83 * @since 1.3.0 84 */ 85 public function save_post( int $post_id, WP_Post $post ): void; 86 87 /** 69 88 * Implements "wp_head" action hook. 70 89 * -
kind-site-framework/tags/1.3/includes/interface-post-meta.php
r3488298 r3494876 2 2 3 3 namespace Kind_Site_Framework; 4 5 use WP_Post; 4 6 5 7 if ( ! defined( 'ABSPATH' ) ) { … … 229 231 230 232 /** 233 * Structured Data: Service Supporting Services post meta field. 234 * 235 * @since 1.3.0 236 */ 237 const STRUCTURED_DATA_SERVICE_SERVICES = 'service_services'; 238 239 /** 240 * Structured Data: Service Treatment Modalities post meta field. 241 * 242 * @since 1.3.0 243 */ 244 const STRUCTURED_DATA_SERVICE_TREATMENTS = 'service_treatments'; 245 246 /** 231 247 * Structured Data: Team Member Job post meta field. 232 248 * … … 241 257 */ 242 258 const STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS = 'team_directory_members'; 259 260 /** 261 * Structured Data: Enable Org Schema post meta field. 262 * 263 * @since 1.2.0 264 */ 265 const STRUCTURED_DATA_ORG_ENABLE = 'org_enable'; 243 266 244 267 /** … … 334 357 self::STRUCTURED_DATA_IMAGE, 335 358 self::STRUCTURED_DATA_SERVICE_AREA_SERVED, 359 self::STRUCTURED_DATA_SERVICE_SERVICES, 360 self::STRUCTURED_DATA_SERVICE_TREATMENTS, 336 361 ), 337 362 self::STRUCTURED_DATA_TYPE__TEAM_MEMBER => array( … … 348 373 349 374 /** 375 * KSF SEO post meta field. 376 * 377 * KSF SEO post meta field is an associative array of options with keys 378 * determining by the following `SEO_*` constants. 379 * 380 * @since 1.3.0 381 */ 382 const SEO = 'kind_site_framework_seo'; 383 384 /** 385 * SEO: Scripts to Defer post meta field. 386 * 387 * Multiline string containing keys (IDs or sources) of scripts to defer. 388 * 389 * @since 1.3.0 390 */ 391 const SEO_SCRIPTS_DEFER = 'scripts_defer'; 392 393 /** 394 * SEO: Scripts to Postpone post meta field. 395 * 396 * Multiline string containing keys (IDs or sources) of scripts to postpone. 397 * 398 * @since 1.3.0 399 */ 400 const SEO_SCRIPTS_POSTPONE = 'scripts_postpone'; 401 402 /** 350 403 * Registers KSF post meta fields. 351 404 * … … 354 407 */ 355 408 public function register(): void; 409 410 /** 411 * Adds a KSF meta box. 412 * 413 * @return void 414 * @since 1.3.0 415 */ 416 public function add_meta_box(): void; 417 418 /** 419 * Saves meta box data. 420 * 421 * @param int $post_id Post ID. 422 * @param \WP_Post $post Post object. 423 * @return void 424 * @since 1.3.0 425 */ 426 public function save_meta_box( int $post_id, WP_Post $post ): void; 356 427 357 428 /** … … 364 435 public function get_structured_data( int $post_id ): array; 365 436 437 /** 438 * Returns SEO options from a post meta. 439 * 440 * @since 1.3.0 441 * 442 * @param int $post_id The post ID. 443 * @return array The SEO options of the post. 444 */ 445 public function get_seo_options( int $post_id ): array; 446 366 447 } -
kind-site-framework/tags/1.3/includes/interface-settings.php
r3489394 r3494876 116 116 117 117 /** 118 * Content: Insurance Accepted: Extra Insurers 119 * 120 * Multiline string containing a list of extra insurers. 121 * 122 * @since 1.3.0 123 */ 124 const CONTENT_INSURANCE_EXTRA = 'insurance_extra'; 125 126 /** 118 127 * KSF Editor setting key. 119 128 * … … 177 186 178 187 /** 179 * Structured Data: Organization Schema 180 * 181 * Boolean determining whether to enable Organization schema. 182 * 183 * @since 1.2.0 184 */ 185 const STRUCTURED_DATA_ORGANIZATION_SCHEMA = 'organization_schema'; 188 * Structured Data: Auto Blog 189 * 190 * Boolean determining whether to automatically enable BlogPosting schema 191 * for all posts without explicit structured data type. 192 * 193 * @since 1.3.0 194 */ 195 const STRUCTURED_DATA_AUTO_BLOG = 'auto_blog'; 186 196 187 197 /** -
kind-site-framework/tags/1.3/kind-site-framework.php
r3489394 r3494876 5 5 * Author: Kind Creative 6 6 * Author URI: https://kindcreative.com/ 7 * Version: 1. 2.27 * Version: 1.3.0 8 8 * Requires at least: 6.7 9 9 * Requires PHP: 7.4 … … 48 48 add_action( 'admin_menu', array( $plugin, 'admin_menu' ) ); 49 49 add_action( 'admin_enqueue_scripts', array( $plugin, 'admin_enqueue_scripts' ) ); 50 add_action( 'add_meta_boxes', array( $plugin, 'add_meta_boxes' ) ); 51 add_action( 'save_post', array( $plugin, 'save_post' ), 10, 2 ); 50 52 } else { 51 53 add_action( 'wp_head', array( $plugin, 'wp_head' ) ); -
kind-site-framework/tags/1.3/patterns/hero-large.php
r3473938 r3494876 23 23 $text_id = $helpers->ksf_id(); 24 24 25 $image_url = KIND_SITE_FRAMEWORK_URL . 'media/placeholders/ 400x600.svg';25 $image_url = KIND_SITE_FRAMEWORK_URL . 'media/placeholders/1200x800.svg'; 26 26 27 27 // phpcs:disable PluginCheck.CodeAnalysis.Offloading.OffloadedContent -
kind-site-framework/tags/1.3/readme.txt
r3489394 r3494876 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1. 2.27 Stable tag: 1.3.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 == Changelog == 44 44 45 **Version 1. 2.2 – Released on March 23, 2026**45 **Version 1.3.0 – Released on March 30, 2026** 46 46 47 * KSF Security Engine Update 47 * KSF Structured Data Engine update (Supporting Services/Treatments) 48 * Service Page Starter Pattern 49 * Hero Banner Page Template 48 50 49 51 **Version 1.2.1 – Released on March 22, 2026** … … 67 69 == Upgrade Notice == 68 70 69 = 1. 2.2=71 = 1.3.0 = 70 72 71 KSF S ecurity Engine Update73 KSF Structured Data Engine, Service Page Starter Pattern, Hero Banner Page Template 72 74 73 75 = 1.2.1 = -
kind-site-framework/tags/1.3/templates/page-with-hero.php
r3473938 r3494876 3 3 * Title: Page With Hero 4 4 * Description: Standard interior page that requires a hero section. 5 * Post Types: page6 5 * 7 6 * @package Kind_Site_Framework … … 19 18 } /--> 20 19 20 <!-- wp:pattern { 21 "slug":"kind-site-framework/hero-large" 22 } /--> 23 21 24 <!-- wp:group { 22 25 "tagName":"main", … … 24 27 } --> 25 28 <main class="wp-block-group"> 26 27 <!-- wp:group {28 "layout":{29 "inherit":true,30 "type":"constrained"31 }32 } -->33 <div class="wp-block-group alignfull">34 35 <!-- wp:post-title {36 "level":1,37 "fontSize":"x-large"38 } /-->39 40 </div>41 <!-- /wp:group -->42 29 43 30 <!-- wp:post-content { -
kind-site-framework/trunk/build/blocks-manifest.php
r3473938 r3494876 59 59 'insurers' => array( 60 60 'type' => 'array' 61 ), 62 'extraInsurers' => array( 63 'type' => 'string' 61 64 ) 62 65 ), -
kind-site-framework/trunk/build/blocks/insurers/block.json
r3473938 r3494876 20 20 "insurers": { 21 21 "type": "array" 22 }, 23 "extraInsurers": { 24 "type": "string" 22 25 } 23 26 }, -
kind-site-framework/trunk/build/blocks/insurers/index.asset.php
r3473938 r3494876 1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => ' ae936c452309b70f2f24');1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '2419a2a604fd331e2e9f'); -
kind-site-framework/trunk/build/blocks/insurers/index.js
r3473938 r3494876 1 (()=>{"use strict";var t,n={608(t,n,e){const i=window.wp.blocks,r=window.React;var o=e.n(r);function s(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var a="(prefers-reduced-motion: reduce)";function u(t){t.length=0}function c(t,n,e){return Array.prototype.slice.call(t,n,e)}function l(t){return t.bind.apply(t,[null].concat(c(arguments,1)))}var d=setTimeout,f=function(){};function p(t){return requestAnimationFrame(t)}function h(t,n){return typeof n===t}function v(t){return!w(t)&&h("object",t)}var g=Array.isArray,m=l(h,"function"),y=l(h,"string"),b=l(h,"undefined");function w(t){return null===t}function k(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch(t){return!1}}function x(t){return g(t)?t:[t]}function E(t,n){x(t).forEach(n)}function S(t,n){return t.indexOf(n)>-1}function _(t,n){return t.push.apply(t,x(n)),t}function C(t,n,e){t&&E(n,function(n){n&&t.classList[e?"add":"remove"](n)})}function P(t,n){C(t,y(n)?n.split(" "):n,!0)}function A(t,n){E(n,t.appendChild.bind(t))}function L(t,n){E(t,function(t){var e=(n||t).parentNode;e&&e.insertBefore(t,n)})}function j(t,n){return k(t)&&(t.msMatchesSelector||t.matches).call(t,n)}function M(t,n){var e=t?c(t.children):[];return n?e.filter(function(t){return j(t,n)}):e}function O(t,n){return n?M(t,n)[0]:t.firstElementChild}var D=Object.keys;function N(t,n,e){return t&&(e?D(t).reverse():D(t)).forEach(function(e){"__proto__"!==e&&n(t[e],e)}),t}function z(t){return c(arguments,1).forEach(function(n){N(n,function(e,i){t[i]=n[i]})}),t}function T(t){return c(arguments,1).forEach(function(n){N(n,function(n,e){g(n)?t[e]=n.slice():v(n)?t[e]=T({},v(t[e])?t[e]:{},n):t[e]=n})}),t}function I(t,n){E(n||D(t),function(n){delete t[n]})}function R(t,n){E(t,function(t){E(n,function(n){t&&t.removeAttribute(n)})})}function F(t,n,e){v(n)?N(n,function(n,e){F(t,e,n)}):E(t,function(t){w(e)||""===e?R(t,n):t.setAttribute(n,String(e))})}function B(t,n,e){var i=document.createElement(t);return n&&(y(n)?P(i,n):F(i,n)),e&&A(e,i),i}function U(t,n,e){if(b(e))return getComputedStyle(t)[n];w(e)||(t.style[n]=""+e)}function W(t,n){U(t,"display",n)}function X(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function G(t,n){return t.getAttribute(n)}function H(t,n){return t&&t.classList.contains(n)}function Y(t){return t.getBoundingClientRect()}function q(t){E(t,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function J(t){return O((new DOMParser).parseFromString(t,"text/html").body)}function K(t,n){t.preventDefault(),n&&(t.stopPropagation(),t.stopImmediatePropagation())}function V(t,n){return t&&t.querySelector(n)}function Q(t,n){return n?c(t.querySelectorAll(n)):[]}function Z(t,n){C(t,n,!1)}function $(t){return t.timeStamp}function tt(t){return y(t)?t:t?t+"px":""}var nt="splide",et="data-"+nt;function it(t,n){if(!t)throw new Error("["+nt+"] "+(n||""))}var rt=Math.min,ot=Math.max,st=Math.floor,at=Math.ceil,ut=Math.abs;function ct(t,n,e){return ut(t-n)<e}function lt(t,n,e,i){var r=rt(n,e),o=ot(n,e);return i?r<t&&t<o:r<=t&&t<=o}function dt(t,n,e){var i=rt(n,e),r=ot(n,e);return rt(ot(i,t),r)}function ft(t){return+(t>0)-+(t<0)}function pt(t,n){return E(n,function(n){t=t.replace("%s",""+n)}),t}function ht(t){return t<10?"0"+t:""+t}var vt={};function gt(){var t=[];function n(t,n,e){E(t,function(t){t&&E(n,function(n){n.split(" ").forEach(function(n){var i=n.split(".");e(t,i[0],i[1])})})})}return{bind:function(e,i,r,o){n(e,i,function(n,e,i){var s="addEventListener"in n,a=s?n.removeEventListener.bind(n,e,r,o):n.removeListener.bind(n,r);s?n.addEventListener(e,r,o):n.addListener(r),t.push([n,e,i,r,a])})},unbind:function(e,i,r){n(e,i,function(n,e,i){t=t.filter(function(t){return!!(t[0]!==n||t[1]!==e||t[2]!==i||r&&t[3]!==r)||(t[4](),!1)})})},dispatch:function(t,n,e){var i,r=!0;return"function"==typeof CustomEvent?i=new CustomEvent(n,{bubbles:r,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(n,r,!1,e),t.dispatchEvent(i),i},destroy:function(){t.forEach(function(t){t[4]()}),u(t)}}}var mt="mounted",yt="ready",bt="move",wt="moved",kt="click",xt="active",Et="inactive",St="visible",_t="hidden",Ct="refresh",Pt="updated",At="resize",Lt="resized",jt="drag",Mt="dragging",Ot="dragged",Dt="scroll",Nt="scrolled",zt="destroy",Tt="arrows:mounted",It="arrows:updated",Rt="pagination:mounted",Ft="pagination:updated",Bt="navigation:mounted",Ut="autoplay:play",Wt="autoplay:playing",Xt="autoplay:pause",Gt="lazyload:loaded",Ht="ei";function Yt(t){var n=t?t.event.bus:document.createDocumentFragment(),e=gt();return t&&t.event.on(zt,e.destroy),z(e,{bus:n,on:function(t,i){e.bind(n,x(t).join(" "),function(t){i.apply(i,g(t.detail)?t.detail:[])})},off:l(e.unbind,n),emit:function(t){e.dispatch(n,t,c(arguments,1))}})}function qt(t,n,e,i){var r,o,s=Date.now,a=0,u=!0,c=0;function l(){if(!u){if(a=t?rt((s()-r)/t,1):1,e&&e(a),a>=1&&(n(),r=s(),i&&++c>=i))return d();o=p(l)}}function d(){u=!0}function f(){o&&cancelAnimationFrame(o),a=0,o=0,u=!0}return{start:function(n){n||f(),r=s()-(n?a*t:0),u=!1,o=p(l)},rewind:function(){r=s(),a=0,e&&e(a)},pause:d,cancel:f,set:function(n){t=n},isPaused:function(){return u}}}var Jt="Arrow",Kt=Jt+"Left",Vt=Jt+"Right",Qt=Jt+"Up",Zt=Jt+"Down",$t="ttb",tn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Qt,Vt],ArrowRight:[Zt,Kt]},nn="role",en="tabindex",rn="aria-",on=rn+"controls",sn=rn+"current",an=rn+"selected",un=rn+"label",cn=rn+"labelledby",ln=rn+"hidden",dn=rn+"orientation",fn=rn+"roledescription",pn=rn+"live",hn=rn+"busy",vn=rn+"atomic",gn=[nn,en,"disabled",on,sn,un,cn,ln,dn,fn],mn=nt+"__",yn="is-",bn=nt,wn=mn+"track",kn=mn+"list",xn=mn+"slide",En=xn+"--clone",Sn=xn+"__container",Cn=mn+"arrows",Pn=mn+"arrow",An=Pn+"--prev",Ln=Pn+"--next",jn=mn+"pagination",Mn=jn+"__page",On=mn+"progress__bar",Dn=mn+"toggle",Nn=mn+"sr",zn=yn+"initialized",Tn=yn+"active",In=yn+"prev",Rn=yn+"next",Fn=yn+"visible",Bn=yn+"loading",Un=yn+"focus-in",Wn=yn+"overflow",Xn=[Tn,Fn,In,Rn,Bn,Un,Wn],Gn={slide:xn,clone:En,arrows:Cn,arrow:Pn,prev:An,next:Ln,pagination:jn,page:Mn,spinner:mn+"spinner"},Hn="touchstart mousedown",Yn="touchmove mousemove",qn="touchend touchcancel mouseup click",Jn="slide",Kn="loop",Vn="fade";var Qn=et+"-interval",Zn={passive:!1,capture:!0},$n={Spacebar:" ",Right:Vt,Left:Kt,Up:Qt,Down:Zt};function te(t){return t=y(t)?t:t.key,$n[t]||t}var ne="keydown",ee=et+"-lazy",ie=ee+"-srcset",re="["+ee+"], ["+ie+"]",oe=[" ","Enter"],se=Object.freeze({__proto__:null,Media:function(t,n,e){var i=t.state,r=e.breakpoints||{},o=e.reducedMotion||{},s=gt(),u=[];function c(t){t&&s.destroy()}function l(t,n){var e=matchMedia(n);s.bind(e,"change",d),u.push([t,e])}function d(){var n=i.is(7),r=e.direction,o=u.reduce(function(t,n){return T(t,n[1].matches?n[0]:{})},{});I(e),f(o),e.destroy?t.destroy("completely"===e.destroy):n?(c(!0),t.mount()):r!==e.direction&&t.refresh()}function f(n,r,o){T(e,n),r&&T(Object.getPrototypeOf(e),n),!o&&i.is(1)||t.emit(Pt,e)}return{setup:function(){var t="min"===e.mediaQuery;D(r).sort(function(n,e){return t?+n-+e:+e-+n}).forEach(function(n){l(r[n],"("+(t?"min":"max")+"-width:"+n+"px)")}),l(o,a),d()},destroy:c,reduce:function(t){matchMedia(a).matches&&(t?T(e,o):I(e,D(o)))},set:f}},Direction:function(t,n,e){return{resolve:function(t,n,i){var r="rtl"!==(i=i||e.direction)||n?i===$t?0:-1:1;return tn[t]&&tn[t][r]||t.replace(/width|left|right/i,function(t,n){var e=tn[t.toLowerCase()][r]||t;return n>0?e.charAt(0).toUpperCase()+e.slice(1):e})},orient:function(t){return t*("rtl"===e.direction?1:-1)}}},Elements:function(t,n,e){var i,r,o,s=Yt(t),a=s.on,c=s.bind,l=t.root,d=e.i18n,f={},p=[],h=[],v=[];function g(){var t,n,o;i=w("."+wn),r=O(i,"."+kn),it(i&&r,"A track/list element is missing."),_(p,M(r,"."+xn+":not(."+En+")")),N({arrows:Cn,pagination:jn,prev:An,next:Ln,bar:On,toggle:Dn},function(t,n){f[n]=w("."+t)}),z(f,{root:l,track:i,list:r,slides:p}),n=l.id||""+(t=nt)+ht(vt[t]=(vt[t]||0)+1),o=e.role,l.id=n,i.id=i.id||n+"-track",r.id=r.id||n+"-list",!G(l,nn)&&"SECTION"!==l.tagName&&o&&F(l,nn,o),F(l,fn,d.carousel),F(r,nn,"presentation"),b()}function y(t){var n=gn.concat("style");u(p),Z(l,h),Z(i,v),R([i,r],n),R(l,t?n:["style",fn])}function b(){Z(l,h),Z(i,v),h=k(bn),v=k(wn),P(l,h),P(i,v),F(l,un,e.label),F(l,cn,e.labelledby)}function w(t){var n=V(l,t);return n&&function(t,n){if(m(t.closest))return t.closest(n);for(var e=t;e&&1===e.nodeType&&!j(e,n);)e=e.parentElement;return e}(n,"."+bn)===l?n:void 0}function k(t){return[t+"--"+e.type,t+"--"+e.direction,e.drag&&t+"--draggable",e.isNavigation&&t+"--nav",t===bn&&Tn]}return z(f,{setup:g,mount:function(){a(Ct,y),a(Ct,g),a(Pt,b),c(document,Hn+" keydown",function(t){o="keydown"===t.type},{capture:!0}),c(l,"focusin",function(){C(l,Un,!!o)})},destroy:y})},Slides:function(t,n,e){var i=Yt(t),r=i.on,o=i.emit,s=i.bind,a=n.Elements,c=a.slides,d=a.list,f=[];function p(){c.forEach(function(t,n){v(t,n,-1)})}function h(){b(function(t){t.destroy()}),u(f)}function v(n,e,i){var r=function(t,n,e,i){var r,o=Yt(t),s=o.on,a=o.emit,u=o.bind,c=t.Components,d=t.root,f=t.options,p=f.isNavigation,h=f.updateOnMove,v=f.i18n,g=f.pagination,m=f.slideFocus,y=c.Direction.resolve,b=G(i,"style"),w=G(i,un),k=e>-1,x=O(i,"."+Sn);function E(){var r=t.splides.map(function(t){var e=t.splide.Components.Slides.getAt(n);return e?e.slide.id:""}).join(" ");F(i,un,pt(v.slideX,(k?e:n)+1)),F(i,on,r),F(i,nn,m?"button":""),m&&R(i,fn)}function S(){r||_()}function _(){if(!r){var e=t.index;(o=P())!==H(i,Tn)&&(C(i,Tn,o),F(i,sn,p&&o||""),a(o?xt:Et,A)),function(){var n=function(){if(t.is(Vn))return P();var n=Y(c.Elements.track),e=Y(i),r=y("left",!0),o=y("right",!0);return st(n[r])<=at(e[r])&&st(e[o])<=at(n[o])}(),e=!n&&(!P()||k);if(t.state.is([4,5])||F(i,ln,e||""),F(Q(i,f.focusableNodes||""),en,e?-1:""),m&&F(i,en,e?-1:0),n!==H(i,Fn)&&(C(i,Fn,n),a(n?St:_t,A)),!n&&document.activeElement===i){var r=c.Slides.getAt(t.index);r&&X(r.slide)}}(),C(i,In,n===e-1),C(i,Rn,n===e+1)}var o}function P(){var i=t.index;return i===n||f.cloneStatus&&i===e}var A={index:n,slideIndex:e,slide:i,container:x,isClone:k,mount:function(){k||(i.id=d.id+"-slide"+ht(n+1),F(i,nn,g?"tabpanel":"group"),F(i,fn,v.slide),F(i,un,w||pt(v.slideLabel,[n+1,t.length]))),u(i,"click",l(a,kt,A)),u(i,"keydown",l(a,"sk",A)),s([wt,"sh",Nt],_),s(Bt,E),h&&s(bt,S)},destroy:function(){r=!0,o.destroy(),Z(i,Xn),R(i,gn),F(i,"style",b),F(i,un,w||"")},update:_,style:function(t,n,e){U(e&&x||i,t,n)},isWithin:function(e,i){var r=ut(e-n);return k||!f.rewind&&!t.is(Kn)||(r=rt(r,t.length-r)),r<=i}};return A}(t,e,i,n);r.mount(),f.push(r),f.sort(function(t,n){return t.index-n.index})}function g(t){return t?w(function(t){return!t.isClone}):f}function b(t,n){g(n).forEach(t)}function w(t){return f.filter(m(t)?t:function(n){return y(t)?j(n.slide,t):S(x(t),n.index)})}return{mount:function(){p(),r(Ct,h),r(Ct,p)},destroy:h,update:function(){b(function(t){t.update()})},register:v,get:g,getIn:function(t){var i=n.Controller,r=i.toIndex(t),o=i.hasFocus()?1:e.perPage;return w(function(t){return lt(t.index,r,r+o-1)})},getAt:function(t){return w(t)[0]},add:function(t,n){E(t,function(t){if(y(t)&&(t=J(t)),k(t)){var i=c[n];i?L(t,i):A(d,t),P(t,e.classes.slide),r=t,a=l(o,At),u=Q(r,"img"),(f=u.length)?u.forEach(function(t){s(t,"load error",function(){--f||a()})}):a()}var r,a,u,f}),o(Ct)},remove:function(t){q(w(t).map(function(t){return t.slide})),o(Ct)},forEach:b,filter:w,style:function(t,n,e){b(function(i){i.style(t,n,e)})},getLength:function(t){return t?c.length:f.length},isEnough:function(){return f.length>e.perPage}}},Layout:function(t,n,e){var i,r,o,s=Yt(t),a=s.on,u=s.bind,c=s.emit,d=n.Slides,f=n.Direction.resolve,p=n.Elements,h=p.root,g=p.track,m=p.list,y=d.getAt,b=d.style;function w(){i=e.direction===$t,U(h,"maxWidth",tt(e.width)),U(g,f("paddingLeft"),x(!1)),U(g,f("paddingRight"),x(!0)),k(!0)}function k(t){var n,s=Y(h);(t||r.width!==s.width||r.height!==s.height)&&(U(g,"height",(n="",i&&(it(n=E(),"height or heightRatio is missing."),n="calc("+n+" - "+x(!1)+" - "+x(!0)+")"),n)),b(f("marginRight"),tt(e.gap)),b("width",e.autoWidth?null:tt(e.fixedWidth)||(i?"":S())),b("height",tt(e.fixedHeight)||(i?e.autoHeight?null:S():E()),!0),r=s,c(Lt),o!==(o=M())&&(C(h,Wn,o),c("overflow",o)))}function x(t){var n=e.padding,i=f(t?"right":"left");return n&&tt(n[i]||(v(n)?0:n))||"0px"}function E(){return tt(e.height||Y(m).width*e.heightRatio)}function S(){var t=tt(e.gap);return"calc((100%"+(t&&" + "+t)+")/"+(e.perPage||1)+(t&&" - "+t)+")"}function _(){return Y(m)[f("width")]}function P(t,n){var e=y(t||0);return e?Y(e.slide)[f("width")]+(n?0:j()):0}function A(t,n){var e=y(t);if(e){var i=Y(e.slide)[f("right")],r=Y(m)[f("left")];return ut(i-r)+(n?0:j())}return 0}function L(n){return A(t.length-1)-A(0)+P(0,n)}function j(){var t=y(0);return t&&parseFloat(U(t.slide,f("marginRight")))||0}function M(){return t.is(Vn)||L(!0)>_()}return{mount:function(){var t,n;w(),u(window,"resize load",(t=l(c,At),n=qt(0,t,null,1),function(){n.isPaused()&&n.start()})),a([Pt,Ct],w),a(At,k)},resize:k,listSize:_,slideSize:P,sliderSize:L,totalSize:A,getPadding:function(t){return parseFloat(U(g,f("padding"+(t?"Right":"Left"))))||0},isOverflow:M}},Clones:function(t,n,e){var i,r=Yt(t),o=r.on,s=n.Elements,a=n.Slides,c=n.Direction.resolve,l=[];function d(){o(Ct,f),o([Pt,At],h),(i=v())&&(function(n){var i=a.get().slice(),r=i.length;if(r){for(;i.length<n;)_(i,i);_(i.slice(-n),i.slice(0,n)).forEach(function(o,u){var c=u<n,d=function(n,i){var r=n.cloneNode(!0);return P(r,e.classes.clone),r.id=t.root.id+"-clone"+ht(i+1),r}(o.slide,u);c?L(d,i[0].slide):A(s.list,d),_(l,d),a.register(d,u-n+(c?0:r),o.index)})}}(i),n.Layout.resize(!0))}function f(){p(),d()}function p(){q(l),u(l),r.destroy()}function h(){var t=v();i!==t&&(i<t||!t)&&r.emit(Ct)}function v(){var i=e.clones;if(t.is(Kn)){if(b(i)){var r=e[c("fixedWidth")]&&n.Layout.slideSize(0);i=r&&at(Y(s.track)[c("width")]/r)||e[c("autoWidth")]&&t.length||2*e.perPage}}else i=0;return i}return{mount:d,destroy:p}},Move:function(t,n,e){var i,r=Yt(t),o=r.on,s=r.emit,a=t.state.set,u=n.Layout,c=u.slideSize,l=u.getPadding,d=u.totalSize,f=u.listSize,p=u.sliderSize,h=n.Direction,v=h.resolve,g=h.orient,m=n.Elements,y=m.list,w=m.track;function k(){n.Controller.isBusy()||(n.Scroll.cancel(),x(t.index),n.Slides.update())}function x(t){E(P(t,!0))}function E(e,i){if(!t.is(Vn)){var r=i?e:function(e){if(t.is(Kn)){var i=C(e),r=i>n.Controller.getEnd();(i<0||r)&&(e=S(e,r))}return e}(e);U(y,"transform","translate"+v("X")+"("+r+"px)"),e!==r&&s("sh")}}function S(t,n){var e=t-L(n),i=p();return t-g(i*(at(ut(e)/i)||1))*(n?1:-1)}function _(){E(A(),!0),i.cancel()}function C(t){for(var e=n.Slides.get(),i=0,r=1/0,o=0;o<e.length;o++){var s=e[o].index,a=ut(P(s,!0)-t);if(!(a<=r))break;r=a,i=s}return i}function P(n,i){var r=g(d(n-1)-function(t){var n=e.focus;return"center"===n?(f()-c(t,!0))/2:+n*c(t)||0}(n));return i?function(n){return e.trimSpace&&t.is(Jn)&&(n=dt(n,0,g(p(!0)-f()))),n}(r):r}function A(){var t=v("left");return Y(y)[t]-Y(w)[t]+g(l(!1))}function L(t){return P(t?n.Controller.getEnd():0,!!e.trimSpace)}return{mount:function(){i=n.Transition,o([mt,Lt,Pt,Ct],k)},move:function(t,n,e,r){var o,u;t!==n&&(o=t>e,u=g(S(A(),o)),o?u>=0:u<=y[v("scrollWidth")]-Y(w)[v("width")])&&(_(),E(S(A(),t>e),!0)),a(4),s(bt,n,e,t),i.start(n,function(){a(3),s(wt,n,e,t),r&&r()})},jump:x,translate:E,shift:S,cancel:_,toIndex:C,toPosition:P,getPosition:A,getLimit:L,exceededLimit:function(t,n){n=b(n)?A():n;var e=!0!==t&&g(n)<g(L(!1)),i=!1!==t&&g(n)>g(L(!0));return e||i},reposition:k}},Controller:function(t,n,e){var i,r,o,s,a=Yt(t),u=a.on,c=a.emit,d=n.Move,f=d.getPosition,p=d.getLimit,h=d.toPosition,v=n.Slides,g=v.isEnough,m=v.getLength,w=e.omitEnd,k=t.is(Kn),x=t.is(Jn),E=l(L,!1),S=l(L,!0),_=e.start||0,C=_;function P(){r=m(!0),o=e.perMove,s=e.perPage,i=O();var t=dt(_,0,w?i:r-1);t!==_&&(_=t,d.reposition())}function A(){i!==O()&&c(Ht)}function L(t,n){var e=o||(T()?1:s),r=j(_+e*(t?-1:1),_,!(o||T()));return-1===r&&x&&!ct(f(),p(!t),1)?t?0:i:n?r:M(r)}function j(n,a,u){if(g()||T()){var c=function(n){if(x&&"move"===e.trimSpace&&n!==_)for(var i=f();i===h(n,!0)&<(n,0,t.length-1,!e.rewind);)n<_?--n:++n;return n}(n);c!==n&&(a=n,n=c,u=!1),n<0||n>i?n=o||!lt(0,n,a,!0)&&!lt(i,a,n,!0)?k?u?n<0?-(r%s||s):r:n:e.rewind?n<0?i:0:-1:D(N(n)):u&&n!==a&&(n=D(N(a)+(n<a?-1:1)))}else n=-1;return n}function M(t){return k?(t+r)%r||0:t}function O(){for(var t=r-(T()||k&&o?1:s);w&&t-- >0;)if(h(r-1,!0)!==h(t,!0)){t++;break}return dt(t,0,r-1)}function D(t){return dt(T()?t:s*t,0,i)}function N(t){return T()?rt(t,i):st((t>=i?r-1:t)/s)}function z(t){t!==_&&(C=_,_=t)}function T(){return!b(e.focus)||e.isNavigation}function I(){return t.state.is([4,5])&&!!e.waitForTransition}return{mount:function(){P(),u([Pt,Ct,Ht],P),u(Lt,A)},go:function(t,n,e){if(!I()){var r=function(t){var n=_;if(y(t)){var e=t.match(/([+\-<>])(\d+)?/)||[],r=e[1],o=e[2];"+"===r||"-"===r?n=j(_+ +(""+r+(+o||1)),_):">"===r?n=o?D(+o):E(!0):"<"===r&&(n=S(!0))}else n=k?t:dt(t,0,i);return n}(t),o=M(r);o>-1&&(n||o!==_)&&(z(o),d.move(r,o,C,e))}},scroll:function(t,e,r,o){n.Scroll.scroll(t,e,r,function(){var t=M(d.toIndex(f()));z(w?rt(t,i):t),o&&o()})},getNext:E,getPrev:S,getAdjacent:L,getEnd:O,setIndex:z,getIndex:function(t){return t?C:_},toIndex:D,toPage:N,toDest:function(t){var n=d.toIndex(t);return x?dt(n,0,i):n},hasFocus:T,isBusy:I}},Arrows:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.emit,c=e.classes,d=e.i18n,f=n.Elements,p=n.Controller,h=f.arrows,v=f.track,g=h,m=f.prev,y=f.next,b={};function w(){var t;!(t=e.arrows)||m&&y||(g=h||B("div",c.arrows),m=S(!0),y=S(!1),i=!0,A(g,[m,y]),!h&&L(g,v)),m&&y&&(z(b,{prev:m,next:y}),W(g,t?"":"none"),P(g,r=Cn+"--"+e.direction),t&&(s([mt,wt,Ct,Nt,Ht],_),a(y,"click",l(E,">")),a(m,"click",l(E,"<")),_(),F([m,y],on,v.id),u(Tt,m,y))),s(Pt,k)}function k(){x(),w()}function x(){o.destroy(),Z(g,r),i?(q(h?[m,y]:g),m=y=null):R([m,y],gn)}function E(t){p.go(t,!0)}function S(t){return J('<button class="'+c.arrow+" "+(t?c.prev:c.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40" focusable="false"><path d="'+(e.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z")+'" />')}function _(){if(m&&y){var n=t.index,e=p.getPrev(),i=p.getNext(),r=e>-1&&n<e?d.last:d.prev,o=i>-1&&n>i?d.first:d.next;m.disabled=e<0,y.disabled=i<0,F(m,un,r),F(y,un,o),u(It,m,y,e,i)}}return{arrows:b,mount:w,destroy:x,update:_}},Autoplay:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.emit,c=qt(e.interval,t.go.bind(t,">"),function(t){var n=d.bar;n&&U(n,"width",100*t+"%"),u(Wt,t)}),l=c.isPaused,d=n.Elements,f=n.Elements,p=f.root,h=f.toggle,v=e.autoplay,g="pause"===v;function m(){l()&&n.Slides.isEnough()&&(c.start(!e.resetProgress),r=i=g=!1,w(),u(Ut))}function y(t){void 0===t&&(t=!0),g=!!t,w(),l()||(c.pause(),u(Xt))}function b(){g||(i||r?y(!1):m())}function w(){h&&(C(h,Tn,!g),F(h,un,e.i18n[g?"play":"pause"]))}function k(t){var i=n.Slides.getAt(t);c.set(i&&+G(i.slide,Qn)||e.interval)}return{mount:function(){v&&(e.pauseOnHover&&a(p,"mouseenter mouseleave",function(t){i="mouseenter"===t.type,b()}),e.pauseOnFocus&&a(p,"focusin focusout",function(t){r="focusin"===t.type,b()}),h&&a(h,"click",function(){g?m():y(!0)}),s([bt,Dt,Ct],c.rewind),s(bt,k),h&&F(h,on,d.track.id),g||m(),w())},destroy:c.cancel,play:m,pause:y,isPaused:l}},Cover:function(t,n,e){var i=Yt(t).on;function r(t){n.Slides.forEach(function(n){var e=O(n.container||n.slide,"img");e&&e.src&&o(t,e,n)})}function o(t,n,e){e.style("background",t?'center/cover no-repeat url("'+n.src+'")':"",!0),W(n,t?"none":"")}return{mount:function(){e.cover&&(i(Gt,l(o,!0)),i([mt,Pt,Ct],l(r,!0)))},destroy:l(r,!1)}},Scroll:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.emit,u=t.state.set,c=n.Move,d=c.getPosition,f=c.getLimit,p=c.exceededLimit,h=c.translate,v=t.is(Jn),g=1;function m(t,e,o,s,f){var h=d();if(w(),o&&(!v||!p())){var m=n.Layout.sliderSize(),k=ft(t)*m*st(ut(t)/m)||0;t=c.toPosition(n.Controller.toDest(t%m))+k}var x=ct(h,t,1);g=1,e=x?0:e||ot(ut(t-h)/1.5,800),r=s,i=qt(e,y,l(b,h,t,f),1),u(5),a(Dt),i.start()}function y(){u(3),r&&r(),a(Nt)}function b(t,n,i,o){var s,a,u=d(),c=(t+(n-t)*(s=o,(a=e.easingFunc)?a(s):1-Math.pow(1-s,4))-u)*g;h(u+c),v&&!i&&p()&&(g*=.6,ut(c)<10&&m(f(p(!0)),600,!1,r,!0))}function w(){i&&i.cancel()}function k(){i&&!i.isPaused()&&(w(),y())}return{mount:function(){s(bt,w),s([Pt,Ct],k)},destroy:w,scroll:m,cancel:k}},Drag:function(t,n,e){var i,r,o,s,a,u,c,l,d=Yt(t),p=d.on,h=d.emit,g=d.bind,m=d.unbind,y=t.state,b=n.Move,w=n.Scroll,k=n.Controller,x=n.Elements.track,E=n.Media.reduce,S=n.Direction,_=S.resolve,C=S.orient,P=b.getPosition,A=b.exceededLimit,L=!1;function M(){var t=e.drag;W(!t),s="free"===t}function O(t){if(u=!1,!c){var n=U(t);i=t.target,r=e.noDrag,j(i,"."+Mn+", ."+Pn)||r&&j(i,r)||!n&&t.button||(k.isBusy()?K(t,!0):(l=n?x:window,a=y.is([4,5]),o=null,g(l,Yn,D,Zn),g(l,qn,N,Zn),b.cancel(),w.cancel(),T(t)))}var i,r}function D(n){if(y.is(6)||(y.set(6),h(jt)),n.cancelable)if(a){b.translate(i+I(n)/(L&&t.is(Jn)?5:1));var r=R(n)>200,o=L!==(L=A());(r||o)&&T(n),u=!0,h(Mt),K(n)}else(function(t){return ut(I(t))>ut(I(t,!0))})(n)&&(a=function(t){var n=e.dragMinThreshold,i=v(n),r=i&&n.mouse||0,o=(i?n.touch:+n)||10;return ut(I(t))>(U(t)?o:r)}(n),K(n))}function N(i){y.is(6)&&(y.set(3),h(Ot)),a&&(function(i){var r=function(n){if(t.is(Kn)||!L){var e=R(n);if(e&&e<200)return I(n)/e}return 0}(i),o=function(t){return P()+ft(t)*rt(ut(t)*(e.flickPower||600),s?1/0:n.Layout.listSize()*(e.flickMaxPages||1))}(r),a=e.rewind&&e.rewindByDrag;E(!1),s?k.scroll(o,0,e.snap):t.is(Vn)?k.go(C(ft(r))<0?a?"<":"-":a?">":"+"):t.is(Jn)&&L&&a?k.go(A(!0)?">":"<"):k.go(k.toDest(o),!0),E(!0)}(i),K(i)),m(l,Yn,D),m(l,qn,N),a=!1}function z(t){!c&&u&&K(t,!0)}function T(t){o=r,r=t,i=P()}function I(t,n){return B(t,n)-B(F(t),n)}function R(t){return $(t)-$(F(t))}function F(t){return r===t&&o||r}function B(t,n){return(U(t)?t.changedTouches[0]:t)["page"+_(n?"Y":"X")]}function U(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}function W(t){c=t}return{mount:function(){g(x,Yn,f,Zn),g(x,qn,f,Zn),g(x,Hn,O,Zn),g(x,"click",z,{capture:!0}),g(x,"dragstart",K),p([mt,Pt],M)},disable:W,isDragging:function(){return a}}},Keyboard:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.unbind,c=t.root,l=n.Direction.resolve;function f(){var t=e.keyboard;t&&(i="global"===t?window:c,a(i,ne,v))}function p(){u(i,ne)}function h(){var t=r;r=!0,d(function(){r=t})}function v(n){if(!r){var e=te(n);e===l(Kt)?t.go("<"):e===l(Vt)&&t.go(">")}}return{mount:function(){f(),s(Pt,p),s(Pt,f),s(bt,h)},destroy:p,disable:function(t){r=t}}},LazyLoad:function(t,n,e){var i=Yt(t),r=i.on,o=i.off,s=i.bind,a=i.emit,c="sequential"===e.lazyLoad,d=[wt,Nt],f=[];function p(){u(f),n.Slides.forEach(function(t){Q(t.slide,re).forEach(function(n){var i=G(n,ee),r=G(n,ie);if(i!==n.src||r!==n.srcset){var o=e.classes.spinner,s=n.parentElement,a=O(s,"."+o)||B("span",o,s);f.push([n,t,a]),n.src||W(n,"none")}})}),c?m():(o(d),r(d,h),h())}function h(){(f=f.filter(function(n){var i=e.perPage*((e.preloadPages||1)+1)-1;return!n[1].isWithin(t.index,i)||v(n)})).length||o(d)}function v(t){var n=t[0];P(t[1].slide,Bn),s(n,"load error",l(g,t)),F(n,"src",G(n,ee)),F(n,"srcset",G(n,ie)),R(n,ee),R(n,ie)}function g(t,n){var e=t[0],i=t[1];Z(i.slide,Bn),"error"!==n.type&&(q(t[2]),W(e,""),a(Gt,e,i),a(At)),c&&m()}function m(){f.length&&v(f.shift())}return{mount:function(){e.lazyLoad&&(p(),r(Ct,p))},destroy:l(u,f),check:h}},Pagination:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.emit,d=o.bind,f=n.Slides,p=n.Elements,h=n.Controller,v=h.hasFocus,g=h.getIndex,m=h.go,y=n.Direction.resolve,b=p.pagination,w=[];function k(){i&&(q(b?c(i.children):i),Z(i,r),u(w),i=null),o.destroy()}function x(t){m(">"+t,!0)}function E(t,n){var e=w.length,i=te(n),r=S(),o=-1;i===y(Vt,!1,r)?o=++t%e:i===y(Kt,!1,r)?o=(--t+e)%e:"Home"===i?o=0:"End"===i&&(o=e-1);var s=w[o];s&&(X(s.button),m(">"+o),K(n,!0))}function S(){return e.paginationDirection||e.direction}function _(t){return w[h.toPage(t)]}function C(){var t=_(g(!0)),n=_(g());if(t){var e=t.button;Z(e,Tn),R(e,an),F(e,en,-1)}if(n){var r=n.button;P(r,Tn),F(r,an,!0),F(r,en,"")}a(Ft,{list:i,items:w},t,n)}return{items:w,mount:function n(){k(),s([Pt,Ct,Ht],n);var o=e.pagination;b&&W(b,o?"":"none"),o&&(s([bt,Dt,Nt],C),function(){var n=t.length,o=e.classes,s=e.i18n,a=e.perPage,u=v()?h.getEnd()+1:at(n/a);P(i=b||B("ul",o.pagination,p.track.parentElement),r=jn+"--"+S()),F(i,nn,"tablist"),F(i,un,s.select),F(i,dn,S()===$t?"vertical":"");for(var c=0;c<u;c++){var g=B("li",null,i),m=B("button",{class:o.page,type:"button"},g),y=f.getIn(c).map(function(t){return t.slide.id}),k=!v()&&a>1?s.pageX:s.slideX;d(m,"click",l(x,c)),e.paginationKeyboard&&d(m,"keydown",l(E,c)),F(g,nn,"presentation"),F(m,nn,"tab"),F(m,on,y.join(" ")),F(m,un,pt(k,c+1)),F(m,en,-1),w.push({li:g,button:m,page:c})}}(),C(),a(Rt,{list:i,items:w},_(t.index)))},destroy:k,getAt:_,update:C}},Sync:function(t,n,e){var i=e.isNavigation,r=e.slideFocus,o=[];function s(){var n,e;t.splides.forEach(function(n){n.isParent||(c(t,n.splide),c(n.splide,t))}),i&&((e=(n=Yt(t)).on)(kt,f),e("sk",p),e([mt,Pt],d),o.push(n),n.emit(Bt,t.splides))}function a(){o.forEach(function(t){t.destroy()}),u(o)}function c(t,n){var e=Yt(t);e.on(bt,function(t,e,i){n.go(n.is(Kn)?i:t)}),o.push(e)}function d(){F(n.Elements.list,dn,e.direction===$t?"vertical":"")}function f(n){t.go(n.index)}function p(t,n){S(oe,te(n))&&(f(t),K(n))}return{setup:l(n.Media.set,{slideFocus:b(r)?i:r},!0),mount:s,destroy:a,remount:function(){a(),s()}}},Wheel:function(t,n,e){var i=Yt(t).bind,r=0;function o(i){if(i.cancelable){var o=i.deltaY,s=o<0,a=$(i),u=e.wheelMinThreshold||0,c=e.wheelSleep||0;ut(o)>u&&a-r>c&&(t.go(s?"<":">"),r=a),function(i){return!e.releaseWheel||t.state.is(4)||-1!==n.Controller.getAdjacent(i)}(s)&&K(i)}}return{mount:function(){e.wheel&&i(n.Elements.track,"wheel",o,Zn)}}},Live:function(t,n,e){var i=Yt(t).on,r=n.Elements.track,o=e.live&&!e.isNavigation,s=B("span",Nn),a=qt(90,l(u,!1));function u(t){F(r,hn,t),t?(A(r,s),a.start()):(q(s),a.cancel())}function c(t){o&&F(r,pn,t?"off":"polite")}return{mount:function(){o&&(c(!n.Autoplay.isPaused()),F(r,vn,!0),s.textContent="…",i(Ut,l(c,!0)),i(Xt,l(c,!1)),i([wt,Nt],l(u,!0)))},disable:c,destroy:function(){R(r,[pn,vn,hn]),q(s)}}}}),ae={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Gn,i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ue(t,n,e){var i=n.Slides;function r(){i.forEach(function(t){t.style("transform","translateX(-"+100*t.index+"%)")})}return{mount:function(){Yt(t).on([mt,Ct],r)},start:function(t,n){i.style("transition","opacity "+e.speed+"ms "+e.easing),d(n)},cancel:f}}function ce(t,n,e){var i,r=n.Move,o=n.Controller,s=n.Scroll,a=n.Elements.list,u=l(U,a,"transition");function c(){u(""),s.cancel()}return{mount:function(){Yt(t).bind(a,"transitionend",function(t){t.target===a&&i&&(c(),i())})},start:function(n,a){var c=r.toPosition(n,!0),l=r.getPosition(),d=function(n){var i=e.rewindSpeed;if(t.is(Jn)&&i){var r=o.getIndex(!0),s=o.getEnd();if(0===r&&n>=s||r>=s&&0===n)return i}return e.speed}(n);ut(c-l)>=1&&d>=1?e.useScroll?s.scroll(c,d,!1,a):(u("transform "+d+"ms "+e.easing),r.translate(c,!0),i=a):(r.jump(n),a())},cancel:c}}var le=function(){function t(n,e){var i;this.event=Yt(),this.Components={},this.state=(i=1,{set:function(t){i=t},is:function(t){return S(x(t),i)}}),this.splides=[],this._o={},this._E={};var r=y(n)?V(document,n):n;it(r,r+" is invalid."),this.root=r,e=T({label:G(r,un)||"",labelledby:G(r,cn)||""},ae,t.defaults,e||{});try{T(e,JSON.parse(G(r,et)))}catch(t){it(!1,"Invalid JSON")}this._o=Object.create(T({},e))}var n,e,i=t.prototype;return i.mount=function(t,n){var e=this,i=this.state,r=this.Components;return it(i.is([1,7]),"Already mounted!"),i.set(1),this._C=r,this._T=n||this._T||(this.is(Vn)?ue:ce),this._E=t||this._E,N(z({},se,this._E,{Transition:this._T}),function(t,n){var i=t(e,r,e._o);r[n]=i,i.setup&&i.setup()}),N(r,function(t){t.mount&&t.mount()}),this.emit(mt),P(this.root,zn),i.set(3),this.emit(yt),this},i.sync=function(t){return this.splides.push({splide:t}),t.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._C.Sync.remount(),t.Components.Sync.remount()),this},i.go=function(t){return this._C.Controller.go(t),this},i.on=function(t,n){return this.event.on(t,n),this},i.off=function(t){return this.event.off(t),this},i.emit=function(t){var n;return(n=this.event).emit.apply(n,[t].concat(c(arguments,1))),this},i.add=function(t,n){return this._C.Slides.add(t,n),this},i.remove=function(t){return this._C.Slides.remove(t),this},i.is=function(t){return this._o.type===t},i.refresh=function(){return this.emit(Ct),this},i.destroy=function(t){void 0===t&&(t=!0);var n=this.event,e=this.state;return e.is(1)?Yt(this).on(yt,this.destroy.bind(this,t)):(N(this._C,function(n){n.destroy&&n.destroy(t)},!0),n.emit(zt),n.destroy(),t&&u(this.splides),e.set(7)),this},n=t,e=[{key:"options",get:function(){return this._o},set:function(t){this._C.Media.set(t,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}],e&&s(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),t}(),de=le;de.defaults={},de.STATES={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,SCROLLING:5,DRAGGING:6,DESTROYED:7};var fe=[[mt,"onMounted"],[yt,"onReady"],[bt,"onMove"],[wt,"onMoved"],[kt,"onClick"],[xt,"onActive"],[Et,"onInactive"],[St,"onVisible"],[_t,"onHidden"],[Ct,"onRefresh"],[Pt,"onUpdated"],[At,"onResize"],[Lt,"onResized"],[jt,"onDrag"],[Mt,"onDragging"],[Ot,"onDragged"],[Dt,"onScroll"],[Nt,"onScrolled"],[zt,"onDestroy"],[Tt,"onArrowsMounted"],[It,"onArrowsUpdated"],[Rt,"onPaginationMounted"],[Ft,"onPaginationUpdated"],[Bt,"onNavigationMounted"],[Ut,"onAutoplayPlay"],[Wt,"onAutoplayPlaying"],[Xt,"onAutoplayPause"],[Gt,"onLazyLoadLoaded"]];function pe(...t){return t.filter(Boolean).join(" ")}function he(t){return null!==t&&"object"==typeof t}function ve(t,n){if(Array.isArray(t)&&Array.isArray(n))return t.length===n.length&&!t.some((t,e)=>!ve(t,n[e]));if(he(t)&&he(n)){const e=Object.keys(t),i=Object.keys(n);return e.length===i.length&&!e.some(e=>!Object.prototype.hasOwnProperty.call(n,e)||!ve(t[e],n[e]))}return t===n}function ge(t,n){const e=t;return function(t,n){if(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const r=e[i];if("__proto__"!==r&&!1===n(t[r],r))break}}}(n,(t,n)=>{Array.isArray(t)?e[n]=t.slice():he(t)?e[n]=ge(he(e[n])?e[n]:{},t):e[n]=t}),e}var me=({children:t,className:n,...e})=>o().createElement("div",{className:pe("splide__track",n),...e},o().createElement("ul",{className:"splide__list"},t)),ye=class extends o().Component{constructor(){super(...arguments),this.splideRef=o().createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:n,transition:e}=this.props,{current:i}=this.splideRef;i&&(this.splide=new de(i,t),this.bind(this.splide),this.splide.mount(n,e),this.options=ge({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!ve(this.options,t)&&(this.splide.options=t,this.options=ge({},t));const n=this.getSlides();var e,i;e=this.slides,i=n,(e.length!==i.length||e.some((t,n)=>t!==i[n]))&&(this.splide.refresh(),this.slides=n)}sync(t){var n;null==(n=this.splide)||n.sync(t)}go(t){var n;null==(n=this.splide)||n.go(t)}getSlides(){var t;if(this.splide){const n=null==(t=this.splide.Components.Elements)?void 0:t.list.children;return n&&Array.prototype.slice.call(n)||[]}return[]}bind(t){fe.forEach(([n,e])=>{const i=this.props[e];"function"==typeof i&&t.on(n,(...n)=>{i(t,...n)})})}omit(t,n){return n.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:n="div",hasTrack:e=!0,children:i,...r}=this.props;return o().createElement(n,{className:pe("splide",t),ref:this.splideRef,...this.omit(r,["options",...fe.map(t=>t[1])])},e?o().createElement(me,null,i):i)}},be=({children:t,className:n,...e})=>o().createElement("li",{className:pe("splide__slide",n),...e},t);const we=window.wp.i18n,ke=window.wp.blockEditor,xe=window.wp.components,Ee={type:"loop",perMove:1,perPage:5,gap:"2rem",autoplay:!0,interval:4e3,breakpoints:{992:{perPage:3,gap:"1rem"},768:{perPage:2,gap:".7rem"},576:{perPage:1,gap:".7rem"}}},Se=window.ReactJSXRuntime,_e=[{label:(0,we.__)("Logos Grid","kind-site-framework"),value:"grid"},{label:(0,we.__)("Text List","kind-site-framework"),value:"list"},{label:(0,we.__)("Logos Slider","kind-site-framework"),value:"slider"}],Ce=[{label:(0,we.__)("Colored","kind-site-framework"),value:"colored"}];function Pe({layout:t,style:n,insurers:e}){switch(t){case"grid":return e.map(t=>(0,Se.jsx)("div",{children:(0,Se.jsx)("img",{src:t.urls[n],alt:t.alt})},t.key));case"list":return e.map(t=>(0,Se.jsx)("li",{children:t.label},t.key));case"slider":return(0,Se.jsx)(ye,{"aria-label":(0,we.__)("Insurance Accepted","kind-site-framework"),options:Ee,children:e.map(t=>(0,Se.jsx)(be,{children:(0,Se.jsx)("img",{src:t.urls[n],alt:t.alt})},t.key))})}return null}const Ae=JSON.parse('{"UU":"kind-site-framework/insurers"}'),Le=(0,Se.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:(0,Se.jsx)("path",{d:"M933 167.4l-384-160c-10.902-4.648-23.586-7.35-36.9-7.35s-25.998 2.702-37.531 7.588l0.631-0.238-384 160c-35.8 14.8-59.2 49.8-59.2 88.6 0 397 229 671.4 443 760.6 23.6 9.8 50.2 9.8 73.8 0 171.4-71.4 443.2-318 443.2-760.6 0-38.8-23.4-73.8-59-88.6zM838.6 395.8l-368 368c-12.4 12.4-32.8 12.4-45.2 0l-208-208c-12.4-12.4-12.4-32.8 0-45.2l45.2-45.2c12.4-12.4 32.8-12.4 45.2 0l140.2 140.2 300.2-300.2c12.4-12.4 32.8-12.4 45.2 0l45.2 45.2c12.6 12.6 12.6 32.8 0 45.2z"})});(0,i.registerBlockType)(Ae.UU,{icon:Le,edit:function({attributes:t,setAttributes:n}){const e=t.layout||"slider",i=t.style||"colored",r=!!t.overwriteSettings,o="list"===e?"ul":"div",s=(0,ke.useBlockProps)({className:"ksf-layout-"+e}),a=globalThis.ksfAllInsurers||[];let u,c=[];return r?(c=t.insurers||[],u=a.filter(t=>c.includes(t.key))):u=[...globalThis.ksfEnabledInsurers||[]],(0,Se.jsxs)(Se.Fragment,{children:[(0,Se.jsx)(ke.InspectorControls,{children:(0,Se.jsxs)(xe.PanelBody,{title:(0,we.__)("Settings","kind-site-framework"),children:[(0,Se.jsx)(xe.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Layout",value:e,options:_e,onChange:t=>n({layout:t})}),(0,Se.jsx)(xe.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Style",value:i,options:Ce,onChange:t=>n({style:t})}),(0,Se.jsx)(xe.ToggleControl,{checked:r,label:(0,we.__)("Overwrite global settings","kind-site-framework"),onChange:()=>n({overwriteSettings:!r})}),r&&(0,Se.jsx)(xe.BaseControl,{label:(0,we.__)("Select insurers to show","kind-site-framework"),children:a.map(t=>(0,Se.jsx)(xe.CheckboxControl,{label:t.label,checked:c.includes(t.key),onChange:e=>n({insurers:[...e?[t.key]:[],...c.filter(n=>t.key!==n)]})},t.key))})]})}),(0,Se.jsx)(o,{...s,children:(0,Se.jsx)(Pe,{layout:e,style:i,insurers:u})})]})}})}},e={};function i(t){var r=e[t];if(void 0!==r)return r.exports;var o=e[t]={exports:{}};return n[t](o,o.exports,i),o.exports}i.m=n,t=[],i.O=(n,e,r,o)=>{if(!e){var s=1/0;for(l=0;l<t.length;l++){for(var[e,r,o]=t[l],a=!0,u=0;u<e.length;u++)(!1&o||s>=o)&&Object.keys(i.O).every(t=>i.O[t](e[u]))?e.splice(u--,1):(a=!1,o<s&&(s=o));if(a){t.splice(l--,1);var c=r();void 0!==c&&(n=c)}}return n}o=o||0;for(var l=t.length;l>0&&t[l-1][2]>o;l--)t[l]=t[l-1];t[l]=[e,r,o]},i.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return i.d(n,{a:n}),n},i.d=(t,n)=>{for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),(()=>{var t={294:0,18:0};i.O.j=n=>0===t[n];var n=(n,e)=>{var r,o,[s,a,u]=e,c=0;if(s.some(n=>0!==t[n])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(u)var l=u(i)}for(n&&n(e);c<s.length;c++)o=s[c],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return i.O(l)},e=globalThis.webpackChunkkind_site_framework=globalThis.webpackChunkkind_site_framework||[];e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))})();var r=i.O(void 0,[18],()=>i(608));r=i.O(r)})();1 (()=>{"use strict";var t,n={608(t,n,e){const i=window.wp.blocks,r=window.React;var o=e.n(r);function s(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var a="(prefers-reduced-motion: reduce)";function u(t){t.length=0}function c(t,n,e){return Array.prototype.slice.call(t,n,e)}function l(t){return t.bind.apply(t,[null].concat(c(arguments,1)))}var f=setTimeout,d=function(){};function p(t){return requestAnimationFrame(t)}function h(t,n){return typeof n===t}function v(t){return!w(t)&&h("object",t)}var g=Array.isArray,m=l(h,"function"),y=l(h,"string"),b=l(h,"undefined");function w(t){return null===t}function x(t){try{return t instanceof(t.ownerDocument.defaultView||window).HTMLElement}catch(t){return!1}}function k(t){return g(t)?t:[t]}function E(t,n){k(t).forEach(n)}function _(t,n){return t.indexOf(n)>-1}function S(t,n){return t.push.apply(t,k(n)),t}function C(t,n,e){t&&E(n,function(n){n&&t.classList[e?"add":"remove"](n)})}function P(t,n){C(t,y(n)?n.split(" "):n,!0)}function A(t,n){E(n,t.appendChild.bind(t))}function L(t,n){E(t,function(t){var e=(n||t).parentNode;e&&e.insertBefore(t,n)})}function j(t,n){return x(t)&&(t.msMatchesSelector||t.matches).call(t,n)}function M(t,n){var e=t?c(t.children):[];return n?e.filter(function(t){return j(t,n)}):e}function O(t,n){return n?M(t,n)[0]:t.firstElementChild}var D=Object.keys;function N(t,n,e){return t&&(e?D(t).reverse():D(t)).forEach(function(e){"__proto__"!==e&&n(t[e],e)}),t}function z(t){return c(arguments,1).forEach(function(n){N(n,function(e,i){t[i]=n[i]})}),t}function T(t){return c(arguments,1).forEach(function(n){N(n,function(n,e){g(n)?t[e]=n.slice():v(n)?t[e]=T({},v(t[e])?t[e]:{},n):t[e]=n})}),t}function I(t,n){E(n||D(t),function(n){delete t[n]})}function R(t,n){E(t,function(t){E(n,function(n){t&&t.removeAttribute(n)})})}function F(t,n,e){v(n)?N(n,function(n,e){F(t,e,n)}):E(t,function(t){w(e)||""===e?R(t,n):t.setAttribute(n,String(e))})}function B(t,n,e){var i=document.createElement(t);return n&&(y(n)?P(i,n):F(i,n)),e&&A(e,i),i}function U(t,n,e){if(b(e))return getComputedStyle(t)[n];w(e)||(t.style[n]=""+e)}function W(t,n){U(t,"display",n)}function X(t){t.setActive&&t.setActive()||t.focus({preventScroll:!0})}function G(t,n){return t.getAttribute(n)}function H(t,n){return t&&t.classList.contains(n)}function Y(t){return t.getBoundingClientRect()}function q(t){E(t,function(t){t&&t.parentNode&&t.parentNode.removeChild(t)})}function J(t){return O((new DOMParser).parseFromString(t,"text/html").body)}function K(t,n){t.preventDefault(),n&&(t.stopPropagation(),t.stopImmediatePropagation())}function V(t,n){return t&&t.querySelector(n)}function Q(t,n){return n?c(t.querySelectorAll(n)):[]}function Z(t,n){C(t,n,!1)}function $(t){return t.timeStamp}function tt(t){return y(t)?t:t?t+"px":""}var nt="splide",et="data-"+nt;function it(t,n){if(!t)throw new Error("["+nt+"] "+(n||""))}var rt=Math.min,ot=Math.max,st=Math.floor,at=Math.ceil,ut=Math.abs;function ct(t,n,e){return ut(t-n)<e}function lt(t,n,e,i){var r=rt(n,e),o=ot(n,e);return i?r<t&&t<o:r<=t&&t<=o}function ft(t,n,e){var i=rt(n,e),r=ot(n,e);return rt(ot(i,t),r)}function dt(t){return+(t>0)-+(t<0)}function pt(t,n){return E(n,function(n){t=t.replace("%s",""+n)}),t}function ht(t){return t<10?"0"+t:""+t}var vt={};function gt(){var t=[];function n(t,n,e){E(t,function(t){t&&E(n,function(n){n.split(" ").forEach(function(n){var i=n.split(".");e(t,i[0],i[1])})})})}return{bind:function(e,i,r,o){n(e,i,function(n,e,i){var s="addEventListener"in n,a=s?n.removeEventListener.bind(n,e,r,o):n.removeListener.bind(n,r);s?n.addEventListener(e,r,o):n.addListener(r),t.push([n,e,i,r,a])})},unbind:function(e,i,r){n(e,i,function(n,e,i){t=t.filter(function(t){return!!(t[0]!==n||t[1]!==e||t[2]!==i||r&&t[3]!==r)||(t[4](),!1)})})},dispatch:function(t,n,e){var i,r=!0;return"function"==typeof CustomEvent?i=new CustomEvent(n,{bubbles:r,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(n,r,!1,e),t.dispatchEvent(i),i},destroy:function(){t.forEach(function(t){t[4]()}),u(t)}}}var mt="mounted",yt="ready",bt="move",wt="moved",xt="click",kt="active",Et="inactive",_t="visible",St="hidden",Ct="refresh",Pt="updated",At="resize",Lt="resized",jt="drag",Mt="dragging",Ot="dragged",Dt="scroll",Nt="scrolled",zt="destroy",Tt="arrows:mounted",It="arrows:updated",Rt="pagination:mounted",Ft="pagination:updated",Bt="navigation:mounted",Ut="autoplay:play",Wt="autoplay:playing",Xt="autoplay:pause",Gt="lazyload:loaded",Ht="ei";function Yt(t){var n=t?t.event.bus:document.createDocumentFragment(),e=gt();return t&&t.event.on(zt,e.destroy),z(e,{bus:n,on:function(t,i){e.bind(n,k(t).join(" "),function(t){i.apply(i,g(t.detail)?t.detail:[])})},off:l(e.unbind,n),emit:function(t){e.dispatch(n,t,c(arguments,1))}})}function qt(t,n,e,i){var r,o,s=Date.now,a=0,u=!0,c=0;function l(){if(!u){if(a=t?rt((s()-r)/t,1):1,e&&e(a),a>=1&&(n(),r=s(),i&&++c>=i))return f();o=p(l)}}function f(){u=!0}function d(){o&&cancelAnimationFrame(o),a=0,o=0,u=!0}return{start:function(n){n||d(),r=s()-(n?a*t:0),u=!1,o=p(l)},rewind:function(){r=s(),a=0,e&&e(a)},pause:f,cancel:d,set:function(n){t=n},isPaused:function(){return u}}}var Jt="Arrow",Kt=Jt+"Left",Vt=Jt+"Right",Qt=Jt+"Up",Zt=Jt+"Down",$t="ttb",tn={width:["height"],left:["top","right"],right:["bottom","left"],x:["y"],X:["Y"],Y:["X"],ArrowLeft:[Qt,Vt],ArrowRight:[Zt,Kt]},nn="role",en="tabindex",rn="aria-",on=rn+"controls",sn=rn+"current",an=rn+"selected",un=rn+"label",cn=rn+"labelledby",ln=rn+"hidden",fn=rn+"orientation",dn=rn+"roledescription",pn=rn+"live",hn=rn+"busy",vn=rn+"atomic",gn=[nn,en,"disabled",on,sn,un,cn,ln,fn,dn],mn=nt+"__",yn="is-",bn=nt,wn=mn+"track",xn=mn+"list",kn=mn+"slide",En=kn+"--clone",Sn=kn+"__container",Cn=mn+"arrows",Pn=mn+"arrow",An=Pn+"--prev",Ln=Pn+"--next",jn=mn+"pagination",Mn=jn+"__page",On=mn+"progress__bar",Dn=mn+"toggle",Nn=mn+"sr",zn=yn+"initialized",Tn=yn+"active",In=yn+"prev",Rn=yn+"next",Fn=yn+"visible",Bn=yn+"loading",Un=yn+"focus-in",Wn=yn+"overflow",Xn=[Tn,Fn,In,Rn,Bn,Un,Wn],Gn={slide:kn,clone:En,arrows:Cn,arrow:Pn,prev:An,next:Ln,pagination:jn,page:Mn,spinner:mn+"spinner"},Hn="touchstart mousedown",Yn="touchmove mousemove",qn="touchend touchcancel mouseup click",Jn="slide",Kn="loop",Vn="fade";var Qn=et+"-interval",Zn={passive:!1,capture:!0},$n={Spacebar:" ",Right:Vt,Left:Kt,Up:Qt,Down:Zt};function te(t){return t=y(t)?t:t.key,$n[t]||t}var ne="keydown",ee=et+"-lazy",ie=ee+"-srcset",re="["+ee+"], ["+ie+"]",oe=[" ","Enter"],se=Object.freeze({__proto__:null,Media:function(t,n,e){var i=t.state,r=e.breakpoints||{},o=e.reducedMotion||{},s=gt(),u=[];function c(t){t&&s.destroy()}function l(t,n){var e=matchMedia(n);s.bind(e,"change",f),u.push([t,e])}function f(){var n=i.is(7),r=e.direction,o=u.reduce(function(t,n){return T(t,n[1].matches?n[0]:{})},{});I(e),d(o),e.destroy?t.destroy("completely"===e.destroy):n?(c(!0),t.mount()):r!==e.direction&&t.refresh()}function d(n,r,o){T(e,n),r&&T(Object.getPrototypeOf(e),n),!o&&i.is(1)||t.emit(Pt,e)}return{setup:function(){var t="min"===e.mediaQuery;D(r).sort(function(n,e){return t?+n-+e:+e-+n}).forEach(function(n){l(r[n],"("+(t?"min":"max")+"-width:"+n+"px)")}),l(o,a),f()},destroy:c,reduce:function(t){matchMedia(a).matches&&(t?T(e,o):I(e,D(o)))},set:d}},Direction:function(t,n,e){return{resolve:function(t,n,i){var r="rtl"!==(i=i||e.direction)||n?i===$t?0:-1:1;return tn[t]&&tn[t][r]||t.replace(/width|left|right/i,function(t,n){var e=tn[t.toLowerCase()][r]||t;return n>0?e.charAt(0).toUpperCase()+e.slice(1):e})},orient:function(t){return t*("rtl"===e.direction?1:-1)}}},Elements:function(t,n,e){var i,r,o,s=Yt(t),a=s.on,c=s.bind,l=t.root,f=e.i18n,d={},p=[],h=[],v=[];function g(){var t,n,o;i=w("."+wn),r=O(i,"."+xn),it(i&&r,"A track/list element is missing."),S(p,M(r,"."+kn+":not(."+En+")")),N({arrows:Cn,pagination:jn,prev:An,next:Ln,bar:On,toggle:Dn},function(t,n){d[n]=w("."+t)}),z(d,{root:l,track:i,list:r,slides:p}),n=l.id||""+(t=nt)+ht(vt[t]=(vt[t]||0)+1),o=e.role,l.id=n,i.id=i.id||n+"-track",r.id=r.id||n+"-list",!G(l,nn)&&"SECTION"!==l.tagName&&o&&F(l,nn,o),F(l,dn,f.carousel),F(r,nn,"presentation"),b()}function y(t){var n=gn.concat("style");u(p),Z(l,h),Z(i,v),R([i,r],n),R(l,t?n:["style",dn])}function b(){Z(l,h),Z(i,v),h=x(bn),v=x(wn),P(l,h),P(i,v),F(l,un,e.label),F(l,cn,e.labelledby)}function w(t){var n=V(l,t);return n&&function(t,n){if(m(t.closest))return t.closest(n);for(var e=t;e&&1===e.nodeType&&!j(e,n);)e=e.parentElement;return e}(n,"."+bn)===l?n:void 0}function x(t){return[t+"--"+e.type,t+"--"+e.direction,e.drag&&t+"--draggable",e.isNavigation&&t+"--nav",t===bn&&Tn]}return z(d,{setup:g,mount:function(){a(Ct,y),a(Ct,g),a(Pt,b),c(document,Hn+" keydown",function(t){o="keydown"===t.type},{capture:!0}),c(l,"focusin",function(){C(l,Un,!!o)})},destroy:y})},Slides:function(t,n,e){var i=Yt(t),r=i.on,o=i.emit,s=i.bind,a=n.Elements,c=a.slides,f=a.list,d=[];function p(){c.forEach(function(t,n){v(t,n,-1)})}function h(){b(function(t){t.destroy()}),u(d)}function v(n,e,i){var r=function(t,n,e,i){var r,o=Yt(t),s=o.on,a=o.emit,u=o.bind,c=t.Components,f=t.root,d=t.options,p=d.isNavigation,h=d.updateOnMove,v=d.i18n,g=d.pagination,m=d.slideFocus,y=c.Direction.resolve,b=G(i,"style"),w=G(i,un),x=e>-1,k=O(i,"."+Sn);function E(){var r=t.splides.map(function(t){var e=t.splide.Components.Slides.getAt(n);return e?e.slide.id:""}).join(" ");F(i,un,pt(v.slideX,(x?e:n)+1)),F(i,on,r),F(i,nn,m?"button":""),m&&R(i,dn)}function _(){r||S()}function S(){if(!r){var e=t.index;(o=P())!==H(i,Tn)&&(C(i,Tn,o),F(i,sn,p&&o||""),a(o?kt:Et,A)),function(){var n=function(){if(t.is(Vn))return P();var n=Y(c.Elements.track),e=Y(i),r=y("left",!0),o=y("right",!0);return st(n[r])<=at(e[r])&&st(e[o])<=at(n[o])}(),e=!n&&(!P()||x);if(t.state.is([4,5])||F(i,ln,e||""),F(Q(i,d.focusableNodes||""),en,e?-1:""),m&&F(i,en,e?-1:0),n!==H(i,Fn)&&(C(i,Fn,n),a(n?_t:St,A)),!n&&document.activeElement===i){var r=c.Slides.getAt(t.index);r&&X(r.slide)}}(),C(i,In,n===e-1),C(i,Rn,n===e+1)}var o}function P(){var i=t.index;return i===n||d.cloneStatus&&i===e}var A={index:n,slideIndex:e,slide:i,container:k,isClone:x,mount:function(){x||(i.id=f.id+"-slide"+ht(n+1),F(i,nn,g?"tabpanel":"group"),F(i,dn,v.slide),F(i,un,w||pt(v.slideLabel,[n+1,t.length]))),u(i,"click",l(a,xt,A)),u(i,"keydown",l(a,"sk",A)),s([wt,"sh",Nt],S),s(Bt,E),h&&s(bt,_)},destroy:function(){r=!0,o.destroy(),Z(i,Xn),R(i,gn),F(i,"style",b),F(i,un,w||"")},update:S,style:function(t,n,e){U(e&&k||i,t,n)},isWithin:function(e,i){var r=ut(e-n);return x||!d.rewind&&!t.is(Kn)||(r=rt(r,t.length-r)),r<=i}};return A}(t,e,i,n);r.mount(),d.push(r),d.sort(function(t,n){return t.index-n.index})}function g(t){return t?w(function(t){return!t.isClone}):d}function b(t,n){g(n).forEach(t)}function w(t){return d.filter(m(t)?t:function(n){return y(t)?j(n.slide,t):_(k(t),n.index)})}return{mount:function(){p(),r(Ct,h),r(Ct,p)},destroy:h,update:function(){b(function(t){t.update()})},register:v,get:g,getIn:function(t){var i=n.Controller,r=i.toIndex(t),o=i.hasFocus()?1:e.perPage;return w(function(t){return lt(t.index,r,r+o-1)})},getAt:function(t){return w(t)[0]},add:function(t,n){E(t,function(t){if(y(t)&&(t=J(t)),x(t)){var i=c[n];i?L(t,i):A(f,t),P(t,e.classes.slide),r=t,a=l(o,At),u=Q(r,"img"),(d=u.length)?u.forEach(function(t){s(t,"load error",function(){--d||a()})}):a()}var r,a,u,d}),o(Ct)},remove:function(t){q(w(t).map(function(t){return t.slide})),o(Ct)},forEach:b,filter:w,style:function(t,n,e){b(function(i){i.style(t,n,e)})},getLength:function(t){return t?c.length:d.length},isEnough:function(){return d.length>e.perPage}}},Layout:function(t,n,e){var i,r,o,s=Yt(t),a=s.on,u=s.bind,c=s.emit,f=n.Slides,d=n.Direction.resolve,p=n.Elements,h=p.root,g=p.track,m=p.list,y=f.getAt,b=f.style;function w(){i=e.direction===$t,U(h,"maxWidth",tt(e.width)),U(g,d("paddingLeft"),k(!1)),U(g,d("paddingRight"),k(!0)),x(!0)}function x(t){var n,s=Y(h);(t||r.width!==s.width||r.height!==s.height)&&(U(g,"height",(n="",i&&(it(n=E(),"height or heightRatio is missing."),n="calc("+n+" - "+k(!1)+" - "+k(!0)+")"),n)),b(d("marginRight"),tt(e.gap)),b("width",e.autoWidth?null:tt(e.fixedWidth)||(i?"":_())),b("height",tt(e.fixedHeight)||(i?e.autoHeight?null:_():E()),!0),r=s,c(Lt),o!==(o=M())&&(C(h,Wn,o),c("overflow",o)))}function k(t){var n=e.padding,i=d(t?"right":"left");return n&&tt(n[i]||(v(n)?0:n))||"0px"}function E(){return tt(e.height||Y(m).width*e.heightRatio)}function _(){var t=tt(e.gap);return"calc((100%"+(t&&" + "+t)+")/"+(e.perPage||1)+(t&&" - "+t)+")"}function S(){return Y(m)[d("width")]}function P(t,n){var e=y(t||0);return e?Y(e.slide)[d("width")]+(n?0:j()):0}function A(t,n){var e=y(t);if(e){var i=Y(e.slide)[d("right")],r=Y(m)[d("left")];return ut(i-r)+(n?0:j())}return 0}function L(n){return A(t.length-1)-A(0)+P(0,n)}function j(){var t=y(0);return t&&parseFloat(U(t.slide,d("marginRight")))||0}function M(){return t.is(Vn)||L(!0)>S()}return{mount:function(){var t,n;w(),u(window,"resize load",(t=l(c,At),n=qt(0,t,null,1),function(){n.isPaused()&&n.start()})),a([Pt,Ct],w),a(At,x)},resize:x,listSize:S,slideSize:P,sliderSize:L,totalSize:A,getPadding:function(t){return parseFloat(U(g,d("padding"+(t?"Right":"Left"))))||0},isOverflow:M}},Clones:function(t,n,e){var i,r=Yt(t),o=r.on,s=n.Elements,a=n.Slides,c=n.Direction.resolve,l=[];function f(){o(Ct,d),o([Pt,At],h),(i=v())&&(function(n){var i=a.get().slice(),r=i.length;if(r){for(;i.length<n;)S(i,i);S(i.slice(-n),i.slice(0,n)).forEach(function(o,u){var c=u<n,f=function(n,i){var r=n.cloneNode(!0);return P(r,e.classes.clone),r.id=t.root.id+"-clone"+ht(i+1),r}(o.slide,u);c?L(f,i[0].slide):A(s.list,f),S(l,f),a.register(f,u-n+(c?0:r),o.index)})}}(i),n.Layout.resize(!0))}function d(){p(),f()}function p(){q(l),u(l),r.destroy()}function h(){var t=v();i!==t&&(i<t||!t)&&r.emit(Ct)}function v(){var i=e.clones;if(t.is(Kn)){if(b(i)){var r=e[c("fixedWidth")]&&n.Layout.slideSize(0);i=r&&at(Y(s.track)[c("width")]/r)||e[c("autoWidth")]&&t.length||2*e.perPage}}else i=0;return i}return{mount:f,destroy:p}},Move:function(t,n,e){var i,r=Yt(t),o=r.on,s=r.emit,a=t.state.set,u=n.Layout,c=u.slideSize,l=u.getPadding,f=u.totalSize,d=u.listSize,p=u.sliderSize,h=n.Direction,v=h.resolve,g=h.orient,m=n.Elements,y=m.list,w=m.track;function x(){n.Controller.isBusy()||(n.Scroll.cancel(),k(t.index),n.Slides.update())}function k(t){E(P(t,!0))}function E(e,i){if(!t.is(Vn)){var r=i?e:function(e){if(t.is(Kn)){var i=C(e),r=i>n.Controller.getEnd();(i<0||r)&&(e=_(e,r))}return e}(e);U(y,"transform","translate"+v("X")+"("+r+"px)"),e!==r&&s("sh")}}function _(t,n){var e=t-L(n),i=p();return t-g(i*(at(ut(e)/i)||1))*(n?1:-1)}function S(){E(A(),!0),i.cancel()}function C(t){for(var e=n.Slides.get(),i=0,r=1/0,o=0;o<e.length;o++){var s=e[o].index,a=ut(P(s,!0)-t);if(!(a<=r))break;r=a,i=s}return i}function P(n,i){var r=g(f(n-1)-function(t){var n=e.focus;return"center"===n?(d()-c(t,!0))/2:+n*c(t)||0}(n));return i?function(n){return e.trimSpace&&t.is(Jn)&&(n=ft(n,0,g(p(!0)-d()))),n}(r):r}function A(){var t=v("left");return Y(y)[t]-Y(w)[t]+g(l(!1))}function L(t){return P(t?n.Controller.getEnd():0,!!e.trimSpace)}return{mount:function(){i=n.Transition,o([mt,Lt,Pt,Ct],x)},move:function(t,n,e,r){var o,u;t!==n&&(o=t>e,u=g(_(A(),o)),o?u>=0:u<=y[v("scrollWidth")]-Y(w)[v("width")])&&(S(),E(_(A(),t>e),!0)),a(4),s(bt,n,e,t),i.start(n,function(){a(3),s(wt,n,e,t),r&&r()})},jump:k,translate:E,shift:_,cancel:S,toIndex:C,toPosition:P,getPosition:A,getLimit:L,exceededLimit:function(t,n){n=b(n)?A():n;var e=!0!==t&&g(n)<g(L(!1)),i=!1!==t&&g(n)>g(L(!0));return e||i},reposition:x}},Controller:function(t,n,e){var i,r,o,s,a=Yt(t),u=a.on,c=a.emit,f=n.Move,d=f.getPosition,p=f.getLimit,h=f.toPosition,v=n.Slides,g=v.isEnough,m=v.getLength,w=e.omitEnd,x=t.is(Kn),k=t.is(Jn),E=l(L,!1),_=l(L,!0),S=e.start||0,C=S;function P(){r=m(!0),o=e.perMove,s=e.perPage,i=O();var t=ft(S,0,w?i:r-1);t!==S&&(S=t,f.reposition())}function A(){i!==O()&&c(Ht)}function L(t,n){var e=o||(T()?1:s),r=j(S+e*(t?-1:1),S,!(o||T()));return-1===r&&k&&!ct(d(),p(!t),1)?t?0:i:n?r:M(r)}function j(n,a,u){if(g()||T()){var c=function(n){if(k&&"move"===e.trimSpace&&n!==S)for(var i=d();i===h(n,!0)&<(n,0,t.length-1,!e.rewind);)n<S?--n:++n;return n}(n);c!==n&&(a=n,n=c,u=!1),n<0||n>i?n=o||!lt(0,n,a,!0)&&!lt(i,a,n,!0)?x?u?n<0?-(r%s||s):r:n:e.rewind?n<0?i:0:-1:D(N(n)):u&&n!==a&&(n=D(N(a)+(n<a?-1:1)))}else n=-1;return n}function M(t){return x?(t+r)%r||0:t}function O(){for(var t=r-(T()||x&&o?1:s);w&&t-- >0;)if(h(r-1,!0)!==h(t,!0)){t++;break}return ft(t,0,r-1)}function D(t){return ft(T()?t:s*t,0,i)}function N(t){return T()?rt(t,i):st((t>=i?r-1:t)/s)}function z(t){t!==S&&(C=S,S=t)}function T(){return!b(e.focus)||e.isNavigation}function I(){return t.state.is([4,5])&&!!e.waitForTransition}return{mount:function(){P(),u([Pt,Ct,Ht],P),u(Lt,A)},go:function(t,n,e){if(!I()){var r=function(t){var n=S;if(y(t)){var e=t.match(/([+\-<>])(\d+)?/)||[],r=e[1],o=e[2];"+"===r||"-"===r?n=j(S+ +(""+r+(+o||1)),S):">"===r?n=o?D(+o):E(!0):"<"===r&&(n=_(!0))}else n=x?t:ft(t,0,i);return n}(t),o=M(r);o>-1&&(n||o!==S)&&(z(o),f.move(r,o,C,e))}},scroll:function(t,e,r,o){n.Scroll.scroll(t,e,r,function(){var t=M(f.toIndex(d()));z(w?rt(t,i):t),o&&o()})},getNext:E,getPrev:_,getAdjacent:L,getEnd:O,setIndex:z,getIndex:function(t){return t?C:S},toIndex:D,toPage:N,toDest:function(t){var n=f.toIndex(t);return k?ft(n,0,i):n},hasFocus:T,isBusy:I}},Arrows:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.emit,c=e.classes,f=e.i18n,d=n.Elements,p=n.Controller,h=d.arrows,v=d.track,g=h,m=d.prev,y=d.next,b={};function w(){var t;!(t=e.arrows)||m&&y||(g=h||B("div",c.arrows),m=_(!0),y=_(!1),i=!0,A(g,[m,y]),!h&&L(g,v)),m&&y&&(z(b,{prev:m,next:y}),W(g,t?"":"none"),P(g,r=Cn+"--"+e.direction),t&&(s([mt,wt,Ct,Nt,Ht],S),a(y,"click",l(E,">")),a(m,"click",l(E,"<")),S(),F([m,y],on,v.id),u(Tt,m,y))),s(Pt,x)}function x(){k(),w()}function k(){o.destroy(),Z(g,r),i?(q(h?[m,y]:g),m=y=null):R([m,y],gn)}function E(t){p.go(t,!0)}function _(t){return J('<button class="'+c.arrow+" "+(t?c.prev:c.next)+'" type="button"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40" focusable="false"><path d="'+(e.arrowPath||"m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z")+'" />')}function S(){if(m&&y){var n=t.index,e=p.getPrev(),i=p.getNext(),r=e>-1&&n<e?f.last:f.prev,o=i>-1&&n>i?f.first:f.next;m.disabled=e<0,y.disabled=i<0,F(m,un,r),F(y,un,o),u(It,m,y,e,i)}}return{arrows:b,mount:w,destroy:k,update:S}},Autoplay:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.emit,c=qt(e.interval,t.go.bind(t,">"),function(t){var n=f.bar;n&&U(n,"width",100*t+"%"),u(Wt,t)}),l=c.isPaused,f=n.Elements,d=n.Elements,p=d.root,h=d.toggle,v=e.autoplay,g="pause"===v;function m(){l()&&n.Slides.isEnough()&&(c.start(!e.resetProgress),r=i=g=!1,w(),u(Ut))}function y(t){void 0===t&&(t=!0),g=!!t,w(),l()||(c.pause(),u(Xt))}function b(){g||(i||r?y(!1):m())}function w(){h&&(C(h,Tn,!g),F(h,un,e.i18n[g?"play":"pause"]))}function x(t){var i=n.Slides.getAt(t);c.set(i&&+G(i.slide,Qn)||e.interval)}return{mount:function(){v&&(e.pauseOnHover&&a(p,"mouseenter mouseleave",function(t){i="mouseenter"===t.type,b()}),e.pauseOnFocus&&a(p,"focusin focusout",function(t){r="focusin"===t.type,b()}),h&&a(h,"click",function(){g?m():y(!0)}),s([bt,Dt,Ct],c.rewind),s(bt,x),h&&F(h,on,f.track.id),g||m(),w())},destroy:c.cancel,play:m,pause:y,isPaused:l}},Cover:function(t,n,e){var i=Yt(t).on;function r(t){n.Slides.forEach(function(n){var e=O(n.container||n.slide,"img");e&&e.src&&o(t,e,n)})}function o(t,n,e){e.style("background",t?'center/cover no-repeat url("'+n.src+'")':"",!0),W(n,t?"none":"")}return{mount:function(){e.cover&&(i(Gt,l(o,!0)),i([mt,Pt,Ct],l(r,!0)))},destroy:l(r,!1)}},Scroll:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.emit,u=t.state.set,c=n.Move,f=c.getPosition,d=c.getLimit,p=c.exceededLimit,h=c.translate,v=t.is(Jn),g=1;function m(t,e,o,s,d){var h=f();if(w(),o&&(!v||!p())){var m=n.Layout.sliderSize(),x=dt(t)*m*st(ut(t)/m)||0;t=c.toPosition(n.Controller.toDest(t%m))+x}var k=ct(h,t,1);g=1,e=k?0:e||ot(ut(t-h)/1.5,800),r=s,i=qt(e,y,l(b,h,t,d),1),u(5),a(Dt),i.start()}function y(){u(3),r&&r(),a(Nt)}function b(t,n,i,o){var s,a,u=f(),c=(t+(n-t)*(s=o,(a=e.easingFunc)?a(s):1-Math.pow(1-s,4))-u)*g;h(u+c),v&&!i&&p()&&(g*=.6,ut(c)<10&&m(d(p(!0)),600,!1,r,!0))}function w(){i&&i.cancel()}function x(){i&&!i.isPaused()&&(w(),y())}return{mount:function(){s(bt,w),s([Pt,Ct],x)},destroy:w,scroll:m,cancel:x}},Drag:function(t,n,e){var i,r,o,s,a,u,c,l,f=Yt(t),p=f.on,h=f.emit,g=f.bind,m=f.unbind,y=t.state,b=n.Move,w=n.Scroll,x=n.Controller,k=n.Elements.track,E=n.Media.reduce,_=n.Direction,S=_.resolve,C=_.orient,P=b.getPosition,A=b.exceededLimit,L=!1;function M(){var t=e.drag;W(!t),s="free"===t}function O(t){if(u=!1,!c){var n=U(t);i=t.target,r=e.noDrag,j(i,"."+Mn+", ."+Pn)||r&&j(i,r)||!n&&t.button||(x.isBusy()?K(t,!0):(l=n?k:window,a=y.is([4,5]),o=null,g(l,Yn,D,Zn),g(l,qn,N,Zn),b.cancel(),w.cancel(),T(t)))}var i,r}function D(n){if(y.is(6)||(y.set(6),h(jt)),n.cancelable)if(a){b.translate(i+I(n)/(L&&t.is(Jn)?5:1));var r=R(n)>200,o=L!==(L=A());(r||o)&&T(n),u=!0,h(Mt),K(n)}else(function(t){return ut(I(t))>ut(I(t,!0))})(n)&&(a=function(t){var n=e.dragMinThreshold,i=v(n),r=i&&n.mouse||0,o=(i?n.touch:+n)||10;return ut(I(t))>(U(t)?o:r)}(n),K(n))}function N(i){y.is(6)&&(y.set(3),h(Ot)),a&&(function(i){var r=function(n){if(t.is(Kn)||!L){var e=R(n);if(e&&e<200)return I(n)/e}return 0}(i),o=function(t){return P()+dt(t)*rt(ut(t)*(e.flickPower||600),s?1/0:n.Layout.listSize()*(e.flickMaxPages||1))}(r),a=e.rewind&&e.rewindByDrag;E(!1),s?x.scroll(o,0,e.snap):t.is(Vn)?x.go(C(dt(r))<0?a?"<":"-":a?">":"+"):t.is(Jn)&&L&&a?x.go(A(!0)?">":"<"):x.go(x.toDest(o),!0),E(!0)}(i),K(i)),m(l,Yn,D),m(l,qn,N),a=!1}function z(t){!c&&u&&K(t,!0)}function T(t){o=r,r=t,i=P()}function I(t,n){return B(t,n)-B(F(t),n)}function R(t){return $(t)-$(F(t))}function F(t){return r===t&&o||r}function B(t,n){return(U(t)?t.changedTouches[0]:t)["page"+S(n?"Y":"X")]}function U(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}function W(t){c=t}return{mount:function(){g(k,Yn,d,Zn),g(k,qn,d,Zn),g(k,Hn,O,Zn),g(k,"click",z,{capture:!0}),g(k,"dragstart",K),p([mt,Pt],M)},disable:W,isDragging:function(){return a}}},Keyboard:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.bind,u=o.unbind,c=t.root,l=n.Direction.resolve;function d(){var t=e.keyboard;t&&(i="global"===t?window:c,a(i,ne,v))}function p(){u(i,ne)}function h(){var t=r;r=!0,f(function(){r=t})}function v(n){if(!r){var e=te(n);e===l(Kt)?t.go("<"):e===l(Vt)&&t.go(">")}}return{mount:function(){d(),s(Pt,p),s(Pt,d),s(bt,h)},destroy:p,disable:function(t){r=t}}},LazyLoad:function(t,n,e){var i=Yt(t),r=i.on,o=i.off,s=i.bind,a=i.emit,c="sequential"===e.lazyLoad,f=[wt,Nt],d=[];function p(){u(d),n.Slides.forEach(function(t){Q(t.slide,re).forEach(function(n){var i=G(n,ee),r=G(n,ie);if(i!==n.src||r!==n.srcset){var o=e.classes.spinner,s=n.parentElement,a=O(s,"."+o)||B("span",o,s);d.push([n,t,a]),n.src||W(n,"none")}})}),c?m():(o(f),r(f,h),h())}function h(){(d=d.filter(function(n){var i=e.perPage*((e.preloadPages||1)+1)-1;return!n[1].isWithin(t.index,i)||v(n)})).length||o(f)}function v(t){var n=t[0];P(t[1].slide,Bn),s(n,"load error",l(g,t)),F(n,"src",G(n,ee)),F(n,"srcset",G(n,ie)),R(n,ee),R(n,ie)}function g(t,n){var e=t[0],i=t[1];Z(i.slide,Bn),"error"!==n.type&&(q(t[2]),W(e,""),a(Gt,e,i),a(At)),c&&m()}function m(){d.length&&v(d.shift())}return{mount:function(){e.lazyLoad&&(p(),r(Ct,p))},destroy:l(u,d),check:h}},Pagination:function(t,n,e){var i,r,o=Yt(t),s=o.on,a=o.emit,f=o.bind,d=n.Slides,p=n.Elements,h=n.Controller,v=h.hasFocus,g=h.getIndex,m=h.go,y=n.Direction.resolve,b=p.pagination,w=[];function x(){i&&(q(b?c(i.children):i),Z(i,r),u(w),i=null),o.destroy()}function k(t){m(">"+t,!0)}function E(t,n){var e=w.length,i=te(n),r=_(),o=-1;i===y(Vt,!1,r)?o=++t%e:i===y(Kt,!1,r)?o=(--t+e)%e:"Home"===i?o=0:"End"===i&&(o=e-1);var s=w[o];s&&(X(s.button),m(">"+o),K(n,!0))}function _(){return e.paginationDirection||e.direction}function S(t){return w[h.toPage(t)]}function C(){var t=S(g(!0)),n=S(g());if(t){var e=t.button;Z(e,Tn),R(e,an),F(e,en,-1)}if(n){var r=n.button;P(r,Tn),F(r,an,!0),F(r,en,"")}a(Ft,{list:i,items:w},t,n)}return{items:w,mount:function n(){x(),s([Pt,Ct,Ht],n);var o=e.pagination;b&&W(b,o?"":"none"),o&&(s([bt,Dt,Nt],C),function(){var n=t.length,o=e.classes,s=e.i18n,a=e.perPage,u=v()?h.getEnd()+1:at(n/a);P(i=b||B("ul",o.pagination,p.track.parentElement),r=jn+"--"+_()),F(i,nn,"tablist"),F(i,un,s.select),F(i,fn,_()===$t?"vertical":"");for(var c=0;c<u;c++){var g=B("li",null,i),m=B("button",{class:o.page,type:"button"},g),y=d.getIn(c).map(function(t){return t.slide.id}),x=!v()&&a>1?s.pageX:s.slideX;f(m,"click",l(k,c)),e.paginationKeyboard&&f(m,"keydown",l(E,c)),F(g,nn,"presentation"),F(m,nn,"tab"),F(m,on,y.join(" ")),F(m,un,pt(x,c+1)),F(m,en,-1),w.push({li:g,button:m,page:c})}}(),C(),a(Rt,{list:i,items:w},S(t.index)))},destroy:x,getAt:S,update:C}},Sync:function(t,n,e){var i=e.isNavigation,r=e.slideFocus,o=[];function s(){var n,e;t.splides.forEach(function(n){n.isParent||(c(t,n.splide),c(n.splide,t))}),i&&((e=(n=Yt(t)).on)(xt,d),e("sk",p),e([mt,Pt],f),o.push(n),n.emit(Bt,t.splides))}function a(){o.forEach(function(t){t.destroy()}),u(o)}function c(t,n){var e=Yt(t);e.on(bt,function(t,e,i){n.go(n.is(Kn)?i:t)}),o.push(e)}function f(){F(n.Elements.list,fn,e.direction===$t?"vertical":"")}function d(n){t.go(n.index)}function p(t,n){_(oe,te(n))&&(d(t),K(n))}return{setup:l(n.Media.set,{slideFocus:b(r)?i:r},!0),mount:s,destroy:a,remount:function(){a(),s()}}},Wheel:function(t,n,e){var i=Yt(t).bind,r=0;function o(i){if(i.cancelable){var o=i.deltaY,s=o<0,a=$(i),u=e.wheelMinThreshold||0,c=e.wheelSleep||0;ut(o)>u&&a-r>c&&(t.go(s?"<":">"),r=a),function(i){return!e.releaseWheel||t.state.is(4)||-1!==n.Controller.getAdjacent(i)}(s)&&K(i)}}return{mount:function(){e.wheel&&i(n.Elements.track,"wheel",o,Zn)}}},Live:function(t,n,e){var i=Yt(t).on,r=n.Elements.track,o=e.live&&!e.isNavigation,s=B("span",Nn),a=qt(90,l(u,!1));function u(t){F(r,hn,t),t?(A(r,s),a.start()):(q(s),a.cancel())}function c(t){o&&F(r,pn,t?"off":"polite")}return{mount:function(){o&&(c(!n.Autoplay.isPaused()),F(r,vn,!0),s.textContent="…",i(Ut,l(c,!0)),i(Xt,l(c,!1)),i([wt,Nt],l(u,!0)))},disable:c,destroy:function(){R(r,[pn,vn,hn]),q(s)}}}}),ae={type:"slide",role:"region",speed:400,perPage:1,cloneStatus:!0,arrows:!0,pagination:!0,paginationKeyboard:!0,interval:5e3,pauseOnHover:!0,pauseOnFocus:!0,resetProgress:!0,easing:"cubic-bezier(0.25, 1, 0.5, 1)",drag:!0,direction:"ltr",trimSpace:!0,focusableNodes:"a, button, textarea, input, select, iframe",live:!0,classes:Gn,i18n:{prev:"Previous slide",next:"Next slide",first:"Go to first slide",last:"Go to last slide",slideX:"Go to slide %s",pageX:"Go to page %s",play:"Start autoplay",pause:"Pause autoplay",carousel:"carousel",slide:"slide",select:"Select a slide to show",slideLabel:"%s of %s"},reducedMotion:{speed:0,rewindSpeed:0,autoplay:"pause"}};function ue(t,n,e){var i=n.Slides;function r(){i.forEach(function(t){t.style("transform","translateX(-"+100*t.index+"%)")})}return{mount:function(){Yt(t).on([mt,Ct],r)},start:function(t,n){i.style("transition","opacity "+e.speed+"ms "+e.easing),f(n)},cancel:d}}function ce(t,n,e){var i,r=n.Move,o=n.Controller,s=n.Scroll,a=n.Elements.list,u=l(U,a,"transition");function c(){u(""),s.cancel()}return{mount:function(){Yt(t).bind(a,"transitionend",function(t){t.target===a&&i&&(c(),i())})},start:function(n,a){var c=r.toPosition(n,!0),l=r.getPosition(),f=function(n){var i=e.rewindSpeed;if(t.is(Jn)&&i){var r=o.getIndex(!0),s=o.getEnd();if(0===r&&n>=s||r>=s&&0===n)return i}return e.speed}(n);ut(c-l)>=1&&f>=1?e.useScroll?s.scroll(c,f,!1,a):(u("transform "+f+"ms "+e.easing),r.translate(c,!0),i=a):(r.jump(n),a())},cancel:c}}var le=function(){function t(n,e){var i;this.event=Yt(),this.Components={},this.state=(i=1,{set:function(t){i=t},is:function(t){return _(k(t),i)}}),this.splides=[],this._o={},this._E={};var r=y(n)?V(document,n):n;it(r,r+" is invalid."),this.root=r,e=T({label:G(r,un)||"",labelledby:G(r,cn)||""},ae,t.defaults,e||{});try{T(e,JSON.parse(G(r,et)))}catch(t){it(!1,"Invalid JSON")}this._o=Object.create(T({},e))}var n,e,i=t.prototype;return i.mount=function(t,n){var e=this,i=this.state,r=this.Components;return it(i.is([1,7]),"Already mounted!"),i.set(1),this._C=r,this._T=n||this._T||(this.is(Vn)?ue:ce),this._E=t||this._E,N(z({},se,this._E,{Transition:this._T}),function(t,n){var i=t(e,r,e._o);r[n]=i,i.setup&&i.setup()}),N(r,function(t){t.mount&&t.mount()}),this.emit(mt),P(this.root,zn),i.set(3),this.emit(yt),this},i.sync=function(t){return this.splides.push({splide:t}),t.splides.push({splide:this,isParent:!0}),this.state.is(3)&&(this._C.Sync.remount(),t.Components.Sync.remount()),this},i.go=function(t){return this._C.Controller.go(t),this},i.on=function(t,n){return this.event.on(t,n),this},i.off=function(t){return this.event.off(t),this},i.emit=function(t){var n;return(n=this.event).emit.apply(n,[t].concat(c(arguments,1))),this},i.add=function(t,n){return this._C.Slides.add(t,n),this},i.remove=function(t){return this._C.Slides.remove(t),this},i.is=function(t){return this._o.type===t},i.refresh=function(){return this.emit(Ct),this},i.destroy=function(t){void 0===t&&(t=!0);var n=this.event,e=this.state;return e.is(1)?Yt(this).on(yt,this.destroy.bind(this,t)):(N(this._C,function(n){n.destroy&&n.destroy(t)},!0),n.emit(zt),n.destroy(),t&&u(this.splides),e.set(7)),this},n=t,e=[{key:"options",get:function(){return this._o},set:function(t){this._C.Media.set(t,!0,!0)}},{key:"length",get:function(){return this._C.Slides.getLength(!0)}},{key:"index",get:function(){return this._C.Controller.getIndex()}}],e&&s(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),t}(),fe=le;fe.defaults={},fe.STATES={CREATED:1,MOUNTED:2,IDLE:3,MOVING:4,SCROLLING:5,DRAGGING:6,DESTROYED:7};var de=[[mt,"onMounted"],[yt,"onReady"],[bt,"onMove"],[wt,"onMoved"],[xt,"onClick"],[kt,"onActive"],[Et,"onInactive"],[_t,"onVisible"],[St,"onHidden"],[Ct,"onRefresh"],[Pt,"onUpdated"],[At,"onResize"],[Lt,"onResized"],[jt,"onDrag"],[Mt,"onDragging"],[Ot,"onDragged"],[Dt,"onScroll"],[Nt,"onScrolled"],[zt,"onDestroy"],[Tt,"onArrowsMounted"],[It,"onArrowsUpdated"],[Rt,"onPaginationMounted"],[Ft,"onPaginationUpdated"],[Bt,"onNavigationMounted"],[Ut,"onAutoplayPlay"],[Wt,"onAutoplayPlaying"],[Xt,"onAutoplayPause"],[Gt,"onLazyLoadLoaded"]];function pe(...t){return t.filter(Boolean).join(" ")}function he(t){return null!==t&&"object"==typeof t}function ve(t,n){if(Array.isArray(t)&&Array.isArray(n))return t.length===n.length&&!t.some((t,e)=>!ve(t,n[e]));if(he(t)&&he(n)){const e=Object.keys(t),i=Object.keys(n);return e.length===i.length&&!e.some(e=>!Object.prototype.hasOwnProperty.call(n,e)||!ve(t[e],n[e]))}return t===n}function ge(t,n){const e=t;return function(t,n){if(t){const e=Object.keys(t);for(let i=0;i<e.length;i++){const r=e[i];if("__proto__"!==r&&!1===n(t[r],r))break}}}(n,(t,n)=>{Array.isArray(t)?e[n]=t.slice():he(t)?e[n]=ge(he(e[n])?e[n]:{},t):e[n]=t}),e}var me=({children:t,className:n,...e})=>o().createElement("div",{className:pe("splide__track",n),...e},o().createElement("ul",{className:"splide__list"},t)),ye=class extends o().Component{constructor(){super(...arguments),this.splideRef=o().createRef(),this.slides=[]}componentDidMount(){const{options:t,extensions:n,transition:e}=this.props,{current:i}=this.splideRef;i&&(this.splide=new fe(i,t),this.bind(this.splide),this.splide.mount(n,e),this.options=ge({},t||{}),this.slides=this.getSlides())}componentWillUnmount(){this.splide&&(this.splide.destroy(),this.splide=void 0),this.options=void 0,this.slides.length=0}componentDidUpdate(){if(!this.splide)return;const{options:t}=this.props;t&&!ve(this.options,t)&&(this.splide.options=t,this.options=ge({},t));const n=this.getSlides();var e,i;e=this.slides,i=n,(e.length!==i.length||e.some((t,n)=>t!==i[n]))&&(this.splide.refresh(),this.slides=n)}sync(t){var n;null==(n=this.splide)||n.sync(t)}go(t){var n;null==(n=this.splide)||n.go(t)}getSlides(){var t;if(this.splide){const n=null==(t=this.splide.Components.Elements)?void 0:t.list.children;return n&&Array.prototype.slice.call(n)||[]}return[]}bind(t){de.forEach(([n,e])=>{const i=this.props[e];"function"==typeof i&&t.on(n,(...n)=>{i(t,...n)})})}omit(t,n){return n.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&delete t[n]}),t}render(){const{className:t,tag:n="div",hasTrack:e=!0,children:i,...r}=this.props;return o().createElement(n,{className:pe("splide",t),ref:this.splideRef,...this.omit(r,["options",...de.map(t=>t[1])])},e?o().createElement(me,null,i):i)}},be=({children:t,className:n,...e})=>o().createElement("li",{className:pe("splide__slide",n),...e},t);const we=window.wp.i18n,xe=window.wp.blockEditor,ke=window.wp.components,Ee={type:"loop",perMove:1,perPage:5,gap:"2rem",autoplay:!0,interval:4e3,breakpoints:{992:{perPage:3,gap:"1rem"},768:{perPage:2,gap:".7rem"},576:{perPage:1,gap:".7rem"}}},_e=window.ReactJSXRuntime,Se=[{label:(0,we.__)("Logos Grid","kind-site-framework"),value:"grid"},{label:(0,we.__)("Text List","kind-site-framework"),value:"list"},{label:(0,we.__)("Logos Slider","kind-site-framework"),value:"slider"}],Ce=[{label:(0,we.__)("Colored","kind-site-framework"),value:"colored"}];function Pe({layout:t,style:n,insurers:e}){switch(t){case"grid":return e.map(t=>(0,_e.jsx)("div",{children:(0,_e.jsx)("img",{src:t.urls[n],alt:t.alt})},t.key));case"list":return e.map(t=>(0,_e.jsx)("li",{children:t.label},t.key));case"slider":return(0,_e.jsx)(ye,{"aria-label":(0,we.__)("Insurance Accepted","kind-site-framework"),options:Ee,children:e.map(t=>(0,_e.jsx)(be,{children:(0,_e.jsx)("img",{src:t.urls[n],alt:t.alt})},t.key))})}return null}const Ae=JSON.parse('{"UU":"kind-site-framework/insurers"}'),Le=(0,_e.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",children:(0,_e.jsx)("path",{d:"M933 167.4l-384-160c-10.902-4.648-23.586-7.35-36.9-7.35s-25.998 2.702-37.531 7.588l0.631-0.238-384 160c-35.8 14.8-59.2 49.8-59.2 88.6 0 397 229 671.4 443 760.6 23.6 9.8 50.2 9.8 73.8 0 171.4-71.4 443.2-318 443.2-760.6 0-38.8-23.4-73.8-59-88.6zM838.6 395.8l-368 368c-12.4 12.4-32.8 12.4-45.2 0l-208-208c-12.4-12.4-12.4-32.8 0-45.2l45.2-45.2c12.4-12.4 32.8-12.4 45.2 0l140.2 140.2 300.2-300.2c12.4-12.4 32.8-12.4 45.2 0l45.2 45.2c12.6 12.6 12.6 32.8 0 45.2z"})});(0,i.registerBlockType)(Ae.UU,{icon:Le,edit:function({attributes:t,setAttributes:n}){const e=t.layout||"slider",i=t.style||"colored",r=!!t.overwriteSettings,o=t.extraInsurers||"",s="list"===e?"ul":"div",a=(0,xe.useBlockProps)({className:"ksf-layout-"+e}),u=globalThis.ksfAllInsurers||[];let c,l=[];return r?(l=t.insurers||[],c=u.filter(t=>l.includes(t.key)).concat(function(t){const n=[];return t.split(/\r?\n|\r|\n/g).forEach(t=>{if(t){const e=t.split("|");2===e.length&&e[0]&&n.push({key:e[0],label:e[1],alt:e[1],urls:{colored:e[0]}})}}),n}(o))):c=[...globalThis.ksfEnabledInsurers||[],...globalThis.ksfExtraInsurers||[]],(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(xe.InspectorControls,{children:(0,_e.jsxs)(ke.PanelBody,{title:(0,we.__)("Settings","kind-site-framework"),children:[(0,_e.jsx)(ke.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Layout",value:e,options:Se,onChange:t=>n({layout:t})}),(0,_e.jsx)(ke.SelectControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:"Style",value:i,options:Ce,onChange:t=>n({style:t})}),(0,_e.jsx)(ke.ToggleControl,{checked:r,label:(0,we.__)("Overwrite global settings","kind-site-framework"),onChange:()=>n({overwriteSettings:!r})}),r&&(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(ke.BaseControl,{label:(0,we.__)("Select insurers to show","kind-site-framework"),children:u.map(t=>(0,_e.jsx)(ke.CheckboxControl,{label:t.label,checked:l.includes(t.key),onChange:e=>n({insurers:[...e?[t.key]:[],...l.filter(n=>t.key!==n)]})},t.key))}),(0,_e.jsx)(ke.TextareaControl,{value:o,label:(0,we.__)("Extra Insurers","kind-site-framework"),help:(0,we.__)("A list of extra insurers in format `https://logo.url|Name`. One insurer per line.","kind-site-framework"),onChange:t=>n({extraInsurers:t}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})]})}),(0,_e.jsx)(s,{...a,children:(0,_e.jsx)(Pe,{layout:e,style:i,insurers:c})})]})}})}},e={};function i(t){var r=e[t];if(void 0!==r)return r.exports;var o=e[t]={exports:{}};return n[t](o,o.exports,i),o.exports}i.m=n,t=[],i.O=(n,e,r,o)=>{if(!e){var s=1/0;for(l=0;l<t.length;l++){for(var[e,r,o]=t[l],a=!0,u=0;u<e.length;u++)(!1&o||s>=o)&&Object.keys(i.O).every(t=>i.O[t](e[u]))?e.splice(u--,1):(a=!1,o<s&&(s=o));if(a){t.splice(l--,1);var c=r();void 0!==c&&(n=c)}}return n}o=o||0;for(var l=t.length;l>0&&t[l-1][2]>o;l--)t[l]=t[l-1];t[l]=[e,r,o]},i.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return i.d(n,{a:n}),n},i.d=(t,n)=>{for(var e in n)i.o(n,e)&&!i.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:n[e]})},i.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),(()=>{var t={294:0,18:0};i.O.j=n=>0===t[n];var n=(n,e)=>{var r,o,[s,a,u]=e,c=0;if(s.some(n=>0!==t[n])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(u)var l=u(i)}for(n&&n(e);c<s.length;c++)o=s[c],i.o(t,o)&&t[o]&&t[o][0](),t[o]=0;return i.O(l)},e=globalThis.webpackChunkkind_site_framework=globalThis.webpackChunkkind_site_framework||[];e.forEach(n.bind(null,0)),e.push=n.bind(null,e.push.bind(e))})();var r=i.O(void 0,[18],()=>i(608));r=i.O(r)})(); -
kind-site-framework/trunk/build/blocks/insurers/render.php
r3473938 r3494876 25 25 26 26 if ( ! empty( $attributes['overwriteSettings'] ) ) { 27 $insurers = $insurers->filter( (array) ( $attributes['insurers'] ?? [] ) ); 27 $insurer_list = $insurers->filter( (array) ( $attributes['insurers'] ?? array() ) ) + 28 $insurers->get_extra( $attributes['extraInsurers'] ?? '' ); 28 29 } else { 29 $insurer s = $insurers->get_enabled();30 $insurer_list = $insurers->get_enabled() + $insurers->get_extra(); 30 31 } 31 32 … … 38 39 <div <?php echo wp_kses_data( $wrapper_attributes ) ?>> 39 40 <?php 40 foreach ( $insurer sas $insurer ) {41 foreach ( $insurer_list as $insurer ) { 41 42 ?> 42 43 <div> … … 56 57 <ul <?php echo wp_kses_data( $wrapper_attributes ) ?>> 57 58 <?php 58 foreach ( $insurer sas $insurer ) {59 foreach ( $insurer_list as $insurer ) { 59 60 ?> 60 61 <li><?php echo esc_html( $insurer['label'] ); ?></li> … … 75 76 <div class="splide__list"> 76 77 <?php 77 foreach ( $insurer sas $insurer ) {78 foreach ( $insurer_list as $insurer ) { 78 79 ?> 79 80 <div class="splide__slide"> -
kind-site-framework/trunk/build/scripts/editor-sidebar.asset.php
r3488298 r3494876 1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => ' 31028c04fd8809755d45');1 <?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins'), 'version' => 'c4223ad9e834696c25d2'); -
kind-site-framework/trunk/build/scripts/editor-sidebar.js
r3488298 r3494876 1 (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.components,o=window.wp.coreData,i=window.wp.data,a=window.wp.editor,l=window.wp.i18n,r=window.wp.plugins,s=window.wp.element,_=window.wp.apiFetch;var c=e.n(_);const x=window.ReactJSXRuntime, m=({value:e,onChange:o,label:i,placeholder:a})=>{const[r,_]=(0,s.useState)({});(0,t.useEffect)(()=>{e&&e.length&&c()({path:`/wp/v2/search?context=embed&include=${e.join(",")}`}).then(e=>{const t={};e.forEach(e=>{t[e.id]={value:e.id,label:e.title,link:e.link}}),_(t)})},[]);const[m,d]=(0,s.useState)(""),[u,p]=(0,s.useState)("");(0,t.useEffect)(()=>{const e=globalThis.setTimeout(()=>p(m),400);return()=>clearTimeout(e)},[m]);const[g,f]=(0,s.useState)([]),[k,h]=(0,s.useState)(!1);(0,t.useEffect)(()=>{u?(h(!0),c()({path:`/wp/v2/search?context=embed&search=${u}`}).then(e=>{const t=e.map(e=>({value:e.id,label:e.title,link:e.url}));f(t),h(!1)}).catch(()=>{f([]),h(!1)})):f([])},[u]);const w=(0,t.useCallback)(t=>{e.includes(t)||(o([...e,t]),_(e=>{const n={...e};for(let e=0;e<g.length;e++){const o=g[e];if(o.value===t){n[t]=o;break}}return n}))},[e,g]),C=(0,t.useCallback)(t=>{e.includes(t)&&(o(e.filter(e=>e!==t)),_(e=>{const{[t]:n,...o}=e;return o}))},[e]);return(0,x.jsxs)("div",{className:"ksf-select-posts-control components-base-control ",children:[(0,x.jsx)(n.ComboboxControl,{label:i||(0,l.__)("Search Posts","kind-site-framework"),options:g,value:null,onFilterValueChange:d,onChange:w,isLoading:k,expandOnFocus:!1,placeholder:a||(0,l.__)("Search posts by title","kind-site-framework"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,x.jsx)("div",{class:"ksf-selected-posts",children:e.map(e=>{const t=r[e];return t?(0,x.jsxs)("div",{class:"ksf-selected-post",children:[(0,x.jsx)("button",{type:"button",className:"components-button is-compact has-icon","aria-label":(0,l.__)("Remove","kind-site-framework"),onClick:()=>(C(e),!1),children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,x.jsx)("path",{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})}),(0,x.jsx)("a",{href:t.link,target:"_blank",children:t.label})]},e):null})})]})},d={homepage:(0,l.__)("Homepage","kind-site-framework"),blog:(0,l.__)("Blog Post","kind-site-framework"),clinic:(0,l.__)("Clinic / Location","kind-site-framework"),service:(0,l.__)("Service / Program","kind-site-framework"),team_member:(0,l.__)("Team Member","kind-site-framework"),team_directory:(0,l.__)("Team Directory","kind-site-framework")},u=Object.entries(d).map(([e,t])=>({value:e,label:t}));u.unshift({value:"",label:(0,l.__)("-Select-","kind-site-framework")}),(0,r.registerPlugin)("kind-site-framework",{render:()=>(0,x.jsx)(a.PluginSidebar,{name:"kind-site-framework",title:(0,l.__)("Kind Site Framework","kind-site-framework"),className:"kind-site-framework-sidebar",children:(0,x.jsx)(p,{})}),icon:(0,x.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M4.42992 1.48591C2.52336 3.46767 2.52336 6.70952 4.42992 8.69073L7.13333 11.5L4.42992 14.3093C2.52336 16.291 2.52336 19.5329 4.42992 21.5141C6.33701 23.4953 9.45669 23.4953 11.3633 21.5141L21 11.5L14.0667 4.29518L11.3633 1.48591C9.45669 -0.495304 6.33701 -0.495304 4.42992 1.48591Z",fill:"#AD1E4D"})})});const p=()=>{const e=(0,i.useSelect)(e=>e("core/editor").getCurrentPostType(),[]),[a,r]=(0,o.useEntityProp)("postType",e,"meta"),s=a&&a.kind_site_framework_structured_data||{},_=!!s.enable,c=s.type||"",d=s.name||"",p=s.url||"",g=s.description||"",f=s.image||"",k=s.clinic_phone||"",h=s.clinic_street||"",w=s.clinic_city||"",C=s.clinic_region||"",b=s.clinic_postal||"",j=s.clinic_country||"",v=void 0===s.clinic_lat?null:s.clinic_lat,y=void 0===s.clinic_lng?null:s.clinic_lng,S=s.clinic_mon_opens||"",D=s.clinic_mon_closes||"",T=s.clinic_tue_opens||"",M=s.clinic_tue_closes||"",B=s.clinic_wed_opens||"",N=s.clinic_wed_closes||"",z=s.clinic_thu_opens||"",H=s.clinic_thu_closes||"",P=s.clinic_fri_opens||"",L=s.clinic_fri_closes||"",R=s.clinic_sat_opens||"",F=s.clinic_sat_closes||"",O=s.clinic_sun_opens||"",A=s.clinic_sun_closes||"",E=s.service_area_served||"",U=s.team_member_job||"",q=s.team_directory_members||[],I=!!s.faq_enable,J=(0,t.useCallback)(e=>t=>{const n={...s};""===t?void 0!==n[e]&&delete n[e]:n[e]=t,r({...a,kind_site_framework_structured_data:{...n}})},[a,r,s]);return(0,x.jsxs)(n.PanelBody,{title:"Structured Data",initialOpen:!0,children:[(0,x.jsx)(n.ToggleControl,{checked:_,label:(0,l.__)("Enable structured data","kind-site-framework"),onChange:()=>J("enable")(!_),__nextHasNoMarginBottom:!0}),_&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.SelectControl,{label:(0,l.__)("Page Type","kind-site-framework"),value:c,options:u,onChange:J("type"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),!!c&&(0,x.jsxs)(x.Fragment,{children:["homepage"!==c&&"blog"!==c&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{value:d,label:(0,l.__)("Name","kind-site-framework"),help:(0,l.__)("Defaults to post title.","kind-site-framework"),onChange:J("name"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"url",value:p,label:(0,l.__)("URL","kind-site-framework"),help:(0,l.__)("Defaults to post URL.","kind-site-framework"),onChange:J("url"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextareaControl,{value:g,label:(0,l.__)("Description","kind-site-framework"),help:(0,l.__)("Defaults to post excerpt.","kind-site-framework"),onChange:J("description"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:f,label:(0,l.__)("Image URL","kind-site-framework"),help:(0,l.__)("Defaults to post featured image.","kind-site-framework"),onChange:J("image"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),"clinic"===c&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{type:"tel",value:k,label:(0,l.__)("Clinic Phone","kind-site-framework"),placeholder:(0,l.__)("e.g. +13057682053","kind-site-framework"),help:(0,l.__)("Phone number in the international format. Defaults to Organization phone.","kind-site-framework"),onChange:J("clinic_phone"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:h,label:(0,l.__)("Clinic Street Address","kind-site-framework"),onChange:J("clinic_street"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:w,label:(0,l.__)("Clinic City","kind-site-framework"),onChange:J("clinic_city"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:C,label:(0,l.__)("Clinic Region","kind-site-framework"),help:(0,l.__)("Defaults to Organization region.","kind-site-framework"),onChange:J("clinic_region"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:b,label:(0,l.__)("Clinic Postal Code","kind-site-framework"),onChange:J("clinic_postal"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:j,label:(0,l.__)("Clinic Country Code","kind-site-framework"),placeholder:(0,l.__)("e.g. “US” or “CA”","kind-site-framework"),help:(0,l.__)("Two-character country code. Defaults to Organization country.","kind-site-framework"),onChange:J("clinic_country"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"number",value:v,label:(0,l.__)("Clinic Latitude","kind-site-framework"),step:1e-5,min:-90,max:90,onChange:J("clinic_lat"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"number",value:y,label:(0,l.__)("Clinic Longitude","kind-site-framework"),step:1e-5,min:-180,max:180,onChange:J("clinic_lng"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)("div",{className:"editor-post-content-information",style:{marginBottom:"16px"},children:(0,l.__)("In the next fields, set clinic opening hours for each day of the week.","kind-site-framework")}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:S,label:(0,l.__)("Monday","kind-site-framework"),onChange:J("clinic_mon_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:D,label:" ",onChange:J("clinic_mon_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:T,label:(0,l.__)("Tuesday","kind-site-framework"),onChange:J("clinic_tue_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:M,label:" ",onChange:J("clinic_tue_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:B,label:(0,l.__)("Wednesday","kind-site-framework"),onChange:J("clinic_wed_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:N,label:" ",onChange:J("clinic_wed_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:z,label:(0,l.__)("Thursday","kind-site-framework"),onChange:J("clinic_thu_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:H,label:" ",onChange:J("clinic_thu_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:P,label:(0,l.__)("Friday","kind-site-framework"),onChange:J("clinic_fri_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:L,label:" ",onChange:J("clinic_fri_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:R,label:(0,l.__)("Saturday","kind-site-framework"),onChange:J("clinic_sat_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:F,label:" ",onChange:J("clinic_sat_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:O,label:(0,l.__)("Sunday","kind-site-framework"),onChange:J("clinic_sun_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:A,label:" ",onChange:J("clinic_sun_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})]}),"service"===c&&(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(n.TextControl,{value:E,label:(0,l.__)("Area Served","kind-site-framework"),placeholder:(0,l.__)("e.g. “California” or “Orange County, CA”","kind-site-framework"),onChange:J("service_area_served"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),"team_member"===c&&(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(n.TextControl,{value:U,label:(0,l.__)("Job Title","kind-site-framework"),onChange:J("team_member_job"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),"team_directory"===c&&(0,x.jsx)(m,{value:q,onChange:J("team_directory_members"),label:(0,l.__)("Team Members","kind-site-framework")})]})]}),(0,x.jsx)(n.ToggleControl,{checked:I,label:(0,l.__)("Enable FAQ schema","kind-site-framework"),help:(0,l.__)("Also check Kind Site Framework Settings: Structured Data > FAQ.","kind-site-framework"),onChange:()=>J("faq_enable")(!I),__nextHasNoMarginBottom:!0})]})}})();1 (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,n=window.wp.components,o=window.wp.coreData,i=window.wp.data,a=window.wp.editor,l=window.wp.i18n,r=window.wp.plugins,s=window.wp.element,_=window.wp.apiFetch;var c=e.n(_);const x=window.ReactJSXRuntime,d=({value:e,onChange:o,label:i,placeholder:a})=>{const[r,_]=(0,s.useState)({});(0,t.useEffect)(()=>{e&&e.length&&c()({path:`/wp/v2/search?context=embed&include=${e.join(",")}`}).then(e=>{const t={};e.forEach(e=>{t[e.id]={value:e.id,label:e.title,link:e.link}}),_(t)})},[]);const[d,m]=(0,s.useState)(""),[u,p]=(0,s.useState)("");(0,t.useEffect)(()=>{const e=globalThis.setTimeout(()=>p(d),400);return()=>clearTimeout(e)},[d]);const[k,g]=(0,s.useState)([]),[f,h]=(0,s.useState)(!1);(0,t.useEffect)(()=>{u?(h(!0),c()({path:`/wp/v2/search?context=embed&search=${u}`}).then(e=>{const t=e.map(e=>({value:e.id,label:e.title,link:e.url}));g(t),h(!1)}).catch(()=>{g([]),h(!1)})):g([])},[u]);const w=(0,t.useCallback)(t=>{e.includes(t)||(o([...e,t]),_(e=>{const n={...e};for(let e=0;e<k.length;e++){const o=k[e];if(o.value===t){n[t]=o;break}}return n}))},[e,k]),C=(0,t.useCallback)(t=>{e.includes(t)&&(o(e.filter(e=>e!==t)),_(e=>{const{[t]:n,...o}=e;return o}))},[e]);return(0,x.jsxs)("div",{className:"ksf-select-posts-control components-base-control ",children:[(0,x.jsx)(n.ComboboxControl,{label:i||(0,l.__)("Search Posts","kind-site-framework"),options:k,value:null,onFilterValueChange:m,onChange:w,isLoading:f,expandOnFocus:!1,placeholder:a||(0,l.__)("Search posts by title","kind-site-framework"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,x.jsx)("div",{class:"ksf-selected-posts",children:e.map(e=>{const t=r[e];return t?(0,x.jsxs)("div",{class:"ksf-selected-post",children:[(0,x.jsx)("button",{type:"button",className:"components-button is-compact has-icon","aria-label":(0,l.__)("Remove","kind-site-framework"),onClick:()=>(C(e),!1),children:(0,x.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",children:(0,x.jsx)("path",{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})})}),(0,x.jsx)("a",{href:t.link,target:"_blank",children:t.label})]},e):null})})]})},m={homepage:(0,l.__)("Homepage","kind-site-framework"),blog:(0,l.__)("Blog Post","kind-site-framework"),clinic:(0,l.__)("Clinic / Location","kind-site-framework"),service:(0,l.__)("Service / Program","kind-site-framework"),team_member:(0,l.__)("Team Member","kind-site-framework"),team_directory:(0,l.__)("Team Directory","kind-site-framework")},u=Object.entries(m).map(([e,t])=>({value:e,label:t}));u.unshift({value:"",label:(0,l.__)("-Select-","kind-site-framework")}),(0,r.registerPlugin)("kind-site-framework",{render:()=>(0,x.jsxs)(a.PluginSidebar,{name:"kind-site-framework",title:(0,l.__)("Kind Site Framework","kind-site-framework"),className:"kind-site-framework-sidebar",children:[(0,x.jsx)(p,{}),(0,x.jsx)(k,{})]}),icon:(0,x.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,x.jsx)("path",{d:"M4.42992 1.48591C2.52336 3.46767 2.52336 6.70952 4.42992 8.69073L7.13333 11.5L4.42992 14.3093C2.52336 16.291 2.52336 19.5329 4.42992 21.5141C6.33701 23.4953 9.45669 23.4953 11.3633 21.5141L21 11.5L14.0667 4.29518L11.3633 1.48591C9.45669 -0.495304 6.33701 -0.495304 4.42992 1.48591Z",fill:"#AD1E4D"})})});const p=()=>{const e=(0,i.useSelect)(e=>{const{getCurrentPostType:t}=e("core/editor");return t()},[]),[a,r]=(0,o.useEntityProp)("postType",e,"meta"),s=(0,i.useSelect)(e=>{const{getEntityRecord:t}=e("core");return t("root","site")?.kind_site_framework_structured_data||{}},[]),_=a&&a.kind_site_framework_structured_data||{},c=!!_.enable,m=_.type||"",p=_.name||"",k=_.url||"",g=_.description||"",f=_.image||"",h=_.clinic_phone||"",w=_.clinic_street||"",C=_.clinic_city||"",b=_.clinic_region||"",v=_.clinic_postal||"",j=_.clinic_country||"",y=void 0===_.clinic_lat?null:_.clinic_lat,S=void 0===_.clinic_lng?null:_.clinic_lng,D=_.clinic_mon_opens||"",T=_.clinic_mon_closes||"",B=_.clinic_tue_opens||"",M=_.clinic_tue_closes||"",z=_.clinic_wed_opens||"",N=_.clinic_wed_closes||"",H=_.clinic_thu_opens||"",P=_.clinic_thu_closes||"",L=_.clinic_fri_opens||"",O=_.clinic_fri_closes||"",R=_.clinic_sat_opens||"",F=_.clinic_sat_closes||"",E=_.clinic_sun_opens||"",A=_.clinic_sun_closes||"",U=_.service_area_served||"",I=_.service_services||[],K=_.service_treatments||[],q=_.team_member_job||"",J=_.team_directory_members||[],Q=!!_.org_enable,$=!!_.faq_enable,V=(0,t.useCallback)(e=>t=>{const n={..._};""===t?void 0!==n[e]&&delete n[e]:n[e]=t,r({...a,kind_site_framework_structured_data:{...n}})},[a,r,_]);return(0,x.jsxs)(n.PanelBody,{title:"Structured Data",initialOpen:!0,children:[(0,x.jsx)(n.ToggleControl,{checked:c,label:(0,l.__)("Enable structured data","kind-site-framework"),onChange:()=>V("enable")(!c),__nextHasNoMarginBottom:!0}),!c&&"post"===e&&s.auto_blog&&(0,x.jsx)(n.__experimentalSpacer,{marginBottom:4,children:(0,x.jsx)(n.Card,{size:"small",children:(0,x.jsx)(n.CardBody,{children:(0,x.jsx)(n.__experimentalText,{children:"BlogPosting schema will be automatically added to this post due to the global settings."})})})}),c&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.SelectControl,{label:(0,l.__)("Page Type","kind-site-framework"),value:m,options:u,onChange:V("type"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),!!m&&(0,x.jsxs)(x.Fragment,{children:["homepage"!==m&&"blog"!==m&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{value:p,label:(0,l.__)("Name","kind-site-framework"),help:(0,l.__)("Defaults to post title.","kind-site-framework"),onChange:V("name"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"url",value:k,label:(0,l.__)("URL","kind-site-framework"),help:(0,l.__)("Defaults to post URL.","kind-site-framework"),onChange:V("url"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextareaControl,{value:g,label:(0,l.__)("Description","kind-site-framework"),help:(0,l.__)("Defaults to post excerpt.","kind-site-framework"),onChange:V("description"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:f,label:(0,l.__)("Image URL","kind-site-framework"),help:(0,l.__)("Defaults to post featured image.","kind-site-framework"),onChange:V("image"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),"clinic"===m&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{type:"tel",value:h,label:(0,l.__)("Clinic Phone","kind-site-framework"),placeholder:(0,l.__)("e.g. +13057682053","kind-site-framework"),help:(0,l.__)("Phone number in the international format. Defaults to Organization phone.","kind-site-framework"),onChange:V("clinic_phone"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:w,label:(0,l.__)("Clinic Street Address","kind-site-framework"),onChange:V("clinic_street"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:C,label:(0,l.__)("Clinic City","kind-site-framework"),onChange:V("clinic_city"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:b,label:(0,l.__)("Clinic Region","kind-site-framework"),help:(0,l.__)("Defaults to Organization region.","kind-site-framework"),onChange:V("clinic_region"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:v,label:(0,l.__)("Clinic Postal Code","kind-site-framework"),onChange:V("clinic_postal"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{value:j,label:(0,l.__)("Clinic Country Code","kind-site-framework"),placeholder:(0,l.__)("e.g. “US” or “CA”","kind-site-framework"),help:(0,l.__)("Two-character country code. Defaults to Organization country.","kind-site-framework"),onChange:V("clinic_country"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"number",value:y,label:(0,l.__)("Clinic Latitude","kind-site-framework"),step:1e-5,min:-90,max:90,onChange:V("clinic_lat"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"number",value:S,label:(0,l.__)("Clinic Longitude","kind-site-framework"),step:1e-5,min:-180,max:180,onChange:V("clinic_lng"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)("div",{className:"editor-post-content-information",style:{marginBottom:"16px"},children:(0,l.__)("In the next fields, set clinic opening hours for each day of the week.","kind-site-framework")}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:D,label:(0,l.__)("Monday","kind-site-framework"),onChange:V("clinic_mon_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:T,label:" ",onChange:V("clinic_mon_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:B,label:(0,l.__)("Tuesday","kind-site-framework"),onChange:V("clinic_tue_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:M,label:" ",onChange:V("clinic_tue_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:z,label:(0,l.__)("Wednesday","kind-site-framework"),onChange:V("clinic_wed_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:N,label:" ",onChange:V("clinic_wed_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:H,label:(0,l.__)("Thursday","kind-site-framework"),onChange:V("clinic_thu_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:P,label:" ",onChange:V("clinic_thu_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:L,label:(0,l.__)("Friday","kind-site-framework"),onChange:V("clinic_fri_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:O,label:" ",onChange:V("clinic_fri_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:R,label:(0,l.__)("Saturday","kind-site-framework"),onChange:V("clinic_sat_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:F,label:" ",onChange:V("clinic_sat_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]}),(0,x.jsxs)(n.PanelRow,{children:[(0,x.jsx)(n.TextControl,{type:"time",value:E,label:(0,l.__)("Sunday","kind-site-framework"),onChange:V("clinic_sun_opens"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextControl,{type:"time",value:A,label:" ",onChange:V("clinic_sun_closes"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})]}),"service"===m&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.TextControl,{value:U,label:(0,l.__)("Area Served","kind-site-framework"),placeholder:(0,l.__)("e.g. “California” or “Orange County, CA”","kind-site-framework"),help:(0,l.__)("Defaults to Organization region.","kind-site-framework"),onChange:V("service_area_served"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(d,{value:I,onChange:V("service_services"),label:(0,l.__)("Supporting Services","kind-site-framework")}),(0,x.jsx)(d,{value:K,onChange:V("service_treatments"),label:(0,l.__)("Treatment Modalities","kind-site-framework")})]}),"team_member"===m&&(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(n.TextControl,{value:q,label:(0,l.__)("Job Title","kind-site-framework"),onChange:V("team_member_job"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),"team_directory"===m&&(0,x.jsx)(d,{value:J,onChange:V("team_directory_members"),label:(0,l.__)("Team Members","kind-site-framework")})]})]}),(0,x.jsx)(n.ToggleControl,{checked:Q,label:(0,l.__)("Enable Organization schema","kind-site-framework"),help:(0,l.__)("Also check Kind Site Framework Settings: Structured Data > Organization.","kind-site-framework"),onChange:()=>V("org_enable")(!Q),__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.ToggleControl,{checked:$,label:(0,l.__)("Enable FAQ schema","kind-site-framework"),help:(0,l.__)("Also check Kind Site Framework Settings: Structured Data > FAQ.","kind-site-framework"),onChange:()=>V("faq_enable")(!$),__nextHasNoMarginBottom:!0})]})},k=()=>{const e=(0,i.useSelect)(e=>{const{getCurrentPostType:t}=e("core/editor");return t()},[]),[a,r]=(0,o.useEntityProp)("postType",e,"meta"),s=a&&a.kind_site_framework_seo||{},_=s.scripts_defer||"",c=s.scripts_postpone||"",d=(0,t.useCallback)(e=>t=>{const n={...s};""===t?void 0!==n[e]&&delete n[e]:n[e]=t,r({...a,kind_site_framework_seo:{...n}})},[a,r,s]);return(0,x.jsxs)(n.PanelBody,{title:"SEO",initialOpen:!0,children:[(0,x.jsx)(n.TextareaControl,{value:_,label:(0,l.__)("Scripts to Defer","kind-site-framework"),help:(0,l.__)("List of keys (IDs or sources) of scripts to defer on this page. Use symbol * as a wildcard prefix and/or suffix. One key per line.","kind-site-framework"),onChange:d("scripts_defer"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,x.jsx)(n.TextareaControl,{value:c,label:(0,l.__)("Scripts to Postpone","kind-site-framework"),help:(0,l.__)("List keys (IDs or sources) of scripts to postpone on this page. Use symbol * as a wildcard prefix and/or suffix. One key per line.","kind-site-framework"),onChange:d("scripts_postpone"),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})]})}})(); -
kind-site-framework/trunk/includes/class-assets.php
r3488298 r3494876 30 30 31 31 /** 32 * KSF data service. 33 * 34 * @since 1.3.0 35 * 36 * @var \Kind_Site_Framework\Data_Interface 37 */ 38 protected Data_Interface $data; 39 40 /** 32 41 * KSF helpers service. 33 42 * … … 64 73 * Constructs a new container instance. 65 74 * 75 * @param \Kind_Site_Framework\Data_Interface $data KSF data service. 66 76 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers service. 67 77 * @param \Kind_Site_Framework\Insurers_Interface $insurers KSF insurers service. … … 72 82 */ 73 83 public function __construct( 84 Data_Interface $data, 74 85 Helpers_Interface $helpers, 75 86 Insurers_Interface $insurers, … … 77 88 Settings_Interface $settings 78 89 ) { 90 $this->data = $data; 79 91 $this->helpers = $helpers; 80 92 $this->insurers = $insurers; … … 89 101 /** @noinspection PhpParamsInspection */ 90 102 return new static( 103 $container->get( 'data' ), 91 104 $container->get( 'helpers' ), 92 105 $container->get( 'insurers' ), … … 129 142 130 143 // Add insurers to the "Insurers" block. 131 $all_insurers = wp_json_encode( array_values( $this-> insurers->get_all() ) );144 $all_insurers = wp_json_encode( array_values( $this->data->get_insurers() ) ); 132 145 $enabled_insurers = wp_json_encode( array_values( $this->insurers->get_enabled() ) ); 146 $extra_insurers = wp_json_encode( array_values( $this->insurers->get_extra() ) ); 133 147 wp_add_inline_script( 134 148 $this->get_asset_handle( 'insurers-editor' ), 135 149 "var ksfAllInsurers = $all_insurers;\n" . 136 "var ksfEnabledInsurers = $enabled_insurers;", 150 "var ksfEnabledInsurers = $enabled_insurers;" . 151 "var ksfExtraInsurers = $extra_insurers;", 137 152 'before' 138 153 ); … … 236 251 */ 237 252 public function optimize_html_scripts( string $html ): string { 238 // Defer scripts. 239 $scripts_to_defer = $this->settings->get_setting( 253 // Page-wide scripts to defer and postpone. 254 $page_scripts_defer = $page_scripts_postpone = ''; 255 if ( $post_id = get_the_ID() ) { 256 $seo_options = $this->post_meta->get_seo_options( $post_id ); 257 if ( ! empty( $seo_options ) ) { 258 $page_scripts_defer = $seo_options[ Post_Meta_Interface::SEO_SCRIPTS_DEFER ] ?? ''; 259 $page_scripts_postpone = $seo_options[ Post_Meta_Interface::SEO_SCRIPTS_POSTPONE ] ?? ''; 260 } 261 } 262 263 // Sitewide scripts to defer and postpone. 264 $global_scripts_defer = $this->settings->get_setting( 240 265 Settings_Interface::CONTENT, 241 266 Settings_Interface::CONTENT_SCRIPTS_DEFER, 242 267 ); 243 if ( $scripts_to_defer ) { 268 $global_scripts_postpone = $this->settings->get_setting( 269 Settings_Interface::CONTENT, 270 Settings_Interface::CONTENT_SCRIPTS_POSTPONE 271 ); 272 273 // Do defer scripts. 274 if ( $page_scripts_defer || $global_scripts_defer ) { 244 275 $html = $this->defer_html_scripts( 245 276 $html, 246 $this->helpers->split_string_into_rows( $scripts_to_defer ) 277 array_merge( 278 $this->helpers->split_string_into_rows( $global_scripts_defer ), 279 $this->helpers->split_string_into_rows( $page_scripts_defer ) 280 ) 247 281 ); 248 282 } 249 283 250 // Postpone scripts. 251 $scripts_to_postpone = $this->settings->get_setting( 252 Settings_Interface::CONTENT, 253 Settings_Interface::CONTENT_SCRIPTS_POSTPONE 254 ); 255 if ( $scripts_to_postpone ) { 284 // Do postpone scripts. 285 if ( $page_scripts_postpone || $global_scripts_postpone ) { 256 286 $html = $this->postpone_html_scripts( 257 287 $html, 258 $this->helpers->split_string_into_rows( $scripts_to_postpone ), 288 array_merge( 289 $this->helpers->split_string_into_rows( $global_scripts_postpone ), 290 $this->helpers->split_string_into_rows( $page_scripts_postpone ) 291 ) 259 292 ); 260 293 } -
kind-site-framework/trunk/includes/class-blocks.php
r3488298 r3494876 47 47 } 48 48 } 49 50 49 } 51 50 -
kind-site-framework/trunk/includes/class-helpers.php
r3488298 r3494876 71 71 * @inheritDoc 72 72 */ 73 public function get_file_content( string $name, string $type = 'template' ): string { 74 $path = KIND_SITE_FRAMEWORK_PATH . "{$type}s/$name.php"; 73 public function get_file_content( string $path ): string { 75 74 if ( file_exists( $path ) ) { 76 75 ob_start(); … … 187 186 } 188 187 188 /** 189 * @inheritDoc 190 */ 191 public function parse_key_value_list( 192 string $list, 193 string $delimiter = '|', 194 callable $key_sanitizer = NULL, 195 callable $value_sanitizer = NULL 196 ): array { 197 if ( ! isset( $key_sanitizer ) ) { 198 $key_sanitizer = 'sanitize_text_field'; 199 } 200 if ( ! isset( $value_sanitizer ) ) { 201 $value_sanitizer = 'sanitize_text_field'; 202 } 203 204 $items = array(); 205 foreach ( $this->split_string_into_rows( $list ) as $row ) { 206 $parts = explode( $delimiter, $row ); 207 if ( count( $parts ) !== 2 ) { 208 continue; 209 } 210 if ( $key = $key_sanitizer( $parts[0] ) ) { 211 $items[ $key ] = $value_sanitizer( $parts[1] ); 212 } 213 } 214 215 return $items; 216 } 217 189 218 } -
kind-site-framework/trunk/includes/class-insurers.php
r3488298 r3494876 16 16 17 17 /** 18 * @inheritDoc 18 * KSF data service. 19 * 20 * @since 1.3.0 21 * 22 * @var \Kind_Site_Framework\Data_Interface 19 23 */ 20 public static function create( Container_Interface $container ): self { 21 return new static(); 24 protected Data_Interface $data; 25 26 /** 27 * KSF helpers service. 28 * 29 * @sinc 1.3.0 30 * 31 * @var \Kind_Site_Framework\Helpers_Interface 32 */ 33 protected Helpers_Interface $helpers; 34 35 /** 36 * KSF settings service. 37 * 38 * @since 1.3.0 39 * 40 * @var \Kind_Site_Framework\Settings_Interface 41 */ 42 protected Settings_Interface $settings; 43 44 /** 45 * Constructs a new service instance. 46 * 47 * @param \Kind_Site_Framework\Data_Interface $data KSF data service. 48 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers service. 49 * @param \Kind_Site_Framework\Settings_Interface $settings KSF settings service. 50 */ 51 public function __construct( 52 Data_Interface $data, 53 Helpers_Interface $helpers, 54 Settings_Interface $settings 55 ) { 56 $this->data = $data; 57 $this->helpers = $helpers; 58 $this->settings = $settings; 22 59 } 23 60 … … 25 62 * @inheritDoc 26 63 */ 27 public function get_all(): array { 28 return array( 29 'aetna' => array( 30 'key' => 'aetna', 31 'label' => __( 'Aetna', 'kind-site-framework' ), 32 'alt' => __( 'Aetna', 'kind-site-framework' ), 33 'urls' => array( 34 'colored' => $this->get_url( 'aetna.webp' ), 35 ), 36 ), 37 'anthem' => array( 38 'key' => 'anthem', 39 'label' => __( 'Anthem', 'kind-site-framework' ), 40 'alt' => __( 'Anthem', 'kind-site-framework' ), 41 'urls' => array( 42 'colored' => $this->get_url( 'anthem.webp' ), 43 ), 44 ), 45 'bcbs' => array( 46 'key' => 'bcbs', 47 'label' => __( 'Blue Cross Blue Shield', 'kind-site-framework' ), 48 'alt' => __( 'Blue Cross Blue Shield', 'kind-site-framework' ), 49 'urls' => array( 50 'colored' => $this->get_url( 'bcbs.webp' ), 51 ), 52 ), 53 'carefirst' => array( 54 'key' => 'carefirst', 55 'label' => __( 'CareFirst', 'kind-site-framework' ), 56 'alt' => __( 'CareFirst', 'kind-site-framework' ), 57 'urls' => array( 58 'colored' => $this->get_url( 'carefirst.png' ), 59 ), 60 ), 61 'carelon' => array( 62 'key' => 'carelon', 63 'label' => __( 'Carelon', 'kind-site-framework' ), 64 'alt' => __( 'Carelon', 'kind-site-framework' ), 65 'urls' => array( 66 'colored' => $this->get_url( 'carelon.webp' ), 67 ), 68 ), 69 'cigna' => array( 70 'key' => 'cigna', 71 'label' => __( 'Cigna', 'kind-site-framework' ), 72 'alt' => __( 'Cigna', 'kind-site-framework' ), 73 'urls' => array( 74 'colored' => $this->get_url( 'cigna.png' ), 75 ), 76 ), 77 'compsych' => array( 78 'key' => 'compsych', 79 'label' => __( 'ComPsych', 'kind-site-framework' ), 80 'alt' => __( 'ComPsych', 'kind-site-framework' ), 81 'urls' => array( 82 'colored' => $this->get_url( 'compsych.png' ), 83 ), 84 ), 85 'geha' => array( 86 'key' => 'geha', 87 'label' => __( 'GEHA', 'kind-site-framework' ), 88 'alt' => __( 'GEHA', 'kind-site-framework' ), 89 'urls' => array( 90 'colored' => $this->get_url( 'geha.png' ), 91 ), 92 ), 93 'humana' => array( 94 'key' => 'humana', 95 'label' => __( 'Humana', 'kind-site-framework' ), 96 'alt' => __( 'Humana', 'kind-site-framework' ), 97 'urls' => array( 98 'colored' => $this->get_url( 'humana.png' ), 99 ), 100 ), 101 'kaiser' => array( 102 'key' => 'kaiser', 103 'label' => __( 'Kaiser Permanente', 'kind-site-framework' ), 104 'alt' => __( 'Kaiser Permanente', 'kind-site-framework' ), 105 'urls' => array( 106 'colored' => $this->get_url( 'kaiser.png' ), 107 ), 108 ), 109 'magellan' => array( 110 'key' => 'magellan', 111 'label' => __( 'Magellan Health', 'kind-site-framework' ), 112 'alt' => __( 'Magellan Health', 'kind-site-framework' ), 113 'urls' => array( 114 'colored' => $this->get_url( 'magellan.png' ), 115 ), 116 ), 117 'multiplan' => array( 118 'key' => 'multiplan', 119 'label' => __( 'MultiPlan', 'kind-site-framework' ), 120 'alt' => __( 'MultiPlan', 'kind-site-framework' ), 121 'urls' => array( 122 'colored' => $this->get_url( 'multiplan.png' ), 123 ), 124 ), 125 'optum' => array( 126 'key' => 'optum', 127 'label' => __( 'Optum', 'kind-site-framework' ), 128 'alt' => __( 'Optum', 'kind-site-framework' ), 129 'urls' => array( 130 'colored' => $this->get_url( 'optum.webp' ), 131 ), 132 ), 133 'tricare' => array( 134 'key' => 'tricare', 135 'label' => __( 'TRICARE', 'kind-site-framework' ), 136 'alt' => __( 'TRICARE', 'kind-site-framework' ), 137 'urls' => array( 138 'colored' => $this->get_url( 'tricare.png' ), 139 ), 140 ), 141 'unitedhealthcare' => array( 142 'key' => 'unitedhealthcare', 143 'label' => __( 'United Healthcare', 'kind-site-framework' ), 144 'alt' => __( 'United Healthcare', 'kind-site-framework' ), 145 'urls' => array( 146 'colored' => $this->get_url( 'unitedhealthcare.png' ), 147 ), 148 ), 149 'molinahealthcare' => array( 150 'key' => 'molinahealthcare', 151 'label' => __( 'Molina Healthcare', 'kind-site-framework' ), 152 'alt' => __( 'Molina Healthcare', 'kind-site-framework' ), 153 'urls' => array( 154 'colored' => $this->get_url( 'molinahealthcare.svg' ), 155 ), 156 ), 157 'wellcare' => array( 158 'key' => 'wellcare', 159 'label' => __( 'Wellcare', 'kind-site-framework' ), 160 'alt' => __( 'Wellcare', 'kind-site-framework' ), 161 'urls' => array( 162 'colored' => $this->get_url( 'wellcare.svg' ), 163 ), 164 ), 165 'healthnet' => array( 166 'key' => 'healthnet', 167 'label' => __( 'Health Net', 'kind-site-framework' ), 168 'alt' => __( 'Health Net', 'kind-site-framework' ), 169 'urls' => array( 170 'colored' => $this->get_url( 'healthnet.png' ), 171 ), 172 ), 173 'highmark' => array( 174 'key' => 'healthnet', 175 'label' => __( 'Highmark', 'kind-site-framework' ), 176 'alt' => __( 'Highmark', 'kind-site-framework' ), 177 'urls' => array( 178 'colored' => $this->get_url( 'highmark.svg' ), 179 ), 180 ), 181 'independence' => array( 182 'key' => 'healthnet', 183 'label' => __( 'Independence Blue Cross', 'kind-site-framework' ), 184 'alt' => __( 'Independence Blue Cross', 'kind-site-framework' ), 185 'urls' => array( 186 'colored' => $this->get_url( 'independence.svg' ), 187 ), 188 ), 64 public static function create( Container_Interface $container ): self { 65 /** @noinspection PhpParamsInspection */ 66 return new static( 67 $container->get( 'data' ), 68 $container->get( 'helpers' ), 69 $container->get( 'settings' ) 189 70 ); 190 71 } … … 194 75 */ 195 76 public function get_enabled(): array { 196 $enabled = array(); 197 if ( $options = get_option( Settings_Interface::CONTENT ) ) { 198 $enabled = $options[ Settings_Interface::CONTENT_INSURANCE_INSURERS ] ?? array(); 199 } 77 $enabled = $this->settings->get_setting( Settings_Interface::CONTENT, Settings_Interface::CONTENT_INSURANCE_INSURERS, array() ); 200 78 return array_intersect_key( 201 $this-> get_all(),79 $this->data->get_insurers(), 202 80 $enabled, 203 81 ); … … 209 87 public function filter( array $keys ): array { 210 88 return array_filter( 211 $this-> get_all(),89 $this->data->get_insurers(), 212 90 fn( $key ) => in_array( $key, $keys ), 213 91 ARRAY_FILTER_USE_KEY … … 216 94 217 95 /** 218 * Returns insurer image URL. 219 * 220 * @param string $filename Image filename. 221 * @param string $style Optional. Image style. Defaults to "colored". 222 * @return string Insurer image URL. 223 * @since 1.1.0 96 * @inheritDoc 224 97 */ 225 protected function get_url( string $filename, string $style = 'colored' ): string { 226 return KIND_SITE_FRAMEWORK_URL . "media/insurance/$style/$filename"; 98 public function get_extra( ?string $list = NULL ): array { 99 $result = array(); 100 if ( ! isset( $list ) ) { 101 $list = $this->settings->get_setting( 102 Settings_Interface::CONTENT, 103 Settings_Interface::CONTENT_INSURANCE_EXTRA, 104 array() 105 ); 106 } 107 if ( ! empty( $list ) ) { 108 $items = $this->helpers->parse_key_value_list( $list, '|', 'esc_url', 'esc_attr' ); 109 foreach ( $items as $key => $value ) { 110 $result[ $key ] = array( 111 'key' => $key, 112 'label' => $value, 113 'alt' => $value, 114 'urls' => array( 115 'colored' => $key, 116 ), 117 ); 118 } 119 } 120 return $result; 227 121 } 228 122 -
kind-site-framework/trunk/includes/class-plugin.php
r3488298 r3494876 4 4 5 5 use WP_Block_Editor_Context; 6 use WP_Post; 6 7 7 8 if ( ! defined( 'ABSPATH' ) ) { … … 215 216 * @inheritDoc 216 217 */ 218 public function add_meta_boxes(): void { 219 $this->post_meta->add_meta_box(); 220 } 221 222 /** 223 * @inheritDoc 224 */ 225 public function save_post( int $post_id, WP_Post $post): void { 226 // Hook save_post to handle meta box submission. 227 $this->post_meta->save_meta_box( $post_id, $post ); 228 } 229 230 /** 231 * @inheritDoc 232 */ 217 233 public function wp_head(): void { 218 234 if ( is_singular() ) { -
kind-site-framework/trunk/includes/class-post-meta.php
r3488298 r3494876 2 2 3 3 namespace Kind_Site_Framework; 4 5 use WP_Post; 4 6 5 7 if ( ! defined( 'ABSPATH' ) ) { … … 26 28 * Structured data cache. 27 29 * 30 * @since 1.2.0 31 * 28 32 * @var array 29 33 */ 30 34 private array $structured_data; 35 36 /** 37 * SEO options cache. 38 * 39 * @since 1.3.0 40 * 41 * @var array 42 */ 43 private array $seo_options; 31 44 32 45 /** … … 39 52 40 53 $this->structured_data = array(); 54 $this->seo_options = array(); 41 55 } 42 56 … … 151 165 'type' => 'string', 152 166 ), 167 self::STRUCTURED_DATA_SERVICE_SERVICES => array( 168 'type' => 'array', 169 'items' => array( 170 'type' => 'number', 171 ), 172 ), 173 self::STRUCTURED_DATA_SERVICE_TREATMENTS => array( 174 'type' => 'array', 175 'items' => array( 176 'type' => 'number', 177 ), 178 ), 153 179 self::STRUCTURED_DATA_TEAM_MEMBER_JOB => array( 154 180 'type' => 'string', … … 159 185 'type' => 'number', 160 186 ), 187 ), 188 self::STRUCTURED_DATA_ORG_ENABLE => array( 189 'type' => 'boolean', 161 190 ), 162 191 self::STRUCTURED_DATA_FAQ_ENABLE => array( … … 175 204 ) 176 205 ); 206 207 // SEO meta field is an associative array. 208 register_post_meta( 209 '', 210 self::SEO, 211 array( 212 'show_in_rest' => array( 213 'schema' => array( 214 'type' => 'object', 215 'properties' => array( 216 self::SEO_SCRIPTS_DEFER => array( 217 'type' => 'string', 218 ), 219 self::SEO_SCRIPTS_POSTPONE => array( 220 'type' => 'string', 221 ), 222 ), 223 ), 224 ), 225 'type' => 'object', 226 'single' => TRUE, 227 'sanitize_callback' => array( $this, 'sanitize_seo_field' ), 228 'label' => __( "SEO", 'kind-site-framework' ), 229 'auth_callback' => function() { 230 return current_user_can( 'edit_posts' ); 231 } 232 ) 233 ); 177 234 } 178 235 … … 188 245 switch ( $key ) { 189 246 case self::STRUCTURED_DATA_ENABLE: 247 case self::STRUCTURED_DATA_ORG_ENABLE: 190 248 case self::STRUCTURED_DATA_FAQ_ENABLE: 191 249 $data[ $key ] = (bool) $value; … … 201 259 break; 202 260 261 case self::STRUCTURED_DATA_SERVICE_SERVICES: 262 case self::STRUCTURED_DATA_SERVICE_TREATMENTS: 203 263 case self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS: 204 264 $data[ $key ] = (array) $value; … … 213 273 // Sanitized values. 214 274 $result = array( 275 // Org setting doesn't depend on any other. 276 self::STRUCTURED_DATA_ORG_ENABLE => ! empty( $data[ self::STRUCTURED_DATA_ORG_ENABLE ] ), 215 277 // FAQ setting doesn't depend on any other. 216 278 self::STRUCTURED_DATA_FAQ_ENABLE => ! empty( $data[ self::STRUCTURED_DATA_FAQ_ENABLE ] ), … … 291 353 } 292 354 293 // Ensure only real post IDs are in the Directory Members field. 294 if ( ! empty( $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ] ) ) { 295 $ids = get_posts( array( 296 'post_type' => 'any', 297 'include' => $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ], 298 'fields' => 'ids', 299 ) ); 300 $result[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ] = array_values( 301 array_intersect( 302 $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ], 303 $ids 304 ) 355 // Ensure only real post IDs are in post reference fields. 356 $ref_fields = array( 357 self::STRUCTURED_DATA_SERVICE_SERVICES, 358 self::STRUCTURED_DATA_SERVICE_TREATMENTS, 359 self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS, 360 ); 361 foreach ( $ref_fields as $field ) { 362 if ( ! empty( $data[ $field ] ) ) { 363 $ids = get_posts( array( 364 'post_type' => 'any', 365 'include' => $data[ $field ], 366 'fields' => 'ids', 367 ) ); 368 $result[ $field ] = array_values( 369 array_intersect( $data[ $field ], $ids ) 370 ); 371 } 372 } 373 374 return $result; 375 } 376 377 /** 378 * Sanitizes KSF SEO post meta field. 379 * 380 * @param array $data Data to sanitize. 381 * @return array Sanitized data. 382 */ 383 public function sanitize_seo_field( array $data ): array { 384 $result = array(); 385 386 // Sanitize post meta fields. 387 foreach ( $data as $key => $value ) { 388 switch ( $key ) { 389 case self::SEO_SCRIPTS_DEFER: 390 case self::SEO_SCRIPTS_POSTPONE: 391 $result[ $key ] = sanitize_textarea_field( $value ); 392 break; 393 } 394 } 395 396 // Sanitize multiline values. 397 $multiline_fields = array( 398 self::SEO_SCRIPTS_DEFER, 399 self::SEO_SCRIPTS_POSTPONE, 400 ); 401 foreach ( $multiline_fields as $field ) { 402 if ( ! empty( $result[ $field ] ) ) { 403 $values = array(); 404 $rows = $this->helpers->split_string_into_rows( $result[ $field ] ); 405 foreach ( $rows as $raw_value ) { 406 if ( ! $raw_value ) { 407 continue; 408 } 409 $values[] = sanitize_text_field( $raw_value ); 410 } 411 $result[ $field ] = implode( PHP_EOL, $values ); 412 } 413 } 414 415 return $result; 416 } 417 418 /** 419 * @inheritDoc 420 */ 421 public function add_meta_box(): void { 422 add_meta_box( 423 Plugin_Interface::SLUG, 424 __( "Kind Site Framework", 'kind-site-framework' ), 425 array( $this, 'render_meta_box' ), 426 NULL, 427 'side', 428 'default', 429 array( 430 '__back_compat_meta_box' => TRUE, 431 ) 432 ); 433 } 434 435 /** 436 * Renders a KSF meta box. 437 * 438 * @param \WP_Post $post Post object. 439 * 440 * @return void 441 * @since 1.3.0 442 */ 443 public function render_meta_box( WP_Post $post ): void { 444 $data = $this->get_structured_data( $post->ID ); 445 $seo = $this->get_seo_options( $post->ID ); 446 447 $enable = ! empty( $data[ self::STRUCTURED_DATA_ENABLE ] ); 448 $type = $data[ self::STRUCTURED_DATA_TYPE ] ?? ''; 449 $name = $data[ self::STRUCTURED_DATA_NAME ] ?? ''; 450 $url = $data[ self::STRUCTURED_DATA_URL ] ?? ''; 451 $description = $data[ self::STRUCTURED_DATA_DESCRIPTION ] ?? ''; 452 $image = $data[ self::STRUCTURED_DATA_IMAGE ] ?? ''; 453 454 $clinic_phone = $data[ self::STRUCTURED_DATA_CLINIC_PHONE ] ?? ''; 455 $clinic_street = $data[ self::STRUCTURED_DATA_CLINIC_STREET ] ?? ''; 456 $clinic_city = $data[ self::STRUCTURED_DATA_CLINIC_CITY ] ?? ''; 457 $clinic_region = $data[ self::STRUCTURED_DATA_CLINIC_REGION ] ?? ''; 458 $clinic_postal = $data[ self::STRUCTURED_DATA_CLINIC_POSTAL ] ?? ''; 459 $clinic_country = $data[ self::STRUCTURED_DATA_CLINIC_COUNTRY ] ?? ''; 460 $clinic_lat = $data[ self::STRUCTURED_DATA_CLINIC_LAT ] ?? ''; 461 $clinic_lng = $data[ self::STRUCTURED_DATA_CLINIC_LNG ] ?? ''; 462 463 $clinic_times = array( 464 'mon' => __( "Monday", 'kind-site-framework' ), 465 'tue' => __( "Tuesday", 'kind-site-framework' ), 466 'wed' => __( "Wednesday", 'kind-site-framework' ), 467 'thu' => __( "Thursday", 'kind-site-framework' ), 468 'fri' => __( "Friday", 'kind-site-framework' ), 469 'sat' => __( "Saturday", 'kind-site-framework' ), 470 'sun' => __( "Sunday", 'kind-site-framework' ), 471 ); 472 473 $service_area_served = $data[ self::STRUCTURED_DATA_SERVICE_AREA_SERVED ] ?? ''; 474 $service_services = ! empty( $data[ self::STRUCTURED_DATA_SERVICE_SERVICES ] ) ? implode( ',', $data[ self::STRUCTURED_DATA_SERVICE_SERVICES ] ) : ''; 475 $service_treatments = ! empty( $data[ self::STRUCTURED_DATA_SERVICE_TREATMENTS ] ) ? implode( ',', $data[ self::STRUCTURED_DATA_SERVICE_TREATMENTS ] ) : ''; 476 477 $team_member_job = $data[ self::STRUCTURED_DATA_TEAM_MEMBER_JOB ] ?? ''; 478 $team_directory_members = ! empty( $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ] ) ? implode( ',', $data[ self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS ] ) : ''; 479 480 $org_enable = ! empty( $data[ self::STRUCTURED_DATA_ORG_ENABLE ] ); 481 $faq_enable = ! empty( $data[ self::STRUCTURED_DATA_FAQ_ENABLE ] ); 482 483 $scripts_defer = $seo[ self::SEO_SCRIPTS_DEFER ] ?? ''; 484 $scripts_postpone = $seo[ self::SEO_SCRIPTS_POSTPONE ] ?? ''; 485 486 wp_nonce_field( 'ksf_meta_box', 'ksf_meta_box_nonce' ); 487 ?> 488 <div class="kind-site-framework-meta-box"> 489 <div class="ksf-section"> 490 <div class="ksf-section-title"><?php _e( "Structured Data", 'kind-site-framework' ); ?></div> 491 <div class="ksf-field"> 492 <label> 493 <input type="checkbox" name="ksf_sd[enable]" value="1" <?php checked( $enable ); ?> id="ksf-sd-enable"> 494 <?php _e( "Enable structured data", 'kind-site-framework' ); ?> 495 </label> 496 </div> 497 498 <div id="ksf-sd-fields" <?php if ( ! $enable ) echo 'style="display:none;"'; ?>> 499 <div class="ksf-field"> 500 <label for="ksf-sd-type"><?php _e( "Page Type", 'kind-site-framework' ); ?></label> 501 <select name="ksf_sd[type]" id="ksf-sd-type"> 502 <option value=""><?php _e( "-Select-", 'kind-site-framework' ); ?></option> 503 <option value="homepage" <?php selected( $type, 'homepage' ); ?>><?php _e( "Homepage", 'kind-site-framework' ); ?></option> 504 <option value="blog" <?php selected( $type, 'blog' ); ?>><?php _e( "Blog Post", 'kind-site-framework' ); ?></option> 505 <option value="clinic" <?php selected( $type, 'clinic' ); ?>><?php _e( "Clinic / Location", 'kind-site-framework' ); ?></option> 506 <option value="service" <?php selected( $type, 'service' ); ?>><?php _e( "Service / Program", 'kind-site-framework' ); ?></option> 507 <option value="team_member" <?php selected( $type, 'team_member' ); ?>><?php _e( "Team Member", 'kind-site-framework' ); ?></option> 508 <option value="team_directory" <?php selected( $type, 'team_directory' ); ?>><?php _e( "Team Directory", 'kind-site-framework' ); ?></option> 509 </select> 510 </div> 511 512 <div id="ksf-sd-common-fields" <?php if ( ! in_array( $type, array( 'clinic', 'service', 'team_member', 'team_directory' ) ) ) echo 'style="display:none;"'; ?>> 513 <div class="ksf-field"> 514 <label for="ksf-sd-name"><?php _e( "Name", 'kind-site-framework' ); ?></label> 515 <input type="text" name="ksf_sd[name]" id="ksf-sd-name" value="<?php echo esc_attr( $name ); ?>"> 516 <div class="description"><?php _e( "Defaults to post title.", 'kind-site-framework' ); ?></div> 517 </div> 518 <div class="ksf-field"> 519 <label for="ksf-sd-url"><?php _e( "URL", 'kind-site-framework' ); ?></label> 520 <input type="url" name="ksf_sd[url]" id="ksf-sd-url" value="<?php echo esc_url( $url ); ?>"> 521 <div class="description"><?php _e( "Defaults to post URL.", 'kind-site-framework' ); ?></div> 522 </div> 523 <div class="ksf-field"> 524 <label for="ksf-sd-description"><?php _e( "Description", 'kind-site-framework' ); ?></label> 525 <textarea name="ksf_sd[description]" id="ksf-sd-description" rows="3"><?php echo esc_textarea( $description ); ?></textarea> 526 <div class="description"><?php _e( "Defaults to post excerpt.", 'kind-site-framework' ); ?></div> 527 </div> 528 <div class="ksf-field"> 529 <label for="ksf-sd-image"><?php _e( "Image URL", 'kind-site-framework' ); ?></label> 530 <input type="url" name="ksf_sd[image]" id="ksf-sd-image" value="<?php echo esc_url( $image ); ?>"> 531 <div class="description"><?php _e( "Defaults to post featured image.", 'kind-site-framework' ); ?></div> 532 </div> 533 </div> 534 535 <div id="ksf-sd-clinic-fields" <?php if ( $type !== 'clinic' ) echo 'style="display:none;"'; ?>> 536 <div class="ksf-field"> 537 <label for="ksf-sd-clinic-phone"><?php _e( "Clinic Phone", 'kind-site-framework' ); ?></label> 538 <input type="tel" name="ksf_sd[clinic_phone]" id="ksf-sd-clinic-phone" value="<?php echo esc_attr( $clinic_phone ); ?>" placeholder="+13057682053"> 539 <div class="description"><?php _e( "Phone number in the international format. Defaults to Organization phone.", 'kind-site-framework' ); ?></div> 540 </div> 541 <div class="ksf-field"> 542 <label for="ksf-sd-clinic-street"><?php _e( "Clinic Street Address", 'kind-site-framework' ); ?></label> 543 <input type="text" name="ksf_sd[clinic_street]" id="ksf-sd-clinic-street" value="<?php echo esc_attr( $clinic_street ); ?>"> 544 <div class="description"><?php _e( "Defaults to Organization street address.", 'kind-site-framework' ); ?></div> 545 </div> 546 <div class="ksf-field"> 547 <label for="ksf-sd-clinic-city"><?php _e( "Clinic Locality / City", 'kind-site-framework' ); ?></label> 548 <input type="text" name="ksf_sd[clinic_city]" id="ksf-sd-clinic-city" value="<?php echo esc_attr( $clinic_city ); ?>"> 549 <div class="description"><?php _e( "Defaults to Organization city.", 'kind-site-framework' ); ?></div> 550 </div> 551 <div class="ksf-field"> 552 <label for="ksf-sd-clinic-region"><?php _e( "Clinic Region / State", 'kind-site-framework' ); ?></label> 553 <input type="text" name="ksf_sd[clinic_region]" id="ksf-sd-clinic-region" value="<?php echo esc_attr( $clinic_region ); ?>"> 554 <div class="description"><?php _e( "Defaults to Organization region.", 'kind-site-framework' ); ?></div> 555 </div> 556 <div class="ksf-field"> 557 <label for="ksf-sd-clinic-postal"><?php _e( "Clinic Postal Code", 'kind-site-framework' ); ?></label> 558 <input type="text" name="ksf_sd[clinic_postal]" id="ksf-sd-clinic-postal" value="<?php echo esc_attr( $clinic_postal ); ?>"> 559 <div class="description"><?php _e( "Defaults to Organization postal code.", 'kind-site-framework' ); ?></div> 560 </div> 561 <div class="ksf-field"> 562 <label for="ksf-sd-clinic-country"><?php _e( "Clinic Country Code", 'kind-site-framework' ); ?></label> 563 <input type="text" name="ksf_sd[clinic_country]" id="ksf-sd-clinic-country" value="<?php echo esc_attr( $clinic_country ); ?>"> 564 <div class="description"><?php _e( "Two-character ISO 3166-1 alpha-2 country code. Defaults to Organization country.", 'kind-site-framework' ); ?></div> 565 </div> 566 <div class="ksf-field"> 567 <label><?php _e( "Clinic Coordinates", 'kind-site-framework' ); ?></label> 568 <div class="ksf-row"> 569 <input type="number" step="any" name="ksf_sd[clinic_lat]" value="<?php echo esc_attr( $clinic_lat ); ?>" placeholder="Latitude"> 570 <input type="number" step="any" name="ksf_sd[clinic_lng]" value="<?php echo esc_attr( $clinic_lng ); ?>" placeholder="Longitude"> 571 </div> 572 <div class="description"><?php _e( "Latitude and longitude of the clinic.", 'kind-site-framework' ); ?></div> 573 </div> 574 <div class="ksf-field"> 575 <label><?php _e( "Opening Hours", 'kind-site-framework' ); ?></label> 576 <?php foreach ( $clinic_times as $day => $label ) : ?> 577 <div class="ksf-row"> 578 <label><?php echo esc_html( $label ); ?></label> 579 <input type="time" name="ksf_sd[clinic_<?php echo $day; ?>_opens]" value="<?php echo esc_attr( $data["clinic_{$day}_opens"] ?? '' ); ?>"> 580 <input type="time" name="ksf_sd[clinic_<?php echo $day; ?>_closes]" value="<?php echo esc_attr( $data["clinic_{$day}_closes"] ?? '' ); ?>"> 581 </div> 582 <?php endforeach; ?> 583 </div> 584 </div> 585 586 <div id="ksf-sd-service-fields" <?php if ( $type !== 'service' ) echo 'style="display:none;"'; ?>> 587 <div class="ksf-field"> 588 <label for="ksf-sd-service-area"><?php _e( "Area Served", 'kind-site-framework' ); ?></label> 589 <input type="text" name="ksf_sd[service_area_served]" id="ksf-sd-service-area" value="<?php echo esc_attr( $service_area_served ); ?>" placeholder="e.g. “California” or “Orange County, CA”"> 590 <div class="description"><?php _e( "Defaults to Organization region.", 'kind-site-framework' ); ?></div> 591 </div> 592 <div class="ksf-field"> 593 <label for="ksf-sd-service-services"><?php _e( "Supporting Services", 'kind-site-framework' ); ?></label> 594 <input type="text" name="ksf_sd[service_services]" id="ksf-sd-service-services" value="<?php echo esc_attr( $service_services ); ?>"> 595 <div class="description"><?php _e( "Comma-separated list of post IDs.", 'kind-site-framework' ); ?></div> 596 </div> 597 <div class="ksf-field"> 598 <label for="ksf-sd-service-treatments"><?php _e( "Treatment Modalities", 'kind-site-framework' ); ?></label> 599 <input type="text" name="ksf_sd[service_treatments]" id="ksf-sd-service-treatments" value="<?php echo esc_attr( $service_treatments ); ?>"> 600 <div class="description"><?php _e( "Comma-separated list of post IDs.", 'kind-site-framework' ); ?></div> 601 </div> 602 </div> 603 604 <div id="ksf-sd-team_member-fields" <?php if ( $type !== 'team_member' ) echo 'style="display:none;"'; ?>> 605 <div class="ksf-field"> 606 <label for="ksf-sd-team-member-job"><?php _e( "Job Title", 'kind-site-framework' ); ?></label> 607 <input type="text" name="ksf_sd[team_member_job]" id="ksf-sd-team-member-job" value="<?php echo esc_attr( $team_member_job ); ?>"> 608 </div> 609 </div> 610 611 <div id="ksf-sd-team_directory-fields" <?php if ( $type !== 'team_directory' ) echo 'style="display:none;"'; ?>> 612 <div class="ksf-field"> 613 <label for="ksf-sd-team-directory-members"><?php _e( "Team Members", 'kind-site-framework' ); ?></label> 614 <input type="text" name="ksf_sd[team_directory_members]" id="ksf-sd-team-directory-members" value="<?php echo esc_attr( $team_directory_members ); ?>"> 615 <div class="description"><?php _e( "Comma-separated list of post IDs.", 'kind-site-framework' ); ?></div> 616 </div> 617 </div> 618 </div> 619 620 <div class="ksf-field"> 621 <label> 622 <input type="checkbox" name="ksf_sd[org_enable]" value="1" <?php checked( $org_enable ); ?>> 623 <?php _e( "Enable Organization schema", 'kind-site-framework' ); ?> 624 </label> 625 <div class="description"><?php _e( "Also check Kind Site Framework Settings: Structured Data > Organization.", 'kind-site-framework' ); ?></div> 626 </div> 627 <div class="ksf-field"> 628 <label> 629 <input type="checkbox" name="ksf_sd[faq_enable]" value="1" <?php checked( $faq_enable ); ?>> 630 <?php _e( "Enable FAQ schema", 'kind-site-framework' ); ?> 631 </label> 632 <div class="description"><?php _e( "Also check Kind Site Framework Settings: Structured Data > FAQ.", 'kind-site-framework' ); ?></div> 633 </div> 634 </div> 635 636 <div class="ksf-section"> 637 <div class="ksf-section-title"><?php _e( "SEO", 'kind-site-framework' ); ?></div> 638 <div class="ksf-field"> 639 <label for="ksf-seo-defer"><?php _e( "Scripts to Defer", 'kind-site-framework' ); ?></label> 640 <textarea name="ksf_seo[scripts_defer]" id="ksf-seo-defer" rows="3"><?php echo esc_textarea( $scripts_defer ); ?></textarea> 641 <div class="description"><?php _e( "List of keys (IDs or sources) of scripts to defer on this page. Use symbol * as a wildcard prefix and/or suffix. One key per line.", 'kind-site-framework' ); ?></div> 642 </div> 643 <div class="ksf-field"> 644 <label for="ksf-seo-postpone"><?php _e( "Scripts to Postpone", 'kind-site-framework' ); ?></label> 645 <textarea name="ksf_seo[scripts_postpone]" id="ksf-seo-postpone" rows="3"><?php echo esc_textarea( $scripts_postpone ); ?></textarea> 646 <div class="description"><?php _e( "List keys (IDs or sources) of scripts to postpone on this page. Use symbol * as a wildcard prefix and/or suffix. One key per line.", 'kind-site-framework' ); ?></div> 647 </div> 648 </div> 649 </div> 650 651 <script> 652 (function() { 653 var enableCheckbox = document.getElementById('ksf-sd-enable'); 654 var typeSelect = document.getElementById('ksf-sd-type'); 655 var fieldsContainer = document.getElementById('ksf-sd-fields'); 656 657 function updateVisibility() { 658 fieldsContainer.style.display = enableCheckbox.checked ? 'block' : 'none'; 659 660 var type = typeSelect.value; 661 var commonFields = document.getElementById('ksf-sd-common-fields'); 662 var clinicFields = document.getElementById('ksf-sd-clinic-fields'); 663 var serviceFields = document.getElementById('ksf-sd-service-fields'); 664 var teamMemberFields = document.getElementById('ksf-sd-team_member-fields'); 665 var teamDirectoryFields = document.getElementById('ksf-sd-team_directory-fields'); 666 667 commonFields.style.display = (['clinic', 'service', 'team_member', 'team_directory'].indexOf(type) !== -1) ? 'block' : 'none'; 668 clinicFields.style.display = (type === 'clinic') ? 'block' : 'none'; 669 serviceFields.style.display = (type === 'service') ? 'block' : 'none'; 670 teamMemberFields.style.display = (type === 'team_member') ? 'block' : 'none'; 671 teamDirectoryFields.style.display = (type === 'team_directory') ? 'block' : 'none'; 672 } 673 674 enableCheckbox.addEventListener('change', updateVisibility); 675 typeSelect.addEventListener('change', updateVisibility); 676 updateVisibility(); 677 })(); 678 </script> 679 <?php 680 } 681 682 /** 683 * @inheritDoc 684 */ 685 public function save_meta_box( int $post_id, WP_Post $post ): void { 686 // Check nonce. 687 if ( ! isset( $_POST['ksf_meta_box_nonce'] ) || ! wp_verify_nonce( $_POST['ksf_meta_box_nonce'], 'ksf_meta_box' ) ) { 688 return; 689 } 690 691 // Check permissions. 692 if ( ! current_user_can( 'edit_post', $post_id ) ) { 693 return; 694 } 695 696 // Skip autosave. 697 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { 698 return; 699 } 700 701 // Save Structured Data. 702 if ( isset( $_POST['ksf_sd'] ) && is_array( $_POST['ksf_sd'] ) ) { 703 $sd_data = $_POST['ksf_sd']; 704 705 // Handle multi-value fields (convert comma-separated string to array). 706 $array_fields = array( 707 self::STRUCTURED_DATA_SERVICE_SERVICES, 708 self::STRUCTURED_DATA_SERVICE_TREATMENTS, 709 self::STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS, 305 710 ); 306 } 307 308 return $result; 711 foreach ( $array_fields as $field ) { 712 if ( isset( $sd_data[ $field ] ) && is_string( $sd_data[ $field ] ) ) { 713 $sd_data[ $field ] = array_filter( array_map( 'trim', explode( ',', $sd_data[ $field ] ) ) ); 714 } 715 } 716 717 $sanitized_sd = $this->sanitize_structured_data_field( $sd_data ); 718 update_post_meta( $post_id, self::STRUCTURED_DATA, $sanitized_sd ); 719 } 720 721 // Save SEO. 722 if ( isset( $_POST['ksf_seo'] ) && is_array( $_POST['ksf_seo'] ) ) { 723 $sanitized_seo = $this->sanitize_seo_field( $_POST['ksf_seo'] ); 724 update_post_meta( $post_id, self::SEO, $sanitized_seo ); 725 } 309 726 } 310 727 … … 320 737 } 321 738 739 /** 740 * @inheritDoc 741 */ 742 public function get_seo_options( int $post_id ): array { 743 if ( ! isset( $this->seo_options[ $post_id ] ) ) { 744 $data = get_post_meta( $post_id, self::SEO, TRUE ); 745 $this->seo_options[ $post_id ] = empty( $data ) ? array() : $data; 746 } 747 return $this->seo_options[ $post_id ]; 748 } 749 322 750 } -
kind-site-framework/trunk/includes/class-settings.php
r3489394 r3494876 16 16 17 17 /** 18 * KSF data service. 19 * 20 * @since 1.3.0 21 * 22 * @var \Kind_Site_Framework\Data_Interface 23 */ 24 protected Data_Interface $data; 25 26 /** 18 27 * KSF helpers service. 19 28 * … … 24 33 25 34 /** 26 * KSF insurers service.27 *28 * @var \Kind_Site_Framework\Insurers_Interface29 * @since 1.1.030 */31 protected Insurers_Interface $insurers;32 33 /**34 35 * Constructs a new container instance. 35 36 * 37 * @param \Kind_Site_Framework\Data_Interface $data KSF data service. 36 38 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers service. 37 * @param \Kind_Site_Framework\Insurers_Interface $insurers KSF insurers service.38 */39 public function __construct( Helpers_Interface $helpers, Insurers_Interface $insurers ) {39 */ 40 public function __construct( Data_Interface $data, Helpers_Interface $helpers ) { 41 $this->data = $data; 40 42 $this->helpers = $helpers; 41 $this->insurers = $insurers;42 43 } 43 44 … … 48 49 /** @noinspection PhpParamsInspection */ 49 50 return new static( 50 $container->get( ' helpers' ),51 $container->get( ' insurers' )51 $container->get( 'data' ), 52 $container->get( 'helpers' ) 52 53 ); 53 54 } … … 158 159 159 160 // SEO: Google Tag Manager container ID. 161 /* 160 162 $field_id = self::CONTENT . '_' . self::CONTENT_GTM_CONTAINER_ID; 161 163 add_settings_field( … … 173 175 ) 174 176 ); 177 */ 175 178 176 179 // Selectors for sections with video backgrounds that should be disabled on … … 334 337 // Insurance Accepted: Available Insurers. 335 338 $field_id = self::CONTENT . '_' . self::CONTENT_INSURANCE_INSURERS; 336 $insurers = array_map( fn( $data ) => $data['label'], $this-> insurers->get_all() );339 $insurers = array_map( fn( $data ) => $data['label'], $this->data->get_insurers() ); 337 340 add_settings_field( 338 341 $field_id, … … 373 376 ) 374 377 ); 378 379 // Insurance Accepted: Extra Insurers. 380 $field_id = self::CONTENT . '_' . self::CONTENT_INSURANCE_EXTRA; 381 add_settings_field( 382 $field_id, 383 __( "Extra Insurers", 'kind-site-framework' ), 384 array( $this, 'render_settings_textarea' ), 385 self::CONTENT, 386 $section_id, 387 array( 388 'setting_name' => self::CONTENT, 389 'label_for' => $field_id, 390 'field_name' => self::CONTENT_INSURANCE_EXTRA, 391 'field_description' => __( 392 "A list of extra insurers in format <code>https://logo.url|Name</code>. One insurer per line.", 393 'kind-site-framework' 394 ), 395 ) 396 ); 375 397 } 376 398 … … 505 527 self::STRUCTURED_DATA, 506 528 array( 507 'type' => 'array', 529 'type' => 'object', 530 'show_in_rest' => array( 531 'schema' => array( 532 'type' => 'object', 533 'additionalProperties' => true, 534 ), 535 ), 508 536 'sanitize_callback' => array( $this, 509 537 'sanitize_structured_data_setting' … … 512 540 ); 513 541 542 $section_id = 'structured_data_blog'; 543 544 // Structured Data: Blog section. 545 add_settings_section( 546 $section_id, 547 __( "Blog", 'kind-site-framework' ), 548 array( $this, 'render_settings_section' ), 549 self::STRUCTURED_DATA, 550 array( 551 'description' => __( 552 "Manage BlogPosting schema.", 553 'kind-site-framework' 554 ), 555 ), 556 ); 557 558 // Whether to enable auto BlogPosting schema. 559 $field_id = self::STRUCTURED_DATA . '_' . self::STRUCTURED_DATA_AUTO_BLOG; 560 add_settings_field( 561 $field_id, 562 __( "Auto BlogPosting", 'kind-site-framework' ), 563 array( $this, 'render_settings_checkbox' ), 564 self::STRUCTURED_DATA, 565 $section_id, 566 array( 567 'setting_name' => self::STRUCTURED_DATA, 568 'label_for' => $field_id, 569 'field_name' => self::STRUCTURED_DATA_AUTO_BLOG, 570 'field_label' => __("Enable auto BlogPosting schema", 'kind-site-framework'), 571 'field_description' => __( 572 "If checked off, the BlogPosting schema will be automatically added to every post without explicit structured data type.", 573 'kind-site-framework' 574 ) 575 ) 576 ); 577 514 578 $section_id = 'structured_data_organization'; 515 579 … … 526 590 ), 527 591 ), 528 );529 530 // Whether to enable Organization Schema.531 $field_id = self::STRUCTURED_DATA . '_' . self::STRUCTURED_DATA_ORGANIZATION_SCHEMA;532 add_settings_field(533 $field_id,534 __( "Enable Schema", 'kind-site-framework' ),535 array( $this, 'render_settings_checkbox' ),536 self::STRUCTURED_DATA,537 $section_id,538 array(539 'setting_name' => self::STRUCTURED_DATA,540 'label_for' => $field_id,541 'field_name' => self::STRUCTURED_DATA_ORGANIZATION_SCHEMA,542 'field_label' => __("Enable Organization schema", 'kind-site-framework'),543 'field_description' => __(544 "If checked off, the Organization schema will be present on every page where structured data output is enabled.",545 'kind-site-framework'546 )547 )548 592 ); 549 593 … … 1348 1392 self::CONTENT_GTM_CONTAINER_ID, 1349 1393 self::CONTENT_VIDEO_BANNERS, 1394 self::CONTENT_SCRIPTS_DEFER, 1395 self::CONTENT_SCRIPTS_POSTPONE, 1350 1396 self::CONTENT_CTA_PHONE_NUMBER, 1351 1397 self::CONTENT_CTA_PHONE_LABEL, … … 1354 1400 self::CONTENT_INSURANCE_INSURERS, 1355 1401 self::CONTENT_INSURANCE_HEADLINE, 1356 self::CONTENT_SCRIPTS_DEFER, 1357 self::CONTENT_SCRIPTS_POSTPONE, 1402 self::CONTENT_INSURANCE_EXTRA, 1358 1403 ); 1359 1404 … … 1362 1407 self::CONTENT_SCRIPTS_DEFER, 1363 1408 self::CONTENT_SCRIPTS_POSTPONE, 1409 self::CONTENT_INSURANCE_EXTRA, 1364 1410 ); 1365 1411 … … 1376 1422 } 1377 1423 1378 // Sanitize "Video Banners", "Scripts to Defer" and "Scripts to Postpone" values. 1379 $multiline_fields = array( 1380 self::CONTENT_VIDEO_BANNERS, 1381 self::CONTENT_SCRIPTS_DEFER, 1382 self::CONTENT_SCRIPTS_POSTPONE, 1383 ); 1424 // Sanitize multiline values. 1425 $multiline_fields = $textarea_fields; 1384 1426 foreach ( $multiline_fields as $field ) { 1385 1427 if ( ! empty( $input[ $field ] ) ) { 1386 1428 $values = array(); 1387 $rows = $this->helpers->split_string_into_rows( $input[ $field ] ); 1388 foreach ( $rows as $raw_value ) { 1389 if ( ! $raw_value ) { 1390 continue; 1429 if ( $field === self::CONTENT_INSURANCE_EXTRA ) { 1430 $rows = $this->helpers->parse_key_value_list( 1431 $input[ $field ], 1432 '|', 1433 'sanitize_url' 1434 ); 1435 foreach ( $rows as $key => $value ) { 1436 $values[] = "$key|$value"; 1391 1437 } 1392 $values[] = esc_attr( $raw_value ); 1438 } else { 1439 $rows = $this->helpers->split_string_into_rows( $input[ $field ] ); 1440 foreach ( $rows as $raw_value ) { 1441 if ( ! $raw_value ) { 1442 continue; 1443 } 1444 $values[] = sanitize_text_field( $raw_value ); 1445 } 1393 1446 } 1394 1447 $input[ $field ] = implode( PHP_EOL, $values ); … … 1472 1525 1473 1526 $all_fields = array( 1474 self::STRUCTURED_DATA_ ORGANIZATION_SCHEMA,1527 self::STRUCTURED_DATA_AUTO_BLOG, 1475 1528 self::STRUCTURED_DATA_NAME, 1476 1529 self::STRUCTURED_DATA_DESCRIPTION, … … 1493 1546 1494 1547 $bool_fields = array( 1495 self::STRUCTURED_DATA_ ORGANIZATION_SCHEMA,1548 self::STRUCTURED_DATA_AUTO_BLOG, 1496 1549 ); 1497 1550 … … 1535 1588 if ( isset( $input[ self::STRUCTURED_DATA_TYPE ] ) && ! in_array( $input[ self::STRUCTURED_DATA_TYPE ], $allowed_types, true ) ) { 1536 1589 unset( $input[ self::STRUCTURED_DATA_TYPE ] ); 1537 }1538 1539 // Check if all fields required for the Organization structured data are set.1540 if ( ! empty( $input[ self::STRUCTURED_DATA_ORGANIZATION_SCHEMA ] ) ) {1541 $organization_schema = TRUE;1542 1543 $required_fields = array(1544 self::STRUCTURED_DATA_NAME => __(1545 "Name is required for the Organization schema.",1546 'kind-site-framework'1547 ),1548 self::STRUCTURED_DATA_PRIMARY_PHONE => __(1549 "Primary Phone is required for the Organization schema.",1550 'kind-site-framework'1551 ),1552 self::STRUCTURED_DATA_LOGO_URL => __(1553 "Logo URL is required for the Organization schema.",1554 'kind-site-framework'1555 ),1556 self::STRUCTURED_DATA_TYPE => __(1557 "Type is required for the Organization schema.",1558 'kind-site-framework'1559 ),1560 );1561 1562 foreach ( $required_fields as $field => $message ) {1563 if ( empty( $input[ $field ] ) ) {1564 add_settings_error( self::STRUCTURED_DATA, $field, $message );1565 $organization_schema = FALSE;1566 }1567 }1568 1569 if ( ! $organization_schema ) {1570 add_settings_error(1571 self::STRUCTURED_DATA,1572 self::STRUCTURED_DATA_ORGANIZATION_SCHEMA,1573 __(1574 "To enable Organization schema all required fields must be set.",1575 'kind-site-framework'1576 )1577 );1578 $input[ self::STRUCTURED_DATA_ORGANIZATION_SCHEMA ] = FALSE;1579 }1580 1590 } 1581 1591 -
kind-site-framework/trunk/includes/class-structured-data.php
r3488298 r3494876 3 3 namespace Kind_Site_Framework; 4 4 5 use Exception; 5 6 use simple_html_dom; 6 7 … … 34 35 35 36 /** 36 * Constructs a new container instance. 37 * 38 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers 39 * service. 40 * @param \Kind_Site_Framework\Post_Meta_Interface $post_meta KSF post meta 41 * service. 37 * Constructs a new service instance. 38 * 39 * @param \Kind_Site_Framework\Helpers_Interface $helpers KSF helpers service. 40 * @param \Kind_Site_Framework\Post_Meta_Interface $post_meta KSF post meta service. 42 41 */ 43 42 public function __construct( … … 64 63 */ 65 64 public function add_to_post( int $post_id ): void { 66 $data = $this->post_meta->get_structured_data( $post_id ); 65 $meta = $this->post_meta->get_structured_data( $post_id ); 66 $data = get_option( Settings_Interface::STRUCTURED_DATA ); 67 67 68 68 $schemas = array(); 69 69 70 // If structured data is disabled for this post, but Auto BlogPosting 71 // feature is enabled globally, simulate BlogPosting type. 72 if ( empty( $meta['enable'] ) && 73 ! empty( $data[ Settings_Interface::STRUCTURED_DATA_AUTO_BLOG ] ) && 74 get_post_type( $post_id ) === 'post' 75 ) { 76 $meta['enable'] = TRUE; 77 $meta['type'] = Post_Meta_Interface::STRUCTURED_DATA_TYPE__BLOG; 78 } 79 70 80 // All other schema types require per-page options. 71 if ( ! empty( $ data ) && ! empty( $data['enable'] ) ) {72 // Organization schema is used on all pages.81 if ( ! empty( $meta ) && ! empty( $meta['enable'] ) ) { 82 // Organization schema is used as reference in other schemas. 73 83 $org_schema = $this->get_organization_schema(); 74 $schemas[] = $org_schema; 75 76 switch ( $data['type'] ?? NULL ) { 84 85 switch ( $meta['type'] ?? NULL ) { 77 86 case Post_Meta_Interface::STRUCTURED_DATA_TYPE__HOMEPAGE: 78 87 $schemas[] = $this->get_website_schema(); … … 114 123 115 124 case Post_Meta_Interface::STRUCTURED_DATA_TYPE__SERVICE: 125 # Main service schema. 116 126 $service_schema = $this->get_service_post_schema( $post_id ); 117 127 if ( $org_schema ) { 118 128 $service_schema['provider'] = array( 119 '@type' => 'Organization',120 129 '@id' => $org_schema['@id'], 121 130 ); 131 132 // Default "Area Served" to the Organization Region. 133 // @see https://app.clickup.com/t/86agdegta 134 if ( empty( $service_schema['areaServed'] ) && ! empty( $org_schema['address']['addressRegion'] ) ) { 135 $service_schema['areaServed'] = $org_schema['address']['addressRegion']; 136 } 122 137 } 138 139 # Additional supporting services. 140 if ( ! empty( $meta[ Post_Meta_Interface::STRUCTURED_DATA_SERVICE_SERVICES ] ) ) { 141 foreach ( $meta[ Post_Meta_Interface::STRUCTURED_DATA_SERVICE_SERVICES ] as $id ) { 142 $supporting_service_schema = $this->get_service_post_schema( $id ); 143 if ( $org_schema ) { 144 $supporting_service_schema['provider'] = array( 145 '@id' => $org_schema['@id'], 146 ); 147 } 148 $service_schema['isRelatedTo'][] = array( 149 '@id' => $supporting_service_schema['@id'], 150 ); 151 $schemas[] = $supporting_service_schema; 152 } 153 } 154 155 # Additional treatment modalities. 156 if ( ! empty( $meta[ Post_Meta_Interface::STRUCTURED_DATA_SERVICE_TREATMENTS ] ) ) { 157 foreach ( $meta[ Post_Meta_Interface::STRUCTURED_DATA_SERVICE_TREATMENTS ] as $id ) { 158 $treatment_schema = $this->get_treatment_modality_post_schema( $id ); 159 $service_schema['isRelatedTo'][] = array( 160 '@id' => $treatment_schema['@id'], 161 ); 162 $schemas[] = $treatment_schema; 163 } 164 } 165 123 166 $schemas[] = $service_schema; 124 167 break; … … 147 190 } 148 191 192 // Org schema may appear on any page. 193 if ( ! empty( $meta[ Post_Meta_Interface::STRUCTURED_DATA_ORG_ENABLE ] ) ) { 194 $schemas[] = $this->get_organization_schema(); 195 } 196 149 197 // FAQ schema may appear on any page. 150 198 $schemas[] = $this->get_post_faq_schema( $post_id ); … … 186 234 187 235 /** 236 * Returns Organization schema ID. 237 * 238 * @return string Organization ID. 239 */ 240 protected function get_organization_id(): string { 241 $data = get_option( Settings_Interface::STRUCTURED_DATA ); 242 return trailingslashit( home_url() ) . '#' . strtolower( $data[ Settings_Interface::STRUCTURED_DATA_TYPE ] ); 243 } 244 245 /** 188 246 * Returns Organization schema. 189 247 * … … 195 253 196 254 $schema = array(); 197 198 if ( empty( $data[ Settings_Interface::STRUCTURED_DATA_ORGANIZATION_SCHEMA ] ) ) {199 return $schema;200 }201 255 202 256 // Check required fields. … … 214 268 215 269 $url = trailingslashit( home_url() ); 216 $schema['@id'] = $ url . '#' . strtolower( $data[ Settings_Interface::STRUCTURED_DATA_TYPE ]);270 $schema['@id'] = $this->get_organization_id(); 217 271 $schema['url'] = $url; 218 272 … … 426 480 Post_Meta_Interface::STRUCTURED_DATA_SERVICE_AREA_SERVED => 'areaServed', 427 481 ) 482 ); 483 } 484 485 /** 486 * Return MedicalTherapy schema for a treatment modality post. 487 * 488 * @param int $post_id Post ID. 489 * @return array MedicalTherapy schema array. 490 * @since 1.2.0 491 */ 492 protected function get_treatment_modality_post_schema( int $post_id ): array { 493 return $this->get_base_post_schema( 494 $post_id, 495 'MedicalTherapy', 428 496 ); 429 497 } … … 740 808 } 741 809 } 742 } catch ( \Exception $e) {810 } catch ( Exception $e ) { 743 811 var_dump( $e ); 744 812 } -
kind-site-framework/trunk/includes/class-templates.php
r3488298 r3494876 58 58 'title' => _x( $template_data['title'], 'Template title', 'kind-site-framework' ), 59 59 'content' => $this->helpers->get_file_content( $file ), 60 'slug' => Plugin_Interface::SLUG, 60 61 ); 61 62 if ( ! empty( $template_data['description'] ) ) { -
kind-site-framework/trunk/includes/interface-helpers.php
r3488298 r3494876 38 38 * Returns file content. 39 39 * 40 * @param string $ name File name.41 * @param string $type File type. Defaults to 'template'.40 * @param string $path Path to file. 41 * 42 42 * @return string File content. 43 43 * @since 1.0.0 44 44 */ 45 public function get_file_content( string $ name, string $type = 'template'): string;45 public function get_file_content( string $path ): string; 46 46 47 47 /** … … 128 128 public function get_tag_attributes( string $tag, string $tag_name, array $extra = array() ): array; 129 129 130 /** 131 * Parses a multiline string containing key-values pairs. 132 * 133 * @since 1.3.0 134 * 135 * @param string $list Multiline string of rows. 136 * @param string $delimiter (optional) Delimiter. Defaults to "|". 137 * @param callable|NULL $key_sanitizer (optional) Key sanitizer. Defaults to `sanitize_text_field`. 138 * @param callable|NULL $value_sanitizer (optional) Value sanitizer. Defaults to `sanitize_text_field`. 139 * @return array Associative array of values keyed by their keys. 140 */ 141 public function parse_key_value_list( 142 string $list, 143 string $delimiter = '|', 144 callable $key_sanitizer = NULL, 145 callable $value_sanitizer = NULL 146 ): array; 147 130 148 } -
kind-site-framework/trunk/includes/interface-insurers.php
r3488298 r3494876 16 16 17 17 /** 18 * Returns all available insurers.19 *20 * @return array21 * @since 1.1.022 */23 public function get_all(): array;24 25 /**26 18 * Returns insurers enabled in the settings. 27 19 * 28 * @return array29 20 * @since 1.1.0 21 * 22 * @return array Array of insurers. 30 23 */ 31 24 public function get_enabled(): array; … … 34 27 * Filters insurers by keys. 35 28 * 29 * @since 1.1.0 30 * 36 31 * @param array $keys Array of insurer keys to filter by. 37 32 * @return array Array of filtered insurers. 38 * @since 1.1.039 33 */ 40 34 public function filter( array $keys ): array; 41 35 36 /** 37 * Returns list of extra insurers. 38 * 39 * @since 1.3.0 40 * 41 * @param string|null $list (optional) Multiline string of extra insurers' data. If empty, taken from the global settings. 42 * @return string[] Array of extra insurers. 43 */ 44 public function get_extra( ?string $list = NULL ): array; 45 42 46 } -
kind-site-framework/trunk/includes/interface-plugin.php
r3488298 r3494876 4 4 5 5 use WP_Block_Editor_Context; 6 use WP_Post; 6 7 7 8 if ( ! defined( 'ABSPATH' ) ) { … … 67 68 68 69 /** 70 * Implements "add_meta_boxes" action hook. 71 * 72 * @return void 73 * @since 1.3.0 74 */ 75 public function add_meta_boxes(): void; 76 77 /** 78 * Implements "save_post" action hook. 79 * 80 * @param int $post_id Post ID. 81 * @param \WP_Post $post Post object. 82 * @return void 83 * @since 1.3.0 84 */ 85 public function save_post( int $post_id, WP_Post $post ): void; 86 87 /** 69 88 * Implements "wp_head" action hook. 70 89 * -
kind-site-framework/trunk/includes/interface-post-meta.php
r3488298 r3494876 2 2 3 3 namespace Kind_Site_Framework; 4 5 use WP_Post; 4 6 5 7 if ( ! defined( 'ABSPATH' ) ) { … … 229 231 230 232 /** 233 * Structured Data: Service Supporting Services post meta field. 234 * 235 * @since 1.3.0 236 */ 237 const STRUCTURED_DATA_SERVICE_SERVICES = 'service_services'; 238 239 /** 240 * Structured Data: Service Treatment Modalities post meta field. 241 * 242 * @since 1.3.0 243 */ 244 const STRUCTURED_DATA_SERVICE_TREATMENTS = 'service_treatments'; 245 246 /** 231 247 * Structured Data: Team Member Job post meta field. 232 248 * … … 241 257 */ 242 258 const STRUCTURED_DATA_TEAM_DIRECTORY_MEMBERS = 'team_directory_members'; 259 260 /** 261 * Structured Data: Enable Org Schema post meta field. 262 * 263 * @since 1.2.0 264 */ 265 const STRUCTURED_DATA_ORG_ENABLE = 'org_enable'; 243 266 244 267 /** … … 334 357 self::STRUCTURED_DATA_IMAGE, 335 358 self::STRUCTURED_DATA_SERVICE_AREA_SERVED, 359 self::STRUCTURED_DATA_SERVICE_SERVICES, 360 self::STRUCTURED_DATA_SERVICE_TREATMENTS, 336 361 ), 337 362 self::STRUCTURED_DATA_TYPE__TEAM_MEMBER => array( … … 348 373 349 374 /** 375 * KSF SEO post meta field. 376 * 377 * KSF SEO post meta field is an associative array of options with keys 378 * determining by the following `SEO_*` constants. 379 * 380 * @since 1.3.0 381 */ 382 const SEO = 'kind_site_framework_seo'; 383 384 /** 385 * SEO: Scripts to Defer post meta field. 386 * 387 * Multiline string containing keys (IDs or sources) of scripts to defer. 388 * 389 * @since 1.3.0 390 */ 391 const SEO_SCRIPTS_DEFER = 'scripts_defer'; 392 393 /** 394 * SEO: Scripts to Postpone post meta field. 395 * 396 * Multiline string containing keys (IDs or sources) of scripts to postpone. 397 * 398 * @since 1.3.0 399 */ 400 const SEO_SCRIPTS_POSTPONE = 'scripts_postpone'; 401 402 /** 350 403 * Registers KSF post meta fields. 351 404 * … … 354 407 */ 355 408 public function register(): void; 409 410 /** 411 * Adds a KSF meta box. 412 * 413 * @return void 414 * @since 1.3.0 415 */ 416 public function add_meta_box(): void; 417 418 /** 419 * Saves meta box data. 420 * 421 * @param int $post_id Post ID. 422 * @param \WP_Post $post Post object. 423 * @return void 424 * @since 1.3.0 425 */ 426 public function save_meta_box( int $post_id, WP_Post $post ): void; 356 427 357 428 /** … … 364 435 public function get_structured_data( int $post_id ): array; 365 436 437 /** 438 * Returns SEO options from a post meta. 439 * 440 * @since 1.3.0 441 * 442 * @param int $post_id The post ID. 443 * @return array The SEO options of the post. 444 */ 445 public function get_seo_options( int $post_id ): array; 446 366 447 } -
kind-site-framework/trunk/includes/interface-settings.php
r3489394 r3494876 116 116 117 117 /** 118 * Content: Insurance Accepted: Extra Insurers 119 * 120 * Multiline string containing a list of extra insurers. 121 * 122 * @since 1.3.0 123 */ 124 const CONTENT_INSURANCE_EXTRA = 'insurance_extra'; 125 126 /** 118 127 * KSF Editor setting key. 119 128 * … … 177 186 178 187 /** 179 * Structured Data: Organization Schema 180 * 181 * Boolean determining whether to enable Organization schema. 182 * 183 * @since 1.2.0 184 */ 185 const STRUCTURED_DATA_ORGANIZATION_SCHEMA = 'organization_schema'; 188 * Structured Data: Auto Blog 189 * 190 * Boolean determining whether to automatically enable BlogPosting schema 191 * for all posts without explicit structured data type. 192 * 193 * @since 1.3.0 194 */ 195 const STRUCTURED_DATA_AUTO_BLOG = 'auto_blog'; 186 196 187 197 /** -
kind-site-framework/trunk/kind-site-framework.php
r3489394 r3494876 5 5 * Author: Kind Creative 6 6 * Author URI: https://kindcreative.com/ 7 * Version: 1. 2.27 * Version: 1.3.0 8 8 * Requires at least: 6.7 9 9 * Requires PHP: 7.4 … … 48 48 add_action( 'admin_menu', array( $plugin, 'admin_menu' ) ); 49 49 add_action( 'admin_enqueue_scripts', array( $plugin, 'admin_enqueue_scripts' ) ); 50 add_action( 'add_meta_boxes', array( $plugin, 'add_meta_boxes' ) ); 51 add_action( 'save_post', array( $plugin, 'save_post' ), 10, 2 ); 50 52 } else { 51 53 add_action( 'wp_head', array( $plugin, 'wp_head' ) ); -
kind-site-framework/trunk/patterns/hero-large.php
r3473938 r3494876 23 23 $text_id = $helpers->ksf_id(); 24 24 25 $image_url = KIND_SITE_FRAMEWORK_URL . 'media/placeholders/ 400x600.svg';25 $image_url = KIND_SITE_FRAMEWORK_URL . 'media/placeholders/1200x800.svg'; 26 26 27 27 // phpcs:disable PluginCheck.CodeAnalysis.Offloading.OffloadedContent -
kind-site-framework/trunk/readme.txt
r3489394 r3494876 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 1. 2.27 Stable tag: 1.3.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 == Changelog == 44 44 45 **Version 1. 2.2 – Released on March 23, 2026**45 **Version 1.3.0 – Released on March 30, 2026** 46 46 47 * KSF Security Engine Update 47 * KSF Structured Data Engine update (Supporting Services/Treatments) 48 * Service Page Starter Pattern 49 * Hero Banner Page Template 48 50 49 51 **Version 1.2.1 – Released on March 22, 2026** … … 67 69 == Upgrade Notice == 68 70 69 = 1. 2.2=71 = 1.3.0 = 70 72 71 KSF S ecurity Engine Update73 KSF Structured Data Engine, Service Page Starter Pattern, Hero Banner Page Template 72 74 73 75 = 1.2.1 = -
kind-site-framework/trunk/templates/page-with-hero.php
r3473938 r3494876 3 3 * Title: Page With Hero 4 4 * Description: Standard interior page that requires a hero section. 5 * Post Types: page6 5 * 7 6 * @package Kind_Site_Framework … … 19 18 } /--> 20 19 20 <!-- wp:pattern { 21 "slug":"kind-site-framework/hero-large" 22 } /--> 23 21 24 <!-- wp:group { 22 25 "tagName":"main", … … 24 27 } --> 25 28 <main class="wp-block-group"> 26 27 <!-- wp:group {28 "layout":{29 "inherit":true,30 "type":"constrained"31 }32 } -->33 <div class="wp-block-group alignfull">34 35 <!-- wp:post-title {36 "level":1,37 "fontSize":"x-large"38 } /-->39 40 </div>41 <!-- /wp:group -->42 29 43 30 <!-- wp:post-content {
Note: See TracChangeset
for help on using the changeset viewer.