HEX
Server: Apache
System: Linux ecngx285.inmotionhosting.com 4.18.0-553.79.1.lve.el8.x86_64 #1 SMP Wed Oct 15 17:59:35 UTC 2025 x86_64
User: zeusxp5 (3862)
PHP: 8.3.28
Disabled: NONE
Upload Files
File: /home/zeusxp5/chuair.org/wp-content/plugins/wd-framework/build/timeline/index.js
!function(){"use strict";var e,t={5940:function(){var e=window.wp.element,t=window.wp.blocks,n=window.wp.i18n,l=window.wp.primitives,a=(0,e.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(l.Path,{d:"M20 5h-5.7c0-1.3-1-2.3-2.3-2.3S9.7 3.7 9.7 5H4v2h1.5v.3l1.7 11.1c.1 1 1 1.7 2 1.7h5.7c1 0 1.8-.7 2-1.7l1.7-11.1V7H20V5zm-3.2 2l-1.7 11.1c0 .1-.1.2-.3.2H9.1c-.1 0-.3-.1-.3-.2L7.2 7h9.6z"}));const{useState:r,useEffect:c}=wp.element,{useBlockProps:i,InspectorControls:o,AlignmentControl:s,BlockControls:m,MediaUpload:_,MediaUploadCheck:d}=wp.blockEditor,{PanelBody:u,TextControl:v,SelectControl:p,TextareaControl:h,RangeControl:w,Button:g}=wp.components;var f=JSON.parse('{"apiVersion":2,"name":"webdevia/timeline","version":"0.1.0","title":"Timeline","category":"webdevia","icon":"smily","description":"The Timeline block!","attributes":{"mediaId":{"type":"number","default":0},"mediaUrl":{"type":"string","default":"../wp-content/plugins/wd-framework/includes/block-editor/blocks/timeline/placeholder-icon.svg"},"layout":{"type":"string","default":"ha"},"events":{"type":"array","default":[{"date":"2020","title":"Event 1","picture":"https://via.placeholder.com/300x200.png","link":"#","text":"Lorem ipsum dolor sit amet, consectetur adip"},{"date":"2021","title":"Event 2","picture":"https://via.placeholder.com/300x200.png","link":"#","text":"Lorem ipsum dolor sit amet, consectetur adip"},{"date":"2022","title":"Event 3","picture":"https://via.placeholder.com/300x200.png","link":"#","text":"Lorem ipsum dolor sit amet, consectetur adip"}]},"columns":{"type":"number","default":3},"textAlign":{"type":"string","default":"left"}},"supports":{"html":false,"anchor":true,"align":["wide","full"]},"keywords":["wd","webdevia","timeline"],"textdomain":"webdevia-blocks","editorScript":"file:./index.js","viewScript":"file:./view.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');const{name:E,...k}=f,{withSelect:b}=wp.data;(0,t.registerBlockType)(E,{...k,icon:()=>(0,e.createElement)("svg",{width:"783",height:"795",version:"1.1",viewBox:"0 0 783 795",xmlns:"http://www.w3.org/2000/svg",class:"wd-blocks-icon"},(0,e.createElement)("g",{fill:"currentColor"},(0,e.createElement)("path",{d:"m0 50c0-12.702 10.297-23 23-23h267c12.703 0 23 10.298 23 23v139c0 12.703-10.297 23-23 23h-267c-12.702 0-23-10.297-23-23v-139z"}),(0,e.createElement)("path",{d:"m470 235c0-12.703 10.297-23 23-23h267c12.703 0 23 10.297 23 23v139c0 12.703-10.297 23-23 23h-267c-12.703 0-23-10.297-23-23v-139z"}),(0,e.createElement)("path",{d:"m0 420c0-12.703 10.297-23 23-23h267c12.703 0 23 10.297 23 23v139c0 12.703-10.297 23-23 23h-267c-12.702 0-23-10.297-23-23v-139z"}),(0,e.createElement)("path",{d:"m470 605c0-12.703 10.297-23 23-23h267c12.703 0 23 10.297 23 23v139c0 12.703-10.297 23-23 23h-267c-12.703 0-23-10.297-23-23v-139z"})),(0,e.createElement)("g",{stroke:"#fff"},(0,e.createElement)("path",{d:"m0 50c0-12.702 10.297-23 23-23h267c12.703 0 23 10.298 23 23v139c0 12.703-10.297 23-23 23h-267c-12.702 0-23-10.297-23-23v-139z"}),(0,e.createElement)("path",{d:"m470 235c0-12.703 10.297-23 23-23h267c12.703 0 23 10.297 23 23v139c0 12.703-10.297 23-23 23h-267c-12.703 0-23-10.297-23-23v-139z"}),(0,e.createElement)("path",{d:"m0 420c0-12.703 10.297-23 23-23h267c12.703 0 23 10.297 23 23v139c0 12.703-10.297 23-23 23h-267c-12.702 0-23-10.297-23-23v-139z"}),(0,e.createElement)("path",{d:"m470 605c0-12.703 10.297-23 23-23h267c12.703 0 23 10.297 23 23v139c0 12.703-10.297 23-23 23h-267c-12.703 0-23-10.297-23-23v-139z"})),(0,e.createElement)("g",{fill:"currentColor"},(0,e.createElement)("rect",{x:"381",width:"21",height:"795",rx:"10.5"}),(0,e.createElement)("rect",{x:"307",y:"109",width:"74",height:"21"}),(0,e.createElement)("rect",{x:"307",y:"485",width:"74",height:"21"}),(0,e.createElement)("rect",{x:"402",y:"298",width:"74",height:"21"}),(0,e.createElement)("rect",{x:"402",y:"665",width:"74",height:"21"}))),edit:b(((e,t)=>({media:t.attributes.mediaId?e("core").getMedia(t.attributes.mediaId):void 0})))((function(t){let{media:l,attributes:s,setAttributes:f}=t;const{rel:E,mediaId:k,events:b,layout:x,textAlign:y,columns:C}=s;c((()=>{}),[]);const N="wd-block-webdevia-timeline",[$,S]=r();let O;const T=i({className:N}),z=(e,t)=>{if(e){const n=[...b];n[t].picture=e.url,f({events:n})}},L=(e,t,n)=>{const l=[...b];switch(e){case"title":l[n].title=t;break;case"date":l[n].date=t;break;case"text":l[n].text=t;break;case"link":l[n].link=t}f({events:l})};return b.length>0&&(O=b.map(((t,l)=>(0,e.createElement)("li",{key:l,className:`${N}__ic__events__event`,draggable:!0,onDragStart:e=>((e,t)=>{e.target.classList.add("dragging")})(e),onDragEnter:e=>((e,t)=>{S(t)})(0,l),onDragOver:e=>((e,t)=>{e.preventDefault();const n=e.target.closest(`.${N}__ic__events ul`),l=function(e,t){return[...e.querySelectorAll(`.${N}__ic__events__event:not(.dragging)`)].reduce(((e,n)=>{const l=n.getBoundingClientRect(),a=t-l.top-l.height/2;return a<0&&a>e.offset?{offset:a,element:n}:e}),{offset:Number.NEGATIVE_INFINITY}).element}(n,e.clientY),a=n.querySelector(".dragging");null==l?n.appendChild(a):n.insertBefore(a,l)})(e),onDragEnd:e=>((e,t)=>{e.target.classList.remove("dragging");const n=[...b],l=n[t];n.splice(t,1);const a=[...n.slice(0,$),l,...n.slice($,n.length)];f({events:a})})(e,l)},(0,e.createElement)("div",{className:`${N}__ic__events__event__title`,onClick:e=>((e,t)=>{e.target.closest("#removeEvent")?f({events:b.filter(((e,n)=>t!==n))}):e.target.closest("li").querySelector(`.${N}__ic__events__event__content`).classList.toggle("open")})(e,l)},t.title,(0,e.createElement)("span",{id:"removeEvent",className:`${N}__ic__events__event__remove`},a)),(0,e.createElement)("div",{className:`${N}__ic__events__event__content`},(0,e.createElement)(v,{label:(0,n.__)("Title","wd-framework"),value:t?.title||"",onChange:e=>L("title",e,l)}),(0,e.createElement)(v,{label:(0,n.__)("Date","wd-framework"),value:t?.date||"",onChange:e=>L("date",e,l)}),(0,e.createElement)(h,{label:"Text",help:"Enter some text",value:t?.text||"",onChange:e=>L("text",e,l)}),(0,e.createElement)(v,{label:(0,n.__)("Link","wd-framework"),value:t?.link||"",onChange:e=>L("link",e,l)}),(0,e.createElement)("fieldset",{className:`${N}__ic__picture`},(0,e.createElement)("legend",null,(0,n.__)("picture","wd-framework")),(0,e.createElement)("div",{className:`${N}__ic__picture__controls`},!t.picture&&(0,e.createElement)(d,null,(0,e.createElement)(_,{onSelect:e=>z(e,l),value:k,allowedTypes:["image"],render:l=>{let{open:a}=l;return(0,e.createElement)(g,{className:t.picture?`${N}__ic__picture__preview`:`${N}__ic__picture__toggle`,onClick:a},(0,n.__)("Choose picture","wd-framework"))}})),!!t.picture&&(0,e.createElement)(d,null,(0,e.createElement)(_,{title:(0,n.__)("Replace picture","awp"),value:k,onSelect:e=>z(e,l),allowedTypes:["image"],render:t=>{let{open:l}=t;return(0,e.createElement)(g,{onClick:l,variant:"secondary",isLarge:!0},(0,n.__)("Replace picture","wd-framework"))}})),!!t.picture&&(0,e.createElement)(d,null,(0,e.createElement)(g,{onClick:()=>(e=>{const t=[...b];t[e].picture="https://via.placeholder.com/300x200.png",f({events:t})})(l),isLink:!0,isDestructive:!0},(0,n.__)("Remove picture","wd-framework")))),!!t.picture&&(0,e.createElement)("span",{className:`${N}__ic__picture__toggle`},(0,e.createElement)(d,null,(0,e.createElement)("img",{src:t.picture,alt:"picture preview"}))))))))),[(0,e.createElement)(o,null,(0,e.createElement)(u,{title:(0,n.__)("Settings","wd-framework"),initialOpen:!0,className:`${N}__ic`},(0,e.createElement)(p,{label:(0,n.__)("Layout","wd-framework"),className:`${N}__ic__layout`,value:x,options:[{label:(0,n.__)("Horizontal Alternating","wd-framework"),value:"ha"},{label:(0,n.__)("Horizontal Standard","wd-framework"),value:"hs"},{label:(0,n.__)("Vertical Separated","wd-framework"),value:"vse"},{label:(0,n.__)("Vertical side","wd-framework"),value:"vsi"}],onChange:e=>f({layout:e})}),!!b&&(0,e.createElement)("fieldset",{className:`${N}__ic__events`},(0,e.createElement)("legend",null,(0,n.__)("Events","wd-framework")),(0,e.createElement)("ul",null,O.length?O:(0,e.createElement)("div",null,(0,n.__)("There are no events yet, please add some!")))),(0,e.createElement)(g,{variant:"primary",className:`${N}__ic__add-event`,onClick:()=>(()=>{const e=[...b];e.push({title:"New event",date:"2000",picture:"https://via.placeholder.com/300x200.png",link:"#",text:"Lorem ipsum dolor sit amet, consectetur adip"}),f({events:e})})()},(0,n.__)("Add Event")),!!x.includes("h")&&(0,e.createElement)(w,{label:(0,n.__)("Columns","wd-framework"),value:C,onChange:e=>f({columns:e}),min:1,max:10}))),(0,e.createElement)(m,{group:"block"}),(0,e.createElement)("div",T,(0,e.createElement)("ul",{className:`${N}__events ${N}__events-layout-${x}`},b.length&&b.map((t=>(0,e.createElement)("li",{className:"timeline__event",style:{flex:x.includes("h")?`0 0 ${100/C}%`:"1"}},(0,e.createElement)("img",{src:t.picture,className:"timeline__event__img"}),(0,e.createElement)("div",{className:"timeline__event__content"},(0,e.createElement)("h4",{className:"timeline__event__content__head"},(0,e.createElement)("a",{href:t.link},t.title)),(0,e.createElement)("p",{className:"timeline__event__content__text"},(0,e.createElement)("span",{className:"timeline__event__content__date"},t.date,": "),t.text)))))))]}))})}},n={};function l(e){var a=n[e];if(void 0!==a)return a.exports;var r=n[e]={exports:{}};return t[e](r,r.exports,l),r.exports}l.m=t,e=[],l.O=function(t,n,a,r){if(!n){var c=1/0;for(m=0;m<e.length;m++){n=e[m][0],a=e[m][1],r=e[m][2];for(var i=!0,o=0;o<n.length;o++)(!1&r||c>=r)&&Object.keys(l.O).every((function(e){return l.O[e](n[o])}))?n.splice(o--,1):(i=!1,r<c&&(c=r));if(i){e.splice(m--,1);var s=a();void 0!==s&&(t=s)}}return t}r=r||0;for(var m=e.length;m>0&&e[m-1][2]>r;m--)e[m]=e[m-1];e[m]=[n,a,r]},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={8724:0,3831:0,5592:0};l.O.j=function(t){return 0===e[t]};var t=function(t,n){var a,r,c=n[0],i=n[1],o=n[2],s=0;if(c.some((function(t){return 0!==e[t]}))){for(a in i)l.o(i,a)&&(l.m[a]=i[a]);if(o)var m=o(l)}for(t&&t(n);s<c.length;s++)r=c[s],l.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return l.O(m)},n=self.webpackChunkwebdevia_blocks=self.webpackChunkwebdevia_blocks||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var a=l.O(void 0,[5592],(function(){return l(5940)}));a=l.O(a)}();