react-bricks 4.3.0-beta.1 → 4.3.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- import{a as e,t,b as n,_ as r,e as i,f as a,d as o,c as s,k as l,l as u}from"./react-bricks-1649b93a.esm.js";import{Md5 as c}from"ts-md5";import d from"react";var p=function(e,t){var n=e;if(/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/.+\..{1,4}/.test(e)){var r=e.match(/(\/[^\/]+)\..{1,4}$/);(null==r?void 0:r.length)&&(null==r?void 0:r.length)>1&&(n=e.replace(r[1],""))}if(!t)return n;var i=n.lastIndexOf(".");return n.substring(0,i)+"/"+t+n.substring(i)},m=function(t,n){return t?n?t.split(",").map((function(t){var r=e(t.trim().split(" "),2),i=r[0],a=r[1];return i&&a?"".concat(p(i,n)," ").concat(a):p(t,n)})).join(", "):t:""},v=function(e){var t=e.lastIndexOf(".");return e.substring(t)},f=function(e){return function(e){var t,n;if(!1===g(e))return!1;if("function"!=typeof(t=e.constructor))return!1;if(!1===g(n=t.prototype))return!1;if(!1===n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(e)&&"string"==typeof e.text};function h(e){return f(e)?e.text:e.children&&Array.isArray(e.children)?e.children.map(h).join(""):""}function g(e){return!0==(null!=(t=e)&&"object"==typeof t&&!1===Array.isArray(t))&&"[object Object]"===Object.prototype.toString.call(e);var t}var y,b={serialize:function(e){return Array.isArray(e)&&e.length>0?e.map(h).join("\n"):""},serializeLight:function(e){return Array.isArray(e)&&1===e.length&&(f(e[0])||e[0].children&&Array.isArray(e[0].children)&&1===e[0].children.length&&e[0].children[0].text&&!e[0].children[0].bold&&!e[0].children[0].italic&&!e[0].children[0].code&&!e[0].children[0].highlight&&!e[0].children[0].link)?e.map(h).join("\n"):e},deserialize:function(e){return e.split("\n").map((function(e){return{type:"paragraph",children:[{text:e}]}}))},isText:f,isSlateContent:function(e){return!!(e&&Array.isArray(e)&&e.length>0&&e[0]&&"paragraph"===e[0].type&&e[0].children)}},w=function(e,t,n){return!(n&&n.find((function(t){return t===e}))||t&&!t.find((function(t){return t===e})))},P={id:"",type:"",slug:"",name:"",meta:{},author:{id:"",firstName:"",lastName:"",email:""},lastEditedBy:{date:"",user:{id:"",firstName:"",lastName:"",company:"",email:""}},status:t.PageStatus.Draft,editStatus:t.EditStatus.Merged,isLocked:!1,content:[],tags:[],createdAt:"",language:"en",translations:[]},A=function(e,t,r){if(!e||!e.type||!e.content)return P;var i=t.find((function(t){return t.name===e.type}));if(!i)return e;var a=x(r,e.content,i.allowedBlockTypes,i.excludedBlockTypes);return n(n({},e),{content:a.blocks,invalidBlocksTypes:a.invalidBlocksTypes})},x=function(t,i,a,o){return i.reduce((function(i,s){var l=t[s.type];if(!l||!w(s.type,a,o))return n(n({},i),{invalidBlocksTypes:r(r([],e(i.invalidBlocksTypes),!1),[s.type],!1)});var u=l.schema.sideEditProps?l.schema.sideEditProps.reduce((function(t,n){if(n.groupName||"BOOLEAN"!==n.type||t.push(n),n.groupName){var i=n.props.filter((function(e){return"BOOLEAN"===e.type}));t=r(r([],e(t),!1),e(i),!1)}return t}),[]):[],c=u.reduce((function(e,t){var r,i=s.props[t.name];return n(n({},e),((r={})[t.name]=!!i,r))}),{}),d=n(n({},s),{props:n(n({},s.props),c)});return Object.keys(d.props).forEach((function(e){var n,r,i,a,o,s,u;d.props[e]&&(null===(r=null===(n=d.props[e])||void 0===n?void 0:n.document)||void 0===r?void 0:r.data)&&(null===(a=null===(i=d.props[e])||void 0===i?void 0:i.document)||void 0===a?void 0:a.nodes)&&"document"===(null===(s=null===(o=d.props[e])||void 0===o?void 0:o.document)||void 0===s?void 0:s.object)||(null===(u=l.schema.repeaterItems)||void 0===u?void 0:u.find((function(t){return t.name===e})))&&(d.props[e]=x(t,d.props[e]).blocks)})),n(n({},i),{blocks:r(r([],e(i.blocks),!1),[d],!1)})}),{blocks:[],invalidBlocksTypes:[]})},C=function(e){var t=atob(e).split("|");if(3!==t.length)return null;var n=t[0],r=t[1],i=t[2],a=(new Date).getTime();if(Math.abs(a-parseInt(r,10))>3e5)return null;var o="".concat(n,"|").concat(r,"|").concat("r@sPX2").concat("q*7*&g".replace(String.fromCharCode(113),String.fromCharCode(81)));return c.hashStr(o)!==i?null:n},T=function(e){return"41192756"===C(e)},O=function(e){var t=C(e);return"77048934"===t||"91035396"===t},N=function(e){var t,r,i,a,o,s,l;return n(n(n(n(n({"@context":"https://schema.org/","@type":"Thing",name:e.name},1===(null===(t=e.alternateName)||void 0===t?void 0:t.length)&&{alternateName:e.alternateName[0].name}),(null===(r=e.alternateName)||void 0===r?void 0:r.length)&&(null===(i=e.alternateName)||void 0===i?void 0:i.length)>1&&{alternateName:e.alternateName.map((function(e){return e.name}))}),1===(null===(a=e.sameAs)||void 0===a?void 0:a.length)&&{sameAs:e.sameAs[0].url}),(null===(o=e.sameAs)||void 0===o?void 0:o.length)&&(null===(s=e.sameAs)||void 0===s?void 0:s.length)>1&&{sameAs:e.sameAs.map((function(e){return e.url}))}),{url:e.url,description:e.description,image:null===(l=e.image)||void 0===l?void 0:l.src})},k=function(e,t){switch(e){case"article":return function(e){var t,r,i,a,o;return n(n(n(n(n(n(n({"@context":"https://schema.org","@type":"Article"},e.url&&{mainEntityOfPage:{"@type":"WebPage","@id":e.url}}),e.description&&{description:e.description}),{headline:e.headline}),1===(null===(t=e.images)||void 0===t?void 0:t.length)&&{image:{"@type":"ImageObject",url:null===(r=e.images[0])||void 0===r?void 0:r.src,width:null===(i=e.images[0])||void 0===i?void 0:i.width,height:null===(a=e.images[0])||void 0===a?void 0:a.height}}),(null===(o=e.images)||void 0===o?void 0:o.length)&&e.images.length>1&&{image:e.images.map((function(e){return{"@type":"ImageObject",url:null==e?void 0:e.src,width:null==e?void 0:e.width,height:null==e?void 0:e.height}}))}),{author:n({"@type":e.authorType,name:e.authorName},e.authorUrl&&{url:e.authorUrl}),publisher:{"@type":"Organization",name:e.publisherName,logo:{"@type":"ImageObject",url:e.publisherLogoUrl,width:e.publisherLogoWidth,height:e.publisherLogoHeight}},datePublished:e.datePublished}),e.dateModified&&{dateModified:e.dateModified})}(t);case"breadcrumb":return function(e){var t;return{"@context":"https://schema.org/","@type":"BreadcrumbList",itemListElement:null===(t=e.itemListElement)||void 0===t?void 0:t.map((function(e,t){return{"@type":"ListItem",position:t+1,name:e.name,item:e.item}}))}}(t);case"event":return function(e){var t,r,i,a,o,s=void 0,l=void 0,u=void 0;switch(e.status){case"cancelled":s="Cancelled";break;case"moved-online":s="MovedOnline";break;case"postponed":s="Postponed";break;case"scheduled":s="Scheduled"}switch(e.attendanceMode){case"mixed":l="Mixed";break;case"online":l="Online";break;case"offline":l="Offline"}switch(e.performerType){case"dance-group":u="DanceGroup";break;case"music-group":u="MusicGroup";break;case"performing-group":u="PerformingGroup";break;case"person":u="Person";break;case"theater-group":u="TheaterGroup"}var c=function(e){switch(e){case"in-stock":return"InStock";case"sold-out":return"SoldOut";case"pre-order":return"PreOrder";default:return""}},d=null===(t=e.timeZone)||void 0===t?void 0:t.split(" | "),p=d&&d.length>0&&d[1];return n(n(n(n(n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org/","@type":"Event"},e.name&&{name:e.name}),e.description&&{description:e.description}),e.imageUrl&&{image:e.imageUrl}),e.startDate&&{startDate:""!==e.startTime&&e.startTime?e.startDate+"T"+e.startTime+p:e.startDate}),e.endDate&&{endDate:""!==e.endTime&&e.endTime?e.endDate+"T"+e.endTime+p:e.endDate}),e.status&&{eventStatus:s&&"https://schema.org/Event"+s}),e.attendanceMode&&{eventAttendanceMode:l&&"https://schema.org/"+l+"EventAttendanceMode"}),("online"===e.attendanceMode||"mixed"===e.attendanceMode)&&""!==e.streamUrl&&e.streamUrl&&{streamUrl:e.streamUrl}),"online"===e.attendanceMode&&{location:{"@type":"VirtualLocation",url:e.streamUrl}}),"offline"===e.attendanceMode&&{location:{"@type":"Place",name:e.venueName,address:{"@type":"PostalAddress",streetAddress:e.street,addressLocality:e.city,postalCode:e.zipCode,addressCountry:e.countryCode,addressRegion:e.regionCode}}}),"mixed"===e.attendanceMode&&{location:[{"@type":"VirtualLocation",url:e.streamUrl},{"@type":"Place",name:e.venueName,address:{"@type":"PostalAddress",streetAddress:e.street,addressLocality:e.city,postalCode:e.zipCode,addressCountry:e.countryCode,addressRegion:e.regionCode}}]}),e.performerType&&{performer:{"@type":u,name:e.performerName}}),1===(null===(r=e.offers)||void 0===r?void 0:r.length)&&{offers:{"@type":"Offer",name:e.offers[0].name,price:e.offers[0].price,priceCurrency:e.offers[0].priceCurrency,validFrom:e.offers[0].validFrom,url:e.offers[0].url,availability:""!==e.offers[0].availability?"https://schema.org/"+c(e.offers[0].availability):e.offers[0].availability}}),(null===(i=e.offers)||void 0===i?void 0:i.length)&&(null===(a=e.offers)||void 0===a?void 0:a.length)>1&&{offers:null===(o=e.offers)||void 0===o?void 0:o.map((function(e){return{"@type":"Offer",name:e.name,price:e.price,priceCurrency:e.priceCurrency,validFrom:e.validFrom,url:e.url,availability:""!==e.availability?"https://schema.org/"+c(e.availability):e.availability}}))})}(t);case"faq":return function(e){var t,r,i,a;return n(n({"@context":"https://schema.org","@type":"FAQPage"},(null===(t=e.faq)||void 0===t?void 0:t.length)&&(null===(r=e.faq)||void 0===r?void 0:r.length)<2&&{mainEntity:{"@type":"Question",name:e.faq[0].question,acceptedAnswer:{"@type":"Answer",text:e.faq[0].answer}}}),(null===(i=e.faq)||void 0===i?void 0:i.length)&&(null===(a=e.faq)||void 0===a?void 0:a.length)>=2&&{mainEntity:e.faq.map((function(e){return{"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}}))})}(t);case"how-to":return function(e){var t,r,i,a,o,s;return n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org/","@type":"HowTo",name:e.name},e.description&&{description:e.description}),e.totalTime&&{totalTime:"PT"+e.totalTime+"M"}),(""!==e.currency||!Number.isNaN(e.estimatedCost))&&{estimatedCost:{"@type":"MonetaryAmount",currency:e.currency,value:Number.isNaN(e.estimatedCost)?"":e.estimatedCost}}),e.imageUrl&&{image:e.imageUrl}),1===(null===(t=e.supplies)||void 0===t?void 0:t.length)&&{supply:{"@type":"HowToSupply",name:e.supplies[0].supply}}),(null===(r=e.supplies)||void 0===r?void 0:r.length)&&e.supplies.length>1&&{supply:e.supplies.map((function(e){return{"@type":"HowToSupply",name:e.supply}}))}),1===(null===(i=e.tools)||void 0===i?void 0:i.length)&&{tool:{"@type":"HowToTool",name:e.tools[0].tool}}),(null===(a=e.tools)||void 0===a?void 0:a.length)&&e.tools.length>1&&{tool:e.tools.map((function(e){return{"@type":"HowToTool",name:e.tool}}))}),1===(null===(o=e.steps)||void 0===o?void 0:o.length)&&{step:n(n(n({"@type":"HowToStep",text:e.steps[0].instructions},e.steps[0].imageUrl&&{image:e.steps[0].imageUrl}),e.steps[0].name&&{name:e.steps[0].name}),e.steps[0].url&&{url:e.steps[0].url})}),(null===(s=e.steps)||void 0===s?void 0:s.length)&&e.steps.length>1&&{step:e.steps.map((function(e){return n(n(n({"@type":"HowToStep",text:e.instructions},e.imageUrl&&{image:e.imageUrl}),e.name&&{name:e.name}),e.url&&{url:e.url})}))})}(t);case"job-posting":return function(e){var t;return n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org/","@type":"JobPosting",title:e.title,description:e.description},e.identifier&&{identifier:{"@type":"PropertyValue",name:e.company,value:e.identifier}}),{hiringOrganization:n(n({"@type":"Organization",name:e.company},e.companyUrl&&{sameAs:e.companyUrl}),e.companyLogo&&{logo:null===(t=e.companyLogo)||void 0===t?void 0:t.src})}),e.industry&&{industry:e.industry}),{employmentType:e.employmentType}),e.workHours&&{workHours:e.workHours}),{datePosted:e.datePosted,validThrough:e.validThrough}),!e.remoteJob&&{jobLocation:{"@type":"Place",address:{"@type":"PostalAddress",streetAddress:e.street,addressLocality:e.city,postalCode:e.zipCode,addressCountry:e.countryCode,addressRegion:e.regionCode}}}),e.remoteJob&&{applicantLocationRequirements:{"@type":"Country",name:e.countryCode},jobLocationType:"TELECOMMUTE"}),e.salaryMinValue&&{baseSalary:{"@type":"MonetaryAmount",currency:e.currency,value:n(n(n({"@type":"QuantitativeValue"},!e.salaryMaxValue&&{value:e.salaryMinValue}),e.salaryMaxValue&&{minValue:e.salaryMinValue,maxValue:e.salaryMaxValue}),{unitText:e.unitText})}}),{responsibilities:e.responsibilities,skills:e.skills,qualifications:e.qualifications,educationRequirements:e.educationRequirements,experienceRequirements:e.experienceRequirements})}(t);case"local-business":return function(e){var t,r,i,a,o,s,l,u=null===(t=e.paymentsAccepted)||void 0===t?void 0:t.filter((function(e){return!1!==e})),c=e.openingHours&&e.openingHours[0].dayOfWeek.filter((function(e){return!1!==e}));return n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org","@type":e.businessType,name:e.name,image:null===(r=e.image)||void 0===r?void 0:r.src,"@id":e.id,url:e.url,telephone:e.phone},e.priceRange&&{priceRange:e.priceRange}),{address:n({"@type":"PostalAddress",streetAddress:e.street,addressLocality:e.city,postalCode:e.zipCode,addressCountry:e.countryCode},e.regionCode&&{addressRegion:e.regionCode})}),(e.latitude||e.longitude)&&{geo:{"@type":"GeoCoordinates",latitude:e.latitude,longitude:e.longitude}}),1===(null==u?void 0:u.length)&&{paymentAccepted:u[0]}),(null==u?void 0:u.length)&&u.length>1&&{paymentAccepted:u}),e.open247&&{openingHoursSpecification:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],opens:"00:00",closes:"23:59"}}),!e.open247&&1===(null===(i=e.openingHours)||void 0===i?void 0:i.length)&&{openingHoursSpecification:{"@type":"OpeningHoursSpecification",dayOfWeek:1===(null==c?void 0:c.length)?c[0]:c,opens:e.openingHours[0].opens,closes:e.openingHours[0].closes}}),!e.open247&&(null===(a=e.openingHours)||void 0===a?void 0:a.length)&&(null===(o=e.openingHours)||void 0===o?void 0:o.length)>1&&{openingHoursSpecification:e.openingHours.map((function(e){var t=e.dayOfWeek.filter((function(e){return!1!==e}));return{"@type":"OpeningHoursSpecification",dayOfWeek:1===t.length?t[0]:t,opens:e.opens,closes:e.closes}}))}),1===(null===(s=e.socialProfiles)||void 0===s?void 0:s.length)&&{sameAs:e.socialProfiles[0].url}),(null===(l=e.socialProfiles)||void 0===l?void 0:l.length)&&e.socialProfiles.length>1&&{sameAs:e.socialProfiles.map((function(e){return e.url}))})}(t);case"organization":return function(e){var t,r,i,a,o,s,l,u,c=e.contacts&&(null===(t=e.contacts[0])||void 0===t?void 0:t.areas.filter((function(e){return 0!=!!e&&""!==e}))),d=e.contacts&&(null===(r=e.contacts[0])||void 0===r?void 0:r.languages.filter((function(e){return 0!=!!e&&""!==e}))),p=e.contacts&&(null===(i=e.contacts[0])||void 0===i?void 0:i.options.filter((function(e){return 0!=!!e&&""!==e})));return n(n(n(n(n(n({"@context":"https://schema.org","@type":e.type,name:e.name},e.alternateName&&{alternateName:e.alternateName}),{url:e.url,logo:null===(a=e.logo)||void 0===a?void 0:a.src}),1===(null===(o=e.contacts)||void 0===o?void 0:o.length)&&{contactPoint:n(n({"@type":"ContactPoint",telephone:e.contacts[0].phone},e.contacts[0].type&&{contactType:e.contacts[0].type}),{areaServed:0===(null==c?void 0:c.length)?"":1===(null==c?void 0:c.length)?c[0]:c,availableLanguage:0===(null==d?void 0:d.length)?"":1===(null==d?void 0:d.length)?d[0]:d,contactOption:0===(null==p?void 0:p.length)?"":1===(null==p?void 0:p.length)?p[0]:p})}),(null===(s=e.contacts)||void 0===s?void 0:s.length)&&e.contacts.length>1&&{contactPoint:e.contacts.map((function(t){var r=e.contacts&&t.areas.filter((function(e){return 0!=!!e&&""!==e})),i=e.contacts&&t.languages.filter((function(e){return 0!=!!e&&""!==e})),a=e.contacts&&t.options.filter((function(e){return 0!=!!e&&""!==e}));return n(n({"@type":"ContactPoint",telephone:t.phone},t.type&&{contactType:t.type}),{areaServed:0===(null==r?void 0:r.length)?"":1===(null==r?void 0:r.length)?r[0]:r,availableLanguage:0===(null==i?void 0:i.length)?"":1===(null==i?void 0:i.length)?i[0]:i,contactOption:0===(null==a?void 0:a.length)?"":1===(null==a?void 0:a.length)?a[0]:a})}))}),1===(null===(l=e.socials)||void 0===l?void 0:l.length)&&{sameAs:e.socials[0].url}),(null===(u=e.socials)||void 0===u?void 0:u.length)&&e.socials.length>1&&{sameAs:e.socials.map((function(e){return e.url}))})}(t);case"person":return function(e){var t,r,i;return n(n(n(n({"@context":"https://schema.org/","@type":"Person",name:e.name,url:e.url,image:null===(t=e.image)||void 0===t?void 0:t.src},1===(null===(r=e.socialProfiles)||void 0===r?void 0:r.length)&&{sameAs:e.socialProfiles[0].url}),(null===(i=e.socialProfiles)||void 0===i?void 0:i.length)&&e.socialProfiles.length>1&&{sameAs:e.socialProfiles.map((function(e){return e.url}))}),e.jobTitle&&{jobTitle:e.jobTitle}),e.company&&{worksFor:{"@type":"Organization",name:e.company}})}(t);case"product":return function(e){var t,r,i;return n(n(n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org/","@type":"Product",name:e.name,image:null===(t=e.image)||void 0===t?void 0:t.src},e.description&&{description:e.description}),e.brand&&{brand:{"@type":"Brand",name:e.brand}}),e.sku&&{sku:e.sku}),e.gtin8&&{gtin8:e.gtin8}),e.gtin13&&{gtin13:e.gtin13}),e.gtin14&&{gtin14:e.gtin14}),e.mpn&&{mpn:e.mpn}),e.ratingValue&&{aggregateRating:n(n({"@type":"AggregateRating",ratingValue:e.ratingValue,bestRating:e.bestRating},e.worstRating&&{worstRating:e.worstRating}),e.ratingCount&&{ratingCount:e.ratingCount})}),1===(null===(r=e.reviews)||void 0===r?void 0:r.length)&&{review:n(n(n(n(n({"@type":"Review",reviewBody:e.reviews[0].reviewBody},e.reviews[0].name&&{name:e.reviews[0].name}),e.reviews[0].datePublished&&{datePublished:e.reviews[0].datePublished}),{author:{"@type":"Person",name:e.reviews[0].author}}),e.reviews[0].publisher&&{publisher:{"@type":"Organization",name:e.reviews[0].publisher}}),e.reviews[0].ratingValue&&{reviewRating:{"@type":"Rating",ratingValue:e.reviews[0].ratingValue}})}),(null===(i=e.reviews)||void 0===i?void 0:i.length)&&e.reviews.length>1&&{review:e.reviews.map((function(e){return n(n(n(n(n({"@type":"Review",reviewBody:e.reviewBody},e.name&&{name:e.name}),e.datePublished&&{datePublished:e.datePublished}),{author:{"@type":"Person",name:e.author}}),e.publisher&&{publisher:{"@type":"Organization",name:e.publisher}}),e.ratingValue&&{reviewRating:{"@type":"Rating",ratingValue:e.ratingValue}})}))}),"offer"===e.offerType&&{offers:n(n(n({"@type":"Offer",url:e.url,priceCurrency:e.priceCurrency,price:Number.isNaN(e.price)?"":e.price},e.priceValidUntil&&{priceValidUntil:e.priceValidUntil}),"not-specified"!==e.availability&&{availability:"https://schema.org/"+e.availability}),"not-specified"!==e.itemCondition&&{itemCondition:"https://schema.org/"+e.itemCondition+"Condition"})}),"aggregate-offer"===e.offerType&&{offers:n(n(n({"@type":"AggregateOffer",url:e.url,priceCurrency:e.priceCurrency},e.lowPrice&&{lowPrice:e.lowPrice}),e.highPrice&&{highPrice:e.highPrice}),e.offerCount&&{offerCount:e.offerCount})})}(t);case"thing":default:return N(t);case"video":return function(e){var t,r,i;return n(n(n(n(n(n(n(n({"@context":"https://schema.org","@type":"VideoObject",name:e.name,description:e.description},1===(null===(t=e.thumbnail)||void 0===t?void 0:t.length)&&{thumbnailUrl:null===(r=e.thumbnail[0])||void 0===r?void 0:r.src}),(null===(i=e.thumbnail)||void 0===i?void 0:i.length)&&e.thumbnail.length>1&&{thumbnailUrl:e.thumbnail.map((function(e){return null==e?void 0:e.src}))}),{uploadDate:e.uploadDate}),(e.minutes||e.seconds)&&{duration:"PT"+(Number.isNaN(e.minutes)?0:e.minutes)+"M"+(Number.isNaN(e.seconds)?0:e.seconds)+"S"}),e.contentUrl&&{contentUrl:e.contentUrl}),e.embedUrl&&{embedUrl:e.embedUrl}),e.seekToAction&&{potentialAction:{"@type":"SeekToAction",target:e.seekToAction+"={seek_to_second_number}","startOffset-input":"required name=seek_to_second_number"}}),e.publisherName&&{publisher:{"@type":"Organization",name:e.publisherName,logo:{"@type":"ImageObject",url:e.publisherLogoUrl,width:Number.isNaN(e.publisherLogoWidth)?"":e.publisherLogoWidth,height:Number.isNaN(e.publisherLogoHeight)?"":e.publisherLogoHeight}}})}(t);case"website":return function(e){return{"@context":"https://schema.org/","@type":"WebSite",name:e.name,url:e.url,potentialAction:{"@type":"SearchAction",target:e.searchUrl+"{search_term_string}"+e.optionalStringAfterQuery,"query-input":"required name=search_term_string"}}}(t)}},V=function(e){if(!e.meta.schemaOrg)return null;var t=e.meta.schemaOrg,n=t.type,r=t.values;return JSON.stringify(k(n,r))},E=function(e){var t=e.page,n=V(t);return n?d.createElement("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:n}}):null},S=function(e,r,s){return i(void 0,void 0,void 0,(function(){var i,l,u,c,d,p,m,v,f,h,g,y,b,w,P,A,x,C,T,O,N;return a(this,(function(a){switch(a.label){case 0:i=[],a.label=1;case 1:a.trys.push([1,17,18,19]),l=o(e),u=l.next(),a.label=2;case 2:return u.done?[3,16]:(c=u.value,d=n(n({},c),{props:n({},c.props)}),(null==(p=s[c.type])?void 0:p.schema)&&p.schema.getData&&"function"==typeof p.schema.getData&&r?[4,p.schema.getData(r,c.props)]:[3,4]);case 3:m=a.sent(),d.props=n(n({},d.props),m),a.label=4;case 4:if(!((null==p?void 0:p.schema)&&p.schema.repeaterItems&&p.schema.repeaterItems.length>0))return[3,12];a.label=5;case 5:a.trys.push([5,10,11,12]),C=void 0,v=o(p.schema.repeaterItems),f=v.next(),a.label=6;case 6:return f.done?[3,9]:(h=f.value,d.props[h.name]&&d.props[h.name].length>0?(g=d.props,y=h.name,[4,S(d.props[h.name],r,s)]):[3,8]);case 7:g[y]=a.sent(),a.label=8;case 8:return f=v.next(),[3,6];case 9:return[3,12];case 10:return b=a.sent(),C={error:b},[3,12];case 11:try{f&&!f.done&&(T=v.return)&&T.call(v)}finally{if(C)throw C.error}return[7];case 12:return c.isEmbed&&(null===(N=null===(O=c.props)||void 0===O?void 0:O[t.EmbedContent])||void 0===N?void 0:N.content)?(w=c.props[t.EmbedContent],[4,S(c.props[t.EmbedContent].content,c.props[t.EmbedContent],s)]):[3,14];case 13:w.content=a.sent(),a.label=14;case 14:i.push(d),a.label=15;case 15:return u=l.next(),[3,2];case 16:return[3,19];case 17:return P=a.sent(),A={error:P},[3,19];case 18:try{u&&!u.done&&(x=l.return)&&x.call(l)}finally{if(A)throw A.error}return[7];case 19:return[2,i]}}))}))},U=function(e,t){return i(void 0,void 0,void 0,(function(){return a(this,(function(n){return[2,S(e.content,e,t)]}))}))},L=function(e,t,n){return i(void 0,void 0,Promise,(function(){var r,i;return a(this,(function(a){switch(a.label){case 0:return r=null,(null==(i=null==t?void 0:t.find((function(t){return t.name===e.type})))?void 0:i.getExternalData)&&"function"==typeof i.getExternalData?[4,i.getExternalData(e,n)]:[3,2];case 1:return(r=a.sent())&&"object"==typeof r?[2,r]:[2,null];case 2:return[2,null]}}))}))},M=function(o,s,l,u){return void 0===u&&(u=!0),i(void 0,void 0,void 0,(function(){var c,d,p,m,v;return a(this,(function(f){switch(f.label){case 0:return c=u?o.content.filter((function(e){return e.props[t.EmbedProp]})):[],[4,Promise.all(c.map((function(e){return i(void 0,void 0,Promise,(function(){var r,i,o,s,u;return a(this,(function(a){switch(a.label){case 0:r=e.props[t.EmbedProp],i=H(r),a.label=1;case 1:return a.trys.push([1,5,,6]),i&&i.id&&i.language?[4,l(i)]:[3,3];case 2:return s=a.sent(),[3,4];case 3:s=null,a.label=4;case 4:return o=s,[2,n(n({},e),{isEmbed:!0,props:n(n({},e.props),(u={},u[t.EmbedContent]=o,u))})];case 5:return a.sent(),[2,null];case 6:return[2]}}))}))})))];case 1:return d=f.sent(),p=o.content.reduce((function(n,i){if(u&&i.props[t.EmbedProp]){var a=H(i.props[t.EmbedProp]),o=d.find((function(e){var n=H(null==e?void 0:e.props[t.EmbedProp]);return(null==n?void 0:n.id)===(null==a?void 0:a.id)&&(null==n?void 0:n.language)===(null==a?void 0:a.language)}));return o?r(r([],e(n),!1),[o],!1):n}return r(r([],e(n),!1),[i],!1)}),[]),[4,Promise.all(d.map((function(e){return i(void 0,void 0,void 0,(function(){return a(this,(function(n){return e?[2,L(e.props[t.EmbedContent],s)]:[2,null]}))}))})))];case 2:return m=f.sent(),v=m.reduce((function(e,t){return t?n(n({},e),t):e}),{}),[2,{contentWithEmbeds:p,externalDataEmbed:v}]}}))}))},H=function(t){if(!t)return null;var n,r;if("string"==typeof t){var i=t.split("_");if(!Array.isArray(i)||0===i.length)return null;var a=e(i);n=a[0],r=a.slice(1).join("_")}else{if(!t.id||!t.language)return null;n=null==t?void 0:t.id,r=t.language}return{id:n,language:r}},j=function(t,n){return i(void 0,void 0,Promise,(function(){var r,i,o,l,u,c;return a(this,(function(a){switch(a.label){case 0:if(!t)return[2,null];if(r=t&&"string"==typeof t?t.split("_"):null,!Array.isArray(r)||0===r.length)return[2,null];i=e(r),o=i[0],l=i.slice(1),u=l.join("_"),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,n({id:o,language:u})];case 2:return(c=a.sent()).content,[2,s(c,["content"])];case 3:return a.sent(),console.error("Page not found:",o,u),[3,4];case 4:return[2,null]}}))}))},R=function(t,s,l){return i(void 0,void 0,void 0,(function(){var i,u,c,d,p,m,v,f,h,g,y,b,w,P,A,x,C,T,O,N,k,V,E,S,U,L,M,H,_,q,D,I,z,B,W,F;return a(this,(function(a){switch(a.label){case 0:i=[],a.label=1;case 1:a.trys.push([1,30,31,32]),u=o(t),c=u.next(),a.label=2;case 2:if(c.done)return[3,29];if(d=c.value,p=n(n({},d),{props:n({},d.props)}),m=s[d.type],v=null===(F=null==m?void 0:m.schema.sideEditProps)||void 0===F?void 0:F.reduce((function(t,n){var i;if(n.groupName){var a=n.props.filter((function(e){var t;return!!(null===(t=e.relationshipOptions)||void 0===t?void 0:t.embedValues)}));return r(r([],e(t),!1),e(a),!1)}return(null===(i=n.relationshipOptions)||void 0===i?void 0:i.embedValues)?r(r([],e(t),!1),[n],!1):t}),[]),!(v&&v.length>0))return[3,19];a.label=3;case 3:a.trys.push([3,17,18,19]),q=void 0,f=o(v),h=f.next(),a.label=4;case 4:if(h.done)return[3,16];if(g=h.value,y=p.props[g.name],!Array.isArray(y))return[3,13];b=[],a.label=5;case 5:a.trys.push([5,10,11,12]),I=void 0,w=o(y),P=w.next(),a.label=6;case 6:return P.done?[3,9]:(A=P.value,[4,j(A,l)]);case 7:(x=a.sent())&&b.push(x),a.label=8;case 8:return P=w.next(),[3,6];case 9:return[3,12];case 10:return C=a.sent(),I={error:C},[3,12];case 11:try{P&&!P.done&&(z=w.return)&&z.call(w)}finally{if(I)throw I.error}return[7];case 12:return p.props["".concat(g.name,"_embed")]=b,[3,15];case 13:return T=p.props,O="".concat(g.name,"_embed"),[4,j(y,l)];case 14:T[O]=a.sent(),a.label=15;case 15:return h=f.next(),[3,4];case 16:return[3,19];case 17:return N=a.sent(),q={error:N},[3,19];case 18:try{h&&!h.done&&(D=f.return)&&D.call(f)}finally{if(q)throw q.error}return[7];case 19:if(!((null==m?void 0:m.schema)&&m.schema.repeaterItems&&m.schema.repeaterItems.length>0))return[3,27];a.label=20;case 20:a.trys.push([20,25,26,27]),B=void 0,k=o(m.schema.repeaterItems),V=k.next(),a.label=21;case 21:return V.done?[3,24]:(E=V.value,p.props[E.name]&&p.props[E.name].length>0?(S=p.props,U=E.name,[4,R(p.props[E.name],s,l)]):[3,23]);case 22:S[U]=a.sent(),a.label=23;case 23:return V=k.next(),[3,21];case 24:return[3,27];case 25:return L=a.sent(),B={error:L},[3,27];case 26:try{V&&!V.done&&(W=k.return)&&W.call(k)}finally{if(B)throw B.error}return[7];case 27:i.push(p),a.label=28;case 28:return c=u.next(),[3,2];case 29:return[3,32];case 30:return M=a.sent(),H={error:M},[3,32];case 31:try{c&&!c.done&&(_=u.return)&&_.call(u)}finally{if(H)throw H.error}return[7];case 32:return[2,i]}}))}))},_=function(t,i){var a,s,l,u,c,d,p,m=[];try{for(var v=o(t),f=v.next();!f.done;f=v.next()){var h=f.value,g=n(n({},h),{props:n({},h.props)}),y=i[h.type],b=null===(p=null==y?void 0:y.schema.sideEditProps)||void 0===p?void 0:p.reduce((function(t,n){var i;if(n.groupName){var a=n.props.filter((function(e){var t;return!!(null===(t=e.relationshipOptions)||void 0===t?void 0:t.embedValues)}));return r(r([],e(t),!1),e(a),!1)}return(null===(i=n.relationshipOptions)||void 0===i?void 0:i.embedValues)?r(r([],e(t),!1),[n],!1):t}),[]);if(b&&b.length>0)try{for(var w=(l=void 0,o(b)),P=w.next();!P.done;P=w.next()){var A=P.value;delete g.props["".concat(A.name,"_embed")]}}catch(e){l={error:e}}finally{try{P&&!P.done&&(u=w.return)&&u.call(w)}finally{if(l)throw l.error}}if(y.schema.repeaterItems&&y.schema.repeaterItems.length>0)try{for(var x=(c=void 0,o(y.schema.repeaterItems)),C=x.next();!C.done;C=x.next()){var T=C.value;g.props[T.name]&&g.props[T.name].length>0&&(g.props[T.name]=_(g.props[T.name],i))}}catch(e){c={error:e}}finally{try{C&&!C.done&&(d=x.return)&&d.call(x)}finally{if(c)throw c.error}}m.push(g)}}catch(e){a={error:e}}finally{try{f&&!f.done&&(s=v.return)&&s.call(v)}finally{if(a)throw a.error}}return m},q=function(t,s,l){return i(void 0,void 0,void 0,(function(){var i,u,c,d,p,m,v,f,h,g,y,b,w,P,A,x,C,T,O,N,k;return a(this,(function(a){switch(a.label){case 0:if(!t.customValues)return[2,void 0];if(i=n({},t.customValues),u=s.find((function(e){return e.name===t.type})),c=null===(k=null==u?void 0:u.customFields)||void 0===k?void 0:k.reduce((function(t,n){var i;if(n.groupName){var a=n.props.filter((function(e){var t;return!!(null===(t=e.relationshipOptions)||void 0===t?void 0:t.embedValues)}));return r(r([],e(t),!1),e(a),!1)}return(null===(i=n.relationshipOptions)||void 0===i?void 0:i.embedValues)?r(r([],e(t),!1),[n],!1):t}),[]),!(c&&c.length>0))return[3,17];a.label=1;case 1:a.trys.push([1,15,16,17]),d=o(c),p=d.next(),a.label=2;case 2:if(p.done)return[3,14];if(m=p.value,v=t.customValues[m.name],!Array.isArray(v))return[3,11];f=[],a.label=3;case 3:a.trys.push([3,8,9,10]),O=void 0,h=o(v),g=h.next(),a.label=4;case 4:return g.done?[3,7]:(y=g.value,[4,j(y,l)]);case 5:(b=a.sent())&&f.push(b),a.label=6;case 6:return g=h.next(),[3,4];case 7:return[3,10];case 8:return w=a.sent(),O={error:w},[3,10];case 9:try{g&&!g.done&&(N=h.return)&&N.call(h)}finally{if(O)throw O.error}return[7];case 10:return i["".concat(m.name,"_embed")]=f,[3,13];case 11:return P=i,A="".concat(m.name,"_embed"),[4,j(v,l)];case 12:P[A]=a.sent(),a.label=13;case 13:return p=d.next(),[3,2];case 14:return[3,17];case 15:return x=a.sent(),C={error:x},[3,17];case 16:try{p&&!p.done&&(T=d.return)&&T.call(d)}finally{if(C)throw C.error}return[7];case 17:return[2,i]}}))}))},D=function(e,t,n,r){return i(void 0,void 0,void 0,(function(){var i,o;return a(this,(function(a){switch(a.label){case 0:return[4,R(e.content,n,r)];case 1:return i=a.sent(),[4,q(e,t,r)];case 2:return o=a.sent(),[2,{contentWithRelationshipValues:i,customValuesWithRelationshipValues:o}]}}))}))},I=function(t,i,a){var s=function(t,i){var a,s,l;if(t.customValues){var u=n({},t.customValues),c=i.find((function(e){return e.name===t.type})),d=null===(l=null==c?void 0:c.customFields)||void 0===l?void 0:l.reduce((function(t,n){var i;if(n.groupName){var a=n.props.filter((function(e){var t;return!!(null===(t=e.relationshipOptions)||void 0===t?void 0:t.embedValues)}));return r(r([],e(t),!1),e(a),!1)}return(null===(i=n.relationshipOptions)||void 0===i?void 0:i.embedValues)?r(r([],e(t),!1),[n],!1):t}),[]);if(d&&d.length>0)try{for(var p=o(d),m=p.next();!m.done;m=p.next()){var v=m.value;delete u["".concat(v.name,"_embed")]}}catch(e){a={error:e}}finally{try{m&&!m.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}return u}}(t,i),l=_(t.content,a);return n(n({},t),{customValues:s,content:l})},z=function(t){if(!t)return null;if(y)return y;var i,a=null==(i=l(t)?u(t):r([],e(t),!1))?void 0:i.reduce((function(e,t){var r;return n(n({},e),((r={})[t.schema.name]=t,r))}),{});return y=a,a},B=function(t){return t.reduce((function(t,n){var i=[];for(var a in n.props)Array.isArray(n.props[a])&&n.props[a].length>0&&n.props[a][0].props?i.push.apply(i,r([],e(B(n.props[a])),!1)):i.push(b.serialize(n.props[a]));return r(r([],e(t),!1),e(i),!1)}),[])};export{P as E,E as J,b as P,p as a,w as b,A as c,x as d,B as e,V as f,v as g,O as h,T as i,U as j,D as k,M as l,L as m,z as n,q as o,m as p,I as r};
2
- //# sourceMappingURL=react-bricks-e89708db.esm.js.map
1
+ import{a as e,t,b as n,_ as r,e as a,f as i,d as o,c as s,k as l,l as u}from"./react-bricks-1649b93a.esm.js";import{Md5 as c}from"ts-md5";import d from"react";var p=function(e,t){var n=e;if(/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\/.+\..{1,4}/.test(e)){var r=e.match(/(\/[^\/]+)\..{1,4}$/);(null==r?void 0:r.length)&&(null==r?void 0:r.length)>1&&(n=e.replace(r[1],""))}if(!t)return n;var a=n.lastIndexOf(".");return n.substring(0,a)+"/"+t+n.substring(a)},m=function(t,n){return t?n?t.split(",").map((function(t){var r=e(t.trim().split(" "),2),a=r[0],i=r[1];return a&&i?"".concat(p(a,n)," ").concat(i):p(t,n)})).join(", "):t:""},v=function(e){var t=e.lastIndexOf(".");return e.substring(t)},f=function(e){return function(e){var t,n;if(!1===g(e))return!1;if("function"!=typeof(t=e.constructor))return!1;if(!1===g(n=t.prototype))return!1;if(!1===n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(e)&&"string"==typeof e.text};function h(e){return f(e)?e.text:e.children&&Array.isArray(e.children)?e.children.map(h).join(""):""}function g(e){return!0==(null!=(t=e)&&"object"==typeof t&&!1===Array.isArray(t))&&"[object Object]"===Object.prototype.toString.call(e);var t}var y,b={serialize:function(e){return Array.isArray(e)&&e.length>0?e.map(h).join("\n"):""},serializeLight:function(e){return Array.isArray(e)&&1===e.length&&(f(e[0])||e[0].children&&Array.isArray(e[0].children)&&1===e[0].children.length&&e[0].children[0].text&&!e[0].children[0].bold&&!e[0].children[0].italic&&!e[0].children[0].code&&!e[0].children[0].highlight&&!e[0].children[0].link)?e.map(h).join("\n"):e},deserialize:function(e){return e.split("\n").map((function(e){return{type:"paragraph",children:[{text:e}]}}))},isText:f,isSlateContent:function(e){return!!(e&&Array.isArray(e)&&e.length>0&&e[0]&&"paragraph"===e[0].type&&e[0].children)}},w=function(e,t,n){return!(n&&n.find((function(t){return t===e}))||t&&!t.find((function(t){return t===e})))},P={id:"",type:"",slug:"",name:"",meta:{},author:{id:"",firstName:"",lastName:"",email:""},lastEditedBy:{date:"",user:{id:"",firstName:"",lastName:"",company:"",email:""}},status:t.PageStatus.Draft,editStatus:t.EditStatus.Merged,isLocked:!1,content:[],tags:[],createdAt:"",language:"en",translations:[]},x=function(e,t,r){if(!e||!e.type||!e.content)return P;var a=t.find((function(t){return t.name===e.type}));if(!a)return e;var i=A(r,e.content,a.allowedBlockTypes,a.excludedBlockTypes);return n(n({},e),{content:i.blocks,invalidBlocksTypes:i.invalidBlocksTypes})},A=function(t,a,i,o){return a.reduce((function(a,s){var l=t[s.type];if(!l||!w(s.type,i,o))return n(n({},a),{invalidBlocksTypes:r(r([],e(a.invalidBlocksTypes),!1),[s.type],!1)});var u=l.schema.sideEditProps?l.schema.sideEditProps.reduce((function(t,n){if(n.groupName||"BOOLEAN"!==n.type||t.push(n),n.groupName){var a=n.props.filter((function(e){return"BOOLEAN"===e.type}));t=r(r([],e(t),!1),e(a),!1)}return t}),[]):[],c=u.reduce((function(e,t){var r,a=s.props[t.name];return n(n({},e),((r={})[t.name]=!!a,r))}),{}),d=n(n({},s),{props:n(n({},s.props),c)});return Object.keys(d.props).forEach((function(e){var n,r,a,i,o,s,u;d.props[e]&&(null===(r=null===(n=d.props[e])||void 0===n?void 0:n.document)||void 0===r?void 0:r.data)&&(null===(i=null===(a=d.props[e])||void 0===a?void 0:a.document)||void 0===i?void 0:i.nodes)&&"document"===(null===(s=null===(o=d.props[e])||void 0===o?void 0:o.document)||void 0===s?void 0:s.object)||(null===(u=l.schema.repeaterItems)||void 0===u?void 0:u.find((function(t){return t.name===e})))&&(d.props[e]=A(t,d.props[e]).blocks)})),n(n({},a),{blocks:r(r([],e(a.blocks),!1),[d],!1)})}),{blocks:[],invalidBlocksTypes:[]})},C=function(e){var t=atob(e).split("|");if(3!==t.length)return null;var n=t[0],r=t[1],a=t[2],i=(new Date).getTime();if(Math.abs(i-parseInt(r,10))>3e5)return null;var o="".concat(n,"|").concat(r,"|").concat("r@sPX2").concat("q*7*&g".replace(String.fromCharCode(113),String.fromCharCode(81)));return c.hashStr(o)!==a?null:n},T=function(e){return"41192756"===C(e)},O=function(e){var t=C(e);return"77048934"===t||"91035396"===t},N=function(e){var t,r,a,i,o,s,l;return n(n(n(n(n({"@context":"https://schema.org/","@type":"Thing",name:e.name},1===(null===(t=e.alternateName)||void 0===t?void 0:t.length)&&{alternateName:e.alternateName[0].name}),(null===(r=e.alternateName)||void 0===r?void 0:r.length)&&(null===(a=e.alternateName)||void 0===a?void 0:a.length)>1&&{alternateName:e.alternateName.map((function(e){return e.name}))}),1===(null===(i=e.sameAs)||void 0===i?void 0:i.length)&&{sameAs:e.sameAs[0].url}),(null===(o=e.sameAs)||void 0===o?void 0:o.length)&&(null===(s=e.sameAs)||void 0===s?void 0:s.length)>1&&{sameAs:e.sameAs.map((function(e){return e.url}))}),{url:e.url,description:e.description,image:null===(l=e.image)||void 0===l?void 0:l.src})},k=function(e,t){switch(e){case"article":return function(e){var t,r,a,i,o;return n(n(n(n(n(n(n({"@context":"https://schema.org","@type":"Article"},e.url&&{mainEntityOfPage:{"@type":"WebPage","@id":e.url}}),e.description&&{description:e.description}),{headline:e.headline}),1===(null===(t=e.images)||void 0===t?void 0:t.length)&&{image:{"@type":"ImageObject",url:null===(r=e.images[0])||void 0===r?void 0:r.src,width:null===(a=e.images[0])||void 0===a?void 0:a.width,height:null===(i=e.images[0])||void 0===i?void 0:i.height}}),(null===(o=e.images)||void 0===o?void 0:o.length)&&e.images.length>1&&{image:e.images.map((function(e){return{"@type":"ImageObject",url:null==e?void 0:e.src,width:null==e?void 0:e.width,height:null==e?void 0:e.height}}))}),{author:n({"@type":e.authorType,name:e.authorName},e.authorUrl&&{url:e.authorUrl}),publisher:{"@type":"Organization",name:e.publisherName,logo:{"@type":"ImageObject",url:e.publisherLogoUrl,width:e.publisherLogoWidth,height:e.publisherLogoHeight}},datePublished:e.datePublished}),e.dateModified&&{dateModified:e.dateModified})}(t);case"breadcrumb":return function(e){var t;return{"@context":"https://schema.org/","@type":"BreadcrumbList",itemListElement:null===(t=e.itemListElement)||void 0===t?void 0:t.map((function(e,t){return{"@type":"ListItem",position:t+1,name:e.name,item:e.item}}))}}(t);case"event":return function(e){var t,r,a,i,o,s=void 0,l=void 0,u=void 0;switch(e.status){case"cancelled":s="Cancelled";break;case"moved-online":s="MovedOnline";break;case"postponed":s="Postponed";break;case"scheduled":s="Scheduled"}switch(e.attendanceMode){case"mixed":l="Mixed";break;case"online":l="Online";break;case"offline":l="Offline"}switch(e.performerType){case"dance-group":u="DanceGroup";break;case"music-group":u="MusicGroup";break;case"performing-group":u="PerformingGroup";break;case"person":u="Person";break;case"theater-group":u="TheaterGroup"}var c=function(e){switch(e){case"in-stock":return"InStock";case"sold-out":return"SoldOut";case"pre-order":return"PreOrder";default:return""}},d=null===(t=e.timeZone)||void 0===t?void 0:t.split(" | "),p=d&&d.length>0&&d[1];return n(n(n(n(n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org/","@type":"Event"},e.name&&{name:e.name}),e.description&&{description:e.description}),e.imageUrl&&{image:e.imageUrl}),e.startDate&&{startDate:""!==e.startTime&&e.startTime?e.startDate+"T"+e.startTime+p:e.startDate}),e.endDate&&{endDate:""!==e.endTime&&e.endTime?e.endDate+"T"+e.endTime+p:e.endDate}),e.status&&{eventStatus:s&&"https://schema.org/Event"+s}),e.attendanceMode&&{eventAttendanceMode:l&&"https://schema.org/"+l+"EventAttendanceMode"}),("online"===e.attendanceMode||"mixed"===e.attendanceMode)&&""!==e.streamUrl&&e.streamUrl&&{streamUrl:e.streamUrl}),"online"===e.attendanceMode&&{location:{"@type":"VirtualLocation",url:e.streamUrl}}),"offline"===e.attendanceMode&&{location:{"@type":"Place",name:e.venueName,address:{"@type":"PostalAddress",streetAddress:e.street,addressLocality:e.city,postalCode:e.zipCode,addressCountry:e.countryCode,addressRegion:e.regionCode}}}),"mixed"===e.attendanceMode&&{location:[{"@type":"VirtualLocation",url:e.streamUrl},{"@type":"Place",name:e.venueName,address:{"@type":"PostalAddress",streetAddress:e.street,addressLocality:e.city,postalCode:e.zipCode,addressCountry:e.countryCode,addressRegion:e.regionCode}}]}),e.performerType&&{performer:{"@type":u,name:e.performerName}}),1===(null===(r=e.offers)||void 0===r?void 0:r.length)&&{offers:{"@type":"Offer",name:e.offers[0].name,price:e.offers[0].price,priceCurrency:e.offers[0].priceCurrency,validFrom:e.offers[0].validFrom,url:e.offers[0].url,availability:""!==e.offers[0].availability?"https://schema.org/"+c(e.offers[0].availability):e.offers[0].availability}}),(null===(a=e.offers)||void 0===a?void 0:a.length)&&(null===(i=e.offers)||void 0===i?void 0:i.length)>1&&{offers:null===(o=e.offers)||void 0===o?void 0:o.map((function(e){return{"@type":"Offer",name:e.name,price:e.price,priceCurrency:e.priceCurrency,validFrom:e.validFrom,url:e.url,availability:""!==e.availability?"https://schema.org/"+c(e.availability):e.availability}}))})}(t);case"faq":return function(e){var t,r,a,i;return n(n({"@context":"https://schema.org","@type":"FAQPage"},(null===(t=e.faq)||void 0===t?void 0:t.length)&&(null===(r=e.faq)||void 0===r?void 0:r.length)<2&&{mainEntity:{"@type":"Question",name:e.faq[0].question,acceptedAnswer:{"@type":"Answer",text:e.faq[0].answer}}}),(null===(a=e.faq)||void 0===a?void 0:a.length)&&(null===(i=e.faq)||void 0===i?void 0:i.length)>=2&&{mainEntity:e.faq.map((function(e){return{"@type":"Question",name:e.question,acceptedAnswer:{"@type":"Answer",text:e.answer}}}))})}(t);case"how-to":return function(e){var t,r,a,i,o,s;return n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org/","@type":"HowTo",name:e.name},e.description&&{description:e.description}),e.totalTime&&{totalTime:"PT"+e.totalTime+"M"}),(""!==e.currency||!Number.isNaN(e.estimatedCost))&&{estimatedCost:{"@type":"MonetaryAmount",currency:e.currency,value:Number.isNaN(e.estimatedCost)?"":e.estimatedCost}}),e.imageUrl&&{image:e.imageUrl}),1===(null===(t=e.supplies)||void 0===t?void 0:t.length)&&{supply:{"@type":"HowToSupply",name:e.supplies[0].supply}}),(null===(r=e.supplies)||void 0===r?void 0:r.length)&&e.supplies.length>1&&{supply:e.supplies.map((function(e){return{"@type":"HowToSupply",name:e.supply}}))}),1===(null===(a=e.tools)||void 0===a?void 0:a.length)&&{tool:{"@type":"HowToTool",name:e.tools[0].tool}}),(null===(i=e.tools)||void 0===i?void 0:i.length)&&e.tools.length>1&&{tool:e.tools.map((function(e){return{"@type":"HowToTool",name:e.tool}}))}),1===(null===(o=e.steps)||void 0===o?void 0:o.length)&&{step:n(n(n({"@type":"HowToStep",text:e.steps[0].instructions},e.steps[0].imageUrl&&{image:e.steps[0].imageUrl}),e.steps[0].name&&{name:e.steps[0].name}),e.steps[0].url&&{url:e.steps[0].url})}),(null===(s=e.steps)||void 0===s?void 0:s.length)&&e.steps.length>1&&{step:e.steps.map((function(e){return n(n(n({"@type":"HowToStep",text:e.instructions},e.imageUrl&&{image:e.imageUrl}),e.name&&{name:e.name}),e.url&&{url:e.url})}))})}(t);case"job-posting":return function(e){var t;return n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org/","@type":"JobPosting",title:e.title,description:e.description},e.identifier&&{identifier:{"@type":"PropertyValue",name:e.company,value:e.identifier}}),{hiringOrganization:n(n({"@type":"Organization",name:e.company},e.companyUrl&&{sameAs:e.companyUrl}),e.companyLogo&&{logo:null===(t=e.companyLogo)||void 0===t?void 0:t.src})}),e.industry&&{industry:e.industry}),{employmentType:e.employmentType}),e.workHours&&{workHours:e.workHours}),{datePosted:e.datePosted,validThrough:e.validThrough}),!e.remoteJob&&{jobLocation:{"@type":"Place",address:{"@type":"PostalAddress",streetAddress:e.street,addressLocality:e.city,postalCode:e.zipCode,addressCountry:e.countryCode,addressRegion:e.regionCode}}}),e.remoteJob&&{applicantLocationRequirements:{"@type":"Country",name:e.countryCode},jobLocationType:"TELECOMMUTE"}),e.salaryMinValue&&{baseSalary:{"@type":"MonetaryAmount",currency:e.currency,value:n(n(n({"@type":"QuantitativeValue"},!e.salaryMaxValue&&{value:e.salaryMinValue}),e.salaryMaxValue&&{minValue:e.salaryMinValue,maxValue:e.salaryMaxValue}),{unitText:e.unitText})}}),{responsibilities:e.responsibilities,skills:e.skills,qualifications:e.qualifications,educationRequirements:e.educationRequirements,experienceRequirements:e.experienceRequirements})}(t);case"local-business":return function(e){var t,r,a,i,o,s,l,u=null===(t=e.paymentsAccepted)||void 0===t?void 0:t.filter((function(e){return!1!==e})),c=e.openingHours&&e.openingHours[0].dayOfWeek.filter((function(e){return!1!==e}));return n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org","@type":e.businessType,name:e.name,image:null===(r=e.image)||void 0===r?void 0:r.src,"@id":e.id,url:e.url,telephone:e.phone},e.priceRange&&{priceRange:e.priceRange}),{address:n({"@type":"PostalAddress",streetAddress:e.street,addressLocality:e.city,postalCode:e.zipCode,addressCountry:e.countryCode},e.regionCode&&{addressRegion:e.regionCode})}),(e.latitude||e.longitude)&&{geo:{"@type":"GeoCoordinates",latitude:e.latitude,longitude:e.longitude}}),1===(null==u?void 0:u.length)&&{paymentAccepted:u[0]}),(null==u?void 0:u.length)&&u.length>1&&{paymentAccepted:u}),e.open247&&{openingHoursSpecification:{"@type":"OpeningHoursSpecification",dayOfWeek:["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],opens:"00:00",closes:"23:59"}}),!e.open247&&1===(null===(a=e.openingHours)||void 0===a?void 0:a.length)&&{openingHoursSpecification:{"@type":"OpeningHoursSpecification",dayOfWeek:1===(null==c?void 0:c.length)?c[0]:c,opens:e.openingHours[0].opens,closes:e.openingHours[0].closes}}),!e.open247&&(null===(i=e.openingHours)||void 0===i?void 0:i.length)&&(null===(o=e.openingHours)||void 0===o?void 0:o.length)>1&&{openingHoursSpecification:e.openingHours.map((function(e){var t=e.dayOfWeek.filter((function(e){return!1!==e}));return{"@type":"OpeningHoursSpecification",dayOfWeek:1===t.length?t[0]:t,opens:e.opens,closes:e.closes}}))}),1===(null===(s=e.socialProfiles)||void 0===s?void 0:s.length)&&{sameAs:e.socialProfiles[0].url}),(null===(l=e.socialProfiles)||void 0===l?void 0:l.length)&&e.socialProfiles.length>1&&{sameAs:e.socialProfiles.map((function(e){return e.url}))})}(t);case"organization":return function(e){var t,r,a,i,o,s,l,u,c=e.contacts&&(null===(t=e.contacts[0])||void 0===t?void 0:t.areas.filter((function(e){return 0!=!!e&&""!==e}))),d=e.contacts&&(null===(r=e.contacts[0])||void 0===r?void 0:r.languages.filter((function(e){return 0!=!!e&&""!==e}))),p=e.contacts&&(null===(a=e.contacts[0])||void 0===a?void 0:a.options.filter((function(e){return 0!=!!e&&""!==e})));return n(n(n(n(n(n({"@context":"https://schema.org","@type":e.type,name:e.name},e.alternateName&&{alternateName:e.alternateName}),{url:e.url,logo:null===(i=e.logo)||void 0===i?void 0:i.src}),1===(null===(o=e.contacts)||void 0===o?void 0:o.length)&&{contactPoint:n(n({"@type":"ContactPoint",telephone:e.contacts[0].phone},e.contacts[0].type&&{contactType:e.contacts[0].type}),{areaServed:0===(null==c?void 0:c.length)?"":1===(null==c?void 0:c.length)?c[0]:c,availableLanguage:0===(null==d?void 0:d.length)?"":1===(null==d?void 0:d.length)?d[0]:d,contactOption:0===(null==p?void 0:p.length)?"":1===(null==p?void 0:p.length)?p[0]:p})}),(null===(s=e.contacts)||void 0===s?void 0:s.length)&&e.contacts.length>1&&{contactPoint:e.contacts.map((function(t){var r=e.contacts&&t.areas.filter((function(e){return 0!=!!e&&""!==e})),a=e.contacts&&t.languages.filter((function(e){return 0!=!!e&&""!==e})),i=e.contacts&&t.options.filter((function(e){return 0!=!!e&&""!==e}));return n(n({"@type":"ContactPoint",telephone:t.phone},t.type&&{contactType:t.type}),{areaServed:0===(null==r?void 0:r.length)?"":1===(null==r?void 0:r.length)?r[0]:r,availableLanguage:0===(null==a?void 0:a.length)?"":1===(null==a?void 0:a.length)?a[0]:a,contactOption:0===(null==i?void 0:i.length)?"":1===(null==i?void 0:i.length)?i[0]:i})}))}),1===(null===(l=e.socials)||void 0===l?void 0:l.length)&&{sameAs:e.socials[0].url}),(null===(u=e.socials)||void 0===u?void 0:u.length)&&e.socials.length>1&&{sameAs:e.socials.map((function(e){return e.url}))})}(t);case"person":return function(e){var t,r,a;return n(n(n(n({"@context":"https://schema.org/","@type":"Person",name:e.name,url:e.url,image:null===(t=e.image)||void 0===t?void 0:t.src},1===(null===(r=e.socialProfiles)||void 0===r?void 0:r.length)&&{sameAs:e.socialProfiles[0].url}),(null===(a=e.socialProfiles)||void 0===a?void 0:a.length)&&e.socialProfiles.length>1&&{sameAs:e.socialProfiles.map((function(e){return e.url}))}),e.jobTitle&&{jobTitle:e.jobTitle}),e.company&&{worksFor:{"@type":"Organization",name:e.company}})}(t);case"product":return function(e){var t,r,a;return n(n(n(n(n(n(n(n(n(n(n(n({"@context":"https://schema.org/","@type":"Product",name:e.name,image:null===(t=e.image)||void 0===t?void 0:t.src},e.description&&{description:e.description}),e.brand&&{brand:{"@type":"Brand",name:e.brand}}),e.sku&&{sku:e.sku}),e.gtin8&&{gtin8:e.gtin8}),e.gtin13&&{gtin13:e.gtin13}),e.gtin14&&{gtin14:e.gtin14}),e.mpn&&{mpn:e.mpn}),e.ratingValue&&{aggregateRating:n(n({"@type":"AggregateRating",ratingValue:e.ratingValue,bestRating:e.bestRating},e.worstRating&&{worstRating:e.worstRating}),e.ratingCount&&{ratingCount:e.ratingCount})}),1===(null===(r=e.reviews)||void 0===r?void 0:r.length)&&{review:n(n(n(n(n({"@type":"Review",reviewBody:e.reviews[0].reviewBody},e.reviews[0].name&&{name:e.reviews[0].name}),e.reviews[0].datePublished&&{datePublished:e.reviews[0].datePublished}),{author:{"@type":"Person",name:e.reviews[0].author}}),e.reviews[0].publisher&&{publisher:{"@type":"Organization",name:e.reviews[0].publisher}}),e.reviews[0].ratingValue&&{reviewRating:{"@type":"Rating",ratingValue:e.reviews[0].ratingValue}})}),(null===(a=e.reviews)||void 0===a?void 0:a.length)&&e.reviews.length>1&&{review:e.reviews.map((function(e){return n(n(n(n(n({"@type":"Review",reviewBody:e.reviewBody},e.name&&{name:e.name}),e.datePublished&&{datePublished:e.datePublished}),{author:{"@type":"Person",name:e.author}}),e.publisher&&{publisher:{"@type":"Organization",name:e.publisher}}),e.ratingValue&&{reviewRating:{"@type":"Rating",ratingValue:e.ratingValue}})}))}),"offer"===e.offerType&&{offers:n(n(n({"@type":"Offer",url:e.url,priceCurrency:e.priceCurrency,price:Number.isNaN(e.price)?"":e.price},e.priceValidUntil&&{priceValidUntil:e.priceValidUntil}),"not-specified"!==e.availability&&{availability:"https://schema.org/"+e.availability}),"not-specified"!==e.itemCondition&&{itemCondition:"https://schema.org/"+e.itemCondition+"Condition"})}),"aggregate-offer"===e.offerType&&{offers:n(n(n({"@type":"AggregateOffer",url:e.url,priceCurrency:e.priceCurrency},e.lowPrice&&{lowPrice:e.lowPrice}),e.highPrice&&{highPrice:e.highPrice}),e.offerCount&&{offerCount:e.offerCount})})}(t);case"thing":default:return N(t);case"video":return function(e){var t,r,a;return n(n(n(n(n(n(n(n({"@context":"https://schema.org","@type":"VideoObject",name:e.name,description:e.description},1===(null===(t=e.thumbnail)||void 0===t?void 0:t.length)&&{thumbnailUrl:null===(r=e.thumbnail[0])||void 0===r?void 0:r.src}),(null===(a=e.thumbnail)||void 0===a?void 0:a.length)&&e.thumbnail.length>1&&{thumbnailUrl:e.thumbnail.map((function(e){return null==e?void 0:e.src}))}),{uploadDate:e.uploadDate}),(e.minutes||e.seconds)&&{duration:"PT"+(Number.isNaN(e.minutes)?0:e.minutes)+"M"+(Number.isNaN(e.seconds)?0:e.seconds)+"S"}),e.contentUrl&&{contentUrl:e.contentUrl}),e.embedUrl&&{embedUrl:e.embedUrl}),e.seekToAction&&{potentialAction:{"@type":"SeekToAction",target:e.seekToAction+"={seek_to_second_number}","startOffset-input":"required name=seek_to_second_number"}}),e.publisherName&&{publisher:{"@type":"Organization",name:e.publisherName,logo:{"@type":"ImageObject",url:e.publisherLogoUrl,width:Number.isNaN(e.publisherLogoWidth)?"":e.publisherLogoWidth,height:Number.isNaN(e.publisherLogoHeight)?"":e.publisherLogoHeight}}})}(t);case"website":return function(e){return{"@context":"https://schema.org/","@type":"WebSite",name:e.name,url:e.url,potentialAction:{"@type":"SearchAction",target:e.searchUrl+"{search_term_string}"+e.optionalStringAfterQuery,"query-input":"required name=search_term_string"}}}(t)}},E=function(e){if(!e.meta.schemaOrg)return null;var t=e.meta.schemaOrg,n=t.type,r=t.values;return JSON.stringify(k(n,r))},V=function(e){var t=e.page,n=E(t);return n?d.createElement("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:n}}):null},S=function(e,r,s,l){return a(void 0,void 0,void 0,(function(){var a,u,c,d,p,m,v,f,h,g,y,b,w,P,x,A,C,T,O,N,k;return i(this,(function(i){switch(i.label){case 0:a=[],i.label=1;case 1:i.trys.push([1,19,20,21]),u=o(e),c=u.next(),i.label=2;case 2:return c.done?[3,18]:(d=c.value,p=n(n({},d),{props:n({},d.props)}),(null==(m=s[d.type])?void 0:m.schema)&&m.schema.getExternalData&&"function"==typeof m.schema.getExternalData&&r?[4,m.schema.getExternalData(r,d.props,l)]:[3,4]);case 3:return v=i.sent(),p.props=n(n({},p.props),v),[3,6];case 4:return(null==m?void 0:m.schema)&&m.schema.getData&&"function"==typeof m.schema.getData&&r?[4,m.schema.getData(r,d.props,l)]:[3,6];case 5:v=i.sent(),p.props=n(n({},p.props),v),i.label=6;case 6:if(!((null==m?void 0:m.schema)&&m.schema.repeaterItems&&m.schema.repeaterItems.length>0))return[3,14];i.label=7;case 7:i.trys.push([7,12,13,14]),T=void 0,f=o(m.schema.repeaterItems),h=f.next(),i.label=8;case 8:return h.done?[3,11]:(g=h.value,p.props[g.name]&&p.props[g.name].length>0?(y=p.props,b=g.name,[4,S(p.props[g.name],r,s)]):[3,10]);case 9:y[b]=i.sent(),i.label=10;case 10:return h=f.next(),[3,8];case 11:return[3,14];case 12:return w=i.sent(),T={error:w},[3,14];case 13:try{h&&!h.done&&(O=f.return)&&O.call(f)}finally{if(T)throw T.error}return[7];case 14:return d.isEmbed&&(null===(k=null===(N=d.props)||void 0===N?void 0:N[t.EmbedContent])||void 0===k?void 0:k.content)?(P=d.props[t.EmbedContent],[4,S(d.props[t.EmbedContent].content,d.props[t.EmbedContent],s)]):[3,16];case 15:P.content=i.sent(),i.label=16;case 16:a.push(p),i.label=17;case 17:return c=u.next(),[3,2];case 18:return[3,21];case 19:return x=i.sent(),A={error:x},[3,21];case 20:try{c&&!c.done&&(C=u.return)&&C.call(u)}finally{if(A)throw A.error}return[7];case 21:return[2,a]}}))}))},U=function(e,t,n){return a(void 0,void 0,void 0,(function(){return i(this,(function(r){return[2,S(e.content,e,t,n)]}))}))},L=function(e,t,n){return a(void 0,void 0,Promise,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return r=null,(null==(a=null==t?void 0:t.find((function(t){return t.name===e.type})))?void 0:a.getExternalData)&&"function"==typeof a.getExternalData?[4,a.getExternalData(e,n)]:[3,2];case 1:return(r=i.sent())&&"object"==typeof r?[2,r]:[2,null];case 2:return[2,null]}}))}))},M=function(o,s,l,u){return void 0===u&&(u=!0),a(void 0,void 0,void 0,(function(){var c,d,p,m,v;return i(this,(function(f){switch(f.label){case 0:return c=u?o.content.filter((function(e){return e.props[t.EmbedProp]})):[],[4,Promise.all(c.map((function(e){return a(void 0,void 0,Promise,(function(){var r,a,o,s,u;return i(this,(function(i){switch(i.label){case 0:r=e.props[t.EmbedProp],a=H(r),i.label=1;case 1:return i.trys.push([1,5,,6]),a&&a.id&&a.language?[4,l(a)]:[3,3];case 2:return s=i.sent(),[3,4];case 3:s=null,i.label=4;case 4:return o=s,[2,n(n({},e),{isEmbed:!0,props:n(n({},e.props),(u={},u[t.EmbedContent]=o,u))})];case 5:return i.sent(),[2,null];case 6:return[2]}}))}))})))];case 1:return d=f.sent(),p=o.content.reduce((function(n,a){if(u&&a.props[t.EmbedProp]){var i=H(a.props[t.EmbedProp]),o=d.find((function(e){var n=H(null==e?void 0:e.props[t.EmbedProp]);return(null==n?void 0:n.id)===(null==i?void 0:i.id)&&(null==n?void 0:n.language)===(null==i?void 0:i.language)}));return o?r(r([],e(n),!1),[o],!1):n}return r(r([],e(n),!1),[a],!1)}),[]),[4,Promise.all(d.map((function(e){return a(void 0,void 0,void 0,(function(){return i(this,(function(n){return e?[2,L(e.props[t.EmbedContent],s)]:[2,null]}))}))})))];case 2:return m=f.sent(),v=m.reduce((function(e,t){return t?n(n({},e),t):e}),{}),[2,{contentWithEmbeds:p,externalDataEmbed:v}]}}))}))},H=function(t){if(!t)return null;var n,r;if("string"==typeof t){var a=t.split("_");if(!Array.isArray(a)||0===a.length)return null;var i=e(a);n=i[0],r=i.slice(1).join("_")}else{if(!t.id||!t.language)return null;n=null==t?void 0:t.id,r=t.language}return{id:n,language:r}},j=function(t,n){return a(void 0,void 0,Promise,(function(){var r,a,o,l,u,c;return i(this,(function(i){switch(i.label){case 0:if(!t)return[2,null];if(r=t&&"string"==typeof t?t.split("_"):null,!Array.isArray(r)||0===r.length)return[2,null];a=e(r),o=a[0],l=a.slice(1),u=l.join("_"),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n({id:o,language:u})];case 2:return(c=i.sent()).content,[2,s(c,["content"])];case 3:return i.sent(),console.error("Page not found:",o,u),[3,4];case 4:return[2,null]}}))}))},R=function(t,s,l){return a(void 0,void 0,void 0,(function(){var a,u,c,d,p,m,v,f,h,g,y,b,w,P,x,A,C,T,O,N,k,E,V,S,U,L,M,H,D,_,q,I,z,B,W,F;return i(this,(function(i){switch(i.label){case 0:a=[],i.label=1;case 1:i.trys.push([1,30,31,32]),u=o(t),c=u.next(),i.label=2;case 2:if(c.done)return[3,29];if(d=c.value,p=n(n({},d),{props:n({},d.props)}),m=s[d.type],v=null===(F=null==m?void 0:m.schema.sideEditProps)||void 0===F?void 0:F.reduce((function(t,n){var a;if(n.groupName){var i=n.props.filter((function(e){var t;return!!(null===(t=e.relationshipOptions)||void 0===t?void 0:t.embedValues)}));return r(r([],e(t),!1),e(i),!1)}return(null===(a=n.relationshipOptions)||void 0===a?void 0:a.embedValues)?r(r([],e(t),!1),[n],!1):t}),[]),!(v&&v.length>0))return[3,19];i.label=3;case 3:i.trys.push([3,17,18,19]),_=void 0,f=o(v),h=f.next(),i.label=4;case 4:if(h.done)return[3,16];if(g=h.value,y=p.props[g.name],!Array.isArray(y))return[3,13];b=[],i.label=5;case 5:i.trys.push([5,10,11,12]),I=void 0,w=o(y),P=w.next(),i.label=6;case 6:return P.done?[3,9]:(x=P.value,[4,j(x,l)]);case 7:(A=i.sent())&&b.push(A),i.label=8;case 8:return P=w.next(),[3,6];case 9:return[3,12];case 10:return C=i.sent(),I={error:C},[3,12];case 11:try{P&&!P.done&&(z=w.return)&&z.call(w)}finally{if(I)throw I.error}return[7];case 12:return p.props["".concat(g.name,"_embed")]=b,[3,15];case 13:return T=p.props,O="".concat(g.name,"_embed"),[4,j(y,l)];case 14:T[O]=i.sent(),i.label=15;case 15:return h=f.next(),[3,4];case 16:return[3,19];case 17:return N=i.sent(),_={error:N},[3,19];case 18:try{h&&!h.done&&(q=f.return)&&q.call(f)}finally{if(_)throw _.error}return[7];case 19:if(!((null==m?void 0:m.schema)&&m.schema.repeaterItems&&m.schema.repeaterItems.length>0))return[3,27];i.label=20;case 20:i.trys.push([20,25,26,27]),B=void 0,k=o(m.schema.repeaterItems),E=k.next(),i.label=21;case 21:return E.done?[3,24]:(V=E.value,p.props[V.name]&&p.props[V.name].length>0?(S=p.props,U=V.name,[4,R(p.props[V.name],s,l)]):[3,23]);case 22:S[U]=i.sent(),i.label=23;case 23:return E=k.next(),[3,21];case 24:return[3,27];case 25:return L=i.sent(),B={error:L},[3,27];case 26:try{E&&!E.done&&(W=k.return)&&W.call(k)}finally{if(B)throw B.error}return[7];case 27:a.push(p),i.label=28;case 28:return c=u.next(),[3,2];case 29:return[3,32];case 30:return M=i.sent(),H={error:M},[3,32];case 31:try{c&&!c.done&&(D=u.return)&&D.call(u)}finally{if(H)throw H.error}return[7];case 32:return[2,a]}}))}))},D=function(t,a){var i,s,l,u,c,d,p,m=[];try{for(var v=o(t),f=v.next();!f.done;f=v.next()){var h=f.value,g=n(n({},h),{props:n({},h.props)}),y=a[h.type],b=null===(p=null==y?void 0:y.schema.sideEditProps)||void 0===p?void 0:p.reduce((function(t,n){var a;if(n.groupName){var i=n.props.filter((function(e){var t;return!!(null===(t=e.relationshipOptions)||void 0===t?void 0:t.embedValues)}));return r(r([],e(t),!1),e(i),!1)}return(null===(a=n.relationshipOptions)||void 0===a?void 0:a.embedValues)?r(r([],e(t),!1),[n],!1):t}),[]);if(b&&b.length>0)try{for(var w=(l=void 0,o(b)),P=w.next();!P.done;P=w.next()){var x=P.value;delete g.props["".concat(x.name,"_embed")]}}catch(e){l={error:e}}finally{try{P&&!P.done&&(u=w.return)&&u.call(w)}finally{if(l)throw l.error}}if(y.schema.repeaterItems&&y.schema.repeaterItems.length>0)try{for(var A=(c=void 0,o(y.schema.repeaterItems)),C=A.next();!C.done;C=A.next()){var T=C.value;g.props[T.name]&&g.props[T.name].length>0&&(g.props[T.name]=D(g.props[T.name],a))}}catch(e){c={error:e}}finally{try{C&&!C.done&&(d=A.return)&&d.call(A)}finally{if(c)throw c.error}}m.push(g)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}return m},_=function(t,s,l){return a(void 0,void 0,void 0,(function(){var a,u,c,d,p,m,v,f,h,g,y,b,w,P,x,A,C,T,O,N,k;return i(this,(function(i){switch(i.label){case 0:if(!t.customValues)return[2,void 0];if(a=n({},t.customValues),u=s.find((function(e){return e.name===t.type})),c=null===(k=null==u?void 0:u.customFields)||void 0===k?void 0:k.reduce((function(t,n){var a;if(n.groupName){var i=n.props.filter((function(e){var t;return!!(null===(t=e.relationshipOptions)||void 0===t?void 0:t.embedValues)}));return r(r([],e(t),!1),e(i),!1)}return(null===(a=n.relationshipOptions)||void 0===a?void 0:a.embedValues)?r(r([],e(t),!1),[n],!1):t}),[]),!(c&&c.length>0))return[3,17];i.label=1;case 1:i.trys.push([1,15,16,17]),d=o(c),p=d.next(),i.label=2;case 2:if(p.done)return[3,14];if(m=p.value,v=t.customValues[m.name],!Array.isArray(v))return[3,11];f=[],i.label=3;case 3:i.trys.push([3,8,9,10]),O=void 0,h=o(v),g=h.next(),i.label=4;case 4:return g.done?[3,7]:(y=g.value,[4,j(y,l)]);case 5:(b=i.sent())&&f.push(b),i.label=6;case 6:return g=h.next(),[3,4];case 7:return[3,10];case 8:return w=i.sent(),O={error:w},[3,10];case 9:try{g&&!g.done&&(N=h.return)&&N.call(h)}finally{if(O)throw O.error}return[7];case 10:return a["".concat(m.name,"_embed")]=f,[3,13];case 11:return P=a,x="".concat(m.name,"_embed"),[4,j(v,l)];case 12:P[x]=i.sent(),i.label=13;case 13:return p=d.next(),[3,2];case 14:return[3,17];case 15:return A=i.sent(),C={error:A},[3,17];case 16:try{p&&!p.done&&(T=d.return)&&T.call(d)}finally{if(C)throw C.error}return[7];case 17:return[2,a]}}))}))},q=function(e,t,n,r){return a(void 0,void 0,void 0,(function(){var a,o;return i(this,(function(i){switch(i.label){case 0:return[4,R(e.content,n,r)];case 1:return a=i.sent(),[4,_(e,t,r)];case 2:return o=i.sent(),[2,{contentWithRelationshipValues:a,customValuesWithRelationshipValues:o}]}}))}))},I=function(t,a,i){var s=function(t,a){var i,s,l;if(t.customValues){var u=n({},t.customValues),c=a.find((function(e){return e.name===t.type})),d=null===(l=null==c?void 0:c.customFields)||void 0===l?void 0:l.reduce((function(t,n){var a;if(n.groupName){var i=n.props.filter((function(e){var t;return!!(null===(t=e.relationshipOptions)||void 0===t?void 0:t.embedValues)}));return r(r([],e(t),!1),e(i),!1)}return(null===(a=n.relationshipOptions)||void 0===a?void 0:a.embedValues)?r(r([],e(t),!1),[n],!1):t}),[]);if(d&&d.length>0)try{for(var p=o(d),m=p.next();!m.done;m=p.next()){var v=m.value;delete u["".concat(v.name,"_embed")]}}catch(e){i={error:e}}finally{try{m&&!m.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}return u}}(t,a),l=D(t.content,i);return n(n({},t),{customValues:s,content:l})},z=function(t){if(!t)return null;if(y)return y;var a,i=null==(a=l(t)?u(t):r([],e(t),!1))?void 0:a.reduce((function(e,t){var r;return n(n({},e),((r={})[t.schema.name]=t,r))}),{});return y=i,i},B=function(t){return t.reduce((function(t,n){var a=[];for(var i in n.props)Array.isArray(n.props[i])&&n.props[i].length>0&&n.props[i][0].props?a.push.apply(a,r([],e(B(n.props[i])),!1)):a.push(b.serialize(n.props[i]));return r(r([],e(t),!1),e(a),!1)}),[])};export{P as E,V as J,b as P,p as a,w as b,x as c,A as d,B as e,E as f,v as g,O as h,T as i,U as j,q as k,M as l,L as m,z as n,_ as o,m as p,I as r};
2
+ //# sourceMappingURL=react-bricks-babdd300.esm.js.map
package/react-bricks.d.ts CHANGED
@@ -396,7 +396,8 @@ declare namespace types {
396
396
  newItemMenuOpen?: boolean;
397
397
  groupByRepeater?: boolean;
398
398
  mapExternalDataToProps?: (externalData: Props, brickProps?: T) => Partial<T>;
399
- getData?: (page: Page, brickProps?: T) => Promise<Partial<T>>;
399
+ getData?: (page: Page, brickProps?: T, args?: any) => Promise<Partial<T>>;
400
+ getExternalData?: (page: Page, brickProps?: T, args?: any) => Promise<Partial<T>>;
400
401
  playgroundLinkUrl?: string;
401
402
  playgroundLinkLabel?: string;
402
403
  theme?: string;