📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: LiteSpeed
2026-06-28 20:17:22
📂
/ (Root)
/
home
/
apkbfjox
/
joygame.com.pk
/
wp-content
/
plugins
/
kadence-blocks-pro
/
dist
📍 /home/apkbfjox/joygame.com.pk/wp-content/plugins/kadence-blocks-pro/dist
🔄 Refresh
✏️
Editing: blocks-repeatertemplate.js
Writable
(()=>{var e,t={52686(e,t,o){"use strict";o.r(t),o.d(t,{metadata:()=>_,name:()=>I});var r=o(74848);const n=(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{fill:"var(--kadence-color, #0058b0 )",d:"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z"})});var a=o(51609),c=o(46942),s=o.n(c);const i=window.wp.element,l=window.wp.data,u=window.wp.i18n,d=window.wp.blockEditor,p=window.wp.components,f=window.lodash;function k(e,t){const o=Boolean(e&&(e.queryId||Number.isFinite(e.queryId))&&e.postId),r=Boolean(e&&void 0!==e["kadence/dynamicSource"]&&e["kadence/dynamicSource"]);return!(!o&&!r)}const y=window.wp.widgets;function m(e){for(var t=5381,o=e.length;o;)t=33*t^e.charCodeAt(--o);return t>>>0}const b=window.wp.url;function g(e,t,o){if("function"==typeof o){const r={source:e,type:"repeaters",contextPost:t,useRepeaterContext:!0},n=(0,f.get)(window,["kadenceDynamicParams","dynamicFieldsEndpoint"],"");(0,l.resolveSelect)("kadenceblockspro/data").storeFetch((0,b.addQueryArgs)(n,function(e,t=null,o="",r=""){const{source:n,field:a,custom:c,para:s,before:i,after:l,fallback:u,type:d,relate:p,relcustom:f,showAll:k,useRepeaterContext:y}=e;let m=n||t;if(wp.data.select("core/editor")&&!m)if(kbpData.isKadenceE&&kadenceElementParams.previewPostID){const e=((e,t=!0)=>{try{var o=JSON.parse(e);if(o&&"object"==typeof o)return o}catch(e){}return e&&"object"==typeof e?e:!!t&&{}})(kadenceElementParams.previewPostID);m=e&&e.id?e.id:""}else m=wp.data.select("core/editor").getCurrentPostId();return r=function(e,t){var o="";if(e&&"string"==typeof e&&e.includes("|")){const r=e.split("|");if(r&&(o=r?.[0]),!o)return t+e}return e||t}(r,m),{source:y?r:m,field:a||"",custom:c||"",para:s||"",before:i||"",after:l||"",fallback:u||"",type:d||"",relate:p||"",relcustom:f||"",ignore_source:k||!1,useRepeaterContext:y||!1,repeaterRow:o}}(r,t))).then(e=>{if("object"==typeof e&&1<=Object.keys(e).length)return o(e),e}).catch(e=>(o(null),null))}}function v(e,t,o){if("function"==typeof o){const r=(0,f.get)(window,["kadenceDynamicParams","repeaterDataEndpoint"],"");(0,l.resolveSelect)("kadenceblockspro/data").storeFetch((0,b.addQueryArgs)(r,{source:e,field:t})).then(e=>"object"==typeof e&&1<=Object.keys(e).length||"object"==typeof e&&0==Object.keys(e).length?(o(e),e):(o(null),null)).catch(e=>(o(null),null))}}const w=[["kadence/dynamichtml",{useRepeaterContext:!0}]];function h(){const e=(0,d.useInnerBlocksProps)({className:"wp-block-post"},{template:w,__unstableDisableLayoutClassNames:!0});return(0,a.createElement)("li",{...e})}const S=(0,i.memo)(function({blocks:e,blockContextId:t,isHidden:o,setActiveBlockContextId:r}){const n=(0,d.__experimentalUseBlockPreview)({blocks:e,props:{className:"wp-block-post"}}),c=()=>{r(t)},s={display:o?"none":void 0};return(0,a.createElement)("li",{...n,tabIndex:0,role:"button",onClick:c,onKeyPress:c,style:s})}),_=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"title":"Repeater Template","name":"kadence/repeatertemplate","category":"kadence-blocks","parent":["kadence/repeater"],"description":"Contains the block elements used to render an item in a repeater loop.","usesContext":["queryId","query","queryContext","kadence/dynamicSource","kadence/previewSource","kadence/repeaterRow","displayLayout","templateSlug","previewPostType","postId"],"attributes":{"uniqueID":{"type":"string","default":""},"inQueryBlock":{"type":"boolean","default":false},"lock":{"type":"object","default":{"move":true,"remove":true}}},"supports":{"reusable":false,"customClassName":false}}'),{name:I}=_,{registerBlockType:x}=wp.blocks;x("kadence/repeatertemplate",{..._,title:(0,u.__)("Repeater Layout","kadence-blocks-pro"),icon:{src:n},category:"kadence-blocks",keywords:[(0,u.__)("ACF","kadence-blocks-pro"),(0,u.__)("Repeater","kadence-blocks-pro"),(0,u.__)("Custom","kadence-blocks-pro")],edit:function({clientId:e,context:t,context:{query:{perPage:o,offset:r=0,postType:n,order:c,orderBy:b,author:w,search:_,exclude:I,sticky:x,inherit:P,taxQuery:E,parents:D,pages:O,comparisonLogic:C,...j}={},queryContext:B=[{page:1}],templateSlug:q,displayLayout:{type:R="flex",columns:N=1}={},previewPostType:A,postId:T},attributes:U,setAttributes:L,__unstableLayoutClassNames:F}){const{uniqueID:H,inQueryBlock:M}=U,[Q,z]=(0,i.useState)("loading"),[V,$]=(0,i.useState)("loading"),[J,W]=(0,i.useState)(""),[K,Y]=(0,i.useState)("loading"),[G,X]=(0,i.useState)("loading"),[Z,ee]=(0,i.useState)("loading"),[te,oe]=(0,i.useState)("loading"),{templatePostSlug:re}=(0,l.useSelect)(e=>({templatePostSlug:!!e("core/edit-site")&&e("core/edit-site").getEditedPostId()}),[e]),ne=!!re;(0,i.useEffect)(()=>{L({inQueryBlock:k(t)})},[]),function(e){const{attributes:t,setAttributes:o,isSelected:r,clientId:n,context:a,className:c}=e,{addUniqueID:s}=(0,l.useDispatch)("kadenceblocks/data"),u=(0,l.useSelect)(e=>e,[n]),{isUniqueID:d,isUniqueBlock:p,parentData:k}=(0,i.useMemo)(()=>({isUniqueID:e=>u("kadenceblocks/data").isUniqueID(e),isUniqueBlock:(e,t)=>u("kadenceblocks/data").isUniqueBlock(e,t),parentData:{rootBlock:u("core/block-editor").getBlock(u("core/block-editor").getBlockHierarchyRootClientId(n)),postId:u("core/editor")?.getCurrentPostId()?u("core/editor")?.getCurrentPostId():"",reusableParent:u("core/block-editor").getBlockAttributes(u("core/block-editor").getBlockParentsByBlockName(n,"core/block").slice(-1)[0]),editedPostId:!!u("core/edit-site")&&u("core/edit-site").getEditedPostId()}}),[u,n]),b=(r,a=!1)=>{d(r)||(r=(0,f.uniqueId)(r));let c={uniqueID:r};if(a){const o=((e,t)=>{if(!(t.uniqueID||void 0!==t.noCustomDefaults&&t.noCustomDefaults)){const o=kadence_blocks_params.config&&kadence_blocks_params.config[e]?kadence_blocks_params.config[e]:void 0,r=kadence_blocks_params.configuration?JSON.parse(kadence_blocks_params.configuration):[];void 0!==r[e]&&"object"==typeof r[e]?Object.keys(r[e]).map(o=>{t[o]=r[e][o]}):void 0!==o&&"object"==typeof o&&Object.keys(o).map(e=>{t[e]=o[e]})}return t})(e.name,t);c={...o,uniqueID:r}}Object.assign(t,c),o(c),s(r,n)},g=t=>{const{postId:o,reusableParent:r,rootBlock:n,editedPostId:a}=t;let c=function(e,t,o,r="block-unknown"){return(0,f.has)(o,"ref")?o.ref:t?t="string"==typeof t?t.replace(/\//g,"_"):t:(0,y.getWidgetIdFromBlock)(e)?(0,y.getWidgetIdFromBlock)(e):r}(e,o,r,0);return 0===c&&("core/template-part"===(0,f.get)(n,"name")&&(0,f.has)(n,["attributes","slug"])?c=m(n.attributes.slug)%1e6:a&&(c=m(a)%1e6)),c};if(!t?.uniqueID){const e=g(k),t=(e?e+"_":"")+n.substr(2,9);b(t,!0)}(0,i.useEffect)(()=>{const e=g(k),o=t?.uniqueID&&2===t?.uniqueID.split("_").length,r=(e?e+"_":"")+n.substr(2,9);return!t?.uniqueID||o&&t?.uniqueID.split("_")[0]!==e.toString()?b(r,!0):d(t?.uniqueID)||p(t?.uniqueID,n)?void s(t?.uniqueID,n):b(r,!1)},[n])}({attributes:U,setAttributes:L,clientId:e}),(0,i.useEffect)(()=>{t["kadence/dynamicSource"]&&($((()=>{var e=t["kadence/dynamicSource"];if(e&&"string"==typeof e&&e.includes("|")){const t=e.split("|");e="current"==(e=void 0!==t[0]?t?.[0]:"")?"":e}return!e&&ne?(e=t["kadence/previewSource"],oe(t["kadence/previewSource"]+t["kadence/dynamicSource"])):oe(t["kadence/dynamicSource"]),e})()),W((()=>{var e=t["kadence/dynamicSource"],o="";if(e&&"string"==typeof e&&e.includes("|")){const t=e.split("|");t&&3==t.length?o=t?.[1]+"|"+t?.[2]:t&&4==t.length&&(o=t?.[1]+"|"+t?.[2]+"|"+t?.[3])}return o})()))},[t["kadence/dynamicSource"],t["kadence/previewSource"]]),(0,i.useEffect)(()=>{"loading"!==V&&z(!V||isNaN(V)&&"options"!=V?T:V)},[V]);const[ae,ce]=(0,i.useState)(),{blocks:se}=(0,l.useSelect)(t=>{const{getBlocks:o}=t(d.store);return{blocks:o(e)}},[J]),ie=(0,f.debounce)(g,200),le=(0,f.debounce)(v,200);(0,i.useEffect)(()=>{"loading"!==Q&&ie(V,Q,Y)},[Q]),(0,i.useEffect)(()=>{"loading"!==K&&ee(function(e,t){var o={};return e&&t&&e.forEach(e=>{e.options&&e.options.forEach(e=>{e.value==t&&(o=e)})}),o}(K,J))},[K,J]),(0,i.useEffect)(()=>{K&&J&&!(0,f.isEmpty)(Z)?le(Q,Z.value,X):"loading"!==Q&&"loading"!==K&&X(null)},[Z]);let ue=null;"object"==typeof G&&(ue=G&&0!=Object.keys(G).length?G?.map((e,t)=>({"kadence/dynamicSource":te,"kadence/repeaterRowData":e,"kadence/repeaterRow":t})):[{"kadence/dynamicSource":te,"kadence/repeaterRowData":[],"kadence/repeaterRow":0}]);const de="flex"===R&&N>1,pe=(0,d.useBlockProps)({className:s()(F,{"is-flex-container":de,[`columns-${N}`]:de})});return"loading"===G?(0,a.createElement)("p",{...pe},(0,a.createElement)(p.Spinner,null)):G||"object"==typeof G?(0,a.createElement)("ul",{...pe},ue&&ue.map((e,t)=>(0,a.createElement)(d.BlockContextProvider,{key:t,value:e},0===t?(0,a.createElement)(h,null):null,(0,a.createElement)(S,{blocks:se,blockContextId:t,setActiveBlockContextId:ce,isHidden:0===t})))):(0,a.createElement)("p",{...pe}," ",(0,u.__)("No data found for this repeater and source.","kadence-blocks-pro"))},save:function(){return(0,a.createElement)(d.InnerBlocks.Content,null)}})},21020(e,t,o){"use strict";var r=o(51609),n=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,o){var r,i={},l=null,u=null;for(r in void 0!==o&&(l=""+o),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!s.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:n,type:e,key:l,ref:u,props:i,_owner:c.current}}},74848(e,t,o){"use strict";e.exports=o(21020)},51609(e){"use strict";e.exports=window.React},46942(e,t){var o;!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=c(e,a(o)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var o in e)r.call(e,o)&&e[o]&&(t=c(t,o));return t}function c(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):void 0===(o=function(){return n}.apply(t,[]))||(e.exports=o)}()}},o={};function r(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.m=t,e=[],r.O=(t,o,n,a)=>{if(!o){var c=1/0;for(u=0;u<e.length;u++){for(var[o,n,a]=e[u],s=!0,i=0;i<o.length;i++)(!1&a||c>=a)&&Object.keys(r.O).every(e=>r.O[e](o[i]))?o.splice(i--,1):(s=!1,a<c&&(c=a));if(s){e.splice(u--,1);var l=n();void 0!==l&&(t=l)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[o,n,a]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={920:0,735:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[c,s,i]=o,l=0;if(c.some(t=>0!==e[t])){for(n in s)r.o(s,n)&&(r.m[n]=s[n]);if(i)var u=i(r)}for(t&&t(o);l<c.length;l++)a=c[l],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(u)},o=globalThis.webpackChunkkadence=globalThis.webpackChunkkadence||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var n=r.O(void 0,[735],()=>r(52686));n=r.O(n),(this.kadence=this.kadence||{})["blocks-repeatertemplate"]=n})();
💾 Save Changes
❌ Cancel